Real-time programming, Use of shared memory, Configuration issues – National Instruments RT Series User Manual

Page 25: Real-time programming -4, Development system -4, Use of shared memory -4 configuration issues -4

Advertising
background image

Chapter 4

LabVIEW RT Programming

RT Series DAQ Device User Manual

4-4

ni.com

Real-Time Programming

This section provides an overview of real-time programming using your
RT Series DAQ 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 techniques and do not require
the VI to yield significant processor 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, of the
LabVIEW Real-Time User Manual for more information about TCP/IP and
VI Server.

Note

Windows NT does not support peeking and poking to shared memory on the PC.

However, because the shared memory is located on the RT Series DAQ device, Windows
NT does support peeking and poking to this shared memory.

Use of Shared Memory

Using peek and poke VIs to write directly to shared memory offers the best
performance. Because you can access shared memory both from a host
LabVIEW application and from an embedded LabVIEW RT VI, you can
write a control loop program that does not have to slow down significantly
or yield to communicate 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
from MAX, you must reset the RT Series DAQ hardware for the changes
to take effect.

LabVIEW RT also supports virtual channels, SCXI, and DAQ accessories
on the RT Series DAQ hardware, but their descriptions download to the
device when the device is reset. If you add a new channel or change the
parameters of a channel using MAX, you must reset the RT Series DAQ

Advertising