Feature Definitions

NI InsightCM™ SDK 3.3 Help

Edition Date: December 2018

Part Number: 375191F-01

»View Product Info
Download Help (Windows Only)

You can create custom services to calculate custom features or spectral bands from a sensor's waveforms. To define the name and configurable properties of the feature that displays in the InsightCM web application, develop a feature definition. Feature definitions in JSON are objects that contain the following name-value pairs:

  • MetricType—The name that appears throughout the InsightCM web application, including on the Assets page and the Features tab of the System page.
  • PropertyDefinitions—An array of objects that define user-configurable property fields that appear on the Features tab on the System page in the InsightCM web application. PropertyDefinitions are only enabled when CanCreateInstance is set to true. The values specified for these properties when creating an instance differentiates that instance from other instances of the same feature definition. Each object contains the following name-value pairs:
  • MetricPropertyDefinitions—An array of objects that define properties that an instance definition can set, as well as the values that are valid for the property. For example, a general feature definition might define a scale property whose valid values are RMS and peak-to-peak, and then an instance of that feature can set the scale property to one of those options. These properties can vary across sensors.
  • ValidationRules—Instruct the InsightCM web application to provide feedback to users when they configure a property field with invalid values.
    Name A unique name that describes the expression to evaluate.
    Type Type—(Optional for some property types) For property fields that you want to display on tabs of the Assets or Device Configuration page, the ID of the specific location where you want the property field to appear: DataGroup, Device, or OperatingState. For a description of each type, refer to Correlating Components with a Location in the InsightCM web application.
    Description The message to display to users in a tip strip when you hover over the property field.
    Expression A valid JavaScript expression that produces a Boolean value. When the expression evaluates false, the InsightCM web application performs the action you configure on the affected property fields. An expression typically identifies the properties and conditions to evaluate.
    Action One of the following strings, which specifies the action the InsightCM web application performs on the property field:
    • Error—Users cannot save the device configuration until the validation rule is no longer true. When users attempt to save, the InsightCM web application displays a dialog box that contains the Description.
    • Warning—Users can save the device configuration.
    AffectedProperties An array of strings that specify the keys of the property fields on which to display the line and tip strip.
  • MetricChannelTypes—An array in which each object contains the following name-value pairs:
    • ChannelType—The ID of an asset type. This value must correspond to an asset type listed in a module type definition. Therefore, you must reuse the same name in both locations.
    • Required—A Boolean that specifies whether the InsightCM web application automatically assigns the feature to each asset whose measurement type is specified by ChannelKeyword and prevents users from removing it.
  • Properties—An array of name-value pair properties that customize the units in which to express calculated values. NI InsightCM Server supports the following properties:
    UnitAppendProperty Specifies to append the value of this property to the units configured for the sensor. For example, if the units for an accelerometer are configured as g's and the value of UnitAppendProperty is rms, the units assigned to the sensor are grms.
    UnitAppendSeparator Specifies to separate the sensor units from the value of UnitAppendProperty with the value of this property.
    Unitless Specifies to format the feature units as the sensor units over the sensor units. For example, g/g.
    UnitOverride Specifies to express calculated units in the value of this property rather than in units derived from the sensor units. For example, although devices calculate speed values from a tachometer in mils when connected to a proximity probe, you might want to always express the values in RPM.
    UnitUnscaledProperty Specifies to convert the calculated value back to its raw value prior to scaling.
  • CanCreateInstance—A Boolean that specifies whether to allow users to create multiple configurable instances of the current feature. If true, the System page»Features tab in the InsightCM web application allows users to create new instances of the feature from the Add pull-down menu. If false, NI InsightCM Server maintains a single instance of the feature. Typically, set this property to true when you want to allow users to configure properties of a feature instance as defined in MetricPropertyDefinitions. Conversely, if you do not allow users to configure any properties of a feature, NI InsightCM Server does not need to maintain more than one instance of the feature.

Related Information

Instance Definitions for Features


Not Helpful