Hi all :)
I have an plc. This plc has option to be as slave device.
There are TCP -> Serial Slave Device and COM -> Serial Slave Device.
There are 4096 ModBus holding registers with mark "internal modify" for the both devices above. So, COM Slave has 4096 registers and TCP Slave has 4096 registers.
And, finally, I have an ARRAY[0..4095] OF WORD. This array glued with COM Slave and TCP slave. Yes, I need plc's opportunity to be communication both TCP and COM ways for the same registers.
For example, the next task structure:
* TASK_0:
1. pou_READ_Registers
2. pou_0
3. pou_1
4. ...
5. pou_N
6. pou_WRITE_Registers
At the first pou I read registers for the other pous, after job we have sort of state of the plc. At the last pou (6) we write modified registers. It is a good scenario: some one wrote registers for the job, after job we save these (modified) registers.
But, what if registers wrote between 1 and 6 pou by operator, for example, at the 3 pou -> the last pou 'pou_WRITE' will rewrite this request from operator.
What the right way to work with this logic? Thanks you.
Last edit: wbj0t 2024-07-01
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all :)
I have an plc. This plc has option to be as slave device.
There are TCP -> Serial Slave Device and COM -> Serial Slave Device.
There are 4096 ModBus holding registers with mark "internal modify" for the both devices above. So, COM Slave has 4096 registers and TCP Slave has 4096 registers.
And, finally, I have an ARRAY[0..4095] OF WORD. This array glued with COM Slave and TCP slave. Yes, I need plc's opportunity to be communication both TCP and COM ways for the same registers.
For example, the next task structure:
* TASK_0:
1. pou_READ_Registers
2. pou_0
3. pou_1
4. ...
5. pou_N
6. pou_WRITE_Registers
At the first pou I read registers for the other pous, after job we have sort of state of the plc. At the last pou (6) we write modified registers. It is a good scenario: some one wrote registers for the job, after job we save these (modified) registers.
But, what if registers wrote between 1 and 6 pou by operator, for example, at the 3 pou -> the last pou 'pou_WRITE' will rewrite this request from operator.
What the right way to work with this logic? Thanks you.
Last edit: wbj0t 2024-07-01