Brock Greman
2005-07-06 22:40:46 UTC
Hi, I'm a new poster here. I'm also working with an
implementation of 'Make Current Values Default' and I've got to say, it
works for me.
My work involves saving data files in the research laboratory where I
work. I'm developing an overarching system that will allow for a
fail-proof data storage system.
Basically, I have a bunch of 'template' VIs corresponding to the
particular data needs of a user. It consists of an an input and
output terminal in the form of a cluster that contains the data.
There's also a case structure with a blank constant to pass to the
output terminal while saving to keep file sizes down. This
template is used in a 'write data' VI.
In this higher level 'Write' VI, the data is passed into the template
VI, which executes itself. LabVIEW is nice to me, and keeps this
VI in memory even after execution, which allows me to open a reference
to it, set its current contents (i.e., the data) as default, and then
save a copy as my 'Data VI'. I call the system DataVIew, because
(corny slogan warning) "The Data IS the VI".
It works like a charm. With one little problem: This method
doesn't work at all if the 'write' VI is involved in any sort of loop
structure. For some reason, the template VI doesn't revert to
edit mode after its copy has been saved, so the second (or further)
time it tries to set default values, I get the 'not in edit mode' error.
So basically, my question is: Is there a programmatic way to unload a
VI from memory? I'd like to do this after the copy is saved, so
that a fresh 'instance' of the template VI is opened on the next
iteration of the loop. I'm willing to deal with the computational
overhead involved.
(I made a new thread as someone mentioned that new messages are searched more often)
LabView 7.1
implementation of 'Make Current Values Default' and I've got to say, it
works for me.
My work involves saving data files in the research laboratory where I
work. I'm developing an overarching system that will allow for a
fail-proof data storage system.
Basically, I have a bunch of 'template' VIs corresponding to the
particular data needs of a user. It consists of an an input and
output terminal in the form of a cluster that contains the data.
There's also a case structure with a blank constant to pass to the
output terminal while saving to keep file sizes down. This
template is used in a 'write data' VI.
In this higher level 'Write' VI, the data is passed into the template
VI, which executes itself. LabVIEW is nice to me, and keeps this
VI in memory even after execution, which allows me to open a reference
to it, set its current contents (i.e., the data) as default, and then
save a copy as my 'Data VI'. I call the system DataVIew, because
(corny slogan warning) "The Data IS the VI".
It works like a charm. With one little problem: This method
doesn't work at all if the 'write' VI is involved in any sort of loop
structure. For some reason, the template VI doesn't revert to
edit mode after its copy has been saved, so the second (or further)
time it tries to set default values, I get the 'not in edit mode' error.
So basically, my question is: Is there a programmatic way to unload a
VI from memory? I'd like to do this after the copy is saved, so
that a fresh 'instance' of the template VI is opened on the next
iteration of the loop. I'm willing to deal with the computational
overhead involved.
(I made a new thread as someone mentioned that new messages are searched more often)
LabView 7.1