12-01-2010 05:35 PM
When starting a new LabVIEW session, the program always starts from the default values of controls and indicators. The default values can be changed from edit->make current values default.
Can LabVIEW do this automatically i.e.every time the program is closed it picks up from the last value of the control and indicators?
Or does this have to be done programmatically i.e saving to a binary file etc.?
thanks
mhaque
Solved! Go to Solution.
12-01-2010 06:37 PM
You need to do this programmatically. You may find good starting points among the many messages on this board - I believe I've seen code posted to iterate through all controls and save their values.
12-01-2010 06:55 PM
@mhaque wrote:
When starting a new LabVIEW session, the program always starts from the default values of controls and indicators. The default values can be changed from edit->make current values default.
There is no automatic way. Remember, LabVIEW needs to be saved with the new default values, not just closed.
Be aware that you only should do this for controls. Indicators such a graphs, arrays, etc. often contain a lot of data so saving the VI with all these set to default can possibly seriously inflate the size of the VI and slow down the loading from disk later.
Typically, one would use a configuration file to save the desired default values and restore them automatically when the program starts.
12-02-2010 03:19 AM
12-02-2010 09:08 AM
An easy way to create and get configuraiton files is the OpenG Variant Configuration Files.
http://wiki.openg.org/Oglib_variantconfig
http://thinkinging.com/2007/03/25/the-openg-vis-that-i-couldnt-live-without/
12-02-2010 10:50 AM
I have after much deliberation somewhat been able to save the values of the matrix in the attached VI.
It works well enough, but I have questions about the efficiency/scalability of the code.
Feedback as always is much appreciated.
mhaque
12-02-2010 11:15 AM - edited 12-02-2010 11:17 AM
mhaque wrote:Feedback as always is much appreciated.
12-02-2010 11:28 AM - edited 12-02-2010 11:32 AM
It is part of an extended VI where the loop has a wait timer of 750 ms.
When I first started programming, the sturcutre looked simple enough, then it got complicated and hence we have the race condition.
How else can I Load, Save and Reset the matirix and steps without a race condition? Which is why I'm here.
Still learning Boss.
mhaque
12-02-2010 11:50 AM
12-02-2010 11:57 AM
Thank you
merci
danke
gracias
dziękuję
grazie