I have device where serial data is mirrored into TCP port(Lantronix Xport). There is also Modbus possible but it`s MB RTU over TCP. Is there any good way to use mb rtu protocol over tcp?
Best Regards,
Risto
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
User manual of that device?
If i`m using some mb sotware where i can choose rtu over tcp everything works fine. One option is to create virtual com port and use it as mb com port. But i was hoping there is good option to do all code and config inside CodeSys.
Cant find any information about that issue.
There is possibility to set mb Slave, com port under mb TCP Slave. Looks like the option i need, but cant find any documentation and will recive "TCP communication error" after i configure any slave channel.
Do you want use modbus RTU encapsulation on Ethernet ? Or do you want use modbusRTU <=> modbus TCP ? This can be do by MGAte MOXA devices (rich solution). Recently I used cheap solution (https://pl.aliexpress.com/item/32903944684.html)
This can be work in both mention configuration. In attachements I send example how I do communication with modbus RTU Slave by Modbus TCP.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello Damina177
I want to use this "cheap" solution but it`s Lantronix x port embedded into device. Can you please send me this example how you communicate with RTU slave by TCP?
BR.Risto
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you want communicate with Modbus RTU slave by Modbus TCP you should connected RS485 to device server and Ethernet to yours Codesys device. Next in codesys you should add Ethernet adapter (IP addres like you use to connect by Codesys environment- look on attachement1), next add Modbus TCP Master (look on attachement2), next you can add several Modbus TCP Slave's.
For example if you want communicate with slave 9600/8 / N / 1 and number 2, you should add add Modbus TCP Slave like in attachement3. Unit ID is the same like number Modbus RTU Slave. Device only convert Modbus TCP to RTU and other side.
To above settings you should setting first port in device like in attachement0 .
Hello,
I have device where serial data is mirrored into TCP port(Lantronix Xport). There is also Modbus possible but it`s MB RTU over TCP. Is there any good way to use mb rtu protocol over tcp?
Best Regards,
Risto
Is there a user-manual? Is there a part number?
User manual of that device?
If i`m using some mb sotware where i can choose rtu over tcp everything works fine. One option is to create virtual com port and use it as mb com port. But i was hoping there is good option to do all code and config inside CodeSys.
Cant find any information about that issue.
There is possibility to set mb Slave, com port under mb TCP Slave. Looks like the option i need, but cant find any documentation and will recive "TCP communication error" after i configure any slave channel.
BR.
Risto
"Modbus RTU over TCP" isn't really one of the Modbus standards. I don't know how to help you further, sorry.
ok, thank you anyway. Will use socat to virtualize port.
Do you want use modbus RTU encapsulation on Ethernet ? Or do you want use modbusRTU <=> modbus TCP ? This can be do by MGAte MOXA devices (rich solution). Recently I used cheap solution (https://pl.aliexpress.com/item/32903944684.html)
This can be work in both mention configuration. In attachements I send example how I do communication with modbus RTU Slave by Modbus TCP.
Hello Damina177
I want to use this "cheap" solution but it`s Lantronix x port embedded into device. Can you please send me this example how you communicate with RTU slave by TCP?
BR.Risto
If you want communicate with Modbus RTU slave by Modbus TCP you should connected RS485 to device server and Ethernet to yours Codesys device. Next in codesys you should add Ethernet adapter (IP addres like you use to connect by Codesys environment- look on attachement1), next add Modbus TCP Master (look on attachement2), next you can add several Modbus TCP Slave's.
For example if you want communicate with slave 9600/8 / N / 1 and number 2, you should add add Modbus TCP Slave like in attachement3. Unit ID is the same like number Modbus RTU Slave. Device only convert Modbus TCP to RTU and other side.
To above settings you should setting first port in device like in attachement0 .
Last edit: damian177 2020-12-13
Now you can adds channel to communicate with your slave Modbus RTU by modbus function 3,4,6,16 etc .... (look on attachment4)