RIO Developer Essentials Guide for Academia
RT PC guide
RT/host inter-target communication
Transfer data, commands, and status between the RT target and a host system.
- Inter-target communication refers to data exchanges between a target (FPGA or RT) and a host computer (RT or desktop PC):
- FPGA/RT communication: RT serves as host to the FPGA target
- RT/PC communication: PC serves as host to the RT target
- Four methods are available for the RT target:
- Front panel communication
- Network-published shared variables (
tagTransfer only the current (most recent) data value between two process loops or between two targets
- Network streams (
streamingTransfer every data value through a first-in first-out (FIFO) queue
messageTransfer every value of intermittent data with low latency.
- Standard protocols (
TCPTransmission Control Protocol, a connection-based means to send and receive data packets with guaranteed reliability
UDPUser Datagram Protocol, a connectionless protocol based on sending data packets known as datagrams, a word play on “data” and “telegrams”
HTTPHyperText Transport Protocol, the basis of the “world wide web”
WebDAVWeb Distributed Authoring and Versioning, an Internet standard mechanism for editing and managing files between remote systems.
Front panel communication
Network-published shared variables
- Use a network-published shared variable (NPSV) just as you would a global variable; the only difference is that a NPSV has network scope, i.e., is accessible by multiple network-connected devices
- Especially useful when you need multiple host PCs to monitor a single RT target
- Because this is tag-based (latest value) communication, rapid changes of a variable in one process can be missed in the other process
- Ensure that control signals remain active long enough for the other process to detect them, or devise a hand-shaking scheme
- Suitable for small, frequent data transfers where relatively low throughput rate is acceptable; for example, the host could:
- adjust RT configuration parameters
- read RT status or a single data measurement
- initiate an RT process
- Relatively low setup overhead per call, but relatively high CPU usage per call
NOTE: 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.
- Use a network stream when every data point must be transferred
- Use cases include:
- Streaming (message) data communication with host
- Transferring data to the host for logging to a file
- Sending data to host computer for memory-intensive processing and analysis
- Consists of a writer and reader endpoint
- Lossless, unidirectional, one-to-one communication channel
- Supports any LabVIEW data type, but most efficient with numeric scalars, Booleans, and 1-D arrays of same
Standard Internet protocols
For more information
- Using the LabVIEW Shared Variable (http://www.ni.com/white-paper/4679/en)
Introduces the network-published shared variables and discusses features and performance.
- Understanding Shared Variable Technology (http://zone.ni.com/reference/en-XX/help/371361M-01/lvconcepts/ni_psp)
Describes the Shared Variable Engine (SVE) and NI Publish-Subscribe Protocol (NI-PSP) as the foundation of network-published shared variables.
- Lossless Communication with Network Streams: Components, Architecture, and Performance (http://www.ni.com/white-paper/12267/en/)
An introduction to network streams, features, and performance.
- Using the Right Networking Protocol (http://www.ni.com/white-paper/12079/en)
Discusses the three most-common communication models -- command or message-based, process data, and streaming/buffered -- and the available networking protocols that are best suited to each model: TCP, UDP, network-published shared variables, network streams, and web services.