View Full Version : Microswitch program..
Basically I want to press a button and let go but the motor begins to run until the switch is activated then I want it to roll back for 5 seconds. Can someone give me an example on how to do this using Labview.
Keyreaper
11-02-2012, 17:58
Is this what you are trying to accomplish? I think some other programmers on here could help out and also make sure I haven't made mistakes....
http://imgur.com/a/oSPD4
Keyreaper
11-02-2012, 18:32
Yes thank you..
I'm not sure it actually works, as I don't normally work with the wait.vi function so I'd build it up just to make sure.
MAldridge
19-02-2012, 20:20
make sure you don't put that in teleop. That wait will stall out the loop.
Keyreaper
19-02-2012, 20:29
make sure you don't put that in teleop. That wait will stall out the loop.
He is correct... Perhaps a Elapsed timer would work better.
MAldridge
19-02-2012, 20:32
actually, you would do good to do it the way you have it here, but throw it into a separate loop in periodic tasks. There is no good way that I have found yet to do a delay on the cRIO without running it in parallel. Mainly because the timestamp is kind of flakey.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.