LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can LabVIEW pickup from where it left off?

Solved!
Go to solution

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

0 Kudos
Message 1 of 16
(4,295 Views)

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.

0 Kudos
Message 2 of 16
(4,285 Views)

 


@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.

 

 

Message 3 of 16
(4,281 Views)

The post nathand mentioned is Ben's Über-Nugget on using control references.

 

Felix

0 Kudos
Message 4 of 16
(4,248 Views)

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/

Dan Shangraw, P.E.


   

0 Kudos
Message 5 of 16
(4,222 Views)

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

0 Kudos
Message 6 of 16
(4,210 Views)

 


mhaque wrote:

Feedback as always is much appreciated.


 

 

  • Why too complicated!
  • Why are you spinning the loop like crazy consuming all CPU?
  • If there is an error in case 1 you write to the "step" local in two different places in parallel, so the outcome will depend on random execution order. A race condition!
  • You don't need to flatten, just wire the cluster directly to the file Write. 😄

 

0 Kudos
Message 7 of 16
(4,201 Views)

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

0 Kudos
Message 8 of 16
(4,190 Views)
Sorry I am on the road posting via phone. I'll show you an easy solution later...
0 Kudos
Message 9 of 16
(4,179 Views)

Thank you

merci

danke

gracias

dziękuję

grazie

 

0 Kudos
Message 10 of 16
(4,172 Views)