Sign in to follow this  
Followers 0
Guest DrZivago

Ethernet communication with VB and CX server v2.4.1.12

34 posts in this topic

Hi there! VB program should communicate with several PLC's via ethernet. Is it possible to use CX-server instead of finsgateway v3.20. Finsgateway sucks :p Thanks in advance!

Share this post


Link to post
Share on other sites
Whadda ya think guys? Does FGW suck?

Share this post


Link to post
Share on other sites
Sounds like an "AB is the only way to go" programmer talking.

Share this post


Link to post
Share on other sites
... I would use neither CX-Server or FGW - VB can communicate directly with PLC via ethernet using FINS protocol. Nibroc

Share this post


Link to post
Share on other sites
Might want to start with this VB program for accessing Omron Ethernet modules. Includes source code. Many a great program has started from this little utility. Thanks to Jeff Nowling! FINS UDP for Ethernet @ MrPLC.com

Share this post


Link to post
Share on other sites
FGW is the most solid windows based driver for PLC comms I know. Have done dozens of installations using FGW CLK and have never ever had a single problem with getting it up and running, let alone locking up the OS or crashed services. Might be without bells and whistles but that's just the way I like it. FGW doesn't suck ... it rocks! But hey .. I'm just another of those "Omron is the way to go" programmer

Share this post


Link to post
Share on other sites
Thanks for your comments and sorry about my strong expression about Finsgateway.. :) FGW works and it is stable but is has its limitations. Actually the most problematic thing is that only the same user must make the installation and uninstallation. That very same user also must run it. If i try to run it with other users it gives an error message "exiting service" or something like that. (can't remember the exact message. PC is on it's way to customer site so i can't check it). Btw, PC is powered with windows XP. Basic users should not even be able to run FGW service manager. Maybe it is enough that i hide shortcuts but.. You got the point, right? Is Finsgateway 2003 any better? EDIT: Jay, thanks for that sample code. I must try that. Not enough time now but later with the next project.. :) Edited by DrZivago

Share this post


Link to post
Share on other sites
I seem to be having an issue with the app that you posted. A Command of 010182000000000F (actual data sent was 800002010900010300000101820000000001) should be reading 16 bytes from DM0000 correct? From what I can tell looking at the source it should then take that information it receives and using ASCII convert it to text. This command isn't working for me at all, and I dont know how to tell if the others work. Can somone guide me to a place where I can see all the FINS commands available? Also can someone guide me to getting some sort of test to see if this is actually working? Right now I am trying to talk to a CJ1G-CPU44H through an ETN11. There is nothing in the ladder logic only some stuff in the DM section of the memory. This will be my first time trying to send FINS commands, so please bear with my ignorance.

Share this post


Link to post
Share on other sites
For starters: W342-E1-09 Sysmac CS/CJ Series communication commands @ MrPLC.com Are you getting a reply at all ? If not, you should first look into the paramaters like port no., net and node. Do you need routing ? Alternatively you can use an ethernet sniffer like Ethereal to intercept the messages sent and received. (remember to connect through a hub instead of a switch!) Although using CJ1G you might want to read this as well: W420-E1-03 CS1W ETN21 Users Manual @ MrPLC.com Hope this helps.

Share this post


Link to post
Share on other sites
I dont think I need a routing table... I am setting the computer to 192.168.1.2 and the PLC to 192.168.1.1 I then connect to each other through a 5-port switch. I am getting something back using the program that Jay posted, but it doesn't make sense to what I expect, and if I click over and over, the data seems to change randomly. Also, I played with various settings in the program for the net/node/unit and either I get jibberish, or I get nothing. Thank you for the link to that manual! it was exactly what I was hoping for, and it answered a lot of questions. One thing that I am wondering as I look at the manual though, it talks about the ETN21... should I try to invest in one of those instead of the ETN11?? Are my problems maybe caused by the fact I am trying to use an ETN11? When I use CX-P, for a connection type I can connect through ethernet, but when I try to use the ethernet(FINS/TCP) setting, it says that the port is not valid... maybe this is part of my problem?? Using the above linked program, when I send: 80000201010101030000010182000000000F I get this response from the PLC: C0000201030001010100010185020001000F00017202 Can someone verify that either the string I am sending is correct for reading from the first 16 digits of DM section of memory, or can someone try the above program and tell me what settings they had that worked? I am getting more confused the more I play with this since I haven't seen a successful communication yet.

Share this post


Link to post
Share on other sites
Someone else has got to try this, I haven't got the hardware to test. Pages_from_W420_E1_03_CS1W_ETN21_Users_Manual.pdf

Share this post


Link to post
Share on other sites
Thanks for your help PDL. I am completely lost and have been tasked with learning how to talk to PLCs with ethernet instead of serial for our future programs.

Share this post


Link to post
Share on other sites
Here's the dedicated manual for CJ1W-ETN11. W343-E1-06 CS/CJ Series Ethernet units operation manual @ MrPLC.com Perhaps if I find the time I will do some reading.

Share this post


Link to post
Share on other sites
I continued playing with the application, and adjusting settings and such. I finally got it to work!! The important thing I think I was missing is that when you enter in the Unit number, its not talking about the unit number of the ETN... you need to put 00 so that it talks to the CPU.

Share this post


Link to post
Share on other sites
Good job Glad you got it to work. Perhaps this has to do with the ETN11 being the only comms card. Someone can confirm what's the case ?

Share this post


Link to post
Share on other sites
From what i remember he is correct...the unit number is not the unit number on the card, go figure, for fins ethernet comms.... fins commands can talk directly to comm's modules on a rack ...

Share this post


Link to post
Share on other sites
Actually it is the unit number of the card. Network Communication cards have the address of unit no.+Hex10. 00 is reserved for the CPU itself.

Share this post


Link to post
Share on other sites
Thanks for the clarifiaction Jay...."unit no.+Hex10" thats what i meant by "the unit number is not the unit number on the card" doh! i forgot the correlation to the unit no. + Hex 10.... Woohoo post 1000

Share this post


Link to post
Share on other sites
Celebrations can be found HERE

Share this post


Link to post
Share on other sites
Well,strangely enough, I dont get any response if I dont use 00. I am not sure why cause if I am understanding what you are saying, if my ETN is unit 1, I should be doing 01. On another note, I am almost done with a C# program that works similar to the above program. I have to flesh it out more before I would release it, but as soon as I do I will be sure to post it here. One thing I wanted to ask though, is it possible to do FINS though TCP? I seem to have a reasonable amount of control with UDP, but I would much prefer to be communicating with the PLC through TCP/IP due to the additional error hendling that it provides (such as giving you a reason why your message didn't get to the destination). I still have so much to read from all the manuals that sleepy posted for me, but I am still trucking along! I noticed that there are some function blocks for using TCP, but they always seem to error out for me so I am not sure I understand them.

Share this post


Link to post
Share on other sites
Chris, The ETN-11 supports only UDP, The ETN21 supports both UDP and TCP. Information can be found in the Ethernet Construction of Applications Manual - W421. There are sample C programs for both UDP and TCP in this manual. I have completed some projects using VB (Serial Toolbus), and UDP (FINS) using C# . I note that the actual serial 'Toolbus' protocol is not fully documented in the CS/CJ communications manual. - although there is enough to work it out. Do you have the Omron Multiway software? - this can be really handy. Nibroc Edited by Nibroc

Share this post


Link to post
Share on other sites
Multiway V6 @ MrPLC.com

Share this post


Link to post
Share on other sites
It's not 01. It's 11. Unit number + 10 Hex. Try a FINS 0501 to unit number 11.

Share this post


Link to post
Share on other sites
I will try this and see what I get. I assume that this will cause me to talk directly to the ETN card, so I am interested to see what changes in regards to the communication.

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