dexdyne
Civil/Environmental
- Jul 10, 2007
- 8
I am aware that Modbus is seen as a set of 16-bit registers.
I am aware that some of the numbers I'll want to read across a Modbus will need >1 adjacent 16-bit registers - floating point for instance needs 2 or 4.
Similarly some data will neeed 32-bit integers, which could suffer in the same way.
It would obviously be a disaster if I read the top 16 bits of an old value, and the bottom 16 bits of a new one. Integer counters could be wrong by 64K, floating point values by almost any amount.
If we use the modbus "read-a block-of-registers-at-once" command, can we be totally confident that the PLC will snapshot all the registers in the block in between any 32-bit-integer or floating-point write operation by the PLC program, and that we CANNOT be given an inconsistent half-and-half value?
Or do I need to do multi-register transfers using all sorts of software semaphores and software routines built into the PLC software to be certain of consistency?
David
I am aware that some of the numbers I'll want to read across a Modbus will need >1 adjacent 16-bit registers - floating point for instance needs 2 or 4.
Similarly some data will neeed 32-bit integers, which could suffer in the same way.
It would obviously be a disaster if I read the top 16 bits of an old value, and the bottom 16 bits of a new one. Integer counters could be wrong by 64K, floating point values by almost any amount.
If we use the modbus "read-a block-of-registers-at-once" command, can we be totally confident that the PLC will snapshot all the registers in the block in between any 32-bit-integer or floating-point write operation by the PLC program, and that we CANNOT be given an inconsistent half-and-half value?
Or do I need to do multi-register transfers using all sorts of software semaphores and software routines built into the PLC software to be certain of consistency?
David