naturephoenix
Member
Hello,
I'm able to read data from the slave with my master s7-1200 PLC.
Now my task is to read multiple registers with address as follows:
(Modbus RTU Register (1-based))
1033
1065
1097
1129
1161
1277
1382
1478
1542
2109
2133
3049
4011
4013
4015
4017
4188
4192
4424
4426
4428
4430
4432
4434
4496
5015
5017
5019
5251
5253
5255
For each this register I know data type.
Can you please tell me what's the correct approach in this cases:
I have 2 ideas on my mind:
Option 1:
Inside PLC create huge DB which covers all registers I need and + spares between needed registers. In that case I just need to use once MASTER function inside PLC and point on starting register and take a lot of bytes. Correct me if I am wrong. My baundrate is 9600, so thats 1200 bytes per sec, that is good speed. So reading 200 bytes (even I do need 30) is not such a problem with this speed, or it is?
Option 2:
Create a loop inside SCL, inside I change register number and my DB_Area adress(place where I store data) everytime I get done and no error signal on pisitive edge. On this way for every register I need to call MASTER FC.
Not for every register, lets say for each GROUP, because some of the data I need from Slave are next to each other(Group 1 ->4424 ,4426, 4428, Group 2 ->4011 ,4013 ,4015, 4017
What do you guys do in such a cases? What should I do?
I'm able to read data from the slave with my master s7-1200 PLC.
Now my task is to read multiple registers with address as follows:
(Modbus RTU Register (1-based))
1033
1065
1097
1129
1161
1277
1382
1478
1542
2109
2133
3049
4011
4013
4015
4017
4188
4192
4424
4426
4428
4430
4432
4434
4496
5015
5017
5019
5251
5253
5255
For each this register I know data type.
Can you please tell me what's the correct approach in this cases:
I have 2 ideas on my mind:
Option 1:
Inside PLC create huge DB which covers all registers I need and + spares between needed registers. In that case I just need to use once MASTER function inside PLC and point on starting register and take a lot of bytes. Correct me if I am wrong. My baundrate is 9600, so thats 1200 bytes per sec, that is good speed. So reading 200 bytes (even I do need 30) is not such a problem with this speed, or it is?
Option 2:
Create a loop inside SCL, inside I change register number and my DB_Area adress(place where I store data) everytime I get done and no error signal on pisitive edge. On this way for every register I need to call MASTER FC.
Not for every register, lets say for each GROUP, because some of the data I need from Slave are next to each other(Group 1 ->4424 ,4426, 4428, Group 2 ->4011 ,4013 ,4015, 4017
What do you guys do in such a cases? What should I do?