Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Turning a motor for a specified time (timer) (http://www.chiefdelphi.com/forums/showthread.php?t=126493)

Dackarobot 15-02-2014 09:01

Turning a motor for a specified time (timer)
 
Hello,

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?

Mark McLeod 15-02-2014 09:15

Re: Turning a motor for a specified time (timer)
 
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.


All times are GMT -5. The time now is 09:48.

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