Codesys 3.5 SP16 is running on a Raspberry PI 3 Model B with static IP address 10.0.0.1 on the ethernet port.
An Akytec IO Module (MK210-311) is connected to it. It has the IP 10.0.0.2
After downloading it seem that the Modbusslave gets connected properly according to ComState.
But as soon as I add a channel for the register request the following error appears at the slave: "tcp port error. Request was not sent" for every request.
Meanwhile the master shows following log entry: modbus/tcp slave socket keep-alive expired
Kislov, thank you very much! That's it! Now its running :)
For all the others:
Here is the screenshot for the setting.
Seems the Akytec module has an internal gateway to modbus rtu and therefore unit id 1 is needed, not 255. 255 is for the gateway itself.
Hey Codesys-Guys,
I have following setting:
Codesys 3.5 SP16 is running on a Raspberry PI 3 Model B with static IP address 10.0.0.1 on the ethernet port.
An Akytec IO Module (MK210-311) is connected to it. It has the IP 10.0.0.2
Ethernet, Modbus Master and Modbus Slave have been attached to the project and configured according to https://www.codesys-blog.com/kommunikation/modbus-kommunikation-in-codesys/
After downloading it seem that the Modbusslave gets connected properly according to ComState.
But as soon as I add a channel for the register request the following error appears at the slave: "tcp port error. Request was not sent" for every request.
Meanwhile the master shows following log entry: modbus/tcp slave socket keep-alive expired
(See also screenshots 1 bis 8)
I would be very grateful to get some hints!
Regards,
Mike
Hi there,
still looking for a solution. Any hint would be fine for me...
I also tested another modbus slave - and here it's working perfectly. So maybe akytec has a problem with the alive signal??
Regrads,
Mike
Check your screenshot #7.
Change Unit ID from 255 to 1.
Kislov, thank you very much! That's it! Now its running :)
For all the others:
Here is the screenshot for the setting.
Seems the Akytec module has an internal gateway to modbus rtu and therefore unit id 1 is needed, not 255. 255 is for the gateway itself.
Regards,
Mike