Go to Post Dean's probably sitting in his chair saying "Dance puppets, dance!" - [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 06-02-2008, 10:58
jonboy jonboy is offline
Engineer/Mentor
FRC #0885 (The Green Team)
Team Role: Engineer
 
Join Date: Jan 2003
Rookie Year: 2003
Location: Tunbridge, Vermont
Posts: 46
jonboy is an unknown quantity at this point
SET command duration?

I assume that the SETxxx(n,n) command when invoked in a function and the function returns, that SETxxx maintains the desired state/action after the return and during interrupts etc until the SETxxx is next invoked or a reset occurs. Correct?
__________________
... jon
  #2   Spotlight this post!  
Unread 06-02-2008, 14:00
Kingofl337's Avatar
Kingofl337 Kingofl337 is offline
You didn't see anything....
AKA: Adam
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 1998
Location: Manchester, NH
Posts: 861
Kingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond repute
Send a message via Yahoo to Kingofl337
Re: SET command duration?

SetXXX is a command instructing WPILIb to alter a default setting.

SetPWM(1,X) // Change PWM 1 from Default "127" to a X
SetGyroDeadBand(1 , X) // Change the Default Dead for Gyro 1 to X
SetUserDisplay ( X ) ; // Change the Default OI Display from 0 to X

Once a Set command is executed, it normally doesn't need to be resent unless
you need to modify the parameter. If X changes for any reason you need to recall
the set command.

Example:
// This will run a Victor connected to PWM 1 at full speed (255) forever
Autonomous ( ) {
SetPWM( 1, 255 ) ;
}

// This will run a Victor connected to PWM 1 at full speed (255) for 1 second (1000ms) then stop (127).
Autonomous ( ) {
SetPWM( 1, 255 );
Wait(1000);
SetPWM( 1, 127 );
}
__________________
FIRST Team 501 PowerKnights - Mentor
FIRST Team 40 Checkmate - Mentor Alum
FIRST Team 146 Blue Lightning - Alumni

Last edited by Kingofl337 : 06-02-2008 at 14:14.
  #3   Spotlight this post!  
Unread 06-02-2008, 14:39
jonboy jonboy is offline
Engineer/Mentor
FRC #0885 (The Green Team)
Team Role: Engineer
 
Join Date: Jan 2003
Rookie Year: 2003
Location: Tunbridge, Vermont
Posts: 46
jonboy is an unknown quantity at this point
Re: SET command duration?

Adam:

TNX for the prompt reply.
__________________
... jon
Closed Thread


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
command listfor c??? jfrank Programming 12 22-01-2008 20:16
assembly command tseres Programming 3 18-01-2008 08:13
Make all command pmzq Programming 3 24-01-2006 16:16
Servo command confusion?!?!?!?! [527]phil Programming 9 15-07-2005 20:10
Run command... frightening archiver 2001 1 24-06-2002 03:37


All times are GMT -5. The time now is 23:47.

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