The "onChangeScopeTags" property is an array of strings that specifies which tags the connector should save to the integration table when a save event occurs. Each "propertyPath" value is the connector's unique identifier to a collected data item, which is commonly called a "tag". This property is required when the "onChangeScope" property is set to "saveSpecificTags".
The following code excerpt persists the "temperature", "pressure", and "humidity" tags when a save event occurs.
"onChangeScope": "saveSpecificTags",
"onChangeScopeTags": [ "temperature", "pressure", "humidity" ]
Code Example
{
"api": "hub",
"action": "createInput",
"params": {
"inputName": "modbusTCP",
"serviceName": "modbus",
"tableName": "modbusTableTCP",
"dataCollectionIntervalMilliseconds": 1000,
"dataPersistenceStrategy": "onChange",
"onChangeScope": "saveSpecificTags",
"onChangeScopeTags": ["t1"],
"settings": {
"modbusProtocol": "TCP",
"modbusServer": "127.0.0.1",
"modbusServerPort": 502,
"propertyMapList": [
{
"propertyPath": "temperature",
"modbusDataAccess": "holdingregister",
"modbusDataAddress": 4003,
"modbusDataType": "int8Signed"
}
]
}
},
"authToken": "replaceWithAuthTokenFromCreateSession"
}
Notes
- The connector uses this property only when the
"dataPersistenceStrategy"is"onChange". - The
"createInput"and"alterInput"actions return an error wen aspecified tag name is not defined. - The
"createInput"and"alterInput"actions return an error if you assign a value to"onChangeScopeTags"and the"onChangeScope"property is not set to"saveSpecificTags". -
The following properties work together to save meaningful data changes.
"dataPersistenceStrategy""maxUnsavedEvents"“normalLowerLimit”"normalUpperLimit""deadbandLowerLimit""deadbandUpperLimit""significantMagnitude""onChangeScope""onChangeScopeTags""onChangeTrigger""onChangeTriggerTags"