Help - Search - Members - Calendar
Full Version: allen bradley.net
Forums.MrPLC.com > PLCs and Supporting Devices > Allen Bradley
trn_psycho
Are there any examples on how to use c# or vb.net to connect to an AB PLC? Currently I've been using vb6 to do so, but am being forced to "upgrade" everything to .net. I'm not seeing anywhere in the program to allow me to link to the topics like I did in classic VB.
TWControls
I know that you can't use DDE with VB.net. You must use OPC. I believe that RsLinx SDK gives you samples and some developer help. I have never seen any of this though so I don't know the details
Contr_Conn
QUOTE(TWControls @ Apr 3 2006, 03:15 PM) [snapback]31045[/snapback]
I know that you can't use DDE with VB.net. You must use OPC. I believe that RsLinx SDK gives you samples and some developer help. I have never seen any of this though so I don't know the details


See this post:
http://www.plctalk.net/qanda/showthread.php?t=10339
TWControls
Thanks for the link.

Are there additional drivers in the RsLinx SDK that are required for OPC or is it just documentation on how to do it. Or I guess can you use RsLinx OEM with OPC?

TechJunki
RsLinx OEM will work just fine with OPC. I have used Linx OEM, Pro, and Gateway for OPC communication developed with Visual Basic 6, there does not seem to be any difference between them.

As far as SDK goes I have never used it but yes I believe it does come with some additional documentation on development, but no extra drivers....
TWControls
So how do you figure out how to do RsLinx to Vb.net over OPC. Are there any sample anywhere?
TechJunki
I am not too farmiliar with VB.net as I have not yet made the jump, but I will post some simple code I would use for OPC and VB6 and maybe some .NET users out there will see if it can be modified slightly for use with .NET and repost the changed code?? I have been very curious as to the differences there might be.

Thanks to anyone who gives this a try

Here is the code..

TWControls
Thanks TechJunki. I will play with it tommorrow. Till now I have only used DDE
TechJunki
Feel free to E-Mail or post any questions with the code..
fredpou
Two month ago I spent a day to code a little vb application that read/write a integer to a slc 5/03 via OPC.
I first try to do it with VB.net... But I found on AB.com that VB.NET is not supported with RsLinx prior to 2.50.

I was working with Rslinx 2.41, so I switch back to VB6 and everything works fine.

So be sure to use RsLinx 2.50 to test your VB.NET



This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.