Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Indicator Value with Memory

Hi:
 I have a problem to solve into my code, and I will appreciate if someone can help me.
I'm running a measurement sequence that is contained inside a Stacked Structure.  I'm evaluating a DBL value against an upper and lower limit.  After I get a Boolean result out of the evaluation, I have to display the result at the Front Panel using an indicator with the following caption: PASSED = Green LED, FAILED = Red LED.  No big deal.  The problems comes when the measurement toggles between the window test.  I need that once the measurement failed, the LED indicator remains in RED and stays that way until I close the application.  This way I can tell the user: "There was a failure in the tests, no matter how many loops the measurement had run" so even if the test had failed once in a 100 times, the user is aware that a failure ocurred.
 
The problem is that I haven't been able to generate a code for this, as there are many layers of structures wrapping my evaluation routine. 
Is there any property in LabVIEW that allows me to lock the value of the indicator?  Kind of a AC motor starter circuit with reset? 
 
Appreciate your help, pardon my ignorance I'm building my first muscles in LabVIEW yet.
 
Thanks
Alberto
0 Kudos
Message 1 of 2
(2,817 Views)

First, if you have more than about two sequence structures, you might want to consider reworking your program. With dataflow and using the error in/error out clusters, you seldom need a stacked or flat sequence structure. For more complex programs, the state machine is better as well. It is much more flexible. There are shipping examples of a state machine and it is also one of the desing templates you can choose.

As far as you immediate problem, the simplest way to handle it is with a shift register. If you don't care about which actual test failed or when, AND the current status with the value in the shift register. Be sure to initialize the shift register with a True constant (assuming true is equal to pass). If at some point you want to know which test failed, then use a shift register with a Boolean array. With each pass, append the new element to the array. Then you can use the AND Array Elements function to give you overall status. With the array, you can do a search for Fail results to see when and how often you got a failure.

p.s. In the future, questions like this should be posted to the LabVIEW and not to the Multifunction DAQ which is for issues with NI DAQ boards.

Message Edited by Dennis Knutson on 08-10-2007 04:00 PM

0 Kudos
Message 2 of 2
(2,815 Views)