RSView VBA error (Object library invalid)

johnhines2

Member
Join Date
Jan 2011
Location
Ashland
Posts
3
I recently "inherited" support for a VBA application hosted within RSView. We have a test-stand that is used to run various tests on industrial pumps. The VBA application having the issue runs a pump priming test, among a host of other tests, but when you access the screen to start the priming test in particular a VB-type error message is presented saying "Object library invalid or contains references to Object definitions that could not be found."

Being a long time VB, VB.NET, C, C# programmer I know the things that normally cause this error but I have not been able to track this down in the VBA code in this case. When the error occurs, the line highlighted in the VBA editor is a declaration using the TAG UDT (Dim TAG_PLC(100) as TAG). If you get past this (by commenting it out and re-running), declarations using the TagGroup UDT also trigger the error. Normal VB datatypes (integer, string, etc.) do not.

I've tried some suggested resolutions such as deleting EXD files so they can be dynamically re-created/registered but that also had no impact on the error. I've checked library references and spent a lot of time trying different versions of certain libraries (especially ActiveX since this application uses a lot of ActiveX controls) but again no impact on the error. I saw a forum post once about single-element array declarations being a problem when being declared using a literal, so I tried the recommendation of setting up a variable with the value of the array elements and using that instead of a literal to specify the size of the array, but again no impact on the error.

It appears there must be something more specific to this flavor of VBA hosted under RSView that I'm not seeing. Unfortunately, I am not very familiar with RSView or VBA elements that are more specific to it in VBA applications written for it and I think that is where my "disconnect" is.

As this error seems to implicate UDTs like TAG and TagGroup, I'm wondering if anyone has run across this kind of error? What library reference in the VBA code is most likely associated with this error, keeping in mind that when the error is thrown it stops on the first line of code that declares something using the TAG UDT?

I have been told by the lab personnel that this test used to run successfully about six or seven months ago and nobody seems to know of any changes made to the software since then.

See attachment. This is the error thrown immediately when the Priming test is selected.

J. Hines
Programmer/Analyst,
Gorman Rupp Company

teststand_error.jpg
 
Stupid question but is the DisplayClient library loaded and working correctly.

I am using FactoryTalk View and Tag and TagGroup are members of the DisplayClient Library
 
Last edited:
It appears that library is loaded. Attached is a screenshot of the references for this screen. Do you see something missing that involves those UDT's? I also screen-shot the references from another module that works correctly and it has largely the same references you see here.

teststand_references.jpg
 
Do the Tag and TagGroup objects show up in the object explorer.

If it was working fine before and no program changes were made I would check for corrupt libraries.
 
Success! Looks like a corrupted library (SegFxRoiCli). Was able to grab this from another machine and the problem is now resolved. Priming test immediately loaded into a "ready" state. Thanks labeledas.
 

Similar Topics

Hello there, I'm new at the forums and with HMI programming and would like to ask for some help. I'm having trouble migrating a VBA code from...
Replies
1
Views
3,079
Need a bit of help. I have a older rsview app running on Windows nt that runs fine. My clients wanted to update and now the same project will...
Replies
12
Views
2,982
I have a global object that is a group of a series of objects one of which is a button. The push of the button needs to execute a VB script based...
Replies
0
Views
4,684
Hallo, I got a Cognex Scanner for dormatrix code. I want to read it in a RSView 32 Application. Therefore I need a VBA Code. Did anybody from...
Replies
0
Views
1,947
In RSView we have the operators read in several pieces of information from a barcode reader. None of the bar codes have any tab, CR, LF, or any...
Replies
4
Views
3,114
Back
Top Bottom