D
I'm worried about if, when and how one needs to be cautious about possible inconsistencies of data when read on a modbus.
I know that some objects one might read across a modbus are in fact bigger than a single modbus 16-bit regsiter. Starting with 32-bit fpt, but there may be many more.
Our driver will consolidate together all registers in the same device which lie on contiguous addresses and read them with a single transaction.
I was intitally worried about whether the transfer of the read-out values to a buffer from which they will be sent to the modbus master could ever catch a 32-bit value in an inconsistent state. For instance could one get the top half of an old fpt value, and the bottom half of a new one.
Some discussion has conviced me that most PLC devices will only move data from the PLC application memory to the transmit buffer inbetween PLC steps, so the data values stored by the PLC should always be consistent.
However, I did find (can't locate it now) a PLC device which said that if you asked for more than 32 reghsiters, it would transfer 32 to the transmit buffer between 2 steps, the next 32 between the next 2 steps, and so on until it had built a complete reply.
It sesesms to me that could cause inconsistency if a floating-point value spans locations 32 and 33, for instance.
Does anyone have any light to shed on this whole area?
David
I know that some objects one might read across a modbus are in fact bigger than a single modbus 16-bit regsiter. Starting with 32-bit fpt, but there may be many more.
Our driver will consolidate together all registers in the same device which lie on contiguous addresses and read them with a single transaction.
I was intitally worried about whether the transfer of the read-out values to a buffer from which they will be sent to the modbus master could ever catch a 32-bit value in an inconsistent state. For instance could one get the top half of an old fpt value, and the bottom half of a new one.
Some discussion has conviced me that most PLC devices will only move data from the PLC application memory to the transmit buffer inbetween PLC steps, so the data values stored by the PLC should always be consistent.
However, I did find (can't locate it now) a PLC device which said that if you asked for more than 32 reghsiters, it would transfer 32 to the transmit buffer between 2 steps, the next 32 between the next 2 steps, and so on until it had built a complete reply.
It sesesms to me that could cause inconsistency if a floating-point value spans locations 32 and 33, for instance.
Does anyone have any light to shed on this whole area?
David
