bluffit
Member
I wonder if you can assist with a design dilemma.
There is a digital output bit on a wireless device somewhere.
Our data logger/remote device controller that doubles as a Modbus master sets/unsets this bit based on a change in a register (which would have been triggered from a separate slave process - i.e. a generic PLC).
However, this data logger will also be updating the state of all pins/bits to the same Modbus master.
If we use the same register for both types of updates there would be contention and a possible race condition with different processes updating the same bit! One to set it, and the other to report it.
Am sure this sort of problem must have been solved before and wondered what the convention was. Do we use separate registers perhaps?
thx.
There is a digital output bit on a wireless device somewhere.
Our data logger/remote device controller that doubles as a Modbus master sets/unsets this bit based on a change in a register (which would have been triggered from a separate slave process - i.e. a generic PLC).
However, this data logger will also be updating the state of all pins/bits to the same Modbus master.
If we use the same register for both types of updates there would be contention and a possible race condition with different processes updating the same bit! One to set it, and the other to report it.
Am sure this sort of problem must have been solved before and wondered what the convention was. Do we use separate registers perhaps?
thx.