Quantcast
Channel: Allen Bradley / Rockwell Automation Latest Topics
Viewing all articles
Browse latest Browse all 3721

RsLinx and VB6

$
0
0
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

Viewing all articles
Browse latest Browse all 3721

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>