Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Microswitch program.. (http://www.chiefdelphi.com/forums/showthread.php?t=102580)

Luiz12 11-02-2012 17:48

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

Re: Microswitch program..
 
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

Luiz12 11-02-2012 18:20

Re: Microswitch program..
 
Yes thank you..

Keyreaper 11-02-2012 18:32

Re: Microswitch program..
 
Quote:

Originally Posted by Luiz12 (Post 1124513)
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

Re: Microswitch program..
 
make sure you don't put that in teleop. That wait will stall out the loop.

Keyreaper 19-02-2012 20:29

Re: Microswitch program..
 
Quote:

Originally Posted by MAldridge (Post 1130434)
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

Re: Microswitch program..
 
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.


All times are GMT -5. The time now is 00:45.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi