Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Tutorial
NI Supported: Yes
Publish Date: Sep 6, 2006

Communicating with Shared Memory on LabVIEW Real-Time Series Devices

7 ratings | 2.86 out of 5
Print
The computer into which the LabVIEW Real-Time Series DAQ device is installed is called the host computer. The LabVIEW Real-Time Series DAQ device (PCI/PXI 7030) communicates to the host computer in which it resides through shared memory on the 7030 processor device. Both the host computer and the embedded processor have access to the shared memory. The memory is allocated for various tasks. For example, the LabVIEW Real-Time development environment on the host, uses part of the shared memory for downloading software to the device. In fact, when the host PC communicates with a 7030 Series device through TCP/IP or VI Server, it actually uses part of the 32 kilobytes (kB) of shared memory. One kilobyte of general purpose shared memory is reserved for you to pass data between the host computer and the processor device.

The embedded LabVIEW Real-Time engine, Instance C, and LabVIEW Real-Time in normal LabVIEW mode can communicate using shared memory VIs to read and write to the shared memory locations. Shared memory VIs have very low overhead and are ideal for time-critical, real-time applications. However, the size of the shared memory is limited to 1 KB. If you need to transfer several large blocks of data, you must break up the data into smaller portions and then transfer them. In doing so, you must make sure that data in the shared memory is not overwritten before it is read. Therefore, TCP/IP functions are more convenient for transferring large amounts of data. Because the TCP/IP functions and the VI Server manage flow control, these methods automatically separate the transfer into smaller sizes. TCP/IP functions and the VI Server are also more portable and target medium independent. By comparison, shared memory access is limited to communicating with LabVIEW Real-Time Series DAQ devices. The drawback of TCP/IP and the VI Server is that these methods have higher overhead than shared memory access and might not be suitable for some fast real-time applications. Also, the TCP/IP and VI Server operations must be performed in non-time critical VIs as they are inherently non-real-time operations. These operations require additional programming between time critical VIs and the non-time critical VI performing the target/host communication.

Refer to the Related Links section for more information about LabVIEW Real-Time architecture, target/host communication, and Real-Time FIFOs.

Related Links:
LabVIEW Real-Time Architecture and Good Programming Practices
Real-Time FIFO for Deterministic Data Transfer Between VIs.

7 ratings | 2.86 out of 5
Print

Reader Comments | Submit a comment »

 

Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).