Under the Hood of NI Linux Real-Time (2024)

HomeShopNI Linux TechnologyUnder the Hood of NI Linux Real-Time

Updated Aug 7, 2023

Overview

The NI LabVIEW Real-Time Module supports the NI Linux Real-Time OS, available on select NI hardware. In this article, learn about specific new features and advanced topics to get the most out of NI Linux Real-Time for your application.

Contents

  • Linux Shell Support
  • File Transfer and File Paths
  • Programmatic System Access
  • Access the Linux Ecosystem
  • Advanced Real-Time Performance
  • Meet Requirements While Relying on the Familiar

Linux Shell Support

The NI Linux Real-Time OS offers full Linux shell support so you can perform complex administrative tasks to manage real-time targets more easily. To access the shell, you need a terminal client. If you are using Windows 7 and later, PuTTY is a popular and free client at PuTTY: A Free Telnet/SSH Client.

In addition to a terminal client, you must select the Enable Secure Shell Server (sshd) option on the real-time target running the NI Linux Real-Time OS. You can use either NI Measurement & Automation Explorer (MAX) or the Web-Based Configuration and Monitoring Interface (see Figures 1 and 2). For security purposes, changing the default password on the admin account is highly recommended. You can change the password through the Web-Based Configuration and Monitoring Interface. To log in to the Linux shell over SSH, you can then use the admin user name along with the password you have configured to get root access—the password is blank if not configured. You can create additional users through the Web-Based Configuration and Monitoring Interface. These users can also log in over SSH, but will not have root access.

Under the Hood of NI Linux Real-Time (1)

Figure 1. You can find the Enable Secure Shell Server (sshd) option on the System Settings tab for the real-time target in Measurement and Automation Explorer. You must select this option before you can access the real-time target running NI Linux Real-Time.

Under the Hood of NI Linux Real-Time (2)

Figure 2. You can also find the Enable Secure Shell Server (sshd) option through the Web-Based Configuration and Monitoring Interface for the real-time target. You must select this option before you can access the real-time target running NI Linux Real-Time.

File Transfer and File Paths

Starting with LabVIEW 2013, all NI real-time targets support WebDAV file transfer. WebDAV is an industry-standard protocol that is built on top of HTTP. Popular applications such as Dropbox use it and you can easily secure it to transfer files containing sensitive information. WebDAV is the default file transfer mechanism for real-time targets running NI Linux Real-Time. Learn more at Using WebDAV to Transfer Files to Your RT Target.

Unlike older devices based on VxWorks and Phar Lap, NI Linux Real-Time targets do not have an FTP server installed by default. If you require FTP support to keep applications backward compatible, you can install a legacy unsecure FTP server through MAX. Learn more about FTP support for NI Linux Real-Time at How do I Use FTP with my NI Linux Real-Time Target. NI Linux Real-Time targets also support SFTP functionality through SSH as well in case WebDAV is unsuitable for a given application.

Additionally, NI Linux Real-Time introduces a few important file path differences from existing real-time targets and from Windows. To prevent errors in file paths when migrating code or managing data logs on a target that supports the new Linux-based RTOS, refer to this document.

Programmatic System Access

The LabVIEW Real-Time Module supports the System Exec VI on NI Linux Real-Time targets. The System Exec VI on NI Linux Real-Time targets provides access to the Linux command line so you can programmatically manage the NI Linux Real-Time OS and interact with other programs running on the target directly from your LabVIEW Real-Time application.

In addition to the System Exec VI, the Call Library Function Node is also supported on NI Linux Real-Time targets. With the Call Library Function Node, you can more easily integrate external C/C++ code with your LabVIEW Real-Time applications and create LabVIEW wrappers for any C APIs provided by other programs installed to and running on an NI Linux Real-Time target.

Under the Hood of NI Linux Real-Time (3)Under the Hood of NI Linux Real-Time (4)

Figure 3. The System Exec VI and Call Library Function Node are supported on NI Linux Real-Time targets. You can interact with both the NI Linux Real-Time OS and other programs seamlessly from your LabVIEW Real-Time application.

Access the Linux Ecosystem

Targets that run NI Linux Real-Time can greatly benefit from the vast ecosystem of IP available for Linux. To install, manage, and make use of the ecosystem, rely on opkg, the package manager provided on NI Linux Real-Time. To learn more about opkg, visit OPKG Package Manager.

Beyond giving you the ability to more easily integrate C/C++ code with the System Exec VI and the Call Library Function Node, NI Linux Real-Time targets allow you to use code from the Linux ecosystem, reuse in-house code, and develop, deploy, and debugC/C++ codeusing your IDE of choice. To learn more about your IDE options,refer toBuilding C/C++ Applications for NI Linux Real-Time.

Access the Linux real-time offline download to get driver support for your Linux system.

Learn more about NI Hardware and Software Operating System Compatibility.

Advanced Real-Time Performance

The new NI Linux Real-Time uses a real-time scheduler similar to the one on current real-time targets to handle the time-critical code scheduling and a completely fair scheduler (CFS) to handle all noncritical code scheduling. Current real-time targets with dedicated RTOSs rely solely on a real-time scheduler to manage both time-critical tasks as well as lower priority system tasks. The CFS in NI Linux Real-Time offers improved performance as lower priority tasks are more efficiently scheduled. To learn more about CFS, visit Inside the Linux 2.6 Completely Fair Scheduler.

Beyond the change in scheduler, you should also be aware of differences in multicore support on NI Linux Real-Time as all NI embedded hardware devices which support this new RTOS are multicore. With respect to multicore support, it’s especially important to follow programming best practices and avoid running a time critical loop on a processor core at 100 percent core utilization. This is because each core in multicore NI Linux Real-Time systems needs some amount of time for OS maintenance/overhead functions, without which system performance can be severely affected. To avoid this performance degradation, ensure that time critical loops allow for the CPU to sleep on the order of 10 milliseconds per 10 seconds of operation to allow for overhead processing.

It’s also important to note that performance degradation can occur in both time critical and system tasks on multicore systems running NI Linux Real-Time if serially dependent tasks are allowed to run in parallel across processor cores. This is because of the inefficiency introduced in communicating information between the serially dependent tasks running simultaneously on different processor cores. To avoid any such performance degradation, follow the LabVIEW Real-Time programming best practice of segregating time-critical code and system tasks to different processor cores. You can accomplish this by setting a processor core to only handle time-critical functions, and specify the processor core to be used by any Timed Loop or Timed Sequence structure as illustrated in Figure 4. You can learn more about the best practices in LabVIEW Real-Time for optimizing on multicore systems at Configuring Settings of a Timed Structure.

Under the Hood of NI Linux Real-Time (5)

Figure 4. There are two methods to assigning processor affinity using the Timed Loop structure in LabVIEW Real-Time: (1) set the processor either by double-clicking on the Timed Loop structure to bring up the configuration dialog or (2) wire a value directly to the node on the left of the structure.

As is recommended with all system upgrades, you should re-validate your application after migrating to an NI Linux Real-Time based target as there may be improvements or degradations in the performance of individual functions which may affect your application's ability to meet all system requirements. In particular, memory allocations on Linux based real-time targets can have a greater impact on jitter.

Meet Requirements While Relying on the Familiar

LabVIEW support for the new NI Linux Real-Time offers you a number of benefits to more easily and quickly meet your embedded application requirements today, while still relying on the familiar LabVIEW development environment.

Join in on the discussion at the NI Linux Real-Time Community

Linux is the registered trademark of Linus Torvalds in the U.S. and other countries.

I'm an enthusiast with a deep understanding of NI Linux Real-Time technology and related concepts. Let's delve into the key components of the article "Under the Hood of NI Linux Real-Time" to provide comprehensive insights.

Linux Shell Support: NI Linux Real-Time OS provides full Linux shell support, enabling users to perform complex administrative tasks for managing real-time targets more efficiently. Access to the shell requires a terminal client, such as PuTTY on Windows 7 and later. The article emphasizes the importance of enabling Secure Shell Server (sshd) on the real-time target for secure access. Changing the default password on the admin account is recommended for security, and additional users can be created through the Web-Based Configuration and Monitoring Interface.

File Transfer and File Paths: Starting with LabVIEW 2013, NI real-time targets support WebDAV file transfer, an industry-standard protocol built on HTTP. While FTP is not installed by default, a legacy unsecure FTP server can be installed through NI Measurement & Automation Explorer (MAX). The article suggests using SFTP through SSH as an alternative. NI Linux Real-Time introduces differences in file paths compared to older devices, and it provides guidance to prevent errors when migrating code or managing data logs.

Programmatic System Access: The LabVIEW Real-Time Module supports the System Exec VI on NI Linux Real-Time targets, allowing programmatic access to the Linux command line. Additionally, the Call Library Function Node is supported for integrating external C/C++ code with LabVIEW Real-Time applications. These features enable users to manage the NI Linux Real-Time OS and interact with other programs running on the target programmatically.

Access the Linux Ecosystem: NI Linux Real-Time targets can benefit from the Linux ecosystem by using opkg, the package manager provided on NI Linux Real-Time. This allows users to install, manage, and leverage the vast IP available for Linux. The article highlights the integration of C/C++ code with System Exec VI and Call Library Function Node, allowing the use of code from the Linux ecosystem and the development, deployment, and debugging of C/C++ code.

Advanced Real-Time Performance: NI Linux Real-Time uses a real-time scheduler similar to current real-time targets for time-critical code scheduling and a Completely Fair Scheduler (CFS) for noncritical code scheduling. The CFS in NI Linux Real-Time offers improved performance for lower priority tasks. The article discusses differences in multicore support and emphasizes best practices to avoid performance degradation, especially regarding time-critical loops and serially dependent tasks.

Meet Requirements While Relying on the Familiar: LabVIEW support for NI Linux Real-Time provides benefits for meeting embedded application requirements while relying on the familiar LabVIEW development environment. The article encourages users to join the discussion at the NI Linux Real-Time Community.

In summary, the article provides a detailed overview of NI Linux Real-Time, covering shell support, file transfer, programmatic system access, ecosystem integration, real-time performance, and the compatibility with the LabVIEW development environment.

Under the Hood of NI Linux Real-Time (2024)
Top Articles
Latest Posts
Article information

Author: Geoffrey Lueilwitz

Last Updated:

Views: 5905

Rating: 5 / 5 (60 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Geoffrey Lueilwitz

Birthday: 1997-03-23

Address: 74183 Thomas Course, Port Micheal, OK 55446-1529

Phone: +13408645881558

Job: Global Representative

Hobby: Sailing, Vehicle restoration, Rowing, Ghost hunting, Scrapbooking, Rugby, Board sports

Introduction: My name is Geoffrey Lueilwitz, I am a zealous, encouraging, sparkling, enchanting, graceful, faithful, nice person who loves writing and wants to share my knowledge and understanding with you.