grnick50
Lifetime Supporting Member
Hello all,
I want to communicate a S7-1500 with a couple of genset controllers from a company called Datakom. The model is D500.
My questions are two:
1. The register list from the controller manual states that for multiple register read, I should use modbus function 03. From past experience I know that when using the 03 function, I should add the 40001 offset. The registers as given in the manual are in the range off 10240 to 10644. To read register 10240 for instance do I have to add 10240+40001=50241 and use this as the address for "MB_DATA_ADDR" in my "MB_Client" Function block??
2. If you see in the attached, the register list has some address "gaps". For instance, the next register after 10278 is 10292. If I want to read 10278 & 10292 Can I read the whole block from 10278 to 10292 and ignore the registers in between? Or do I need to make two calls of the "MB_Client" block and read with the first call 10278 and with the second call 10292? I am asking because I remember in the past that the first approach did not work. However I am concerned as the second approach produces very long code as there are many address segments to read in one slave. Is there a better way to do it?
Regards
Have a nice weekend
I want to communicate a S7-1500 with a couple of genset controllers from a company called Datakom. The model is D500.
My questions are two:
1. The register list from the controller manual states that for multiple register read, I should use modbus function 03. From past experience I know that when using the 03 function, I should add the 40001 offset. The registers as given in the manual are in the range off 10240 to 10644. To read register 10240 for instance do I have to add 10240+40001=50241 and use this as the address for "MB_DATA_ADDR" in my "MB_Client" Function block??
2. If you see in the attached, the register list has some address "gaps". For instance, the next register after 10278 is 10292. If I want to read 10278 & 10292 Can I read the whole block from 10278 to 10292 and ignore the registers in between? Or do I need to make two calls of the "MB_Client" block and read with the first call 10278 and with the second call 10292? I am asking because I remember in the past that the first approach did not work. However I am concerned as the second approach produces very long code as there are many address segments to read in one slave. Is there a better way to do it?
Regards
Have a nice weekend