Home > Forum > LogicLab development environment information > Modbus TCP connection with multiple servers
- This topic has 1 replies, 2 participants and was last updated 4 years, 9 months ago da Sergio Bertana.
-
AuthorPost
-
June 13, 2019 at 6: 00 am #48126Giorgio BoeroParticipant
I would need to connect up to 8 proprietary devices to the Ethernet network (let's call them server 1 ... 8) with a client Cortex M7 and by modbus TCP communication cyclically query all 8 devices.
My question is: can I configure the 8 FB SysTCPClient client each with a different PeerAdd? Can 8 active communications live together? The cycle time could be less than about 50mS?
June 13, 2019 at 6: 10 am #48128Sergio BertanaAdministrator ForumYes of course you can instantiate 8 FB SysTCPClient to which you connect 8 ModbusMaster FBs and all will work in parallel independently of each other. Each SysTCPClient will connect to the IP address of the server device and the ModbuaMaster will be able to exchange data with it.
The 50mS you request could also be possible, but the modbus protocol is not optimized for speed, a response is expected to be received for each command and if you have to write and read data from the server, 4 packets will be needed, then there is a TCP communication. Ack packages should also be considered.
To increase the speed if your server manages it you can use a UDP communication with the FB SysUDPClient in this case avoid the Ack packages.
If the systems were all SlimLine more optimized communication is achieved with the library eLLabDataExchLib which manages the sending of data only on variation and in the Ack packet there are also read data.
-
AuthorPost
- You must be logged in to reply to this topic.