Gert Posted April 26, 2020 Report Share Posted April 26, 2020 Request for help, Im struggling with the following problem, i have a master PLC v1040 and 6 slave PLC s also v1040's . From the slaves i want to read measurement values every cople of seconds. im able to read 1 slave but im struggling with the fact that i have only 4 sockets and more than 4 slaves to connect to so i know that i have to connect disconnect continuously . i use socket 3 to connect the slaves. Can anyone help me out? thanks in advance. Gert. Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted April 26, 2020 MVP 2023 Report Share Posted April 26, 2020 It seems like you understand things well. Based on your question I am assuming you are using MODBUS TCP. If you have only a few seconds available between readings then you will need to use multiple sockets. For simplicity, I would use 3 sockets (leaving the 4th for communication with VisiLogic or a SCADA system, etc. Each socket will be used to connect to two slaves. For each socket, you will need to connect to one slave, exchange data, disconnect from the slave, connect to the second slave, exchange data, disconnect, and repeat. The only trick is to allow plenty of time to connect and disconnect, as it can take some time to complete that function. Link to comment Share on other sites More sharing options...
Gabriel Franco Posted April 26, 2020 Report Share Posted April 26, 2020 I use UDP instead of TCP set as protocol in a single socket init. With UDP there is not need of connect/disconnect everytime I change to the next slave query. Query first slave, wait for its response, process data, wait a small time, query second slave and so on. 1 Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted April 26, 2020 MVP 2023 Report Share Posted April 26, 2020 @Gabriel Franco, I have often wanted to do that in certain situations, but always worried that the UDP protocol and TCP protocol might not coexist well on a customer's network that is using TCP. Are you aware of any issues with that? Link to comment Share on other sites More sharing options...
Gabriel Franco Posted April 27, 2020 Report Share Posted April 27, 2020 I have mixed different protocols in different sockets without any problem Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted April 27, 2020 MVP 2023 Report Share Posted April 27, 2020 14 minutes ago, Gabriel Franco said: I have mixed different protocols in different sockets without any problem Actually, I was more concerned about a customer's network than I am about mixing protocols within a Unitronics PLC network. Link to comment Share on other sites More sharing options...
Gabriel Franco Posted April 27, 2020 Report Share Posted April 27, 2020 No problem at all, either Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted April 27, 2020 MVP 2023 Report Share Posted April 27, 2020 44 minutes ago, Gabriel Franco said: No problem at all, either Thanks! That is good to know. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now