Applies To:
  • CitectSCADA

Summary:
In some cases, it is possible to read data from a device even though the processor module is not running. In those situations it may be useful to be able to detect this situation by monitoring a continuously changing register or a digital. If the register fails to change in a given period or the digital becomes zero then the processor can be assumed to have stopped running. Does the Modbus driver support this internally? 

Solution:
If enabled, the above mentioned drivers will check on startup and approximately every watchtime that a user specified variable in the PLC is changing. If a digital is specified, the value must always be on, otherwise the unit is put offline. If an analog is specified, on startup two consecutive reads are performed with a interval of 1000 ms (specified by [Driver]Timeout, where Driver is the driver name). The two reads must get different values before the unit can be put online. At every watchtime, if the digital is off or the analog data does not change from the last value read, then the driver returns error 0x2C (unit status bad) and puts the unit offline.

The PLC status variable is specified and enabled by the "status" citect.ini variable.

[driver]
status = RawType, BitWidth, UnitType, UnitAddress, UnitCount

Where:

  • RawType is 0,1,4 and 8 for Digital,Int,Long and Byte respectively.
  • BitWidth is 1,16,32 and 8 for Digital,Int,Long and Byte respectively.
  • for UnitType see variable specification .dbf files.
  • UnitAddress is the item number or bit number.
  • UnitCount is normally 1 for analog and 16 for digitals.

0x,0b,0o formatting is recognised.

For example, to specify modbus address 40001 as the analog tag variable which must change to indicate the device is online, use:

[modbus]
status=1,16,3,0,1

To use modbus address 00001 as the digital tag variable which must remain set to 1 to indicate the device is online, use

[modbus]
status=0,1,1,0,16

 

Keywords:
 

Attachments