08-30-2010 03:40 PM
My application includes a library containing a number of single-process shared variables. I use type defs to create the shared variables "from custom control." I know that the shared variables do not auto-update from the type defs, so I update the shared variables (right click, properties, data type) whenever I update the type defs. However, if I make a change to a type def that does not change the data type, such as changing the labels of the controls, these changes will not be reflected in the shared variable. The shared variable window data types list contains entries for each previous update, indicating it is using previous entries. How can I make the shared variable properties popup window "forget" my previous errant type defs without removing the variable altogether? Removing and replacing would be troublesome, as the variable is referenced throughout my project.
Thanks,
Wes
Solved! Go to Solution.
08-30-2010 03:49 PM
What if you make a more substantial change like doing something to actually change a datatype (double to ext, U16 to U32) along with the non-critical change. (Of course this might break a lot of code.) Then later go back and change the datatype again back to what is was. (Hopefully fixing any broken code, and keeping the desired non-critical changes to the shared variable still stuck.)
08-31-2010 09:23 AM
Ravens Fan,
I tried that approach originally, and the non-critical change does take effect with the new datatype, but once I revert to the original datatype the variable reverts to its previous definition. In fact, even if I remove the variable from the library altogether and create a new one, the new variable sticks to the previous non-critical definition. It appears that I will need to access whatever part of Labview is keeping track of the custom types to clear them out, but I haven't discovered how to do that.
Cheers,
Wes
08-31-2010 09:40 AM
Perhaps it is the shared variable engine.
Maybe you have to specifically undeploy the library, or do something to stop the shared variable from being tracked in the shared variable engine. (Remove process in distributed system manager ???)
08-31-2010 11:56 AM
The variable is not found in the Distributed System Manager, or the Variable Manager, and undeploying did not resolve. However, I found that closing Labview entirely and restarting clears the memory of previously used custom data types that the library sees. Thus, the successful workaround I found is:
1 - Make a non-trivial change to the data type of the type def (per your suggestion). Save.
2 - Redefine the variable vis-a-vis the type def.
3 - Save the project. Close and restart labview.
4 - The old type def is now cleared.
5 - Revert the non-trivial change of the type def, implement the trivial change, and save.
6 - Redefine the variable using the now-correct type def. Viola!
Thanks!