Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Adding a delay to commands (http://www.chiefdelphi.com/forums/showthread.php?t=103521)

APrettyDucky 21-02-2012 17:12

Adding a delay to commands
 
What I need to do is figure out how to add a delay to a command, like when i press and hold button, the motor that is supposed to turn is delayed for a second, and then turns. I am also wondering how to implement this into autonomous.

Thanks

Ether 21-02-2012 17:27

Re: Adding a delay to commands
 
Quote:

Originally Posted by APrettyDucky (Post 1131934)
What I need to do is figure out how to add a delay to a command, like when i press and hold button, the motor that is supposed to turn is delayed for a second, and then turns. I am also wondering how to implement this into autonomous.

Thanks

You have two choices:

1) state machine

2) periodic tasks



kentwedeking 23-02-2012 21:48

Re: Adding a delay to commands
 
Set a flag that you've pressed a button via a functional global or using a :ahh: global variable:ahh: and put your sequence code in the Periodic Tasks VI. If you leave it in your Teleop or autonomous you'll not be happy ... it'll block your execution and cause you code to have delays you don't want ...


All times are GMT -5. The time now is 11:19.

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