From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Delay before sending signal

Hi guys,

 

I need help on this urgently. 😞

 

See attached photo.

 

I have a case structure with Boolean True/False of Time Elapsed attached to it. Once the time has elapsed, it will trigger the case structure. However, I would like to have a 3s or more time delay before the case structure is triggered. How should I do this ?

 

Thanks ! Gracis merci.

0 Kudos
Message 1 of 13
(4,185 Views)
The picture doesn't tell us much except you are probably misusing local variables. What have you tried? What's the problem with adding the 3 seconds to the elapsed time function? Where's the case statement? Why can't you insert a delay function in there so it's called before the existing functions you have?
0 Kudos
Message 2 of 13
(4,178 Views)

Hi Denis please help.

 

What I need is to delay before executing a case structure. Please see attached photo. The case structure is inside a while loop.

 

The local variable will signal to execute the case structure. However, I wish to delay that signal. 

 

Thanks !

0 Kudos
Message 3 of 13
(4,163 Views)
And I have you a couple of ideas. If adding the extra delay to the elapsed time does not work, then put it inside the case statement as I already said. A simple way is to put a flat sequence structure around the code inside the case statement. Add a frame before and in that frame, put a Wait (ms) or a Delay function.
Message 4 of 13
(4,153 Views)
Use Time Delay with 3sec and then pass the error wire into case structure.
Thanks
uday
0 Kudos
Message 5 of 13
(4,151 Views)
p.s. If you need to delay both cases, then a flat sequence structure outside can be used.
Message 6 of 13
(4,147 Views)
pps I suspect you are adding this delay because of a race condition caused by misusing local variables. The suggestions I made may work but still a hack.
0 Kudos
Message 7 of 13
(4,140 Views)

Hi Udka,

 

Addint time delay into the case structu re does not work as now it delays the execution of the case stucture at each iteration of the outer while loop. Do you understand ?

 

Hmm what I need is to delay the signal before it starts executing the case structure... without delaying each iteration of the while loop....

0 Kudos
Message 8 of 13
(4,129 Views)
I told you to keep time delay before case structure and then pass the error wire to case structure.
-Which means the case structure will execute when the error wire comes out from time delay block (Remember Data Flow using error wires??)
Thanks
uday
0 Kudos
Message 9 of 13
(4,126 Views)

Hi Udka,

 

The problem is, because of the outer while loop, at each iteration of the while loop, the time delay of 3s will be in effect and thus the case structure will be delayed every 3s at each iteration of while loop.

 

What I need is to only delay 3s for the first time and subsequently the case structure will execute without any delay. Hope you understand.

 

Thanks a lot guys !!!

0 Kudos
Message 10 of 13
(4,121 Views)