09-30-2012 12:33 AM
Hi,
I would like my program to do turn an LED on when the INPUT > X. If the input then drops, the LED will stay on for 10 seconds before turning off.
I have figured how to turn an LED on when INPUT has been > X for 10 seconds, but not what I need.
Thanks
10-01-2012 06:16 PM
Hi alarmharm,
I would recommend using a state machine for your application. More information on state machines can be found here: http://zone.ni.com/reference/en-XX/help/370281P-01/imaqvision/imaq_arraytoimage/
You can have a state that waits for INPUT>X to transition into a state that turns the light on and waits for INPUT<X. This state would transition into a state that waits for 10 seconds and then turns the LED off which then goes back to the original state that waits for INPUT>X.
10-02-2012 09:06 AM
Perhaps you can use something like this as a starting point.