From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
09-12-2016 01:08 AM
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?"
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?
09-12-2016 01:45 AM
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…
09-13-2016 10:14 PM
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.
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
09-14-2016 01:31 AM
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?
09-14-2016 01:52 AM
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:
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...
12-10-2020 03:32 AM
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).
12-10-2020 08:23 AM
@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.