Applies To:
  • CitectSCADA 6.00
  • CitectHMI 6.00

Summary:
The Cicode function TagRead does not seem to work properly when reading Alarm Properties as Tags if the alarm tag looks like a variable tag array.
Say for instance a TagRead("DigitalArray[09].Ack") is performed, it always returns 1. What can be done to solve this?
 

Solution:
What is happening is that the TagRead function searches through the tag name until it reaches "[". Once it gets to this, it then reads the size, i.e. "09". It then drops the rest of the trailing characters in the argument. So instead of reading "DigitalArray[09].Ack", it is actually reading the value of variable tag "DigitalArray[09]" which in your case is why it is returning 1.
The use of "[" or "]" in Alarm Property Tags is not supported. The only solution is to change the Alarm tag, so that it does not use "[" or "]" in the tag.
You can rename the Alarm tag from "DigitalArray[09]" to "DigitalArray{09}". This change will not result in any loss of Alarm data. The Alarm, and Alarm summary records are based on Alarm record numbers. Obviously if the Alarm summary has been logged to a device, then you will see a slight difference in the name - from where you made the change, but this is just a cosmetic problem which you can rectify by manually editing the summary log device if desired.
 

Keywords:
Alarm Properties as Tags, bracket, [, ], array 
 

Attachments