henrylow Posted May 13, 2005 Report Posted May 13, 2005 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? Quote
liuzu2000 Posted May 13, 2005 Report Posted May 13, 2005 i think you will buy the mitsubishi communication activex ,and use the activex to work easy more. Quote
calvin Posted May 13, 2005 Report Posted May 13, 2005 (edited) 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 May 13, 2005 by calvin Quote
henrylow Posted May 19, 2005 Author Report Posted May 19, 2005 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? Quote
calvin Posted May 19, 2005 Report Posted May 19, 2005 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. Quote
Chalpa Posted May 23, 2005 Report Posted May 23, 2005 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 Quote
calvin Posted May 23, 2005 Report Posted May 23, 2005 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. Quote
fae-san Posted June 5, 2005 Report Posted June 5, 2005 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 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.