Shutdown NI Linux Real-Time Devices via Software

Updated Nov 17, 2020

Environment

Operating System

  • LabVIEW Real-Time (NI Linux Real-Time)

Other

NI Linux Real-Time targets

How can I shutdown NI Linux Real-Time devices via software commands?

There are several ways to shut down your device.
  • You can use the Call Library Function node to call into a standard installed library glibc on your Linux Real-Time device. The version of this library may change in different LabVIEW releases so be sure to point to the libc-x.xx.so that is on your device.  An example VI of how to structure your shutdown VI is attached and will look like:

The command 4321FEDC is to shutdown the device.

If you are using a cRIO, you can check the libc-x.xx.so file that is on your device, by accessing files > lib64libc-x.xx.so as shown below. 

To see how to access files on your device, refer to How Can I Transfer Files over FTP to a Remote System? /sbin/shutdown -P -h now

More information about the options used in this command can be found here.

Additional Information

Because of the flash-based hardware on NI Linux Real-Time devices, it is highly recommended to shutdown the device before loss of battery power. You can refer to Under the Hood of NI Linux Real-Time  for more information on how to access the Linux Real-Time command line via LabVIEW.