05-10-2013 12:09 AM - edited 05-10-2013 12:10 AM
I need ideas on how to execute a delay only once after start (and that's it, no more calling the delay ever again after start) in a while loop without affecting other codes in that same loop...
Something like this http://forums.ni.com/t5/LabVIEW/put-a-delay-for-executing-case-structure/m-p/1095396/highlight/true#... but it is not working
05-10-2013 01:06 AM
It does not help if you say "it does not work". Please be more specific. What happens and what do you expect to happen instead?
Did you use the snippet or wire it up from scratch?
Please attach your non-working code!
05-10-2013 01:32 AM
I tried to use the code as attached in the link. But the indicator just shows 0. The delay VI in the link can be found in the very last picture...
05-10-2013 01:50 AM - edited 05-10-2013 01:52 AM
How do you expect the subVI to delay only once if the main loop has a 5000ms delay?
Please attach the VI, not pictures. Thanks
05-10-2013 01:54 AM
Kindly run untitled 1.vi
delayed output.vi is for your reference.
Hope you can help, thanks in advanced
05-10-2013 02:10 AM
05-10-2013 02:12 AM
Because I introduced a new VI so I do not want it to get messy
05-10-2013 02:31 AM
@augustg wrote:
Kindly run untitled 1.vi
delayed output.vi is for your reference.
Your "delayed output.vi" is faulty. You did not copy it correctly. The loop condition needs to be TRUE instead of FALSE. In your case, the subVI runs forever and never returns control to the calling VI.
(I did not check the rest of your code)
05-10-2013 02:37 AM
I've switched the event of the TRUE and FALSE in the case structure in the delayed output.vi but it's still not working in my untitled 1.vi
05-10-2013 02:58 AM - edited 05-10-2013 03:04 AM
Why? That makes no sense. You need to change the loop termination inside the subVI as I already mentioned.