You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old January 19th, 2011, 09:51 AM   #1
johnhines2
Member
United States

johnhines2 is offline
 
Join Date: Jan 2011
Location: Ashland
Posts: 3
RSView VBA error (Object library invalid)

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
Attached Images
File Type: jpg teststand_error.jpg (60.6 KB, 35 views)
  Reply With Quote
Old January 19th, 2011, 10:07 AM   #2
labeledas
Member
Canada

labeledas is offline
 
labeledas's Avatar
 
Join Date: Apr 2010
Location: Peace River Alberta
Posts: 536
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 by labeledas; January 19th, 2011 at 10:09 AM.
  Reply With Quote
Old January 19th, 2011, 10:27 AM   #3
johnhines2
Member
United States

johnhines2 is offline
 
Join Date: Jan 2011
Location: Ashland
Posts: 3
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.
Attached Images
File Type: jpg teststand_references.jpg (66.3 KB, 34 views)
  Reply With Quote
Old January 19th, 2011, 11:12 AM   #4
labeledas
Member
Canada

labeledas is offline
 
labeledas's Avatar
 
Join Date: Apr 2010
Location: Peace River Alberta
Posts: 536
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.
  Reply With Quote
Old January 19th, 2011, 11:33 AM   #5
johnhines2
Member
United States

johnhines2 is offline
 
Join Date: Jan 2011
Location: Ashland
Posts: 3
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.
  Reply With Quote
Old January 19th, 2011, 11:45 AM   #6
labeledas
Member
Canada

labeledas is offline
 
labeledas's Avatar
 
Join Date: Apr 2010
Location: Peace River Alberta
Posts: 536
Glad to help
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Using VBA in RSView SE question. briana banks LIVE PLC Questions And Answers 11 January 17th, 2014 07:56 AM
Associate generate VBA values in excel to RSVIEW RafaCerda83 LIVE PLC Questions And Answers 0 July 5th, 2010 01:55 PM
Not able to expose RSView control to VBA pequeajim LIVE PLC Questions And Answers 0 July 6th, 2009 10:40 AM
Using VBA to resize main app window in RSVIEW brdwater LIVE PLC Questions And Answers 1 December 29th, 2008 05:14 PM
VBA to write values from RSView SE V5.00.00 to CLX Tags MorphuisOGrady LIVE PLC Questions And Answers 0 April 24th, 2008 05:56 PM


All times are GMT -5. The time now is 10:20 AM.


.