Solution
Whenever you create a LabVIEW project, a .aliases file is generated containing the name and IP address of any targets in the project. This file may look something like this:
[My Target Machine]
My Target Machine = "192.168.0.5"
[My Computer]
My Computer = "192.168.0.6"
When you build a VI into an executable application, an additional .aliases file is generated in the same directory as the built exe. You can alter this file when moving the application to a different host machine so that the application knows which RT target it needs to search for the shared variables. To do so:
- Browse to the local copy of the .aliases file for your application. It will be in the directory specified in the Destination directory property under the Information category of the build specification.
- Open the .aliases file in a text editor, such as Notepad.
- Change the names and IP addresses of the host and remote target to match the new system. The new host should now be able to find the shared variables hosted on the RT target. You should have something like this:
When a Real-Time startup application is built, a similar .aliases file is generated and deployed to the RT target. This file can be found at the following location on NI Linux RT targets: /home/lvuser/natinst/bin
If the shared variables are hosted on the PC, the .aliases file on the target must be modified to reference the right host PC. Use a file transfer method, to transfer the startup.aliases file from the directory specified above to the host PC. You can then edit the file with the correct information and transfer it back to the RT target.
After making the above modifications, ensure that you can establish communication from the host machine to the RT target and from the RT target to the host machine (bidirectional communication). You can test this by running the ping command on the devices as explained below:
- For Windows PCs, open a Command Prompt window and type ping followed by the RT controller's IP address.
- For NI Linux RT targets, access the shell and type ping followed by the host PC's IP address.