Applies To:
  • CitectSCADA 1.20, 2.01, 3.x, 4.x

Some non standard PLCs support the Modbus protocol. However, some of these I/O Devices do not support the Modbus protocol correctly. When Citect tries to communicate with these I/O Devices, you may get errors on startup or during communication. 

To work around these non standard devices, the Modbus drivers allows some special options to change its operation. These options are supported in Version 1.20 and 2.01 and later.

On startup, Citect tries to read some digital inputs to verify that the PLC does exist. If Citect cannot read these bits, it will assume the PLC is bad and it will remain offline. Some of the non standard I/O Devices don't support digital bits, so this command fails. You can change the type of variable the modbus protocol tries to read on startup - to allow communication to start. The CITECT.INI option [MODBUS]InitType sets the read type as follows:

The default is 2.

1 00001 - 00017 Output status
2 10001 - 10017 Input status
3 40001 Output registers
4 30001 Input registers

In Citect versions 3.30, 4.10 and later the InitType setting is no longer important, this new driver will assume that the PLC should go online if it gets either a good reply or error 0x003 or 0x002 from the PLC.

The standard modbus driver allows reading of 2000 bits in one request. Some of the non standard I/O Devices don't support reads this large. You can change the maximum read size with the option [MODBUS]MaxBits=<number>, the default it 2000. You must also change the MAX_LENGTH field for the modbus protocol in \CITECT\BIN\PROTDIR.DBF to the same value. You must recompile your project after changing this option. Don't forget that if you reinstall Citect, the PROTDIR.DBF file will be overwritten and you will have to do the change again.

Some I/O Devices operating over radio modems also require the padding of the protocol messages. These padding characters will wake up the radio modem to allow the rest of the message to be transmitted. The option [MODBUS]Padd=n is the number of characters to pad, [MODBUS]PaddChar is the ASCII code of the character to pad.


Will pad 20 0xFF characters to the start of the message.