Using LabVIEW on a host PC with the NI WSN-3202 with the FP2000
Configuring a LabVIEW program to work with the FP2000 and NI WSN system is very straightforward. First, since the amplified pressure transducer used in this example outputs a 0-5 VDC signal, we should configure the input range of the WSN-3202 to an input range of ±5V. This can be set in the Data Configuration section of the NI WSN-3202 Properties window, accessed by right-clicking on the node in the LabVIEW Project.
With the WSN properties set, the application building can begin. Each I/O channel on the WSN voltage node has a shared variable associated with it in the LabVIEW Project. This shared variable returns the unscaled voltage reading returned form the pressure transducer. The 0-5 VDC output of the pressure transducer corresponds to a pressure range of 0 – 150 psi. Therefore, we can use a scaling factor of 30 psi/V, which we calculate on the block diagram from the maximum pressure and output. This allows easy modification for other model options for using calibrated factors for more precise scaling.
Below is a very simple example block diagram for the wireless pressure transducer application. This example acquires the voltage from the node, scales the voltage to engineering units (psi), and displays the pressure value on the front panel. In order to only perform the scaling and displaying when the shared variable returns new data, the VI checks the time stamp of the shared variable for a change of value. In order to access the time stamp, you must right click on the shared variable (AI0) in the LabVIEW project, select Properties, and then check the box next to Enable Timestamping. After dragging the shared variable onto the block diagram, right-click on the shared variable in the block diagram and select Show Time Stamp.
Figure 3. LabVIEW VI Block Diagram Running on Host Computer – Acquires, Scales and Displays Data.
Using LabVIEW WSN Embedded Programs on the NI WSN-3202 with the FP2000
With LabVIEW WSN and programmable version of the WSN-3202 node, you can download and run LabVIEW VIs on the WSN node for local data processing and control. For example, you could perform the data scaling to engineering units locally on the node, filter the data, program a customized triggering or event detection algorithm, or perform local alarming in the node itself