Turning a motor for a specified time (timer)


we want to turn one of out motors for a specified amount of time everytime a button on the joystick is pressed. Which structure should we use? Can we use it directly on Teleop.vi?

It’s easiest to do it in Periodic Tasks like this:

You must use different code in Teleop, because loops should not be used there.
Essentially, you would take the current time, add your delay to it whenever the button is pressed, then separately check to see if the time less than your target and set the motor speed accordingly.