<< Click to Display Table of Contents >>
Tag Reference |
IOTags (individual tags) shall be used for communication.
Tags are addressed through the parameters Device, Item, N1, N2 and N3 at the following format:
Property |
Meaning |
Device |
Metasys_Server_Name:NAE_Device |
Item |
MetasysObject;property{Extra} See more details below in Addressing: |
N1 |
Object Type: 0 = Standard 1 = Enum (will be converted to a number) 2 = Analog with alarm limits |
N2 |
Read type, if the Read Method property = By Tag (N2) 0 = Polling 1 = Events |
N3 |
Retries for alarm limits retries (N1 = 2) |
Addressing
At item parameter, MetasysObject is the name of a metasys system object, and property is an optional parameter which informs the property to be read. If not informed, the property will be presentValue.
If a special property name PVALM is informed, the properties presentValue and alarmState will be read, with the first one mapped to the tag property Value and the second to the property Quality. If the alarmState Value is HighAlarm or Alarm, it will be mapped as OPC_LIMIT_HIGH (bit 1 - Quality) and if the values is LowAlarm it will be mapped as OPC_LIMIT_LOW (bit 0 - Quality), resulting respectively at the values 194 (OPC_GOOD + OPC_LIMIT_HIGH) and 193 (OPC_GOOD + OPC_LIMIT_LOW).
Extra is a JSON formatted text where you can inform a list of discrete states (States) or an Alarm Name (Alarm).
States is a JSON where we can declare state names and corresponding values for each tag. The driver will try first to use the state names declared at the tag, if not found, it will use the state names declared at the state files 0 and 1.
The expected States format is:
{"states" : [ {"Name1":Value1}, {"Name2":Value2} , {"NameN":ValueN}]}
Alarm is a JSON where you can declare, only for analog tags, a children alarm name inside Metasys system, at the format:
{ "alarmName":"Name"}
This alarm object will have its limits (Baixo e Alto, Warning e Alarm) read and saved into a file through the special tag "GetAlarmLimits".
Some tag examples:
Device: WIN-CGVCS5PQ7TV:NAE4561 Item: Programming.AV1 => will be read the presentValue
Device: WIN-CGVCS5PQ7TV:NAE4561 Item: Programming.AV1;presentValue => will be read the presentValue
Device: WIN-CGVCS5PQ7TV:NAE4561 Item: Programming.AV1;PVALM => will be read the presentValue and alarmState as explained above
Device: WIN-CGVCS5PQ7TV:NAE4561 Item: Programming.AV1{"alarmName":"Alarm1"} => will be read the presentValue with Alarm object as "Alarm1"
Device: WIN-CGVCS5PQ7TV:NAE4561 Item: FieldBus1.4oPav.FX34.BinaryInputs;status => the property status will be read
Device: WIN-CGVCS5PQ7TV:NAE4561 Item: Programming.AV1{"states":[{"Local":0},{"Remote":1},{"Automatic":2}]} => will be read the presentValue, interpreting its contents as the states Local, Remote and Automatic.
Note: If the returned value of a property is an Enum and N1=1 the driver will try to translate the text for a corresponding integer value, based on the content of the files MetatsysState0.txt and MetasysState1.txt.
For write operations, the driver obtains the command name as the property field, and sends whatever is received as the tag value, performing the translation to the corresponding Enum state if necessary.
Special Tags
Name |
Device |
Item |
Read/Write |
Description |
ClearStateCache |
Metasys_Server_Name:NAE_Device |
ClearStateCache |
R/W |
Erases the command and state cache for a specific NAE controller, without stopping the system execution. The possible values are: 0: Idle, ready to start 1: Processing 2: Finished, cache file saved To start the process, write to the tag the value 1. It will only be accepted if the current value is 0 (Idle). The tag value will be 2 automatically when the process is finished, and stays at this value until receiving a write with value 0, being ready to start again if necessary. |
FlushGUID |
Metasys_Server_Name:NAE_Device |
FlushGUID |
W |
Saves the driver GUID file (with GUID´s of all NAE´s of this driver) |
GetGUID |
Metasys_Server_Name:NAE_Device |
GetGUID:ObjectName |
R |
Returns the ObjectName GUID if it has already been obtained. Returns error if ObjectName doesn´t exist or if it is still under processing. |
GetDeviceEnumCount |
Metasys_Server_Name:NAE_Device |
GetDeviceEnumCount |
R |
It shall be a block with 2 elements. The first element returns the total object count which contains at least one tag of Enum type (N1 = 1) declared. The second returns from the object count of the previous element, how many have its commands and states already been translated from the Metasys Server. |
GetAlarmLimits |
Metasys_Server_Name:NAE_Device |
GetAlarmLimits |
R/W |
Request or Get the status of alarm limit read operation, for the tags marked with N1=2. This tag value is: 0 = Idle (Ready to start collection) 1 = Pending (Request Pending) 2 = Executing (Under treatment) 3 = Finished OK: All objects were read, ready to store file 4 = Finished Error: At least one object didn´t return its limits When tag value is 3 or 4, it is necessary to write the value 0 to the tag, so the driver will write to disk a file named NAEDevice_MetasysAlarmInfo.txt with a line for each tag, at the following format: Path;GUID;Message;LowAlarm;HighAlarm;LowWarning;HighWarning;Delay;DelayActive |
InterReqDelayMS |
Metasys_Server_Name:NAE_Device |
InterReqDelayMS |
W |
Informs a Delay in miliseconds between read requests per NAE. |
LoginStatus |
Metasys_Server_Name:NAE_Device |
LoginStatus |
R |
Informs if the driver is logged at the Metasys Server. The NAE device informed at the Device field can be any, as the driver makes only one login, independently of the number of NAE devices. |
MaxItemsRead |
Metasys_Server_Name:NAE_Device |
MaxItemsRead |
W |
Informs the maximum number of items to read on each read request for this particular NAE device. If not informed, it uses the default value informed at the driver dialog. |
ReadFailureRate |
Metasys_Server_Name:NAE_Device |
ReadFailureRate |
R |
Informs the percent rate of failed reads, calculated every 30 seconds. If the rate surpasses 10%, a new login is performed at the Metasys server, in order to check system integrity. |