LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Configure VI front panel for subsequent calls

When you call a VI with an unwired input, the default value for the control is used. Most of the time, this makes good sense. But then how can you configure a VI to operate in a particular way, and subsequently call it to repeatedly perform some function given the prior configuration?

 

For example, suppose I have a VI that works something like a virtual o-scope. I want to configure the instrument once (set up all the controls: time base, volt ranges, etc) and then periodically take readings. Is there any way to do this without having to wire the setup every time I take a reading?

0 Kudos
Message 1 of 2
(2,325 Views)

Use Action Engines or Functional Globals.  They make use of un-initialized shift registers.  Upon first call, the initilization must take place inside the vi.  The init values get wired to the shift registers on the right side.  Upon next call, the shift registers will retain the values that were set on the first call.

See the Action Engine Nugget created by Ben.  Very useful and very practical.

 

- tbob

Inventor of the WORM Global
Message 2 of 2
(2,316 Views)