Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Getting and Setting Properties in Configuration Files

NI InsightCM™ SDK Help

Edition Date: July 2017

Part Number: 375191C-01

»View Product Info
Download Help (Windows Only)

Parent Topic: Configuration Properties from NI InsightCM Server

The Global Configuration VIs read and return properties from configuration JSON files stored on the device. These files define properties of devices, alarm rules, the equipment hierarchy that is defined in the InsightCM web application, and so on. These files store properties in the following formats:

  • Named cluster elements, where the element label is the property name and its value is the property value.
  • Elements of an array of clusters, where each cluster contains a key-value pair of the property name and value.

Getting or Setting Named Configuration Properties

Programmatically access these properties with the Global Configuration API. The following illustration shows an example of using the Get Device VI to retrieve properties available at the device level and preparing them for use by the process. This code is typical of how Initialize subdiagrams in processes populate the configuration cluster.

The appropriate member of the Global Configuration API returns all the properties in its category.
Unbundle the desired elements. This block diagram first unbundles an array in which each element is a cluster of properties for a data group, and then unbundles specific properties from each of those clusters.
Bundle properties of interest into the format that the process configuration cluster expects. When the configuration cluster passes through a message-handling subdiagram that requires these values, the subdiagrams can unbundle them.

The API member you use depends on the type of property. Refer to the following code as an example.

"Properties" : [{

"Key" : "OnDemandInterval",

"Value" : "60"

}


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit