Useful Tools¶
When configuring a PXI from scratch, there are several tools and shortcuts that could be implemented to simplify routine procedures or debugging these are:
Script for copying all the required configuration files onto a fresh installed PXI from an old one¶
The script is called CopyFromOldPxi.sh and is meant to be executed from the PXI we want to configure.
This script
requires the IP of the PXI to copy from as an input:
./CopyFromOldPxi.sh 139.229.171.26
Adding an alias to read the log messages the rtexe app logs during boot¶
SSH into the PXI, using the admin user
Open the
.bashrcfile withvi->$ vi .bashrcAdd the following line to the admin user
.bashrcfile.alias labviewmessages="cat /var/log/messages | grep LabVIEW_Custom"
Save the file and exit
Reload the
.bashrc->$ source .bashrc
Loading the rtexe onto the target PXI¶
Download the built version
Extract the
*.zipfileCopy the contents of the
startuporbinfolders into the/c/ni-rt/startup/folder from the target PXI. Example:$ cd C:\Builds\MainAxesPXI\MainAxisControl\c\ni-rt\ $ ls startup $ scp -r startup/* admin@<target IP or hostname>:/c/ni-rt/startup/ (a list of copied files appear)
For builds with the
rtexeinside abinfolder the command from the example changes toscp -r bin/* admin@<target IP or hostname>:/c/ni-rt/startup/
Making sure the PXI will boot from the installed rtexe¶
For the PXI to boot from the provided rtexe built app, there is a configuration setting from the NI real time environment
that must be set. This setting is located inside /etc/natinst/share/lvrt.conf for NI Linux RT targets. Here the following
sections must be set:
RTTarget.ApplicationPath=/c/ni-rt/startup/startup.rtexeRTTarget.LaunchAppAtBoot=True