EPICS Server Not Publishing Variables in NI Linux RT PXIe System

Updated Apr 3, 2023

Reported In

Hardware

  • PXIe-8880

Software

  • LabVIEW
  • LabVIEW Real-Time Module

Operating System

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

Issue Details

I have configured an EPICS I/O Server under my PXIe RT system by following the steps on this article Interactively Configuring EPICS I/O Servers. The first time I run the program on the RT side, the variables are published correctly and I can read them on the Client side, but when I software reboot the target and run the RT Main VI again, the variables are not published anymore and cannot be accessed from the Client.

I was able to confirm that the variables from the Server are not being published by checking the NI Distributed System Manager. When I attempt to drill down the Server side variables in the NI Distributed System Manager, no variables show up.

Solution

This issue is an identified bug for EPICS Servers running under PXIe Real-Time systems.

After an EPICS Server has been successfully set up for the first time in a PXIe RT system, and the target is restarted, the service running in NI Linux RT might fail to start properly when the RT Main program runs again. The current identified workaround is to add a delay to the daemon in charge of starting the process in NI Linux RT.

Please follow these steps to solve the issue:
  1. Use the SFTP program of your preference (e.g. winSCP, FileZilla, etc...) to access your target's file directory from your Host computer. If you are unsure on how to do this, please check this article for instructions: Tools Available for File Transfer/Access on NI Linux Real-Time Targets
  2. After you are able to connect to the target through the SFTP application and access its file directory from the host computer, please do the following:
    1. Navigate to /usr/local/natinst/etc/init.d/
    2. Open the tagsrv script file. This script file runs during the initialization of NI Linux RT and loads the NI Variable Engine process during boot.
    3. Edit the file and include  a sleep 60 in the first line under the startdaemon()function as shown below:
      • daemonedit.jpg
    4. After you edit the file, save it and close it.
    5. Confirm that the changes were applied to the file.
    6. Reboot your target and run your Main VI again.
The sleep function will cause the service to have a delayed start on the target, which ensures it starts correctly next time the target is rebooted.
 

Additional Information

If you reformat the target, the above file will go back to its original configuration, and you will need to edit the file again.