LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Class library is locked, but shouldn't be

I've run into some particularly weird behavior of LabVIEW 2011 SP1:

  • I have a base class, "Scanner". Child classes will generally have a member VI called "Scan loop.vi", so Scanner has a member method "Scan loop template.vi". This template can be used to make creating a child class easier.
  • I created a child class, "MCL Fast Scanner". I copied the "Scanner : Scan loop template" member VI, and added it to "MCL Fast Scanner", renamed as "MCL Fast Scanner : Scan loop.vi".
  • Now, for some strange reason, when I open the project, the "MCL Fast Scanner.lvclass" library appears locked, with LabVIEW indicating that "this LabVIEW class is loaded in multiple application instances". I'm pretty sure it isn't (note: I'm note using any real-time targets).
  • I found a way to unlock the library: simply open "MCL Fast Scanner : Get scan loop.vi", which happens to contain a Static VI Reference to "MCL Fast Scanner : Scan loop.vi". Opening this VI mysteriously makes the library lock disappear.

I've tried to summarize this in the picture below:

 

Screenshot - 08-May-12 , 11_54_54.png

 

So I'm not entirely sure what's causing this behavior:

  1. Either it's because I originally messed around with copying this template VI from the base class. This would seem similar to a post from a few years ago, mentioning an eerily similar issue. However, I afterwards tried re-creating "Scan loop.vi" from scratch, and that didn't solve anything.
  2. There's something strange going on with the Static VI Reference.
  3. I created the "MCL Fast Scanner" child class using the LVOOP Assistant; could that have botched something?

Feel free to contact me if the actual files are needed for further investigation.

 

Thanks!

Science & Wires — a blog on LabVIEW and scientific programming
http://scienceandwires.com
0 Kudos
Message 1 of 9
(3,407 Views)

Could you please post an image of the code containing th static reference?

 

Curious,

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 9
(3,388 Views)

Sure 🙂 It's nothing special:

 

Screenshot - 08-May-12 , 15_55_38.png

 

Note that I've used similar code for years all over the place, but this is the first time I've encountered this issue.

Science & Wires — a blog on LabVIEW and scientific programming
http://scienceandwires.com
0 Kudos
Message 3 of 9
(3,384 Views)

Hello onnodb,

 

I do not have explanations for such a behaviour at the moment.

 

Perhaps you can post the actual project in order for me to reproduce the issue and see what is going on?

 

Thanks!

Cédric | NI Belgium
0 Kudos
Message 4 of 9
(3,343 Views)

Hello Cédric,

 

Thanks for your reply! It's much appreciated.

 

Would it be possible to send a snapshot of the code by email? It's a relatively big project that's still under development for a scientific research group, so I'd rather not have the code publicly available at this point.

 

Best regards,

 

 

Onno 

Science & Wires — a blog on LabVIEW and scientific programming
http://scienceandwires.com
0 Kudos
Message 5 of 9
(3,328 Views)

Hello,

 

This behaviour is actually caused by the auto-populating folder feature. If you put that feature off, the library does not appear locked anymore.

The issue has been reported to the developpers and should be corrected in a further revision.

 

@ Onno: I just sum up here our discussion to make this post complete, nothing new for you.

Cédric | NI Belgium
Message 6 of 9
(3,300 Views)

@cedhoc wrote:

Hello,

 

This behaviour is actually caused by the auto-populating folder feature. If you put that feature off, the library does not appear locked anymore.

The issue has been reported to the developpers and should be corrected in a further revision.

 

@ Onno: I just sum up here our discussion to make this post complete, nothing new for you.


 

Please post the CAR number so we can check for it being fixed.

 

Than kyou,

 

Ben

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 7 of 9
(3,293 Views)

Hey,

 

Actually, there are more than one CAR related to the auto populating feature opened at the moment 🙂

 

Ealier in the development of his project, Onno ran into some corruption of his project (for reasons only him can give you). He thought he had resolved -most of- them. Thus, the locked library issue he still have at the moment is probably a consequence of a previous corruption. Because of that, I cannot give you a precise CAR reference, but for sure, the R&D is aware of some issue with the auto-populating folder. This one (CAR#347498) is probably intersting to follow though.

Cédric | NI Belgium
Message 8 of 9
(3,278 Views)

I just ran into this problem and thankfully, was able to fix it in my case. I'm using LabVIEW 2011 with classes and autopopulating folders.

1. I was able to open the class by itself and it wasn't locked.

2. When I opened the project, the class became locked.

3. After looking through the vis in the project I found one vi that was formerly part of the class but I had removed from the class.

4. The vi itself was set to be part of the class even though it shouldn't have been. I deleted the offending vi and the class was no longer locked. I'm sure you can also just save the vi instead of deleting it. However, I didn't try that approach because I didn't need the vi in this case.

 

Hope this helps!

0 Kudos
Message 9 of 9
(3,056 Views)