Example Code

Distributed Machine Condition Monitoring Example

    Other

  • CompactRIO

Code and Documents

Attachment

Description

Overview


Machine Condition Monitoring for remote assets can save thousands of dollars in technician costs but it requires a distributed network of rugged monitoring and recording devices. CompactRIO provides a rugged industrial distributed I/O platform for monitoring vibration, stress, oil particulate counts, temperature, speed, and additional health and operational parameters. This example program, builds on the CompactRIO vibration data logger reference to illustrate a condition monitoring system for distributed machine assets. Using the real-time controller and FPGA of the CompactRIO, data is monitored, acquired and stored on the CompactRIO controller and status updates are sent via UDP communication. Through a remote Windows Host, the data logger can be controlled and monitored, in addition to transferring saved data logs off of the CompactRIO controller using FTP communication.

Video Walk Through

 

 

Required Software Components

This example program builds on several example components, including the CompactRIO Vibration Data Logger Reference Design.  These required components are listed below.  All of these have been bundled into the Installer folder in the download at the end of this document for completeness.

  1. Reference Library for Converting Between LabVIEW and XMLData (GXML) 1.4.0
  2. Simple Messaging Reference Library (STM) 2.0.2
  3. Asynchronous Message Communication Reference Library (AMC) 2.1
  4. LabVIEW Syslog Protocol Reference Library 1.1.1
  5. FlexSignal Signal Acquisition Reference Library 1.1.2
  6. Channel Monitor XControl 1.1
  7. NI CompactRIO Waveform Reference Library 3.0.5
  8. Distributed Condition Monitoring Example (mcm_logger.zip) provided in this document

In addition, the example program requires the following development tools:

  1. LabVIEW Professional Development System 2010 or later
  2. LabVIEW Real-Time 2010 or later
  3. LabVIEW FPGA 2010 or later
  4. Sound and Vibration Measurement Suite 2010 or later

Recommended Getting Started Hardware Configuration

A cost effective getting started hardware kit includes the following:

  1. CompactRIO 9074 Integrated Chassis and Controller, 779999-01
  2. Industrial 24 Volt Power Supply, 781093-01
  3. NI 9234 vibration and voltage input module with Sound and Vibration Measurement Suite, 779680-02

Software Installation

  1. Install the Reference Library for Converting Between LabVIEW and XMLData (GXML)
  2. Install the Simple Messaging Reference Library (STM)
  3. Install the Asynchronous Message Communication Reference Library (AMC)
  4. Install the LabVIEW Syslog Protocol Reference Library
  5. Install the NI CompactRIO Waveform Reference Library  
  6. Install the FlexSignal Signal Acquisition Reference Library
  7. Install the Channel Monitor Xcontrol
  8. Download and open the Distributed Condition Monitoring Example (mcm_logger.zip) from this document

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.

  1. Open the project MCM Logger»Main Project Files»cRIO Logger Deploy.lvproj
  2. If you are using a 9074 Integrated chassis and controller:
    1. Right click on the CompactRIO controller in the project and select Properties
    2. In the left hand pane of the Properties Window select the General category
    3. Change the Name to the name of your CompactRIO controller
    4. Change the IP Address / DNS Name to that of you CompactRIO controller as shown under Remote Systems in Measurement & Automation Explorer (MAX).
    5. Press OK 
  3. If you are using a model other than the 9074 follow the steps listed here, as summarized here:
    1. Add your CompactRIO to the project by right clicking on the project at the top of the items pane in the project explorer window and selecting New»Targets and Devices»Real-Time CompactRIO and selecting your controller
    2. Copy the data32 DMA buffer, and the [FPGA] DeltaSig Main.vi to your FPGA backplane in the project
    3. Adjust any properties to your 9234 C-Series modules such as IEPE on/off and clock routing for use with multiple delta sigma C series modules.
    4. Refer to the document “Customizing the FPGA Vis.pdf” as needed
    5. Compile the FPGA code for your configuration

Figure 1. Project files for the cRIO Logger Deploy project

  1. Verify you system configuration by running the example RT 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 please refer to the CompactRIO Vibration Data Logger Reference Design.

Deploying the CompactRIO Data Logger

  1. 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.  This is done 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 will create 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

  1. 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

 

Monitoring the Data Logger with a Complete Host Application

  1. 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, open and run [Host 05] Combined Monitor.vi

    Note: [RT 05] must be deployed and running on the CompactRIO 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 a wind turbines.  The following provides an overview of the combined host application.

Configuration Tab

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.  Additionally there is a feature of being able to list out 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 configure your settings appropriately and then, with the FTP to Target? button depressed, press the Create XML button.  You will then need to press the Restart cRIO with New Configuration button.  This will restart 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 related to moving data log files off of the CompactRIO controller and onto the host monitoring machine.  There are 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 to begin a data logging operation.

Figure 6. The Live Monitoring tab of [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 also provides an option to pop-up a time-domain waveform graph of individual channels as shown in the pop-up figure further below.  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 [Host 05] Combined Monitor.vi allows playback of files that have been recorded on the CompactRIO Data Logger and transferred off to the host computer.

When selecting a file, a dialog box will appear as shown below, requesting which file to open.  On the file selection pop-up, a specific file that has been FTP’d from the CompactRIO Data Logger can be chosen and time waveform channels from the file can be selected or excluded. 

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 [Host 05] Combined Monitor.vi

 

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
zuosi
Member
Member
on

Hi, after download the source code and install the package, I found the code lost some subvi, like the deltasig main, some custom controls, etc.

Can you please update the code, it is really useful for me to implement it on our project, thanks in advance.