You can host NPSVs on either the host PC or the RT target:
RT target: multiple PC hosts can the NPSVs on the same RT target, and the NPSVs have high uptime while the RT is running
PC target: reduces CPU and memory overhead on the RT target
NPSVs have persistent state, i.e., the most recent values written to the variables by any VIs will remain, even when the VIs that wrote to them stop running. Guard against “stale values” by initializing them before use.
Network communication latency introduces non-determinism into process loops
IMPORTANT: Data transfers through the network are subject to latency (unpredictable delays). Enable the ‘RT FIFO’ option when the NPSV is placed inside an RT timed (deterministic) loop.
Connect your Academic RIO Device to your PC using USBLAN, Ethernet, or Wi-Fi. NOTE: Not all Academic RIO Devices have Ethernet and Wi-Fi connectivity options.
If using the NI myRIO 1950 or NI RIO Control Module start with the NI myRIO 1900 Archive.
Different IP address: Right-click on the "NI myRIO 1900" Device, choose "Properties", and then enter the new IP address
Different device:
Right-click on the top of the project hierarchy, select "New Targets and Devices", keep the "Existing target or device" option, and then find and select your particular device
Select all of the components under the "NI myRIO 1900" device: click the first one and then shift+click the last one
Drag the selected components to the new device
Right-click the "NI myRIO 1900" device and select "Remove from project"
Run the “RT Main” VI:
This is a “headless” VI – once started, the PC host monitors and controls the VI through the network connection
The VI contains one non-deterministic loop and one deterministic loop
Polls the “LED0” NPSV every 100ms and sets the states of LEDs 0 and 3
Writes the “Button” NPSV according to the state of the Academic RIO Device onboard pushbutton
Reads the onboard accelerometer Z-axis every 10ms in the deterministic loop, and writes the “Accelerometer-Z” NPSV
Polls the “Stop” NPSV in the non-deterministic loop and copies this state to the “Local Stop” SPSV which in turn is polled within the deterministic loop
Run the “PC Main” VI:
Writes the “LED0” NPSV every 10ms according to the LED0 front-panel button
Reads the “Button” NPSV and displays its state
Reads the “Accelerometer-Z” NPSV and displays its value as a chart; tip and rotate the Device to see changes
Stop the “PC Main” VI to stop the “RT Main” VI, too