Calculating Custom Features on the Device

NI InsightCM™ SDK 3.3 Help

Edition Date: December 2018

Part Number: 375191F-01

»View Product Info
Download Help (Windows Only)

Parent Topic: Developing Device Applications for Targets in an NI InsightCM System

To implement custom analysis calculations, create a new process that runs in the device code and runs as part of the Dataflow Script. For guided, step-by-step instructions for creating a generic process, refer to Creating a New Process.

Planning

Determine how you want to construct data sets of the size you desire.

Details

In the SDK reference code, the NI-developed Accumulator process combines waveforms from successive data sets into sets of a user-specified size. Then, the NI-developed Vibration Analysis process calculates feature and spectral band values on the resized data sets.

Initializing the Process

Determine whether your process needs to perform the following common tasks.

Read information about feature definition from the configuration file that NI InsightCM Server sends to the device.

Details

For example, your process might need to know the high and low levels of the spectral band.

How-to: Providing Configuration Data to a Process

Read the asset configuration for sensor properties that are required to perform the calculation.

Details

For example, calculations for a sensor that is part of a pair of proximity probes might require the waveform from the other sensor in the pair. In this case, read the name of the pair sensor and bundle it with other asset properties for use in retrieving the pair sensor waveform at the time of calculation.

How-to: Providing Configuration Data to a Process

If you allow users to choose whether the custom feature or spectral band is logged for a particular sensor, read the asset configuration to determine which sensors have the custom feature or spectral band assigned to them.
Prepare the NI-developed Data Event Creator process to create data sets that contain the values this process calculates.

Details

You must register any data included in your process with the Data Event Creator process to write that data to NI InsightCM server. This includes acquired data, such as waveforms, single-point values, and speed profiles, as well as calculated feature and spectral band values.

ProcessNextDataFlowBlock Subdiagram

Sensor data on which your process calculates features and spectral bands arrives from the previous process in the Dataflow Script. Therefore, your process must handle these data sets.

If the calculation requires an array of waveform points, check whether the data set contains waveforms before you begin operating on it.
Check the status of each sensor that produced data in the data set to ensure it was in proper working condition when it acquired the data.

Details

If the sensor status is not ok, consider flagging the sensor so that your process writes a value of -1 for all its features.

For each sensor that produced data in the data set, find the waveform it produced.

Details

How-to: If the NI-developed FPGA Acquisition process acquired the data, you can read the NI_ChannelName attribute from each waveform in the data set's array of waveforms until you find the waveform whose NI_ChannelName value matches the sensor name of interest.

Perform the calculation. Ensure the result is a double-precision, floating point number.

Details

Location: Navigation menu»System»Features

Write the calculated value as a map point in the data set's point value map.

Details

Write the Tag Id as the point name. Use the Point Set Valid subVI to write the channel-status Boolean value from step 1 as an attribute of the point. The Data Event Creator process reads these map points and writes them in the data files it creates.

How-to: Reading and Writing Shared Properties at Run Time

Write the sensor status to two point value maps in use.

Details

How-to: 

Use a copy of the data group's point value map that the NI-developed initialization subVI creates when it runs.

Send the data, including both the sensor data and calculated values, to the next process in the Dataflow Script.

Details

How-to: Bundle the data set, including the point value map that now contains feature values, and use the Get Next Process VI to send the data set to the next process in the Dataflow Script.

Top-Level VI

After you complete the previous sections to prepare for many devices to connect to NI InsightCM Server, complete these tasks for each device you add.

Initialize the application software with Qbus.

Details

Templates can save time because you do not need to manually perform similar configuration tasks for each device. You might only need to verify that the settings are correct.

How-to: Initialize with Qbus

Add the process to the Dataflow Script in the execution order you desire.

Details

If you want to reuse the NI-developed Accumulator process to construct data sets of a desired size, add this process after the Accumulator process.

How-to: Add to DataFlow Script

Device Model

To allow users to set properties for the feature or choose whether the application software calculates the custom feature for a particular sensor, you must perform additional steps to represent the feature in the InsightCM web application. If you always want to calculate the feature, ignore this section.

Inform NI InsightCM Server that the feature is calculated on the device.

Details

Add the MetricType value to the calculated feature definition called in the asset type definition.

How-to: Calculated Features

WAS THIS ARTICLE HELPFUL?

Not Helpful