Sign in to follow this  
Followers 0
Guest merico

Ethernet communications

10 posts in this topic

i'm trying to read CIO & D word data with a PC computer from a CS1 PLC via CS1W-ETN11 ethernet module using FINS commands. I wrote my own PLC monitoring programs since 80's using both ethernet and serial ports, but this's the first time i try to communicate with OMRON PLC's I wrote a small test program based in the C code example included in W343e1-2 OMRON manual, it uses UDP sockets. My problem is: When i send the command to the ETN11 FINS node then i have no response. Instead when i try to send the command to a non existant FINS node i get a 22 byte response with an error code. My questions: Do i need finsgateway installed in the computer? Is Finsgateway a software sold alone? or is it free software? Do you have some other idea about my problem ? Thanks in advance. merico

Share this post


Link to post
Share on other sites
Guest_merico: Please register at MrPLC.com and join the MRPLC.com community Register at MrPLC.com 1. No 2. It is sold alone and is sold with a license. It is not free. 3. You don't need FINS Gateway to do what you want. Check out the following download link at MrPLC.com for VB Install and Source Code. This basic example has been the foundation of many good custom applications. Courtesy of Jeff Nowling - Sr. Engineering Consultant - Omron TSG NA

Share this post


Link to post
Share on other sites
Thanks for you answer Jay. I will test the VB program but i don't understand why you said i should not use an UDP socket but the VB test program uses UDP packets. UDP sockets are connection less sockets that means i can send an UDP packet to an IP address + port number without any previous negotiation with the server side. Instead TCP sockets need a previous connection and accept in server side before any data transfer. Did you mean TCP instead UDP ? Thanks in advance. Best regards. Merico.

Share this post


Link to post
Share on other sites
By all means, continue to use UDP packets. FINS is based on UDP, not TCP. If you continue to get error responses, please post the exact string and I will try to interpret the error, based on the response.

Share this post


Link to post
Share on other sites
The problem is now solved My C code does not set Local port = 9600, this was the problem, i did let the operating system to pick a free port number. Most IP protocols like http or ftp do not care about local port number (source port) but FINS protocol does care and both source and destination port must be equal to 9600. That imposes a limitation: only one program can communicate with the FINS network on the same computer, for example if you are running the VB program posted above the CX-Programmer will fail to communicate. Well, thanks to Jay, the VB programm helped me to debug my C code. Best regards. merico.

Share this post


Link to post
Share on other sites
And that is where FINS Gateway comes into play. There are Active X components (Value Aid and Compolet) which would allow CX programmer and other programs to operate on the same computer and to use a common interface. If you have CX programmer, you also have FINS Gateway. Look on the install CD.

Share this post


Link to post
Share on other sites
Well, my program can communicate with all Mitsubishi PLC family and now with OMRON FINS protocol via ethernet too, i wrote all drivers by myself because my company needs a cheap monitoring tool not based on third part software or drivers. Our clients don't need to run cx-programmer or another plc related software on the same machine then my C code using UDP socket is enough. Thanks again. Regards. merico

Share this post


Link to post
Share on other sites
Hi jay cant find the link to the above VB Install and Source Code can you point me to it thx.

Share this post


Link to post
Share on other sites
FINS UDP for Ethernet

Share this post


Link to post
Share on other sites
I think FINS gateway works as a communication layer. I have not been using FINS gateway since I have realised a bug in it (this was nearly two years ago). For a great possibility, guys in OMRON should have fixed this bug, but as I remember that FINS gateway was stopping without giving any error messages. When it stops, the software written in VB (or another language) was still reading the last read values and getting no error messages. Once we made a test, when we realised that FINS was frozen, we plug the ethernet cable off on PLC, but our VB software was still getting data from FINS layer. This was two years ago and I strongly believe that it should have been fixed. for two years, we are using our own library for ethernet communication and we never needed to communicate by more than one application on a computer.

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