You can use high-level software protocols to communicate between VIs running on the RT target and VIs running on other targets, such as the host computer. Each protocol has its advantages and disadvantages. The following list classifies the different communication methods:
Use network-published shared variables to share data between VIs running on different targets across a network. Right-click an RT target in the Project Explorer window and select New»Variable from the shortcut menu to open the Shared Variable Properties dialog box, which you can use to create a network-published shared variable.
The Real-Time Module adds a real-time FIFO—first in, first out buffer—to the shared variable. By enabling the real-time FIFO of a shared variable, you can deterministically share data without affecting the determinism of VIs running on an RT target. From the Real-Time FIFO page of the Shared Variable Properties dialog box, place a checkmark in the Enable Real-Time FIFO checkbox to enable the real-time FIFO for a shared variable.
![]() |
Note Network-published shared variables share data from VIs on an RT target without affecting the determinism of the VIs. However, the transfer of the data across the network is not deterministic. You can use time-triggered shared variables with RT Series PXI or desktop PC targets to transfer data across a network deterministically. |
TCP is an industry-standard protocol for communicating over networks. VIs running on the host computer can communicate with RT target VIs using the TCP VI and functions. However, TCP is non-deterministic, and using TCP communication inside a time-critical VI can affect the determinism of the VI.
The Real-Time Module extends the capabilities of the existing TCP functions to enable communication with networked RT Series devices and to allow communication across shared memory with RT Series plug-in devices.
RTX Use RTRTX::0 as the address of an RT target when attempting to open a TCP connection with the target using the LabVIEW TCP functions.
UDP is a network transmission protocol for transferring data between two locations on a network. UDP is not a connection-based protocol, so the transmitting and receiving computers do not establish a network connection. Because there is no network connection, there is little overhead when transmitting data. However, UDP is non-deterministic, and using UDP communication inside a time-critical VI can affect the determinism of the VI.
When using the UDP VI and functions to send data, the receiving computer must have a read port open before the transmitting computer sends the data. Use the UDP Open function to open a write port and specify the IP address and port of the receiving computer. The data transfer occurs in byte streams of varying lengths called datagrams. Datagrams arrive at the listening port, and the receiving computer buffers and then reads the data.
You can transfer data bidirectionally with UDP. With bidirectional data transfers, both computers specify a read and write port and transmit data back and forth using the specified ports. You can use bidirectional UDP data transfers to send and receive data from a VI on the RT target.
UDP has the ability to perform fast data transmissions deterministically. However, UDP cannot guarantee that all datagrams arrive at the receiving computer. Because UDP is not connection-based, you cannot verify the arrival of datagrams. You must ensure that network congestion does not affect the transmission of datagrams. Also, you must read data stored in the data buffer of the receiving computer fast enough to prevent overflow and loss of data.
RTX You must use RTRTX::0 as the address of the RT target when attempting to write data to the target using the LabVIEW UDP functions.
Use the VI Server to monitor and control VIs on an RT target. Using VI Server technology, a LabVIEW VI can invoke RT target VIs remotely. The LabVIEW VI can pass parameter values to and from the RT target VIs, creating a distributed application.
A host VI can invoke only VIs in memory on the RT target. The host VI cannot dynamically download LabVIEW VIs to the RT target for use with the VI Server.
One advantage to communicating using the VI Server is that the VI Server allows you to access the functionality of TCP while working within the framework of LabVIEW. However, the VI Server is non-deterministic and using VI Server communication can affect the determinism of the VI.
RTX You must use RTRTX::0 as the computer name of the RT target when attempting to open an application reference using the VI Server.
Use the SMTP Email VIs to send data from a VI running on the RT target to VIs running on another computer. The SMTP VIs can send electronic mail, including attached data and files, using the Simple Mail Transfer Protocol (SMTP). You cannot use the SMTP VIs to receive information.
SMTP is non-deterministic, and using SMTP communication inside a time-critical VI can affect the determinism of the VI.
VIs running on the RTX subsystem can communicate with each other through the shared memory mechanism of the operating system using the Real-Time Shared Memory VIs. Use the Real-Time Shared Memory VIs to read and write to shared memory locations of the RTX subsystem.
RTX Use RTRTX::0 as the device name of the RT target when communicating with the target using the Real-Time Shared Memory VIs.
Serial communication is the transmission of data between two locations through the serial ports. The Serial VIs and functions provide serial communication support in LabVIEW for communication between RT targets with serial devices and serial instruments or computers that have a serial connection. Serial communication is ideal when transfer data rates are low or for transmitting data over long distances. You must add the NI-Serial RT software on the RT target from MAX. Refer to the Measurement & Automation Explorer Help for information about adding software on an RT target.
Serial communication is non-deterministic, and using serial communication inside a time-critical VI can affect the determinism of the VI.
Controller Area Network (CAN) is a deterministic, multi-drop communication bus standardized as ISO 11898. Using CAN, you can transfer up to 8 data bytes per frame at a rate of up to 1 Mbit per second. You can network multiple RT systems using NI-CAN interface cards and NI-CAN driver software. You cannot use CAN communication with RT Series plug-in devices. You must add the NI-CAN RT software on the RT target from MAX. Refer to the Measurement & Automation Explorer Help for information about adding software on an RT target.
Refer to the NI-CAN Hardware and Software Manual for information about using NI-CAN hardware and software with LabVIEW.
Infrared Data Association (IrDA) is a communication standard that specifies a way to transfer data using a wireless infrared connection. IrDA devices communicate using infrared LEDs. You can use IrDA devices to send data in and out of VIs running on an RT target using the LabVIEW IrDA functions. RT Series controllers support Extended Systems XTNDAccess IrDA PC Adapters and ACTiSYS IR-220L+ IrDA Com-Port Serial Adapters connected to a built-in controller serial port. You must install NI-IrDA RT on the RT target from MAX and then configure the target for IrDA communication.
IrDA is non-deterministic, and using IrDA communication inside a time-critical VI can affect the determinism of the VI.