Tag Reference

<< Click to Display Table of Contents >>

 

Tag Reference

Users must use individual Tags for communication. These Tags are addressed by using the parameters described on the next table.

 

Device

Name of a Metasys server or NAE concentrator

Item

MetasysObject;property{Extra}. For more information, please check section Addressing next

N1 or B1

Type of object. Possible values are 0: Default, 1: Enumeration (converted to a number), or 2: Analog with alarm limits

N2 or B2

Type of reading, used in case the Read Method option is configured with the value ByTag(N2). Possible values are 0: By polling or 1: By event

N3 or B3

Retries for reading alarm limits if the N1 parameter is configured with the value 2 (two)

N4 or B4

Not used, leave it in 0 (zero)

 

Addressing

In the Item parameter, the value MetasysObject is the name of some object in a system, and property is an optional parameter that informs the property read from an object. If that property is not informed, the read property is presentValue. If the special property PVALM is informed, the presentValue and alarmState properties are read, in which the first one is mapped to the Value property of a Tag and the second one is mapped to the Quality property of a Tag. If the value of the alarmState property is equal to HighAlarm or Alarm, that is mapped to the OPC_LIMIT_HIGH field (bit one from the Quality property) and if the value is equal to LowAlarm, this is mapped to the OPC_LIMIT_LOW field (bit zero from the Quality property), resulting respectively in values 194 (OPC_GOOD + OPC_LIMIT_HIGH) and 193 (OPC_GOOD + OPC_LIMIT_LOW).

The Extra value is a text in JSON format that can be a list of discrete statuses (States) or the name of an Alarm. States is a text in JSON format that declares the meaning of statuses for a specific Tag and this Driver prefers the translation of statuses declared in a Tag. If translations are not found, it uses the texts declared in the files with statuses 0 (zero) and 1 (one). The expected format for the States value is the following:

{
  "states": [
    {
      "Name1": Value1
    },
    {
      "Name2": Value2
    },
    {
      "NameN": ValueN
    }
  ]
}

 

The Alarm value is a text in JSON format with the name of an Alarm, only for analog Tags, according to the next example.

{
  "alarmName": "Name"
}

 

The Low, High, Warning, and Alarm limits of this Alarm object are retrieved and saved in a file using the special Tag GetAlarmLimits. The next code contains examples of Tags.

#Reads the presentValue property
Device: WIN-CGVCS5PQ7TV:NAE4561 Item: Programming.AV1
#Reads the presentValue property
Device: WIN-CGVCS5PQ7TV:NAE4561 Item: Programming.AV1;presentValue
#Reads the presentValue property and the alarmState property
Device: WIN-CGVCS5PQ7TV:NAE4561 Item: Programming.AV1;PVALM
#Reads the presentValue property with the name of an Alarm object equal to "Alarm1"
Device: WIN-CGVCS5PQ7TV:NAE4561 Item: Programming.AV1{"alarmName":"Alarm1"}
#Reads the status property of an object
Device: WIN-CGVCS5PQ7TV:NAE4561 Item: FieldBus1.4oPav.FX34.BinaryInputs;status
#Reads the presentValue property, interpreting its content according to Local, Remote, and Automatic statuses
Device: WIN-CGVCS5PQ7TV:NAE4561 Item: Programming.AV1{"states":[{"Local":0},{"Remote":1},{"Automatic":2}]}

 

NOTE

If the value retrieved from a property is an enumeration and the N1 property is equal to 1 (one), this Driver tries to translate the text of that enumeration to a corresponding value, mapping commands and declarations of names of statuses. For writing, this Driver retrieves the name of a command in the property and sends what is received in a Tag, translating it to the corresponding enumeration, if necessary.

Was this page useful?