1. Video Walkthrough
2. Required Software Components
This example program builds on several components, including the CompactRIO Vibration Data Logger Reference Design. These required components, which are listed below, are bundled in the Installer folder in the download at the end of this document for completeness.
- Reference Library for Converting Between LabVIEW and XMLData (GXML) 1.4.0
- Simple Messaging Reference Library (STM) 2.0.2
- Asynchronous Message Communication Reference Library (AMC) 2.1
- LabVIEW Syslog Protocol Reference Library 1.1.1
- FlexSignal Signal Acquisition Reference Library 1.1.2
- Channel Monitor XControl 1.1
- NI CompactRIO Waveform Reference Library 3.0.5
- Distributed Condition Monitoring Example for Oil and Gas (mcm_logger.zip) provided in this document
In addition, the example program requires the following development tools:
- LabVIEW Professional Development System 2010 or later
- LabVIEW Real-Time 2010 or later
- LabVIEW FPGA 2010 or later
- Sound and Vibration Measurement Suite 2010 or later
3. Recommended Getting Started Hardware Configuration
A cost-effective getting started hardware kit includes the following:
- NI cRIO-9074 integrated chassis and controller, 779999-01
- PS-15 industrial 24 V power supply, 781093-01
- NI 9234 vibration and voltage input module with NI Sound and Vibration Measurement Suite, 779680-02
4. Software Installation
- Install the Reference Library for Converting Between LabVIEW and XMLData (GXML)
- Install the Simple Messaging Reference Library (STM)
- Install the Asynchronous Message Communication Reference Library (AMC)
- Install the LabVIEW Syslog Protocol Reference Library
- Install the NI CompactRIO Waveform Reference Library
- Install the FlexSignal Signal Acquisition Reference Library
- Install the Channel Monitor XControl
- Download and open the Distributed Condition Monitoring Example for Oil and Gas (mcm_logger.zip) from this document
5. Configuring CompactRIO
To start, download the CompactRIO Vibration Data Logging Example (and its required components - see above section). Follow these steps to adapt this example for your CompactRIO system.
NOTE: Please disable the Use Localized Decimal Point option under Tools»Options»Front Panel before proceeding.
- Open the project MCM Logger»Main Project Files»cRIO Logger Deploy.lvproj
- If you are using an NI 9074 integrated chassis and controller
- Right-click on the CompactRIO controller in the project and select Properties
- In the left-hand pane of the Properties Window, select the General category
- Change the Name to the name of your CompactRIO controller
- Change the IP Address/DNS Name to that of your CompactRIO controller, as shown under Remote Systems in the NI Measurement & Automation Explorer (MAX)
- Press OK
- If you are using a model other than the NI 9074, follow the steps listed below:
- Add your CompactRIO to the project by right-clicking on the project at the top of the items pane in the LabVIEW Project Explorer window and selecting New»Targets and Devices»Real-Time CompactRIO and selecting your controller
- Copy the data32 DMA buffer, and the [FPGA] DeltaSig Main.vi to your FPGA backplane in the project
- Adjust any properties to your NI 9234 C Series modules such as IEPE on/off and clock routing for use with multiple delta sigma C Series modules
- Refer to the document “Customizing the FPGA Vis.pdf” as needed
- Compile the FPGA code for your configuration
Figure 1. Project Files for the CompactRIO Logger Deploy Project
- Verify your system configuration by running the example real-time codes [RT 01], [RT 02], [RT 03], and [RT 04]. These example programs run on the CompactRIO controller, interact with FPGA code, and interact with Windows host components in the case of [RT 03] and [RT 04]. For more information about running these examples, refer to the CompactRIO Vibration Data Logger Reference Design.
6. Deploying the CompactRIO Data Logger
- Create an XML Configuration for the CompactRIO to load at run time by running the [Host] Create Advanced Config XML.vi. Ensure that all IP addresses are correct, specifically those of the CompactRIO Data Logger and the Syslog (in the Syslog Config tab) that will serve as the Windows Host Machine.
When deploying CompactRIO data logger systems, it is often desirable to remove front panel controls. This allows for easy creation of a startup EXE as well as remote configuration and monitoring. [RT 05] Main_Logger Advanced Deploy.vi is configured as a ready for deployment startup VI or EXE on a CompactRIO controller. You can do this by substituting an XML configuration file for standard front panel controls. The VI [Host] Create Advanced Config XML.vi is provided to create and download this XML configuration file to the CompactRIO Data Logger.
This configuration utility creates an XML configuration file based on the configuration settings provided by the user in the various tabs such as channel configuration and acquisition parameters like sample rate. This XML file is then sent by FTP to the targeted CompactRIO Data Logger controller for use by the [RT 05] VI or EXE.
Figure 2. Front Panel of [Host 05] Create Advanced Config XML.vi
- Run [RT 05] Main_Logger Advanced Deploy.vi and keep running in the background. This VI must be running for [Host 05] Combined Monitor.vi to run successfully.
The [RT 05] VI runs on the CompactRIO Data Logger and performs the actual data-logging functions, including triggering conditions for data logging as well as UDP and TCP/IP communication with a monitoring application. In place of a user interactive front panel, it loads the XML configuration file that was created in the first step. This VI is made to run in conjunction with [Host] Combined Monitor, which can perform the remote monitoring and configuration duties.
Figure 3. The Front Panel of the Real-Time VI That Runs on the CompactRIO Controller
7. Monitoring the Data Logger With a Complete Host Application
- After running the steps in the above section, namely creating an XML configuration file, and with the [RT 05] VI still running on the CompactRIO controller, open and run [Host 05] Combined Monitor.vi.
Note: [RT 05] must be deployed and running on the CompactRIO controller with the IP addresses properly configured in the XML configuration file for this VI to run successfully.
The [Host 05] Combined Monitor VI allows monitoring and control of the CompactRIO data logger from a single application running a Windows machine. This VI includes XML configuration and download, FTP and Syslog statuses, live data monitoring, and file playback with spectral analysis. This is especially useful for remote monitoring of data-logging systems in difficult-to-access locations such as wind turbines. The following provides an overview of the combined host application.
The XML Configuration and Download tab is shown below. All of the configuration items are the same as noted in the earlier section of this document. You also can take advantage of a feature to list multiple deployable CompactRIO targets and then select from an editable drop-down list which one to target the XML configurations to.
To create a new XML file for the CompactRIO controller, configure your settings appropriately and then, with the FTP to Target? button depressed, press the Create XML button. You then need to press the Restart cRIO with New Configuration button. This restarts the CompactRIO controller, restarting the [RT 05] VI with the new XML configuration file.
Figure 4. The XML Configuration and Download tab of [Host 05] Combine Monitor.vi - notice that the configuration settings are the same as those shown earlier.
FTP Status Tab
The FTP Status tab shows information on moving data log files from the CompactRIO controller to the host monitoring machine. You can choose from several options to select file dump locations as well as status information about how many files remain on the CompactRIO controller as well as the current FTP status.
Figure 5. The FTP Status Tab of [Host 05] Combine Monitor.vi
Live Monitor Tab
The Live Monitor tab displays the data currently being acquired by the CompactRIO data logger transmitted through TCP communication. The live data for all channels is shown in a table view, and selectable channels are shown in the graphical display. There is also a button to force a trigger on the CompactRIO data logger to begin a data-logging operation.
Figure 6. The Live Monitoring tab of the [Host 05] Combined Monitor.vi displays live information as it is acquired on the CompactRIO data logger by transferring it over TCP communication.
File Playback Tab
The File Playback tab offers file playback and spectral analysis options for previously recorded and transferred data logs. The channel monitor displays a level indication of each channel in the file and provides an option to pop up a time-domain waveform graph of individual channels, as shown in Figure 8. There is also a tab control so that both time-domain waveforms of all channels or the frequency spectrum of a specified channel can be configured and displayed.
Figure 7. The File Playback tab of the [Host 05] Combined Monitor.vi allows the playback of files that have been recorded on the CompactRIO data logger and transferred to the host computer.
When you select a file, a dialog box appears as shown in Figure 8, requesting a file to open. On the file selection pop-up, you can choose a specific file that has been transferred via FTP from the CompactRIO data logger and select or exclude time waveform channels from the file.
The accompanying graph is an example of the time waveform pop-up from the channel monitor in the Live Playback tab.
Figure 8. The Pop-Ups From the File Playback Tab of the [Host 05] Combined Monitor.vi
8. Related Resources and References