LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Community Example: Updating subVIs' chart from topVI

In this application, a TopVI has several buttons which call various subVIs. 

Front panel TopVI.PNG

 

The subVIs to be called have a few indicators or controls in common - like a waveform chart and boolean in this example.

Typical subVI front panel.PNG

 

Because the subVI selected could be any based on the button pressed, control/indicator references are bundled as a cluster and output from the subVI through the pinout.

SubVI block diagram.PNG

 

See the block diagram of the topVI below/

In the topVI, when the subVI is called, the output control reference cluster is stored in a cluster. During data operations, the control refs are passed via a local variable to the code that does the graph or data operations as in the lower loop. A state machine is used to decide which state the program is in (depending on the button pressed).

The lower loop uses a local variable referring to the state to decide what data operation to do. Note, the updateVI operation is generic and works for any subVI that has a waveform chart.

Screenshot TopVI.PNG

 

The above example relates to a very specific customer application.

Tanim
National Instruments
0 Kudos
Message 1 of 2
(2,587 Views)

Here's the zipped file for program.

Tanim
National Instruments
0 Kudos
Message 2 of 2
(2,585 Views)