Sign in to follow this  
Followers 0
louisf

Setting FINS network for inter-PLC communication

12 posts in this topic

Hi,

I'm currently in a project where I'm putting up together a network where a CJ2M-CPU33 is reading the memory of 4 G9SP safety controller and communicating with an unchosen HMI. Since I'm new to Omron communications, I've decided to set up a network composed of only 1 CJ2M-CPU33 and 1 CJ2M-CPU31, both equiped with built-in EIP21 port, to help me understand the FINC protocol used to Read/Write and other commands from one PLC to another. I'm currently trying to use the CMND(490) function in the CJ2M-CPU33 to attempt and read part of the D memory in the CJ2M-CPU31 without success. I've tried many ways of sending the Hexa code to the PLC I'm trying to read the memory from but always come up with a 0401 end code (Service unsupported: Undefined command) or nothing at all when my Hexa code is really messed up. It's also good to know that the informatician of the company has succesfully read from the memory area but with his computer. I have provided with this topic an overview of my setup, settings and program in the PLC that is performing the CMND(490) function. I'd also like and take this opportunity to say that I really don't understand the settings in the FINS/UDP and FINS/TCP menu and when and how the PLC is using these protocols even if I've read tons documents on the FINS protocol. I find that that Omron's doc is complete but kinda lacks of setting and program examples.

FINS_Problem_description.docx

Share this post


Link to post
Share on other sites

I would recommend looking at SEND or RECV.  These commands are simpler and accomplish the same end result. 

Here is some sample code that is way more complicated than you need, but contains the SEND and RECV commands:

You can also use this nice utility to check if your FINS command is set up properly:

http://forums.mrplc.com/index.php?/files/file/948-fins-color-coded-messaging-tool/

Share this post


Link to post
Share on other sites

Thank you for the quick response! Yes I have downloaded this code earlier looked at it a little bit. Although, to be honest I am also trying to understand the FINS protocol so I may use it in other applications. Also, I have read documentation on how to read and write data on a G9SP safety controller and it seems that I need to use a command code other than the read/write (0101/0102) to communicate with this kind of PLC. This could make sense since I've looked at the G9SP configurator tool and we can't really see where the data is in the memory, unlike a comme PLC where you have an address. I didn't have a look to the link you have proposed I will let you know if I find a solution. Thank you very much! And again thanks for the quick answer this is really appreciated! :)

Share this post


Link to post
Share on other sites

 

I also have a question via the compatibility of FINS protocol and the hardware in use. I was told that there some function disabled when using a built-in ethernet port EIP21 instead of a distinct card ETN21. Could that be the problem why I'm having the 0401 error code which stipulates that the Service is unsupported and I'm trying an undefined command? Because the most probable cause written in the doc for this error is that the Unit/Board does not support the specified command code. Although I would find that very strange, I thought that could be a possible problem.

Edited by louisf

Share this post


Link to post
Share on other sites

Well, I went ahead and tested this for you.  I took the code directly from the G9SP manual, found here:

http://www.edata.omron.com.au/eData/Safety/Z922-E1-05.pdf

Section 7-3-2

Here is my code (this was a CJ2H, using the built in EtherNet/IP port):

570407182c23c_CMND1.jpg.2a79e2f73b84788157040717768d9_CMND2.thumb.jpg.01c86e3622

As you can see from my notation in rung 1, you will need to change the node number from #43 (67 decimal) to match the node number of your G9SP.  Otherwise, nothing else needs to change unless you cannot use the same addresses for some reason.

The image below illustrates that the value of channel 100 in the PLC will be sent to the G9SP as Optional Communication Reception bits and the Optional communication Transmission bits will be sent from the G9SP to the PLC and stored in channel 200.

CXPG9SPjpg.jpg.eb5abe4b645c37eae5922d900

In summary, the sample code from the manual works well.

 

Here is my Ethernet module configuration in the G9SP:

570408512547e_G9SPComms.jpg.d88cf5987444

I would just make sure that the EtherNet/IP module built into the CJ2M PLC has a FINS node number that matches the last octet of the IP Address.  In my example, my PLC was set to 192.168.0.60 and the node number dials on the front of the PLC were set to 3C (hex) which is 60 decimal.

Share this post


Link to post
Share on other sites

Good support , Michael!

Share this post


Link to post
Share on other sites

Thank you very much! I coded the same thing and i have had results. I'll get to you tomorrow after I've analyzed my response code and if there is a way to adapt this code to communicate with other omron PLCs.

Share this post


Link to post
Share on other sites

Note that you will use different FINS commands for PLC to PLC communications.  See this manual for information:

 

http://www.edata.omron.com.au/eData/Software/FGW/W342-E1-15.pdf

Look at FINS commands 0101 and 0102 for memory area read and memory area write in Section 5. 

So, going back and reading your other posts, I see that I skimmed over some points.  Yes, the G9SP does NOT support all of the FINS commands and you will not effectively be able to test PLC to PLC communications. 

Share this post


Link to post
Share on other sites

Thanks Michael. The code you sended me yesterday is working well and I finally am able to communicate with a G9SP. This also gives me the confirmation that I may be able to communicate with other devices such as another CJ2M I was testing FINS with! Also, I've read most of the documentation on FINS and I'm starting to understand how to build a network with Omron devices (I'm mostly new in communications that a little painful). I'm really grateful for your support thank you very much that was very helpful!

Share this post


Link to post
Share on other sites

Can any one tell ... if i can Open socket services using CJ2M with inbuild ethernet port.... I dont want to use ETN 21.

Presently i am using Fins UDP in which the master is my PC.

I am willing if i can get data using tcp ip and  Plc as  master.

Share this post


Link to post
Share on other sites

Please only post in one forum.  I have answered your question in the other forum.  Thanks.

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
Sign in to follow this  
Followers 0