01-16-2010 02:26 AM
Hi all,
I want to generate time delay of 2 sec between operation of 2 booleans...
I tried sequence structure with 'wait' but it stops whole VI for 2 sec.
I want just delay between two booleans irrespctive of whole VI
Can u guide me?
01-16-2010 04:04 AM
Hi Vaibhav,
stop to create duplicate posts, especially when you have marked a solution for the same question!
01-16-2010 05:34 AM
Mr. GerdW,
its not duplicate post, With earlier solution the whole VI is taking delay. This time I have indicated that I want this delay just between two booleans in whole VI.
if u can help
Thanks
01-16-2010 05:43 AM
01-18-2010 12:09 AM
I have tried this logic but by the application of it, my whole VI is taking delay.
I need that this delay should take place between two booleans irrespective of VI's other work.
I have tried to use case structure along with this.
01-18-2010 12:38 AM - edited 01-18-2010 12:45 AM
Hello, The solution given (the vi snippet) will work. Just a create seperate subvi and plce the code in this so that the main vi is not dependent on this (what i mean to say here is do not pass anything "out" from this subvi to the main vi) or call this sub vi as a top level in a new thread dynamically so that your whole vi does not wait for 2 seconds.
Guru
01-18-2010 02:24 AM
Vaibhav G wrote:I want to generate time delay of 2 sec between operation of 2 booleans...
I tried sequence structure with 'wait' but it stops whole VI for 2 sec.
I want just delay between two booleans irrespctive of whole VI
I agree with Gerd that this is just a clarification to the earlier question, so you should have continued in the other thread and unmarked the earlier solution since it apparently isnt. 😉
Please be more clear in you problem description. What is an "operation of 2 booleans"? Are these controls? indicators? what kind of "operations"? What should happen after 2 seconds? Should it start over after 4 seconds?
Such a 3 frame sequence will only delay code that has a direct data dependency to it. All you need to do is make sure that parts of the code that should run in parallel are not in the same loop, so they don't need to wait. LabVIEW is great for parallel operations, it's just a matter of programming it right.
Can you attach your VI so we can have a better idea what this is all about? Thanks! 🙂
(And please keep it all in this thread!) 😉
01-18-2010 02:46 AM
As I said, you need two parallel structures if they should not block each other. Here's a very simple example (LV 8.0):
Both processes occur independently and in parallel because there is no data dependency. I am sure you can solve your problem along those lines.
01-18-2010 02:57 AM
You could try adding something similar to below inside your main loop - you could use this to drive a case structure for example.
However, the best way of implementing a delay depends on you application, architecture and what you are trying to do