WattUp

Configuring Two PLC to communicate over ETH

9 posts in this topic

I an seeking guidance on how to link two mitsubishi PLC over Ethernet and have them pass bits/words between them. 

PLC 1, Q03UDV built in port  ---- GXWorks 2 v1.54N   192.168.1.39  (QJ71 in slot 1 is also available if req'd)

PLC2, Q02H with a QJ71 Ethernet card in slot 2.  Same GXworks2   192.168.1.35

 

I know with a modbus or CCLink setup, there is a place to declare the buffer > X/Y parameters, but i have found no such parameters for the ethernet connections. I found 1 document describing the JP.Send instructions but I have not been able to get that to work from the example. 

 

any help would be greatly appreciated. 

 

 

Share this post


Link to post
Share on other sites

Why don't you use the Mitsubishi FB's They are free 

E71 FB2.JPG

E71 FB1.JPG

Edited by Gambit

Share this post


Link to post
Share on other sites

i tried it using GX developer and it was unreliable at best. i had troubles re-establishing connections if they dropped out.

 

if you are using GX works i would just go with using the FB's as above unless you are using a simple project type?

Share this post


Link to post
Share on other sites
6 hours ago, Gambit said:

Why don't you use the Mitsubishi FB's They are free 

E71 FB2.JPG

E71 FB1.JPG

That does look helpful..  but how do i find that?  ( I hate MITS website, can never find anything I want/need )

Share this post


Link to post
Share on other sites

Thanks for the links. 

 

These examples are interesting, but if I were to use the IEC style function blocks I am afraid my MAINT. team would revolt against me.  We don't use that style of code here at all and I try to keep things simple. 

 

Does anyone have any ideas/examples using the simple ladder? 

Share this post


Link to post
Share on other sites

FB are simple, When they work they work !!!!.

I have an older solution pack which also has GX examples. However it's 20MB.

I can only attach 3.91 MB max. I can email it to you i've you like

 

Share this post


Link to post
Share on other sites
Just now, Gambit said:

FB are simple, When they work they work !!!!.

I have an older solution pack which also has GX examples. However it's 20MB.

I can only attach 3.91 MB max. I can email it to you i've you like

 

PM'd

Share this post


Link to post
Share on other sites

Just wanted to drop in a little comment: I totally agree with @Gambit regarding FBs. They are tested, and when they work they just work. What about creating a couple of POU's in your application so that you can take advantage of the already finalized FBs? One (or more) POU's for simple ladder, and one POU for the structured ladder with the FB's. That way you can just assign the correct words to your FBs in your structured ladder POU, and you can use your normal code for accessing the actual devices in your simple ladder POU(s).

P.S. If you still struggle with your team you can also take a different path: You configure/develop your FBs in Structured Ladder as you wish (and test it). Then download to the PLC. After that, create a new projcet with simple ladder, and upload the code from the PLC as Simple Ladder/IL code and import it into your MAIN project. When you've uploaded the project from the PLC it will be IL and Simple Ladder. That way your team get's their Simple Ladder code style, and you can be sure that the code works as it should.

The reason why you can download with Structured Ladder and upload with Simple Ladder is because Structured Ladder is simply a graphical representation of the same IL code. Structured Ladder gets compiled before you download it to IL, just as Simple Ladder is "converted" to IL when downloading. So all in all, the code inside the PLC is exactly the same it's just how the code is represented during development and how it is represented inside the PLC (which is always IL/Simple Ladder).

And as a sidecomment (my opinion only): FBs are much easier than writing all the code in one or more "MAIN" programs. With FB you get more or less object-oriented development which has existed for years in computer programming. Structured Ladder with FB's offers a lot cleaner code and a lot more segmented and readable code (when you get over the first "bump" of starting with Structured Ladder). The only thing with Structured Ladder to annoy you is the importance of always having a backup of the original project. Since it is compiled to IL, you'll need the original project files to get the graphical representation of the code. But then again: In the computer development world the normal languages also gets compiled, hence you always need the original development code to modify any project.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now