Chapter4 LabVIEWRT Programming
RTSeries DAQ Device User Manual 4-4 ni.com
Real-Time Programming
This section provides an overview of real-time programming using your
RTSeries DA Q hardware.

Running a VI at Time-Critical Priority without

the RT Development System

Instead of using TCP/IP or VI Server to communicate data to a host PC
application,you can maximize real-time VI performance on RT Series
DAQ devices by peeking and poking data to shared memory. Peeking, or
reading directly from shared memory, and poking, or writing directly to
shared memory, are common programming techniquesand d o not require
the VI to yield significantprocessor time. You can create deterministic
control loops that run in excess of 1 kHz when you peek and poke data
to shared memory.Refer to Chapter 3, Software Overview,ofthe
LabVIEW Real-Time User Manual for more information about TCP/IP and
VIServ er.
Note WindowsNT does not support peeking and poking to shared memory on the PC.
However,because the shared memory is located on the RT Series DAQdevice, Windows
NT does support peeking and poking to this shared memory.

Use of Shared Memory

Usingpeek and poke VIs to write directly to shared memory offers the best
performance.Because you can access shared memory both f rom a host
LabVIEW application andfrom an embedded LabVIEW RT VI, you can
writea control loop program that does not have to slow d own significantly
oryield to commu nicate with the host system. Many such examples are in
the examples\RT\RT Control (7030).llb library.

Configuration Issues

The RT Development System downloads the RT Engine to the RT Series
DAQ hardware and sends configuration information when you reset the
hardware.If you make any change to the device configuration information
fromMA X, you mustreset the RT Series DAQ hardware for the changes
to take effect.
LabVIEW RTalso supports virtual channels, SCXI, and DAQ accessories
on the RTSeries DAQ hardware, but their descriptions download to the
devicewhen the device is reset. If you add a new channel or change the
parameterso f ach annel using MAX, you must reset the RTSeries DAQ