Applies To:
  • CitectSCADA
  • CitectHMI

I tried to write a value outside the tag engineering scale defined in the variable database but I received a hardware alarm "257 - Value is out of range" at runtime and the value write was denied. I do not want to change the engineering scale. How can I work around this problem? 

There are two settings that allow a out of range value to be written back to PLC.

For the local setting, you should use Cicode function CodeSetMode(1, 0) to disable the value checking. Cicode commands of tag value assignment must immediately follow CodeSetMode call. The scope is local and any attempt to write out of range values outside your code block starting with CodeSetMode will be denied and generate a hardware alarm.

For the global setting, you should use Parameter [Code]ScaleCheck = 0 to disable the value checking. Please be aware that this will turn off the value checking safe guard globally.

It is noted that these settings DO NOT apply to

1. Cicode function TagWrite()

2. CTAPI functions: ctListWrite() and ctPointWirte() and ctTagWrite().

These functions still check a value before writing it to PLC. If the value is out of range, write will fail but no hardware alarm will be generated.