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!

PLC Interfacing using OPC in Visual Basic and RSLinx 1

Status
Not open for further replies.

eaaf

Electrical
Jul 12, 2007
18
0
0
GT
Hello Everyone.
I'm using AB PLC for an application. I'm using RSLinx pro for the communication in the PC. I want to make an application in Visual Basic for Read and Write data in the PLC. Any one can help me with an example of code in VB6 to get access of the data using OPC. I'm already using DDE, but it is very slow for my me. I want almost real time writing.

I get the data form and external source, and I want to write it in the PLC, that will be use in the PLC program and in a Scada aplication that is in the PLC network.

Thanks in advance for all your comments.

 
Replies continue below

Recommended for you

Thanks a lot for your comments.

I have a lot of work make in the application, so I really want to add the code.

I looked at the address that you send me, and the investment for just one application is not justified in my company, if the application that I made are running; slowly, but running.

Some one has an example of how I have to implement the code, so I can make test in the application in order to include these lines of code.

Regards.
 
eaaf
Do you really think that it is not worth investing $795 ? (Or perhaps you only need to spend 395)
How much of your time would it take to reinvent the OPC interface? What are they are paying you? Even at $5 per hour that would pay for a month and you could easily lose that and more developing the interface yourself.
Do the numbers.
There is even a free demo you can try.
I suggest that you make your management re-think.
 
Hello FrancsL.
You're complete right. The money invested in the OPC interface, can't be compare with the hours that will take the implementation.
I have my hands tied by the budget of the department. But I think can convince them to spend some extra money in this interface.
Also I really want to do it my self, in order to gain experience in that field. and enjoy it to do it.
I already download the demo. I will experiment with it.
Sorry me, if I insist if any body have code for this application.
thanks a lot.
Regards.
 
The AB website has some examples of how its done and its not really that difficult. Unfortunately I have no examples to post for you.

If you are open to using .NET as opposed to VB6 and use an RS232 connection, then you can use this open source code to communicate:


This even works in Visual Basic Express, which is the free development environment from Microsoft.
 
Did not know about abdf1
Mind you, after a look, one developer (no problems with that) and No Users(or people on the mailing list anyway)and No Reported Bugs and hardly any documentation. Hmmm
Hang on, it says Posted By: arj3090
That is you!
On the basis of your experience arj3090 how long should eeaf allow for writing the code he or she needs?
Francis
 
FrancisL

Here are some links to video documents on using the ABDF1 driver:



The main download is a fully self contained demo program that can be used to get an understanding of how to use the class.


This software was developed by myself, but tested by a large number of users that I keep in direct contact with to stay on top of bugs and feature requests. It has quite a number of users around the world. As for time to write your own.... to develop, debug, and refine a thorough driver will take about 9 months.

A few other things to note is that this class supports ladder program upload/download which is not supported in any of the other commercial versions. The demo program also has a feature to list data tables, read all data, and save it to a text file. The data can then be written back to the PLC from the text file. I can assure you the features and stability is beyond anything commercially available.
 
Consider the fact that you don't have to use OPC to communicate with the PLC. There are some 3rd party tools which communicate in the PLC's native protocol, and are much faster, not to mention simpler to use.

I suggest that you consider the In-Gear components from Cimquest: Specifically, have a look at the ActiveX components if you are using VB6. I have used that product several times with VB6 to communicate directly with an Allen-Bradley PLC, and I've always had good luck.

Alternatively, if you want to go with OPC, you need an OPC client. All I can suggest is the OPCDA client, although I hear there is also a KEPware client as well. I believe both require you to spend money.

Scott Whitlock
PLC Programming Articles:
 
Status
Not open for further replies.
Back
Top