Have motor run for X amount of time

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 :confused:

Thanks!

This is a timed sequence of actions, just ignore the servo examples.
Your sequence would be

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

Put 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.