02-16-2010 07:14 PM
Hello,
Is there a quick way to progam a section in LabVIEW to toggle the value of a variable every, say, 3 seconds, non-stop? For example, I want a control button to turn on and off every 3 seconds. I have tried various methods but they all seem a bit messy.
Thank you,
LD
Solved! Go to Solution.
02-16-2010 07:17 PM - edited 02-16-2010 07:17 PM
Shift register in a while loop. Not! function on that wire. Wait 3000 ms in the loop.
Not messy at all!
02-16-2010 07:38 PM
Could you please attach the vi file, there's some components I'm not sure what they are.
And this configuration would make the whole program to wait right? Is there a way to get that only bit to toggle and the rest of the program working without any delay? I am still working on the program from yesterday that you helped me with
Thanks a lot for your help,
LD
02-16-2010 08:37 PM - edited 02-16-2010 08:41 PM
It's a VI snippet. If you have LV 2009, drag and drop the image from your browser into your block diagram.
Which functions don't you know? It has a wait (ms) and Not functions. That's it.
Yes, each loop iteration will take 3 seconds. If that is too long for other reasons, then you can use the elapsed time function to toggle the shift register.
02-17-2010 06:23 PM - edited 02-17-2010 06:24 PM
Thank you very much. Unfortunately I'm suing LabVIEW 8.5 so can't drag and drop. I usually have icons displayed so I got a bit confused about the representation of the components but it's all fine now. Never used a shift register before so you really helped me to find out a basic useful thing.
PS: and thanks for the tutorials.