Multiple DAQ Board Real-Time Control Example

2019-07-03 08:56:32 RPG Electronics (Shenzhen) Co., Ltd. 12

The general purpose of this example is to demonstrate the use of RT FIFOs to transfer data between the RT Engine time-critical priority VI and the RT Engine normal priority communication VI, and then further demonstrate the use of VI Server and TCP/IP to transfer data between the RT Engine normal priority communication VI and the Host PC VI.

The control loop in the time-critical VI has a very specific purpose, but it could be modified to do PID on the DAQ device or even to do FieldPoint or other operations on a different RT target.

This control loop monitors a large number of channels across (optionally) an arbitrarily large number of DAQ devices in the system. If the analog voltage acquired on any one of the channels drops below a specified minimum threshold value, DIO line 0 on the MIO board specified will be set to logic high. Once the channel goes back above this threshold, this digital line is set to logic low. For a system with only one DAQ device, you must simply specify this device along with the fact that you are using only one DAQ board. You may also need to reduce the number of channels if you are not using a 64-channel DAQ device.

The absolute minimum voltage acquired across all channels of all boards being used, along with which channel from which board are sent through RT FIFOs to a normal priority communication VI, which then in turn sends these values to the host computer through TCP/IP.

The Host PC VI connects to the RT Engine VIs to receive this TCP/IP data. It also uses VI Server to set some initial parameters on the RT Engine as well as retrieve a final result once the RT Engine VIs complete execution. Execution status of the RT Engine VIs is fully controllable from the Host PC VI.

In order for this or any other RT example using VI Server to run properly, you must verify your VI Server settings by doing the following:
1. Switch Execution Target to your RT system.
2. Open or create a new VI. From the Tools menu, select "Network: Options"
3. In the pull-down menu, select "VI Server: Configuration". Be sure TCP/IP is checked and set to port 3363. Also be sure that the top three check boxes under "Server Resources" are checked.
4. In the pull-down menu, select "VI Server: TCP/IP Access". Be sure that at least your Host PC IP address is entered in this list. The most fail-safe way to configure this would be to not worry about what your Host PC IP address is, and just enter an asterisk (*) in the allow list. This will allow VI Server TCP/IP access to any IP address on your network. Sometimes this can be a security issue, but often people are behind firewalls such that this does not pose a significant problem.
5. In the pull-down menu, select "VI Server: Exported VIs". Allow access to (*) like suggested for TCP/IP Access.
6. If any changes were made, press the OK button, switch execution target back to LabVIEW for Windows, and power cycle the RT system.

As mentioned, this VI makes use of the RT FIFO VIs for communication. These VIs do not currently ship with LabVIEW RT. If you have never used them before, you will need to visit the related link below to download these VIs. In specific you will need the files "nbfifo.dll" and "RTFIFO.llb" that are attached to this document. If you are prompted for a VI entitled "No EOC Error.vi" when opening the VIs, you should find this in the TCP/IP examples for LabVIEW, which reside 

Company Profile

Our Goals:

service every customer sincerely, focus on technology improvement, to do business with integrity and creditability

Our Objective:

with continuous innovation and improvement, strive to make RPG a leading "one-stop" service brand in Chinese instrument industry


Browse details

Main Product

Contact Us

© RPG Electronics 2019

Add:Room 1505-1506,Building 3-D Cloud Park-Phase I 2018Xuegang Road Bantian,Longgang,Shenzhen, China

RPG Electronics,test equipment rent and lease,Oscilloscope,Digital Multimeter,DMM,DC Power Supply,Signal Generator,Network Analyzer,Spectrum Analyzer,Communication Analyzer,Semiconductor Equipment