i'm designing a program and here's what I
would like to have happen. mainVI has a button to scopeVI and another
button that initiates acquisition (a 'run Exp.' button). scopeVI
allows the user to set things like vert/horiz/sampling rate/record
size, and whatever other 'controls' they want to use for the actual
acquisition.
ideally, i'd like the user to be able to click on scopeVI button,
set parameters, and then close this VI. Then I'd like the user to be
able to press 'run Exp.' button to (1) initialize the scope using the
same values that were set in the scopeVI, (2) collect data, (3) close
scope.
The problems are this....
1) One way that I can envision doing this is to put all of the
scope controls in the mainVI, create references to them which can then
be updated when scopeVI runs. I could then hide the cotrols from the
front panel so the user wouldn't know they're even there. One good
thing about this approach is that I can avoid using global Vars. I
don't like this approach because it will take a lot of work to
duplicate all of the controls, and I have to be very careful to avoid
race conditions when accessing the controls.
3) I'm not sure how I could do this using shift registers because it seems complicated.
2) the other way I can envision doing this is to have scopeVI load
into memory when the button is clicked, but then when it is closed from
the scopeVI panel, somehow make sure it is not entirely unloaded from
memory so that I can still access those variables. I don't know if
this is even possible, but i would think there's some way to do it.
any suggestions on how to approach this are really appreciated!
-Z