LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to edit a typedef (locked library)

Hi,

I've a project with a lot of typedefs which is used as a shared variable.

Most of the time (all of the time?) when i change one of those typedefs and save it, I am not able to change it again. LabVIEW reports:

"This VI cannot be changed to edit mode. This VI is locked because it defines the data type of a shared variable that is in a locked library. To determine why the library is locked, right-click the library and select "Why is this Library Locked?"

Locked Library.png

 

But as far as I can see, the library in the project explorer is not locked. The only solution I have found is to close the project, an re-open it (!!!).

 

Anyone got a suggestion to what to do?

0 Kudos
Message 1 of 7
(3,645 Views)

Hi ThetaMa,

 

what did you get when you follow the advice to "check why the library is locked"?

 

Just an idea: As the term "shared variable" is mentioned in the error message that SV maybe is already distributed (aka "active"/"in use") and you need to stop this shared variable before you can change its datatype. Stopping is (probably) done by closing the project and so unloading all its parts from memory…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(3,624 Views)

There is at least two reasons a library locks:  1) something the library owns is running, 2) the library is open in two or more application instances.

 

I would take GerdW's suggestion and right click on the library to get some idea which one of these it is.

 

Quentin "Q" Alldredge

Chief LabVIEW Architect, Testeract | Owner, Q Software Innovations, LLC (QSI)
Director, GCentral | Admin, LabVIEW Wiki | Creator, The QControl Toolkit
Certified LabVIEW Architect | LabVIEW Champion | NI Alliance Partner



0 Kudos
Message 3 of 7
(3,576 Views)

I have also seen a locked library when the library is already loaded and is trying to be loaded from elsewhere (a conflict).  Is there a library listed in your dependencies that is in conflict?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 7
(3,565 Views)

I finally figured something out thanks to all of your suggestions.

In my project i have 2 hardwares, a cRIO 9030 and a myRIO. The cRIO is connected, but the myRIO is hardly used, and not connected to my computer. Once I made changes to the typedef the library gets the locker symbol attatced. Right-cliking the library i get this error message:

LockedLib.png

I scrolled down to the myRIO to see whats happening, but there is no locker-symbol and no warnings or error messages.

When i saved the project, the locker-symbol disappeared from the cRIO but the typedef is still locked (?!?).

 

My "solution" was to remove the myRIO from the project. This somehow unlocked the typedef...

Is there a way to solve this another way? I really want both of the hardwares in the project...

0 Kudos
Message 5 of 7
(3,561 Views)

Same problem here. I have a library of shared variables on multiple targets and I cannot edit its typedefs. 

 

Actually, I can edit them once after LabVIEW startup, lets say on target A. After saving, I cannot edit the typedef again - it says LabVIEW cannot enter edit mode. The library icon in Project window has a lock on it. When I click "why is library locked", it points to a target B which "has edits" in library, so I open the library there and save it. Then the lock icon on target A disappears, but I still cannot edit the typedef. 

 

Restarting the LabVIEW helps, I can then edit the typedef once (with 10 minutes waiting of course).

0 Kudos
Message 6 of 7
(2,000 Views)

@TheQ wrote:

There is at least two reasons a library locks:  1) something the library owns is running, 2) the library is open in two or more application instances.

 

I would take GerdW's suggestion and right click on the library to get some idea which one of these it is.

 


And when it's 1), can be almost impossible to find out what is running.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 7 of 7
(1,979 Views)