Tech Posted March 22, 2019 Report Share Posted March 22, 2019 dear sir, i have 4 vessels having individual plcs model is v700, Each plc having individual festo valve (16 way digital outputs) in tcp/ip protocol, my first plc ip is 192.168.1.50 and my festo ip is 192.168.1.1 my second plc ip is 192.168.1.51 and my festo ip is 192.168.1.2 my third plc ip is 192.168.1.52 and my festo ip is 192.168.1.3 my fourth plc ip is 192.168.1.53 and my festo ip is 192.168.1.4 Question 1 : How to handshaking all plc in one loop (ex: i want to transfer my first vessel product to 2nd,3rd and 4th vessels.) regards, Mohamed Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted March 22, 2019 MVP 2022 Report Share Posted March 22, 2019 Sounds like you are just interested in data transfer between all the PLCs, not handshaking. There are many ways to do this. I normally use MODBUS TCP when transferring data between PLCs over Ethernet. You need to assign one or more PLCs as the MODBUS Master. There are multiple ways to do this as well, but one way that allows all 4 PLC programs to be nearly identical would be to make PLC 1 Master to PLC 2, PLC 2 Master to PLC 3, PLC 3 Master to PLC 4, and PLC 4 Master to PLC 1. This daisy chains all the data around to all the PLCs. The drawback is if one of the PLCs goes down, then the chain is broken. Another option is to Make PLC 1 the Master to PLCs 2-4. PLC 1 would collect all the data and distribute it to the other 3 PLCs. 1 Quote Link to comment Share on other sites More sharing options...
Tech Posted March 22, 2019 Author Report Share Posted March 22, 2019 (edited) Thanks for your replay flex, Second option is suitable for my process.How to write in ladder for MODBUS TCP data transferring ?below i have attached my sample for 1st plc Tcp master.Pls check it sample data transfer.vlp Edited March 22, 2019 by Tech Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted March 22, 2019 MVP 2022 Report Share Posted March 22, 2019 There are sample programs that came with your VisiLogic installation. And there are specific examples for V700 MODBUS TCP Master and Slave. I recommend reviewing those example programs. 1 Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted March 22, 2019 MVP 2022 Report Share Posted March 22, 2019 5 minutes ago, Tech said: i have attached my sample for 1st plc Tcp master I took a quick look and it appears you're on the right track. I didn't look at all the details to see if there are any mistakes though. 1 Quote Link to comment Share on other sites More sharing options...
Tech Posted March 22, 2019 Author Report Share Posted March 22, 2019 ill try it tomorrow and update u.thks a lot Quote Link to comment Share on other sites More sharing options...
Tech Posted March 28, 2019 Author Report Share Posted March 28, 2019 Dear flex, i tried lot of time..one festo slave is connected and its working properly but my another festo not in communication..here i have attched sample pls check once u free sample data transfer.vlp Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted March 29, 2019 MVP 2022 Report Share Posted March 29, 2019 Your program is a bit of a mess. You cannot communicate with two different devices over MODBUS IP using the same Socket unless you specifically disconnect from one before connecting to the other (and waiting for the fairly lengthy time for the disconnect and connect to properly occur. But with 8 Sockets available, there is no need - use two different sockets. Also, do NOT place two logic networks in the same ladder rung as you have in rungs 8 & 12. Make sure the IP addresses and Port numbers are properly aligned between Master and each Slave. Your logic appears to disconnect from the slave instantly upon connection (and in the same PLC cycle!). That can't possibly work. Please be sure all the operands in use are labeled if you want someone else to review your program. It's unnecessarily difficult without labeling. And this is just a guess, but you seem to be writing your program like your PLC is a computer, which executes each step of the program sequentially from beginning to end with each step completing before the next step is executed. A PLC is different - it's a loop. The PLC does not interact with the outside world, or even its own I/O until the entire program loop has been completed. The basic execution in a PLC is as follows (one scan cycle): 1) Read all inputs 2) Execute ladder 3) Write all outputs 4) Repeat infinitely There are more complexities, but this is the basic cycle which you must keep in mind while writing your program. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.