Go to Post "Simple" is about staying within boundaries. - dtengineering [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 21-02-2012, 17:12
APrettyDucky's Avatar
APrettyDucky APrettyDucky is offline
AKA: Egor001, Minecrafter Supreme
FRC #3828 (12 Pretty Duckies)
Team Role: Programmer
 
Join Date: Feb 2012
Rookie Year: 2011
Location: Eveleth, Minnesota
Posts: 6
APrettyDucky is an unknown quantity at this point
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
__________________

Last edited by APrettyDucky : 21-02-2012 at 17:23.
Reply With Quote
  #2   Spotlight this post!  
Unread 21-02-2012, 17:27
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,015
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Adding a delay to commands

Quote:
Originally Posted by APrettyDucky View Post
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


Reply With Quote
  #3   Spotlight this post!  
Unread 23-02-2012, 21:48
kentwedeking's Avatar
kentwedeking kentwedeking is offline
LabVIEW Zealot
FRC #0967
Team Role: Mentor
 
Join Date: Feb 2012
Rookie Year: 2009
Location: Marion, IA
Posts: 3
kentwedeking is on a distinguished road
Re: Adding a delay to commands

Set a flag that you've pressed a button via a functional global or using a global variable 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 ...
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 08:43.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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