Home > Forum > Interface converters > Modbus TCP / RTU gateway in multidrop connection
tagged: MODBUS LIBRARY eLLabMdbDevsLib
- This topic has 6 replies, 2 participants and was last updated 3 years ago da Sergio Bertana.
-
AuthorPost
-
February 24, 2021 at 2: 27 pm #59150MarcelloParticipant
I need to connect some devices in multidrop connection to a Modbus TCP / Modbus RTU gateway which converter can I use?
February 24, 2021 at 2: 40 pm #59152Sergio BertanaAdministrator ForumAll ATC Modbus gateways allow you to manage multiple devices (up to 485) connected in multidrop on the RS32 port (a twisted cable must be used for the connection). By connecting to the converter in TCP it is possible to send Modbus commands indicating the node number to which to send the command.
The Modbus RTU packet with the node number will be sent to the RS232 or RS485 serial port, and only the addressed device will respond. The received Modbus RTU packet will be converted to Modbus TCP and sent as a response.
ATC-1300: It can only operate as a server.
ATC-3002: It has extensive configurability and allows it to be configured as a server or as a client.
February 24, 2021 at 4: 13 pm #59153MarcelloParticipantWell thanks, problem solved.
March 28, 2021 at 11: 50 am #59368StefanoParticipantI hook to this post for a similar application. There are about twenty energy meters connected on an RS485 bus with MODBUS RTU protocol. I need to connect a TCP / RTU gateway to the bus to be able to read the registers from the network.
Then I will have a virtual machine, on which MES software runs, which will periodically poll the meters to detect the energy consumed. On another virtual machine, a supervisor software will read the various data relating to instantaneous voltages / currents / powers.
Given that I will have to check the polling times well in order not to saturate the bus, it could happen that the two software make a request almost simultaneously, so the gateway must be able to queue the requests or in any case manage the case.
What could be the most suitable product?
March 28, 2021 at 11: 58 am #59382Sergio BertanaAdministrator ForumBy reading the documentation of the Modbus TCP Gateway to RTU / ASCII ATC-3002 it looks like it can handle the Modbus request queue and so it should solve the problem for you. I personally have never tried to manage more than one simultaneous connection.
For our systems SlimLine we developed the FB ModbusTCPGateway which allows you to manage multiple simultaneous connections. Having developed it we know exactly how it works, in practice when it receives a Modbus TCP request it transforms it into RTU and forwards it on the serial port, waiting for the response that will be redirected to the TCP client.
If several clients make simultaneous requests, naturally it is necessary for those who arrive later to wait for the previous request to be concluded with an inevitable lengthening of the times.
But being it SlimLine programmable, you can also cyclically interrogate all the devices in RTU by placing the data in the system registers that will be interrogated via Modbus TCP (The system accepts multiple simultaneous Modbus TCP connections) in this case you have no delay times. moreover, by managing the data from the program, you can execute any swaps to adapt the endianness on the 32-bit variables.
April 20, 2021 at 7: 54 am #59648[email protected]ParticipantI also have a Lovato energy meter reading application, connected in cascade in RS485, I have to create an application that cyclically reads me the various devices in Modbus from my PLC.
I have an MPS054B110, and as shown in the examples on the site I have tried to include the eLLabMdbDevsLib library, the last one downloaded from the site to use the MODBUS functions. Unfortunately, as I start the compilation, only with the library included, and no command line or call to the FBs, I always get this compilation error:
ModbusMaster_v1.File – error A4108: eFILEP => Base object not found.
Any suggestions ?
April 20, 2021 at 8: 03 am #59655Sergio BertanaAdministrator ForumThe new libraries have all been converted for the new architecture XUnified (See article), probably yours SlimLine has a firmware version yet XTarget. You now have two options:
1) Include the library in your project as well eLLabXTargetAdjLib.
2) Perform a system upgrade and convert it to a system XUnified (See article).I definitely recommend the second solution that allows you to update the system making it compatible with all new library versions.
I add a tip to acquire the various meters you can use the FB ACModbus, Array command Modbus, which relying on a single instance of the FB ModbusMaster_v1 it allows to automatically sequence the various acquisitions.
-
AuthorPost
- You must be logged in to reply to this topic.