The NI Wireless Sensor Network (WSN) platform simplifies remote monitoring applications and delivers a complete, customizable monitoring solution. NI WSN hardware reduces installation and maintenance costs while delivering a flexible solution that features industrial ratings and extremely low power consumption.
Each wireless sensor network consists of three main components: nodes, gateways, and software. The spatially distributed, battery-powered measurement nodes interface with sensors to monitor assets or their environment. The acquired data wirelessly transmits to the gateway, which can operate independently or connect to a host system where you can collect, process, analyze, and present your measurement data using the software. Furthermore, you can use the LabVIEW WSN Module to deploy embedded applications to NI WSN measurement nodes to perform local data analysis and control.
Figure 1. WSN systems can scale from tens to hundreds of nodes and seamlessly integrate with existing wired measurement and control system.
NI CompactRIO is a reconfigurable embedded control and acquisition system that can be used in a variety of embedded control and monitoring applications.. The CompactRIO system’s rugged hardware architecture includes I/O modules, a reconfigurable field-programmable gate array (FPGA) chassis, and an embedded controller. The LabVIEW Real-Time Module is used to deploy embedded applications to run on the CompactRIO controller, offering real-time data processing and analysis. The LabVIEW FPGA Module is used to target and program the chassis FPGA, delivering the capability to perform advanced timing and closed-loop control in hardware.
Figure 2. Choose between Value, Ultra-Rugged, and High Performance NI CompactRIO systems to meet the unique needs of your application.
Learn more about NI CompactRIO
Configure a CompactRIO System
With the NI 9795 WSN C Series Gateway, you can create complete wired and wireless monitoring and control systems with LabVIEW. The gateway can plug into any slot in your CompactRIO chassis to deliver wireless connectivity to up to 36 deployed WSN nodes. Through the NI RIO Scan Interface (RSI), WSN I/O data is available in your deployed LabVIEW Real-Time application, where you can integrate WSN I/O with the rest of your CompactRIO measurement and control system. Because the data is passed through the scan interface, you must use the NI 9795 in CompactRIO chassis that are compatible with RSI.
Figure 3. Elegantly combine wired CompactRIO systems with wireless WSN systems using the NI 9795 WSN C Series Gateway
By combining NI CompactRIO and NI WSN systems you can have the best of both worlds: high-speed I/O with tight synchronization, FPGA-based control, and real-time processing with NI CompactRIO and lower-speed remote monitoring of assets or environments far away from your CompactRIO system or in hard to reach places with NI wireless sensor networks.
The following step-by-step guide will help you integrate NI WSN and NI CompactRIO systems.
To use NI CompactRIO and NI WSN you will need the following software components:
To begin, make sure you have installed the LabVIEW Development Environment, LabVIEW Modules and device drivers to your host PC.
Which version of NI-RIO and NI-WSN do I need?
You may use any NI CompactRIO system that supports RIO Scan Interface. For the purposes of this tutorial, we will use the cRIO-9076 four-slot integrated CompactRIO system.
Assembling and Configuring your CompactRIO System
This tutorial will assume that you have already setup and configured your CompactRIO system for first use. If this is not the case, and you need detailed instructions for assembling and configuring your CompactRIO system for first use, refer to this Getting Started tutorial. Complete all of STEP 2 in the Getting Started tutorial by clicking through to the Next Step at the bottom of each page. Complete each of the following sections before proceeding:
When your CompactRIO system is ready to use (assembled and powered, with software installed), insert the NI 9795 WSN C Series Gateway into any available slot in your CompactRIO chassis.
In the NI WSN system, the gateway acts at the network coordinator, and it must know which nodes are authorized to join its network. To do this, open Measurement & Automation Explorer (MAX) and locate your CompactRIO system under Remote Systems.
When your WSN nodes power up, they will automatically connect to the gateway and you can click Refresh to see the most recent node parameters in MAX. To force a reconnect on nodes that may have been previously configured for another gateway, press and hold the connect button for five seconds.
Once your nodes have been configured in MAX and joined the gateway, open LabVIEW and create an Empty Project.
Each WSN node offers four analog input channels and 2 or 4 digital I/O channels. These channels, along with other node properties can be configured from the LabVIEW Project.
Right-click on a node in the LabVIEW Project and select Properties.
Figure 11. Bring up the Node Properties Window
In the NodeN Properties window, you can configure settings for each analog and digital channel. You can also set the Attribute and Range for each analog input channel, as well as the Drive Mode for each digital I/O channel. In this system, a J-type thermocouple is connected to TC0, and the Range is set to Fahrenheit. Each channel can be configured differently, depending on the unique needs of your application.
Figure 12. Setting Node I/O Channel Properties
In the Properties window, select the Node tab. Here you can change the node ID, provide an alias, and set the node sample interval. The sample interval designates how many seconds elapse between consecutive data acquisition cycles on the node. In this system, the sample interval is set to 10 seconds. This means that the node will remain in a low-power sleep state for 10 seconds, then wake up, sample all of its channels, transmit all of that data back to the gateway, and then re-enter the low-power sleep state and reset the sample interval timer.
Figure 13. Configuring Node Properties, such as Sample Interval
Configure these properties for each of the nodes in your system, clicking OK when finished in each Properties dialog box.
Now that hardware is properly configured in the Project window, you are ready to extract WSN measurement data and other node parameters in LabVIEW. WSN data can be viewed on the host PC or integrated into a deployed LabVIEW Real-Time application that runs on the CompactRIO controller.
Figure 14. LabVIEW VI to monitor WSN data and parameters
When you run the VI, the I/O variables are deployed to the gateway. I/O variable data is passed through RIO Scan Interface to the CompactRIO controller, and then over Ethernet to the host PC. But, you can embed the WSN I/O variables into a deployed LabVIEW Real-Time application running on the CompactRIO.
Collaborate with other users in our discussion forums
A valid service agreement may be required, and support options vary by country.