Go to Post neato. - ebarker [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 29-01-2007, 19:41
iwdu15 iwdu15 is offline
Registered User
FRC #0811
 
Join Date: Feb 2006
Location: NH
Posts: 10
iwdu15 is an unknown quantity at this point
GTS strange behavior

Hi, im working on the GTS code for our teams robot and ive hit a roadblock of sorts. I have tried using the 2007 default code for the GTS and put printf statements in the encoder initialization function, yet nothing is ever printed. the interrupt handler is also never executed. there is no "Phase B" code and the encoder is wired into the Digital Input 1 input. The Initialize code for the encoders is in the User_Initialization function:

printf("Initializing Encoders......\r\n");
Initialize_Encoders();

printf("Encoders init done!");

both printf statements are executed, however the InitializeEncoders function is not executed:

//first few lines

void Initialize_Encoders(void)
{

printf("initializing encoder 1 \r\n");
//rest of init code here...


whats going on? Thanks

--iwdu15
--Team 811
  #2   Spotlight this post!  
Unread 29-01-2007, 19:49
Unsung FIRST Hero
Mike Betts Mike Betts is offline
Electrical Engineer
no team
Team Role: Engineer
 
Join Date: Dec 2001
Rookie Year: 1995
Location: Homosassa, FL
Posts: 1,442
Mike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond repute
Re: GTS strange behavior

Maybe it's just me. I do not know of any "2007 default code for the GTS". Please provide a link to the code you are trying to use.
__________________
Mike Betts

Alumnus, Team 3518, Panthrobots, 2011
Alumnus, Team 177, Bobcat Robotics, 1995 - 2010
LRI, Connecticut Regional, 2007-2010
LRI, WPI Regional, 2009 - 2010
RI, South Florida Regional, 2012 - 2013

As easy as 355/113...
  #3   Spotlight this post!  
Unread 29-01-2007, 19:58
iwdu15 iwdu15 is offline
Registered User
FRC #0811
 
Join Date: Feb 2006
Location: NH
Posts: 10
iwdu15 is an unknown quantity at this point
Re: GTS strange behavior

oops sry, typo, i meant the 2006 code at: http://www.kevin.org/frc/ ....sry about that
  #4   Spotlight this post!  
Unread 29-01-2007, 22:23
Unsung FIRST Hero
Mike Betts Mike Betts is offline
Electrical Engineer
no team
Team Role: Engineer
 
Join Date: Dec 2001
Rookie Year: 1995
Location: Homosassa, FL
Posts: 1,442
Mike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond repute
Re: GTS strange behavior

Quote:
Originally Posted by iwdu15 View Post
oops sry, typo, i meant the 2006 code at: http://www.kevin.org/frc/ ....sry about that
I assume that you are using Kevin's FRC_encoder.zip files.

I also assume that you know what a statement like

"#ifdef ENABLE_ENCODER_1"

does and that you placed your printf outside the compiler directives.

Am I on the right track?

Mike
__________________
Mike Betts

Alumnus, Team 3518, Panthrobots, 2011
Alumnus, Team 177, Bobcat Robotics, 1995 - 2010
LRI, Connecticut Regional, 2007-2010
LRI, WPI Regional, 2009 - 2010
RI, South Florida Regional, 2012 - 2013

As easy as 355/113...
  #5   Spotlight this post!  
Unread 29-01-2007, 22:45
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,113
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: GTS strange behavior

Quote:
Originally Posted by iwdu15 View Post
...I have tried using the 2007 default code for the GTS and put printf statements in the encoder initialization function, yet nothing is ever printed.
Does the source code file with the encoder initialization function #include <stdio.h>? If not, the printf won't actually produce any output.
  #6   Spotlight this post!  
Unread 30-01-2007, 09:36
charrisTTI charrisTTI is offline
Ramblin' Wreck
AKA: Charles Harris
FRC #0623
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2003
Location: Vienna, VA
Posts: 106
charrisTTI has a spectacular aura aboutcharrisTTI has a spectacular aura about
Send a message via AIM to charrisTTI
Re: GTS strange behavior

A few pointers:

Kevin's code uses the C Library printf with his buffered, interrupt driven serial port routines. The default code has it's own printf and serial port initialization. You need to use one or the other but not both.

Kevin's encoder code is for a quadrature encoder. The gear tooth sensor is not a quadrature encoder, so there is no Phase B signal. This means that you cannot determine the direction of rotation from the gear tooth sensor.
__________________
FRC 623 2003,2004,2005,2006,2007,2008, 2009, 2010, 2011
FRC 1900 2007
FVC 60 and 193 2006
FVC 3271 2007
FTC 226 and 369 2008, 2009, 2010, 2011
FTC 3806 2010
  #7   Spotlight this post!  
Unread 01-02-2007, 18:46
iwdu15 iwdu15 is offline
Registered User
FRC #0811
 
Join Date: Feb 2006
Location: NH
Posts: 10
iwdu15 is an unknown quantity at this point
Re: GTS strange behavior

hi, thanks for the replies...i already took out the PhaseB stuff and i did include stdio.h....so thats not the issue. il try checking the printf statements and use the way included in the GTS code and get back to you....thanks for the help so far

--iwdu15
--team 811
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
How the GTS works? Bomberofdoom Programming 6 25-01-2007 21:46
GTS Counting gnirts Programming 13 21-04-2006 21:15
GTS code Problems caderader Programming 8 13-02-2006 19:23
Strange Behavior Gary Bonner Control System 17 09-11-2005 19:01


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

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