LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Give delay to digital output

Hi, im trying to do a simple project base on Labview software. I wanted to ask how to give a delay like 30 seconds to digital output(LED n buzzer) after my digital input(ir sensor) detect a signal. Im using 6125 daq card. 

Thanks

0 Kudos
Message 1 of 4
(2,808 Views)

Hi,

I've implemented a solution into your program which should solve the problem.

It gives the on sequence a delay of 30 seconds.

0 Kudos
Message 2 of 4
(2,757 Views)

Thanks, I will try it later after i get my daq card back. I thought need to use state machine in order to do this. I just wanted digital output(buzzer and led) turn on for 30 secs after getting signal from ir sensor. If I can put any value to turn on digital output will be great

0 Kudos
Message 3 of 4
(2,749 Views)

A state machine could definitely handle your problem well. With all design patterns though, there is never one you must use, but some are more appropriate than others.

 

You may also want to think about what happens if you receive multiple triggers. Should the LED stay on for 30 seconds from the original trigger? Or should it reset the counter when a second trigger comes in? This is something that a simple "Wait (ms)" could not handle.

0 Kudos
Message 4 of 4
(2,743 Views)