Jump to content

Recommended Posts

I'm having some difficulty getting communications between several V570 PLCs. My desire is to have two Masters that each talk to a single slave (but not to each other directly) and have a 5th PLC acting as Master and talking to the two Master PLCs but treating them as slaves. I'm using MODBUS IP to communicate. I have had no problem getting all PLCs to communicate with a single Master and 4 Slaves, but can't get this arrangement to work. See attached drawing. I can get PLC2 & PLC3 talking to each other and PLC4 talking with PLC5. When I attempt to connect PLC1 to PLC2, they connect just fine (both PLCs show they're connected), but they won't exchange data. PLC1 shows a TXD to PLC2 but no RXD from PLC2. PLC2 shows a RXD from PLC1 but no TXD to PLC1.

Is a V570 acting as both Master to one PLC and Slave to another not possible, or do I just have something awry in my setup?

Other possibly important info: PLC1 is actually a V1210. PLC2-5 are V570s. I am using Visilogic 9.4.0 and Win 7 64-bit.

Link to post
Share on other sites

Do you actually have them wired like that or do you have them all tied to a common switch?

I haven't tried it in practice, but my first gut feeling is to set up separate sockets and port numbers for master and slave communication in each PLC.

I opened up Visilogic and was able to define two Modbus IP config blocks. I set the first one to use socket 0 port 20000. This is the one I would use for the master. You do have to init the socket to use TCP and set it as a master. Then I dropped another Modbus IP config block and set it to socket 2, which is Modbus slave on port 502 by default. In the following network I dropped a ScanEX block using MODBUS_IP2.

Try it and let us know if it works or if I'm on dope.

Joe T.

  • Upvote 1
Link to post
Share on other sites

Thanks for the reply, Joe. Yes, they're all tied to a common ethernet switch - I should've mentioned that. The arrows in my picture were intended to denote line of communication, not actual ethernet cable.

I used different actual port and socket numbers than you mention, but that is exactly what I did. I initialized two sockets in the Master/Slave PLCs with different port numbers and initialized a single matching port/socket in the Slave-only PLCs. Those PLCs communicate properly and exchange data. In the top Master PLC (the V1210), I initialized two sockets/ports, one for each of the Master/Slave PLCs (#2 & #4) and had one of the ports set as slave and the ScanEx block. The sockets initialize and connect and show as connected on all PLCs, but the Master/Slave PLCs (#2 & #4) do not respond to #1 with a TXD, though they show RXD from #1.

There are so many settings that have to be exactly right across all the PLCs that it's very easy to miss something or make a typo that's difficult to find. I guess my primary question is, is this theoretically possible and it's not working because I have a setup issue, or is the situation of a single PLC acting as Master to one PLC, but Slave to another - and exchanging data with both - not a capability I should be expecting?

Link to post
Share on other sites
  • 3 years later...
1 hour ago, Flex727 said:

Yes, I just had a configuration issue (port numbers weren't addressed properly). These PLCs can definitely act as both a Master and a Slave simultaneously.

Nice, I have a pretty good number of applications running that way. My only recommendation is trying to use an Unistream as Master. The communication is much better and so easy to do it. 

Good luck 

Link to post
Share on other sites
  • 1 year later...

Hi, I'm trying to do almost same thing, but only one PLC (Vision 1210). It is Master when comunicating with a rpm driver trough serial. And it is Slave when I try to communicate from software in my laptop trough ethernet (software creates a master instance). PLC works perfect when controlling rpm driver. From laptop to PLC the connection is established (I open a tcp/ip connection using IP and port 502 of PLC and it says "OK" without errors), but when try of read holding registers nothing happens.

I know there are two sources of error: 1) software is not asking properly for the registers. 2) PLC setting are wrong.

I ask you to give a look in my PLC configuration and tell me if you see any problem.

Thank you in advance.


Extra info: PLC Vision 1210, software is LabView. Visilogic version 9.8.64. Win 7 32-bit


Link to post
Share on other sites

You're piling too much stuff into one ladder rung. I've never tried to perform MODBUS Config before Socket Init, but it is likely important to perform the Socket Init first. Your ladder rung loses control over that order execution. Try breaking that rung into 3 or more separate rungs.

I'll repeat something I've said before - Unitronics WILL NOT charge you by the rung. Break your code up into the basic simple instructions for both readability and to have more certainty that the code will compile the way you think it will.

If that doesn't solve your problem, then you need to post the internal workings of each of your function blocks or post your .vlp file here.

Link to post
Share on other sites
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...