Sign in to follow this  
Followers 0
Fredrix

Communicating with Omron in VB (Ethernet)

17 posts in this topic

I have a project where I want to make a Visual Basic application to communicate (read/write I/O) with a Omron CJ1M CPU11-ETN Are there any easy ways to do this without the use of OPC-servers or CX-Server? The computer is connected to the PLC's Ethernet port

Share this post


Link to post
Share on other sites
Hi, Yes, sure it is possible; the keyword is 'Fins Commands' If you search around mrplc.com, you can find a sample in VB to use Fins Commands, sendind Fins commands to the PLC over UDP protocol is the way I prefer. Fins commands are available on the net, you can develop and improv your own communication software in VB.

Share this post


Link to post
Share on other sites
Can I use the FINS commands to read/write direct from/to the PLC memory areas?

Share this post


Link to post
Share on other sites
Hi, Although TCP is considered more 'safe' than UDP, Microsoft Windows have some strange controls over TCP sessions. I mostly prefer UDP because handling TCP in Windows is a little bit tricky, if communication is broken accidentally in a TCP session, Windows blocks the port for one minute, this means that you may not be able to communicate within 1 minutes if you do not make some tricks on programming. UDP is fast, and PLC sends it's own response to UDP packages, so you can understand that your Fins Command evaluated successfully or not. Also there is a byte 'SID' in Fins protocol, you write any value while sending a read or write request, and PLC replies with the same SID value in its response. So I prefer to use UDP for Fins communication.

Share this post


Link to post
Share on other sites
Looks like I have to try using FINS and UDP One more thing, are the FINS commands "universal" for all PLCs that accept FINS? Or are there special commands related to each PLC type? Thanks for all your help!

Share this post


Link to post
Share on other sites
The are all for most of Omron PLC´s. Are you lloking to control the PLC from VB?

Share this post


Link to post
Share on other sites
Yes, I want to be able to use the VB application as an optional way of triggering the inputs/reading the outputs of the PLC. Without having to use any special instructions in the PLC program

Share this post


Link to post
Share on other sites
Can anyone give me a link or manual where I can read more about the FINS commands?

Share this post


Link to post
Share on other sites
Fins Command Manual: http://forums.mrplc.com/index.php?autocom=downloads&showfile=467 Sample Software: http://forums.mrplc.com/index.php?autocom=downloads&showfile=181 http://forums.mrplc.com/index.php?autocom=downloads&showfile=705 http://forums.mrplc.com/index.php?autocom=downloads&showfile=695 (Sample with Java) Best Regards,

Share this post


Link to post
Share on other sites
Thanks! In the manual there are different commands for different series, I can't find CJ series. Does C-series commands apply to CJ-series? Edited by Fredrix

Share this post


Link to post
Share on other sites
The documents at the following documents may include detailed information: http://forums.mrplc.com/index.php?act=ST&f=17&t=5476

Share this post


Link to post
Share on other sites
Hi, I download the visual basic sample Ethernet_UDP, I can finde the correct command to read the working area: I send this command: 0101B101C200000A (all command: 80000201CF00010300000101B101C200000A) I said I want read w450 to w460 but I can´t understand the data I get in this code!!! I have 10 words, and I want know the value of w450.0, w450.1,... But I don´t understand the results!!! I get this in Hex: C0000201030001CF0000010100000000000008080008099803DC2000000042A30000 mmmmm, can anyone help me please?? I need understand the results... I attach the image... thanks in advance!!

Share this post


Link to post
Share on other sites
I think you already have answer, you are receiving data it hex format, when you convert it in to binary, your data seems as follows: Word Value B 15 to B8 B7 to B0 0000 00000000 00000000 0000 00000000 00000000 0808 00001000 00001000 0008 00000000 00001000 0998 00001001 10011000 03DC 00000011 11011100 2000 00100000 00000000 0000 00000000 00000000 42A3 01000010 10100011 0000 00000000 00000000 Seems that you are receiving 10 words successfully.

Share this post


Link to post
Share on other sites
I have found a library to communicate with an omron Plc in Visual Basic .Net (serial port or ethernet): www.plclibrary.com

Share this post


Link to post
Share on other sites
Try INDAFINS I have developed it for my own pojects and really working fast, and it is very simple to use.

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