Sign in to follow this  
Followers 0
brubingh

RsLinx and VB6

2 posts in this topic

After a little hair pulling and MUCH research to find the information needed it is now nearly 3 a.m., but I have a working program. I finally got Visual Basic 6 (VB6) to read and write variables in a CompactLogix L43 processor using RsLinx OEM. (It should also work with any other version of RSLinx *except* RSLinx Lite.) This does NOT use OPC. It uses function calls directly in RSLinx. This DOES use PLC5/SLC type messaging rather than the newer CIP messaging which is native to CompactLogix. This means the variables in the CompactLogix must be mapped to data files using the RSLogix 5000 menu Logic->Map PLC/SLC Messages. I started with the ReadCB.zip available from Rockwell Software, which is for VB5 and RSLinx SDK. I converted to VB6. NOTE - This uses the CallBack functions. What that means is that the VB program tells RSLinx to send a message (read/write) to the PLC, but the VB program does NOT wait for confirmation that the read/write was received by the PLC. When RSLinx receives confirmation from the PLC that the message was received, RSLinx calls the CallBack function in VB to tell the program the read/write status. This means the VB program is free to do other things while the message is being handled by the PLC, but it can mess up your program if you were not expecting it. With all that said... I hope this is of good use to others. I'll also post it to my web site for downloading at your convenience: http://files.rubeautomation.com/downloads/RsLinx_RW_CB-110.zip Enjoy and feel free to send questions... although I won't guarantee a quick response... RsLinx_RW_CB-110.zip

Share this post


Link to post
Share on other sites

Hey, i know its been a long time since you upload the file but if you could upload it again it will be great cause right now im working on a school project and im stuck with the communication between VB and PLC.

 

Greetings.

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