Community Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

Live update of front panel controls using reference globals

Introduction

Heres how you update your front panel controls no matter where the program threads running. Basically the main controls get updated through subvi s and you do not need to pass references to sub vi. This will help keep programing modular, clutter free of reference wires and passes, and no need of unwanted queuing, paralel while looping, or looping within another loop. Unfortunately I could not find this on the web, so thought worth posting.

Steps to Complete

1. Create a reference to the control (which needs live updating) in the main VI.

2. Ceate an indicator from the reference.

3. Add this reference to your global vi as a global variable of type reference.

4. Create a reference control of same type in the subvi where you write new values to the front panel control for updating.

5. Write to this from the global ref you created earlier.

6. Invoke the value property (or any other property you want to change) of the sub vi reference and write new values.

7. That is it. Your updating will work flawless, and you see the continuous updating of the front panel control rather than jumps when you have wired through tunnels.

Additional Notes

Advantages:

Unlike references the sub vis wont get loaded in to memory.

Clutter free

Once you run the main VI atleast once reference globals are written once, and from then onwards you can even run subvis as stand alones without unknown reference errors.

Well I foundmy dial gauge on the main fron panel increasing or decreasing continuosly without flaws.

Comments
Mr.Fah
Member
Member
on

show me some example code

Contributors