LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to monitor an indicator at all times...regardless of program structure. HELP!

I have a complex Labview VI complete with several sequence structures and "for loops" that are necessary to control the logic of the program.  I need to be able to monitor, via an  indicator on the front panel, an indicator at all times during the program. Unfortunately, the way I have it set up, the indicator on the front panel will only display the correct values if the program is in the same structure as the indicator.  How can I monitor an input regardless of where I am at in the program?  Thank you!
0 Kudos
Message 1 of 8
(3,139 Views)

Hi Josh,

if you use a state machine instead of your sequences, you could use everytime the same indicator. With sequences i think you could use property nodes or local variables, but i recommend the state machine structure.

Mike



Message Edited by MikeS81 on 04-15-2008 07:03 AM
0 Kudos
Message 2 of 8
(3,132 Views)
I have no idea what this statement means:
the indicator on the front panel will only display the correct values if the program is in the same structure as the indicator
What are you using the monitoring for? Are you supposed to perform some action based on the value, or is it just for diplay on the front panel? If it's just for display, a "hack" would be to have an independent while loop that simply updates the value of the indicator. Without seeing your code, and what you mean by the above statement, it's a little hard to offer specific suggestions.
0 Kudos
Message 3 of 8
(3,106 Views)
I apologize for the confusion and thanks for trying to help out with this.  The problem I am having is this:  I have a high voltage (0 to 10,000 V source) that I need to measure the voltage on at all times - because of safety reasons.  The high voltage source outputs a 0 to 5 V analog signal that is proportional to the 10,000V.  I measure the 0 to 5 V signal with a DAQ and need to show the value at all times on the front panel.  Because the voltage is always changing - even just a little bit - I should always see the value on the front panel changing.  However, I only see the value changing and fluctuating when the program is in the same structure (the same part of the sequence) as the indicator (that indicates the 0 to 5 V signal to the user on the front panel). Once the program goes to the next part of the sequence structure, the indicator on the front panel stays at the last value that was collected just before the program moved to the next part of the sequence.  I hope this is clearer. Thanks.

Josh
0 Kudos
Message 4 of 8
(3,102 Views)
Hi Josh,
as i understand it, you write the value only in one part of your program into the indicator. Can you show us a part of your program? To write your value in the other part you can use property nodes or something like this.
 
Mike
0 Kudos
Message 5 of 8
(3,095 Views)
Josh,

As was stated, you can modify your program to use a state machine and after every state check the voltage.  The issue with this is that if any of your states take a while, you will still see a delay in updates.

Alternatively, you can launch a parallel process (a while loop in parallel with the rest of your program, or a dynamic VI you launch at startup and shutdown at the end of the program), which monitors the value at whatever rate you desire.  If you use a subVI, you can use a control reference or a queue to send data back to your main program to update the indicator.  If you use a paralllel while loop, just drop the indicator in there.
0 Kudos
Message 6 of 8
(3,091 Views)
Does anyone have an example of a parallel while loop?  I am trying to better understand how this would work. Thanks.

Josh
0 Kudos
Message 7 of 8
(3,076 Views)
It would simply be a ... parallel... while loop. Open the Example Finder (Help -> Find Examples), change to the Search tab and enter "loops" in the search box. Open the example "Stopping Parallel While Loops without Reset". When the VI starts both loops are running simultaneously. In your case one of the loops is the rest of your program. You just need to set a flag (like an indicator) to stop the while loop.
0 Kudos
Message 8 of 8
(3,065 Views)