Go to Post This is real. This is hard. This, is FIRST. - sanddrag [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
Team 51   CD-Events   CD-Media   CD-Swap   CD-Spy   FRC-Spy   Unsung FIRST Heroes   WFA
portal register members calendar search Today's Posts Mark Forums Read FAQ rules
VEXpro
The Chief Delphi Forums are sponsored by Innovation First International, Inc.
Chief Delphi Alumni
ADVERTISEMENT

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 02-21-2012, 04:12 PM
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 : 02-21-2012 at 04:23 PM.
Reply With Quote
  #2   Spotlight this post!  
Unread 02-21-2012, 04:27 PM
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 4,671
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 02-23-2012, 08:48 PM
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 12:59 AM.

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


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright © Delphi and Pontiac Central High School