Go to Post Paul: "IDK, my BFF Karthik?" - jgannon [more]
Home
Go Back   Chief Delphi > Technical > Control System
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 08-06-2007, 12:32
Adam Shapiro's Avatar
Adam Shapiro Adam Shapiro is offline
Registered User
FRC #0555 (Montclair Robotics)
Team Role: Alumni
 
Join Date: Jan 2002
Rookie Year: 2001
Location: Montclair, NJ
Posts: 401
Adam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud of
Send a message via AIM to Adam Shapiro
Re: Radio Probs

Quote:
Originally Posted by EHaskins View Post
Even when the robot is disabled it is reading input from joysticks.

IF your programmers removed the piece of code setting all the pwm outputs to 127 during autonomous mode those movements could be the result of the robot tryng to move while disabled.
Correct me if I'm wrong but I thought the user micro is passed idle values from the master when disabled or in autonomous? I know this is the case on the vex controller, I remember it being the case for the FRC controller as well though I haven't used it in a few years. Otherwise autonomous could still take input from the user.

Quote:
Originally Posted by prograid View Post
I believe what he means is the opposite. The robot can move if it is NOT set to neutral.
In other words, if you don't say pwm01 = pwm02 = ... = 127 at the beginning of your autonomous, the robot can do whatever it wants.
To add to what prograid said, you shouldn't ever assume the initialization state of any variables in your program. This can lead to very bad problems, especially since a value of 0, a common initialization value, does not halt the motor! If you do not set the PWM values to idle you can have some very weird and dangerous results.
__________________
Mentor to Teams 555, 1929, and 2070!
Currently working in hardware design at Cisco.
Cornell University DARPA Urban Challenge - http://www.cornellracing.com
Co-Captain Team 555 - 2003,2004,2005
Trust, Love, and Magic
  #2   Spotlight this post!  
Unread 08-06-2007, 12:46
EHaskins EHaskins is offline
Needs to change his user title.
AKA: Eric Haskins
no team (CARD #6 (SCOE))
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Elkhorn, WI USA
Posts: 998
EHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond repute
Send a message via MSN to EHaskins
Re: Radio Probs

Quote:
Originally Posted by Adam Shapiro View Post
Correct me if I'm wrong but I thought the user micro is passed idle values from the master when disabled or in autonomous? I know this is the case on the vex controller, I remember it being the case for the FRC controller as well though I haven't used it in a few years. Otherwise autonomous could still take input from the user.
During autonomous and disabled modes the RC is still getting all of the inputs from the OI, but when the RC is disabled the master processor doesn't create the PWM signals. That and the status flags in the code, is the only difference between the normal mode, autonomous, and disabled, modes.

Even if you are doing other things in autonomous it is a bad idea not to set the PWMs to 127.
__________________
Eric Haskins KC9JVH
  #3   Spotlight this post!  
Unread 08-06-2007, 13:31
Adam Shapiro's Avatar
Adam Shapiro Adam Shapiro is offline
Registered User
FRC #0555 (Montclair Robotics)
Team Role: Alumni
 
Join Date: Jan 2002
Rookie Year: 2001
Location: Montclair, NJ
Posts: 401
Adam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud of
Send a message via AIM to Adam Shapiro
Re: Radio Probs

Quote:
Originally Posted by EHaskins View Post
During autonomous and disabled modes the RC is still getting all of the inputs from the OI, but when the RC is disabled the master processor doesn't create the PWM signals. That and the status flags in the code, is the only difference between the normal mode, autonomous, and disabled, modes.
Ah. I forgot that it still gets inputs, that was how we used to select autonomous modes before the match started. Thanks for the correction.
__________________
Mentor to Teams 555, 1929, and 2070!
Currently working in hardware design at Cisco.
Cornell University DARPA Urban Challenge - http://www.cornellracing.com
Co-Captain Team 555 - 2003,2004,2005
Trust, Love, and Magic
  #4   Spotlight this post!  
Unread 08-06-2007, 13:33
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Radio Probs

Quote:
Originally Posted by Adam Shapiro View Post
Correct me if I'm wrong but I thought the user micro is passed idle values from the master when disabled or in autonomous?
You're half right.

When the robot is disabled, all joystick and switch input is passed along normally. It's only the outputs that are suppressed. You can see this behavior using a Dashboard program.

In autonomous mode, the inputs are indeed forced to neutral (all joysticks at 127, all switches off). But if your program doesn't do anything in autonomous, that can be a problem. Not doing anything means not shutting off things that were trying to move just before autonomous was selected. That's what Eric and Tom are trying to warn about.

If you want to remove all autonomous actions, make sure to leave in the part at the beginning that sets all the pwm outputs to 127. Otherwise, a mistrimmed joystick or flipped switch can cause things to start moving and not stop until the teleoperated code starts running.

Here's another piece of useful advice: if you have limit switches to protect mechanisms from moving too far, put the code to read the switches (and take action based on them) in the Process_Data_From_Local_IO() function, and call that function from within the autonomous loop. The default code only calls it when in teleoperated mode.
  #5   Spotlight this post!  
Unread 08-06-2007, 21:03
Bharat Nain's Avatar
Bharat Nain Bharat Nain is offline
Registered User
no team
Team Role: Alumni
 
Join Date: Jan 2004
Rookie Year: 2003
Location: New York
Posts: 2,000
Bharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond repute
Send a message via AIM to Bharat Nain Send a message via MSN to Bharat Nain
Re: Radio Probs

Quote:
Originally Posted by Alan Anderson View Post
Here's another piece of useful advice: if you have limit switches to protect mechanisms from moving too far, put the code to read the switches (and take action based on them) in the Process_Data_From_Local_IO() function, and call that function from within the autonomous loop. The default code only calls it when in teleoperated mode.
Also note, when you call it, call it towards the end of the autonomous loop or after all other functions have been called.
__________________
-= Bharat Nain =-

Whatever you do, you need courage. Whatever course you decide upon, there is always someone to tell you that you are wrong. There are always difficulties arising that tempt you to believe your critics are right. To map out a course of action and follow it to an end requires some of the same courage that a soldier needs. Peace has its victories, but it takes brave men and women to win them. - Ralph Waldo Emerson
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
Ham Radio and Radio at FIRST bcieslak General Forum 41 06-04-2007 10:41
T_Packet_Data.mx probs Ryan O Programming 4 14-02-2006 00:34
need 2003 radio/help with old radio MaxM Technical Discussion 2 04-01-2004 15:31
FM radio transmitter Alexander McGee Electrical 11 29-10-2003 19:41
radio transmitters Arin Technical Discussion 2 18-12-2002 01:59


All times are GMT -5. The time now is 20:27.

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