Sign in to follow this  
Followers 0
phuz

Rockwell OPC Automation Wrapper (RsiOPCAuto.dll)

8 posts in this topic

I am digging up some old problems with a customer that is using DDE to manage recipes in an Excel file with communication to a SLC. Randomly, the DDE server will lose its comms and the customer must re-create the topics inside of RSLinx before anything starts working. I want to switch over to OPC, but I do not have the Rockwell OPC Automation wrapper in the references. I have been looking around but cannot find it. The closest thing I found was a thread on OPC foundation that says it was no longer included in RSLinx after 2.55 (I am on 2.59 and customer is on 2.58). It also said that the new file is called OPCAuto.dll and is managed by the OPC foundation. However, because I am not a valid member of that foundation, I am not able to download the file, even after I created an account with them. Here's the link as a reference: http://www.opcfoundation.org/forum/viewtopic.php?p=11800 Anyone know how I can obtain this file?

Share this post


Link to post
Share on other sites
OK, after what seems like a big TO-DO, I have finally obtained the RSLinxOPCAuto.dll file and added it as a reference to my Excel VBA. I am having trouble obtaining data from RSLinx, though. I have added my DDE/OPC topic and I have added a series of commands that execute without error, but I am not getting any data. This is pretty straightforward with DDE, but not so much with OPC. Any help would be greatly appreciated. Dim MyRsLinxOPCServer As RSLinxOPCAutomation.opcserver 'MyRsLinxOPCServer = New RSLinxOPCAutomation.opcserver 'Connect to Server MyRsLinxOPCServer.Connect ("RSLinx OPC Server") 'Add Group to Server LinxOPCGroup = MyRsLinxOPCServer.OPCGroups.Add("TEST") 'Group name can be anything you want it to be 'Set Group Active for Data Updates and Events LinxOPCGroup.IsActive = True 'Group Update Rate LinxOPCGroup.UpdateRate = 1000 LinxOPCGroup.IsSubscribed = True LinxItem1 = LinxOPCGroup.OPCItems.AddItem("[HOME]N35:60,L1,C1", 1) Workbooks("RSLINOPC.xls").Worksheets("Template").Range("Q4").Value = LinxItem1

Share this post


Link to post
Share on other sites
Hi, For me, there seems to be a few things missing. Using our LogixOPC server and Excel we have an example project that might point you in the right direction. Edited by Mark-

Share this post


Link to post
Share on other sites
Thanks. I'll try this one. I just snagged another sample one I found and I get VBA errors.

Share this post


Link to post
Share on other sites
"ActiveX component can't create object" when I hit the connect button.

Share this post


Link to post
Share on other sites
Who is the target for your reply? If it is me, did you install our server? Did you watch the video? Did you read the notes? Edited by Mark-

Share this post


Link to post
Share on other sites
OK, changed OPC server to "RSLinx OPC Server" and now I get this: "Method 'AddItem' of object 'OPCItems' failed" I think that is because I am using a SLC and there are obviously no tagnames, but not having any luck using SLC data files.

Share this post


Link to post
Share on other sites
OK, changed some things around and got it working. For SLC / PLC, you need "[topic_NAME]N7:0" in place of the tag name. I have a lot of work converting this DDE code to OPC, but at least it's working. Thanks for the sample, Mark. I couldn't have resolved it this quickly without your help!

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