Applies To:
  • CitectSCADA 1.00, 1.01, 1.10, 1.11, 2.00

Under some conditions ReRead(), will not appear to read data back from the PLC that has just been written to. If your Cicode has just written to a PLC variable, and you call the ReRead() function, the PLC data may be read from the I/O Servers unit cache. This may happen as the write is waiting for the protocol driver to finish existing requests, and during this time the ReRead() function will get data from the unit cache. When the write is completed, the I/O Server will flush the read data associated with the write, so the next read will read fresh data from the PLC. 

A workaround for this problem is to either sleep for the cache time before calling ReRead(), or disable the cache for that unit. It is better to sleep as it only effects the performace of that section of Cicode. For example if your cache time is 500ms, sleep for 1 second.


In Version 2.01 and 1.20 the I/O Server will flush the unit cache data when it queues a pending write as well as the existing flush when the write is completed. This will solve the problem for versions 2.01 and 1.20 and later.