Applies To:
  • CitectSCADA 3.xx, 4.xx, 5.xx

I am using Citects MODBUS Plus driver to communicate to a Quantum Modicon PLC. The problem is that the driver does not read or write to any digitals, but will read analogs ok. There is no hardware error when it displays the digitals, but they are shown as all off even though I know most are on. A hardware error occurs when I try to write to a digital output coil. It returns a driver error (0x00000024) which I see from KB article Q1399 means "Cannot perform write". I have checked with online help to ensure my addresses lie within a valid range. What is the problem? 

The online help defines the valid data types and addresses for each PLC. For example for a 484 series PLC:

Data Types Address Format Citect Data Type

Data Types Address Format Citect Data Type
Output Coils 00001 to 09999 DIGITAL
Input Status 10001 to 19999 DIGITAL
Input Registers 30001 to 39999 INT / LONG / STRING / REAL
Output Registers 40001 to 49999 INT / LONG / STRING / REAL
Address 00001
Comment Output Coil 00001

When addressing Output Coils it is necessary to include leading zeros in the variable tag address as per the example. Citect uses the first digit to determine the data type. For example if defining a tag at address 1454 ensure you define the address as 01454. If you do not then the compiler will detect the leading digit which in this instance is 1 and will incorrectly interpret the following characters to reference an Input status. Hence Citect will attempt to write to register 10454 which is an input coil (ie read only) and will result in the aforementioned hardware alarm. Similarly Citect will be displaying data from registers in a different range to those which you think you are referencing, hence yielding unexpected results.

For information on the modbus 6-digit addressing scheme, refer to seperate KB article Q2800.