How can I ask LV to leave my design time stuff separate from runtime stuff 
Author Message
 How can I ask LV to leave my design time stuff separate from runtime stuff

Taking your second question first, the answer is that LV doesn't keep
track of different window positions for design-time and run-time.
Sorry.

Now, concerning your first question, what exactly is it that your
changing and it isn't staying the same?

Mike...



Sat, 15 Oct 2005 08:13:38 GMT  
 How can I ask LV to leave my design time stuff separate from runtime stuff
You choose "Reinitialize all to default" from the Operate menu, this
should set most of your application back to the "original" state.

If you want to set all values back to before you clicked the "RUN"
button, rather than default values, you will need to write the apps
state to a file, and when you run (or quit) the application load the
previous values into the controls.

Charts act a bit differently than other controls also, because they
will keep their history, so you'll have to write some code to clear
the history of the graph (using a property node).

For you second issue, I actually wrote a VI like that (a full screen
app).  What I did was record the current size of the app before
changing the position / size programatically.  When the user pressed
the "quit" button, I reset the size / location of the app.



Sat, 15 Oct 2005 22:30:22 GMT  
 How can I ask LV to leave my design time stuff separate from runtime stuff
I forgot to mention, you can clear a charts history by right clicking
on the chart and choosing "Data operations -> clear chart history".
(instead of doing it programatically.


Sun, 16 Oct 2005 00:20:55 GMT  
 How can I ask LV to leave my design time stuff separate from runtime stuff
As you can tell from the other answers, there are many different ways
of dealing with the two issues you raise.  I'll just add a couple more
comments.
1. Whenever you start labview and open VIs, the front panel controls
are set to their default values and their properties (e.g. disabled,
visible, etc.) are set as they were the last time the VI was saved.
If you close a VI and then reopen it without exiting and restarting
LabVIEW, you get the values and properties from the last time the VI
was open (not the last time it was saved).
2. If you want to initialize some front panel controls every time you
run the VI, you can use local variables and/or property nodes.
3. Whenever you start LabVIEW and open VIs, the front panel and
diagram will be displayed at the location they had the last time the
VI was saved.  If you move a front panel, close the VI, and reopen the
VI without exiting and restarting LabVIEW, the front panel will be
displayed at the location it had when it was last open, not last
saved.


Sun, 16 Oct 2005 01:09:58 GMT  
 How can I ask LV to leave my design time stuff separate from runtime stuff
Ok, I think I see what you mean. Actually, this in some ways is the
same issue as the second question. LV keeps track of the control's
current appearance, location, visibility, etc. In general, it doesn't
distinguish between the way it was designed and the ways you changed
it programatically.

Now here is a great big caveat: I say "In general..." because LV is
100% consistent. Some properties it saves and some it doesn't. For
example, if you change the format of a plot's axis programatically and
then close the VI, when you reopen it, it will be in the original
state.

Bottom line, if it's critical that a control be a particular way when
you start the VI up, reset it in code before the VI terminates.

Mike...



Sun, 16 Oct 2005 09:32:46 GMT  
 How can I ask LV to leave my design time stuff separate from runtime stuff
Do you want to reset front panel stuff before the VI terminates or
initialize it when the VI starts?  Here are some technical and
philosophical considerations.
1. When the VI ends, do you want the controls and indicators to show
the latest values or be reset to their defaults?  If you want to
retain the latest values, you don't want to reset stuff before the VI
ends.
2. Will you show the Abort button or a title bar when the VI is
running?  If yes, you don't have control over how the user ends the VI
so code to reset stuff before the VI ends may not get executed.
3. Do you want the user to be able to set controls to desired values
before the program starts?  If yes, then you don't want to initialize
when the program starts.
Generally, I like to initialize stuff when the program starts and
retain latest values when the program ends. But that's just the
philosophical part.


Sun, 16 Oct 2005 20:45:05 GMT  
 How can I ask LV to leave my design time stuff separate from runtime stuff

Quote:
> Now here is a great big caveat: I say "In general..." because LV is
> 100% consistent. Some properties it saves and some it doesn't. For
> example, if you change the format of a plot's axis programatically and
> then close the VI, when you reopen it, it will be in the original
> state.

There is one property that isn't saved, but it is isn't the one you
listed.  All properties of a control are saved except for the value.

Properties come in two flavors.  Those which mark the VI as needing to
be saved when they are modified, and those that don't.  There are
actually other distinctions since some property changes cause the VI to
be marked for recompile and others do not.

If a graph's axis is modified interactively or programatically and the
VI is saved, the change gets saved to disk.  But, the change to the axis
will not mark the VI as needing to save since these changes are often
made simply to explore data.

Greg McKaskle



Mon, 17 Oct 2005 11:40:10 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. FS/A: Cool rare SMALLTALK stuff, don't miss out, NeXT and BeOS stuff too

2. JSObject stuff & stuff

3. Latest Fortran stuff and other stuff

4. Timing and stuff.

5. Porting Date Time C stuff to ISE Eiffel

6. Win9x and [after] or any time related stuff

7. Contol of GPIB initializing at LV Runtime Startup

8. LV 6.0.2: an App-built dll gives a runtime error when called by C

9. LV 6.0 runtime engine not found with labview 6.1

10. LV 6.0.2: an App-built dll gives a runtime error when called by C

11. Programmically mass compile under LV runtime

 

 
Powered by phpBB® Forum Software