Cicode Programming Reference > Writing Functions > Tag Reference /TagReadEx() behaviour in Cicode Expressions

Tag Reference /TagReadEx() behavior in Cicode Expressions

The following table describes the tag reference and TagReadEx() behavior in a Cicode expression if the quality of the tag is BAD:

Tag Reference / TagReadEx syntax Error Mode/Citect.ini settings Cicode Expression behavior
“Tag1” ErrSet(0)
[Code]HaltOnInvalidTagData = 0
Tag ref returns a BAD quality value, Cicode expression continues, Error is set.
TagReadEx(“Tag1”) ErrSet(0)
[Code]HaltOnError = 0
Function returns a BAD quality value, Cicode expression continues, Error is set.
“Tag1” ErrSet(0)
[Code]HaltOnInvalidTagData = 1
Tag ref returns a BAD quality value, Cicode expression stops.
TagReadEx(“Tag1”) ErrSet(0)
[Code]HaltOnError = 1
Function returns a BAD quality value, Cicode expression stops.
“Tag1” ErrSet(1) Tag ref returns a BAD quality value, Cicode expression continues, Error is set.
TagReadEx(“Tag1”) ErrSet(1) Function returns a BAD quality value, Cicode expression continues, Error is set
“Tag1.V” ErrSet(0) or ErrSet(1) Tag ref returns a GOOD quality value, Cicode expression continues, No error is set.
TagReadEx(“Tag1.V”) ErrSet(0) or ErrSet(1) Function returns a GOOD quality value, Cicode expression continues, No error is set.

See Also

TagReadEx()

Tag Functions