Sign in to follow this  
Followers 0
henrylow

PC & PLC communication

8 posts in this topic

I need to write a Visual Basic program to communicate with a Mitsubishi PLCs using an A1SJ71UC24-R2 serial card. What is the quick and easy way to read and write data registers from Visual Basic? Can some one help me?

Share this post


Link to post
Share on other sites
i think you will buy the mitsubishi communication activex ,and use the activex to work easy more.

Share this post


Link to post
Share on other sites
Hi A good way is an ActiveX control just like liuzu2000 say, the ActiveX Mitsubishi software is "MX Components". But perhaps an OPC server is better, Mitsubishi OPC server is "MX OPC Server", there are others OPC server with drivers for many PLC's including Mitsubishi, like http://www.kepware.com/ OPC is more robust, and easy to configure, but is a litte slower and hard to program... There are also an DDE server (Meldde), but nobody still uses DDE. Edited by calvin

Share this post


Link to post
Share on other sites
Thanks to liuzu2000 & Calvin. The problem I have now is that the PLC can read the data I sent from PC, but the PC can't read the data from PLC. Previously I have no problem with this. That was when I was using Win NT visual basic version 4. Is it PC operating system causing the communication problem? Because I'm using Win XP now. If XP causing the problem, can the problem be solved by using visual basic version 6 or later?

Share this post


Link to post
Share on other sites
What system are you using, ActiveX, OPC???? In the first post, appears that you want to write a new program, but seems that already have one Please explain better.

Share this post


Link to post
Share on other sites
Hi: I think he is not using any OPC or Active X method, but emmulating a barcode reader or something similar with the VB program to send and receive data frim the PLC. I´m trying to make something similar, use a visual basic program to sent a command to the PLC using the serial port of the module (is just sent, not receive). I just need to known if is possible to do it without using any OPC or Active X, just a plain ASCII string. Please henrylow, let me know if you did it that way. Regards

Share this post


Link to post
Share on other sites
Chalpa is probably right If you are using a serial card (A1SJ71UC24-R2), is much easier to program a VB application with simple ASCII messages. The only problem is that in this case, you need to program the PLC to receive/send messages, see the R2 manual for an example.

Share this post


Link to post
Share on other sites
Attached is a program I wrote years ago in VB. It should help get you started. In todays world you might want to look into OPC and write your application that way so that if for no other reason, you can learn OPC. C24.32.zip

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