Log in

View Full Version : Have motor run for X amount of time


Dillonboy8
19-02-2013, 16:17
I know, there is a similar thread to this, but my situation is different, so bear with me....

I am trying to get my team's conveyer belt (run by a motor) to go forward for X amount of time, then after it does that maybe wait a second and then go backwards. Any idea on how to do this? Me and the other programmer are completely lost :/

Thanks!

Mark McLeod
19-02-2013, 16:27
This is a timed sequence of actions, just ignore the servo examples.
Your sequence would be

set motor to 1,
wait x milliseconds,
set motor to zero,
wait 1000 ms,
set motor to -1,
wait X miliseconds,
set motor to 0. This drops into Periodic Tasks.vi NOT Teleop.vi

http://team358.org/files/programming/ControlSystem2009-/LabVIEW/ButtonTimedAction.jpg

Omar
19-02-2013, 16:31
14117Put this inside your Periodic

You can add the Names for the joystick and the motor used in your begin VI

Edit: I missed the stop and wait a second step before going back.