Jump to content

Recommended Posts

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

Link to comment
Share on other sites

  • MVP 2023

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.

  • Like 1
Link to comment
Share on other sites

  • MVP 2023

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.

Link to comment
Share on other sites

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.

Guest
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...