Using LabVIEW 7.0 to Collect Data from FieldPoint Modules
Overview
Two of the most common methods of collecting data from a FieldPoint module are using the FieldPoint OPC server and using the FieldPoint subVIs in LabVIEW. This document explains how to collect data from FieldPoint modules in LabVIEW using the FieldPoint subVIs. This information applies to FieldPoint 4.0 and LabVIEW 7.0
Table of Contents
Getting Started
This document assumes the following:
- You have successfully set up the modules in Measurement and Automation Explorer (MAX).
- You can monitor and write values to the modules in MAX.
- You have saved the configuration (.iak) file.
After you set up the modules in MAX, you see a window like this:

Figure 1. A FieldPoint Comm Resource Configured in MAX
This example uses an FP-2010 with an FP-AI-100 and an FP-DO-301. The name of the configuration file is my_fieldpoint.iak.
When you install the FieldPoint 4.0 software on your computer, the FieldPoint subpalette is installed on the NI Measurements palette, which is located on the Functions palette in LabVIEW. You can find FieldPoint 4.0 on the National Instruments ftp site at ftp://ftp.ni.com/support/fieldpoint/Server/
In addition to the FieldPoint Express VI, which enables a quick and simple setup, the FieldPoint subpalette has two VIs for use in most applications:
Follow these steps to read one channel of a FieldPoint module using the LabVIEW FieldPoint subVIs.
- Place the FieldPoint IO Point Constant on the block diagram. The FieldPoint IO Point Constant specifies the FieldPoint tag to be used for I/O operations. Click the arrow in the constant and select the desired comm resource name, device name, and item name. You may need to browse to the item. In this example we use FieldPoint\FP Res\FP-AI-110 @4\Channel 0.
- Place FP Read (Polymorphic) on the block diagram FP Read pulls the values from the FieldPoint module into LabVIEW. You can call FP Read and FP Write as many times as you want. FP Read and FP Write are often called in a loop.
- Wire the output of the FieldPoint IO Point Constant to the FieldPoint IO Point In terminal of FP Read (Polymorphic).
- We are reading only one value, so we want to change the output type by right-clicking FP Read (Polymorphic) and clicking Select Type>>FP Read (Float IO).
- Right-click the value output of FP Read (Polymorphic) and select Create>>Indicator.
- Place a Simple Error Handler (Functions>>Time&Dialog>>Simple Error Handler) on the block diagram. This enables you to monitor the error cluster.
- Wire error out from FP Read (Polymorphic) to error in on the Simple Error Handler as shown in the following diagram.
- Place another FP Read (Polymorphic) parallel to the first FP Read (Polymorphic) on the block diagram.
- Create a constant for the FieldPoint IO Point In input by right-clicking the new FP Read (Polymorphic) and selecting Create>>Control. Click the arrow in the constant and select the desired comm resource name, device name, and All as the item name. In this example we use FieldPoint\FP Res\FP-DI-301 @3\All.
- To view the values of the FP-DI-301 module as an array of booleans, right-click the new FP Read (Polymorphic) and choose Select Type>>FP Read (Boolean Array IO).
- To combine the errors from both FP Reads, place the Merge Errors function (Functions>>Time & Dialog>>Merge Functions) on the block diagram.
- Wire the error out outputs from both FP Reads into error 1 in and error 2 in of the Merge Errors function.
- Place a While Loop (Functions>>Structures>>While Loop) on the block diagram around the FP Reads.
- Place a Wait Until Next ms Multiple function (Functions>>Time & Dialog>>Wait Until Next ms Multiple) on the block diagram inside the While Loop. The wait statement sets the update rate. If you do not include a wait statement, LabVIEW will execute the loop as fast as possible and could use up all of your CPU resources.
- Right-click the left side of the Wait Until Next ms Multiple function and select Create>>Constant. Enter the number of milliseconds to wait. This example uses 100 ms, as shown in the following diagram.

Figure 6. A VI to Write to Multiple Channels
Using NI FieldPoint 4.0 with LabVIEW 7.0
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/).




