nong7215 Posted August 13, 2014 Report Share Posted August 13, 2014 Do you know that how to config modbus tcp master to slave together. thank you Mr.noynong Link to comment Share on other sites More sharing options...
Alexander Posted August 13, 2014 Report Share Posted August 13, 2014 When communicating over an Ethernet network you will first need to ensure that each device has a unique IP address. All of the slave devices should have a different IP address or the V130, or any other devices will not be able to differentiate from one device from another. We do have example programs for Modbus IP for both master and slave configurations. These can be found within our VisiLogic software by navigating to the help menu and selecting Examples. As the Modbus IP master you will follow the sequence listed below: Connect to the slave device using the required IP address and port Send the required Modbus commands Disconnect from the slave device (Optional) Connect to another slave and repeat steps 1-3 Please note: Our Ethernet cards have 4 sockets (Ethernet port configurations) that can all be used simultaneously. Link to comment Share on other sites More sharing options...
nong7215 Posted August 13, 2014 Author Report Share Posted August 13, 2014 Thank you, Mr.Alexander i need connect modbus TCP salve 4 ip together. Link to comment Share on other sites More sharing options...
nong7215 Posted August 14, 2014 Author Report Share Posted August 14, 2014 You have have example programs to config multi IP Link to comment Share on other sites More sharing options...
s.pratt Posted August 14, 2014 Report Share Posted August 14, 2014 Hello, Thank you for using our Unitronics Forum. We have example projects of how to configure Modbus communications over Ethernet in the help menu of VisiLogic. Please navigate to the help tab> Examples...>Version 900> Project Examples> Communications> Ethernet> Ethernet MODBUS IP In this folder, you will find example programs for Modbus Master and Slave configurations. Also, we have a webinar full explaining these set-ups with our software on our Webinars page under the support tab: http://www.unitronics.com/support/webinars/modbus Link to comment Share on other sites More sharing options...
nong7215 Posted August 14, 2014 Author Report Share Posted August 14, 2014 I want to connect for real-time to slave. Link to comment Share on other sites More sharing options...
s.pratt Posted August 14, 2014 Report Share Posted August 14, 2014 Hello, In order to connect to the 4 slave units, you must connect over different sockets, or connect to them 1 at a time with socket 0 and disconnect when you are done communicating to each slave. In your second picture I noticed you have 4 socket 0 connect blocks; you must use different sockets and initialize the sockets. The sockets we have in VisiLogic are Socket 0 (which you have used), Socket 1, Socket 2 and Socket 3. Please configure these and connect them with an assigned slave IP for each of them. Link to comment Share on other sites More sharing options...
nong7215 Posted August 15, 2014 Author Report Share Posted August 15, 2014 How many config in socket 0 ? Link to comment Share on other sites More sharing options...
s.pratt Posted August 15, 2014 Report Share Posted August 15, 2014 You can connect to one IP address at a time with a single socket. This is similar to your power outlet: for a single power socket, you can only plug in one device at a time. For example, your computer is plugged in now, so you cannot plug anything else in. You must remove your computer's power cord to plug in another device like your TV. Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted August 15, 2014 MVP 2023 Report Share Posted August 15, 2014 Just to make sure it's clear: You have two choices when communicating with four other devices over Ethernet. You may either: 1) connect to all four simultaneously using four different sockets, or 2) connect to each device sequentially using a single socket, connecting and disconnecting each time you transfer data. For #1 you will have separate ladder rungs with four Socket Initialization function blocks, four Configuration function blocks, four Connect function blocks, and four Read and/or Write function blocks. For #2, you will only have one of each, but the IP address must be indirect (using 4 MIs). You must load the IP address into the MIs, execute the Configuration block, execute the Connect, do the Read/Write, then disconnect and repeat for each of the remaining three devices. Link to comment Share on other sites More sharing options...
Henny Posted August 15, 2014 Report Share Posted August 15, 2014 Hello You could check if your slave devices(also called server devices in ethernet terms) support UDP protocol and if Yes then you don,t have to use the connect and disconnect blocks and would only need one socket. Regards Henny 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