Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HMI Application using VB6.0 3

Status
Not open for further replies.

shayne31

Industrial
Feb 11, 2004
45
0
0
CA
Good Morning,
I would like to ask a simple question, which will hopefully generate an equally simple answer. What link is needed to link a VB6.0 user interface with a PLC (specifically AB Micrologix Series C). I have heard of ActiveX DLL Drivers etc. but, as an Industrial programmer only, this means very little. I am proficient in both AB PLC logic and VB6.0 but lack the stuff in between. Does anyone know of a helpful link and/or alternative resource? Much obliged.
[noevil]
 
Replies continue below

Recommended for you

use rslinx single node server, i have used this for DAQ reading/writing data to/from Excel from a micro logix 1500. you could do more with VB6.0
 
rubha,
thanks for getting back to me. Have you ever used SDK or Gateway? The single-node, as you said, is good for DAQ, but is it good the other direction? Does it allow RSLinx to become the DDE client and the API to become the DDE server? Can't tell I'm reading the 'RSLinx Getting Results Guide' can you? Again, I'm creating an external SCADA with VB6.0 and require my rung logic to respond to the VB6.0 code permissives. i.e. the radiobutton true value actuates I:000/00 on my MicroLogix1200. So I guess, short story long, I want VB6.0 to be 80% of the inputs for the rung logic.
[hairpull3]
 
Hello;
RsLinx will allow bi-directional DDE communications. It will also allow a type of more advanced communications called OPC. See The only caveat is that you must use RsLinx OEM or Pro. The Lite version will not work.
The question I have is why re-invent the wheel. There are available many low cost HMI programs that run on the PC. Check out Also whichever HMI you use, it will not be able to set the value of the input space on the processor. It can read this data, but writes to it will be overwritten by the PLC scan process. You must write to the data memory areas (N7, F8, B3 etc).
 
djs,

Thanks for the excellent information. I agree; my goal is not to re-invent the wheel, therefore, you have just saved me a lot of time and energy. Cheers!
[cheers]
 
A good link to check out on Active X dll's for VB 6 would be this one:


This company created an ocx which is the pipeline between the ab plc and your vb6 software. Just a little bit of research on the topic of active x controls and ocx files will give you a good understanding of how this technology works.

This link actually downloads the AB DF1 Serial Active X Driver for communicating with SLC500 / MiicroLogix / PLC5 driver with Modem support:


By inserting this into your vb6 project the ocx driver components become a tool in your VB toolbox. You can then utilize this driver to communicate with your plc.

So the main point that I am trying to get across is, you have the driver that will work with vb6 or vb.net and all you need to do is familiarize yourself with how an active x control works within vb then implement your code. So do a google search with the following keywords "active x tutorial vb6" You will get many different sites that provide small examples of how to use active x controls and if your already familiar with vb6 coding then this will not be to hard.

Also, Wonderware will talk with vb6 or vb.net via active x controls. So that is another option.

Hope this info helps.

For prefessional plc, hmi, scada, and electrical engineering visit PLC Automation, Inc. at
 
One additional avenue that I have done for slower comm rates is rs-232 to visual basic MSCOMM. This works well on Allen-Bradley Micrologix to Computer.

The resource that I used to get started was "Home Automation Basics" by Thomas Leonik, which was obtained from Amazon.

For me (PLC background) it provided a basic starting point for using VB to communicate to PLC's. I have used this in some demo systems as well as systems that would need periodic data collection or intermittant operator interface requirements.

 
Yuo might enjoy looking at a book by Tom Leonik titled Home Automation Basics. It's over my head but is all about using vb6.0 to display HMI via AB micrologix PLC's. I picked up a used copy and may understand it someday.
 
Maybe I'm a little late coming in on this but it seems to me that if you want simplicity, you should not have to bother with writing code and using OCX PLC drivers etc., instead you should be using OPC.

First you get an OPC server for the AB PLC such as KepServer, and configure that to connect to your PLC, making the variables you are interested in available as tags or OPC items as they are known. Then it's a simple matter of using OPCWare Client Developer ( to link the OPC tags to your VB controls using straightforward property pages.

For example the text property of a textbox or the value property of a progress bar can be bound to the values of specific OPC items, and they will update automatically. No code is necessary to do this reading, everything can be set up using the mouse. See OPCWare Client Developer ( to download a free 30 day fully functional demo.
 
There is a lot of information about vb6 and A-B in a book by Tom Leonik titled Home Automation Basics. I got a copy real cheap on Buy.com. Mr. Leonik is helpful up to a point via e-mail but I must have had too many questions being inexperienced with vb an he shut me off.It all has to do with packets and protocols in serial comm. All beyond me at this point so I have tabled for now. You sound like you have a better understanding of what is involved.
Regards,
Dave
 
Status
Not open for further replies.
Back
Top