Bridge between 2 Modbus RTU devices over ethernet LAN
Home › Forum › Convertitori di interfaccia › Bridge between 2 Modbus RTU devices over ethernet LAN
- Questo topic ha 5 risposte, 2 partecipanti ed è stato aggiornato l'ultima volta 9 anni, 2 mesi fa da
Sergio Bertana.
-
AutorePost
-
Gennaio 27, 2016 alle 12:50 pm #35921
Joze
PartecipanteHello. Can we use the “ATC-1000 Ethernet to Serial Converter” in the following configuration:
Slimline PLC programmed with LogicLab as a Modbus Slave, we would use Modbus RTU on RS485.
↑↓
ATC-1000 Ethernet to Serial Converter
↑↓
Poweline adapter 1 for LAN ethernet over electrical installation
↑↓
Poweline adapter 2 for LAN ethernet over electrical installation
↑↓
ATC-1000 Ethernet to Serial Converter
↑↓
Eaton PLC with Codesys used as a Modbus Master, again, Modbus RTU on RS485.So basically we would like to create a bridge between 2 Modbus RTU devices over ethernet LAN. Would this work ?
Gennaio 27, 2016 alle 12:54 pm #39305Sergio Bertana
Amministratore del forumYes, two ATC-1000 converters can be configured to work paired, one, must be set as a TCP server, the other must be set as a TCP client. In the TCP client, the IP address of the server must be defined. The two Powerline adapters work as an ethernet cable, so the RTU serial packets received by one ATC converter are sent out from the other ATC conveter and viceversa.
But a suggestion, it could be better to use an ethernet version of SlimLine PLC, so in this way you can connect it directly to the Powerline and using the TCPServer FB it can directly receive the data from the ATC-1000 configured as a client. Or by using the TCPClient FB it can send the data directly to the ATC-1000 configured as a server.
Gennaio 27, 2016 alle 3:33 pm #39306Joze
PartecipanteThank you for your answer and for suggesting the interesting solution with the “TCPServer” library. Do we specifically need the SlimeLine MPS053 or we can use MPS046 as well ?
The MPS053 is very limited with storage, it has only half the FlashEPROM user program storage (48kBytes vs. 96kBytes), how big projects can this run ?
We are also considering getting the Codesys SlimLine version since we are more experienced using Codesys, does it also support TCPServer/TCPClient Function blocks ?
Gennaio 27, 2016 alle 4:22 pm #39307Sergio Bertana
Amministratore del forumThe two SlimLine models MPS046 (Starting from version B) and MPS053 are both capable to run the TCPServer and TCPClient FBs. About the program memory dimension on the MPS053, it’s true it normally has half space of the MPS046 but now it’s possible to extend the memory to the same dimension of the MPS046. You must buy a DID code (The ordering code and price will be added shortly to our site).
The CODESYS version of the SlimLine has raffly the same functionality of the LogicLab version, also for it you can find the TCPServer and TCPClient FBs. If you use two CPU modules both equipped with ethernet connection, you can exchange data between them by using Modbus TCP directly on ethernet without any serial converter.
On this topic you will find a modbus RTU implementation, but it can be easily modified to use modbus TCP. On this topic a program that allow to access to the SlimLine by PHP script. The Modbus TCP client is native in the SlimLine LogicLab.
Gennaio 29, 2016 alle 12:13 pm #39313Joze
PartecipanteOh, you are right, our HMI panel has Ethernet as well so a Modbus TCP/IP solution is definetely a option, thank you for your suggestion!
I looked a bit into the thing and I think that most portable solution will be using OSCAT ModbusTCP function blocks. Eaton has some function blocks for Modbus TCP, but I’m not sure if it can be used on SlimLine PLC. Maybe you can try using it on the SlimLine ?
I also had a quick look into your solution (PHPToModbus.pro program), doesn’t look that hard to implement, but that then are basicaly ModbusRTU packets sent via TCP and not proper ModbusTCP ? As far as I know there are some differences between those two types.Gennaio 29, 2016 alle 4:53 pm #39314Sergio Bertana
Amministratore del forumThe OSCAT library is a source of informations, often i take a look on it, but I prefer to write the FBs by myself, about the Modbus you can use our FBs (In this topic you can find them).
About the PHPToModbus program (It can be reached here), and about the PHP class it uses the Modbus TCP protocol…
Don’t make confusion between RTU and TCP. The Modbus TCP frame starts with 6 bytes of additional data (Transaction Identifier, Protocol Identifier, Length) and after it’s exactly the same frame that Modbus RTU without the final 2 bytes of CRC (Please refer to this manual).
-
AutorePost
- Devi essere connesso per rispondere a questo topic.