Hi there,
I'm using an S7-1200 system and I have followed a Siemens application example to read/write data to 1x slave using Modbus RTU and a CM1241 communication module.
I have a partially working system. I have appear to have an issue with reading data more than 1x register from my Modbus slave device.
If I read say:
DATA_ADDR: 40013
DATA_LEN: 1
It works fine (I get a value back from the slave) but if I increase my DATA_LEN to > 1, then I get Rx/Tx flashing normally but no data back and I get the following error code:
818D
This doesn't appear in any help file!
I'm using the following set-up:
TIA-Portal V14
S7-1212C fw: 4.2
CM1241 (RS485)
I've configured my modbus_comm_load (V3.0) and my modbus_master (V2.4) as per the application example.
I also observed that if I increase my DATA_LEN to say 32, the TX/RX LEDs stay on for a greater length of time, which implies that the slave is actually responding to the request and maybe the PLC code isn't managing the data correctly. Are there any special DB settings I need to be aware of? The application example states "Optimized block access" is disabled (which I have done).
Also, if I run Modbus Poll I can read the required data without any issues. My Modbus poll scan rate is set to 1000ms. I don't seem to have an equivalent scan rate setting in TIA-Portal that I can adjust.
Any help or advice would be greatly appreciated.
Regards,
Justin
I'm using an S7-1200 system and I have followed a Siemens application example to read/write data to 1x slave using Modbus RTU and a CM1241 communication module.
I have a partially working system. I have appear to have an issue with reading data more than 1x register from my Modbus slave device.
If I read say:
DATA_ADDR: 40013
DATA_LEN: 1
It works fine (I get a value back from the slave) but if I increase my DATA_LEN to > 1, then I get Rx/Tx flashing normally but no data back and I get the following error code:
818D
This doesn't appear in any help file!
I'm using the following set-up:
TIA-Portal V14
S7-1212C fw: 4.2
CM1241 (RS485)
I've configured my modbus_comm_load (V3.0) and my modbus_master (V2.4) as per the application example.
I also observed that if I increase my DATA_LEN to say 32, the TX/RX LEDs stay on for a greater length of time, which implies that the slave is actually responding to the request and maybe the PLC code isn't managing the data correctly. Are there any special DB settings I need to be aware of? The application example states "Optimized block access" is disabled (which I have done).
Also, if I run Modbus Poll I can read the required data without any issues. My Modbus poll scan rate is set to 1000ms. I don't seem to have an equivalent scan rate setting in TIA-Portal that I can adjust.
Any help or advice would be greatly appreciated.
Regards,
Justin