Go to Post I think this just hit the nail in the head with a sledgehammer. - Yan Wang [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 05-02-2005, 16:35
doyler doyler is offline
Rookie / Programmer
#0900 (Infinity)
Team Role: Programmer
 
Join Date: Oct 2004
Rookie Year: 2005
Location: Durham
Posts: 87
doyler is an unknown quantity at this point
Interface with breaker

My team captain thinks I need to interface with the breaker panel to tell if a breaker blows

Do any of you have any ways to go about this. There is a pwm slot in it, but I know neither where it goes nor what to do to get information from it
__________________
  #2   Spotlight this post!  
Unread 05-02-2005, 16:41
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,854
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Interface with breaker

Quote:
Originally Posted by doyler
My team captain thinks I need to interface with the breaker panel to tell if a breaker blows

Do any of you have any ways to go about this. There is a pwm slot in it, but I know neither where it goes nor what to do to get information from it
You use the serial port and plug it into the RC program port.
(that pwm type connector is unsupportd at this time)
The default code is already setup to send the breaker data back to he dashboard program. Take a look in user_routines.c and you'll see it towards the end of the Default_Routine.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #3   Spotlight this post!  
Unread 05-02-2005, 16:43
doyler doyler is offline
Rookie / Programmer
#0900 (Infinity)
Team Role: Programmer
 
Join Date: Oct 2004
Rookie Year: 2005
Location: Durham
Posts: 87
doyler is an unknown quantity at this point
Re: Interface with breaker

Is it in the DDT version? What does it look like if it is because I can't really tell anything that might be it
__________________

Last edited by doyler : 05-02-2005 at 16:49.
  #4   Spotlight this post!  
Unread 05-02-2005, 16:57
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,854
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Interface with breaker

Quote:
Originally Posted by doyler
Is it in the DDT version? What does it look like if it is because I can't really tell anything that might be it
oops, my fault of course.

The breaker code is in Process_Data_From_Master_uP() of both the 2.2 and 2.4 versions of the default code.

Code:
/* Example code to check if a breaker was ever tripped. */
if (aBreakerWasTripped)
{
  for (i=1;i<29;i++)
  {
	if (Breaker_Tripped(i))
	  User_Byte1 = i; 
	  /* Update the last breaker tripped on User_Byte1 (to demonstrate the use of a user byte) Normally, you do something else if a breaker got tripped (ex: limit a PWM output) */
  }
}

__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 05-02-2005 at 17:01.
  #5   Spotlight this post!  
Unread 05-02-2005, 17:08
doyler doyler is offline
Rookie / Programmer
#0900 (Infinity)
Team Role: Programmer
 
Join Date: Oct 2004
Rookie Year: 2005
Location: Durham
Posts: 87
doyler is an unknown quantity at this point
Re: Interface with breaker

My DDT code did not come with it, could I just put that in there

Also, do you know where is the manual for the breaker panel is, because think our electronics people did it their way instead of the right way and the dashboard is telling me that everything is tripped
__________________
  #6   Spotlight this post!  
Unread 05-02-2005, 17:26
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: Interface with breaker

The breaker panel telemetry parser is located in IFI's serial port driver. I've taken all of the breaker code and placed it into it's own source file. It's part of the latest build of the serial port driver I mentioned in the "Updated: Serial Port Driver Code" thread.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #7   Spotlight this post!  
Unread 05-02-2005, 17:29
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,854
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Interface with breaker

Quote:
Originally Posted by doyler
My DDT code did not come with it, could I just put that in there

Also, do you know where is the manual for the breaker panel is, because think our electronics people did it their way instead of the right way and the dashboard is telling me that everything is tripped
The dashboard manual is at http://www.ifirobotics.com/circuit-breaker-panel.shtml

The code will drop right into the DDT code, however, I haven't looked at the DDT closely to see if there are any potential serial port conflicts. Try it and you can tell me if it works okay.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #8   Spotlight this post!  
Unread 06-02-2005, 14:30
doyler doyler is offline
Rookie / Programmer
#0900 (Infinity)
Team Role: Programmer
 
Join Date: Oct 2004
Rookie Year: 2005
Location: Durham
Posts: 87
doyler is an unknown quantity at this point
Re: Interface with breaker

I dumped that code in and got 2 errors from the compilation

Code:
Z:\user_routines_DDT.c:313:Error [1105] symbol 'aBreakerWasTripped' has not been defined
Z:\user_routines_DDT.c:317:Warning [2058] call of function without prototype
Halting build on first failure as requested.
BUILD FAILED: Sun Feb 06 14:29:16 2005
I think it is because you have breaker functions and that is the only thing pertaining to breakers that i know i have
__________________

Last edited by doyler : 06-02-2005 at 14:33.
  #9   Spotlight this post!  
Unread 06-02-2005, 17:37
JBotAlan's Avatar
JBotAlan JBotAlan is offline
Forever chasing the 'bot around
AKA: Jacob Rau
FRC #5263
Team Role: Mentor
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Riverview, MI
Posts: 723
JBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond repute
Send a message via AIM to JBotAlan Send a message via Yahoo to JBotAlan
Re: Interface with breaker

Quote:
Originally Posted by doyler
our electronics people did it their way instead of the right way and the dashboard is telling me that everything is tripped
The only way you can tell if your breaker had a fuse trip is if you do it the 'right' way. Fill up the positives from 1 up (they're numbered) and for the negatives, the circuit that is using positive 1 needs to use negative 1 also. The same with 2, positive 2, and negative 2. Do the same all the way up. You can test the breaker. When you give it power, the light should flash green. Pull a fuse out without shutting off power, and if the light flashes red, it's working. As for the dashboard program, I haven't even seen one for this year. Where did you get it? I had a version from InnovationFirst.com, but they don't have it anymore.
__________________
Aren't signatures a bit outdated?
  #10   Spotlight this post!  
Unread 06-02-2005, 21:11
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,854
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Interface with breaker

Quote:
Originally Posted by doyler
I dumped that code in and got 2 errors from the compilation
You're right. You need the Breaker_Tripped() function as well.
What Kevin was referring to above is he has already extracted Breaker_Tripped() so you can easily add it to your DDT project.

Go to Kevin's website and pickup his http://kevin.org/frc/frc_serial_ports_0.3.zip
within that zip file Kevin has pulled the function and data structures you need into the two files:
  • breaker_panel.c
  • breaker_panel.h
Copy just these two files into your DDT project folder and add them to your list of project files (Project -> Add Files to Project...).

I just checked this combination and you'll need to add:
#define FALSE 0
to breaker_panel.h or include it from somewhere else where it's already defined.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 06-02-2005 at 21:20.
  #11   Spotlight this post!  
Unread 07-02-2005, 17:09
doyler doyler is offline
Rookie / Programmer
#0900 (Infinity)
Team Role: Programmer
 
Join Date: Oct 2004
Rookie Year: 2005
Location: Durham
Posts: 87
doyler is an unknown quantity at this point
Re: Interface with breaker

What should my prototype for Breaker_Tripped() be, and is there any specific place I have to put it?

Code:
Executing: "C:\mcc18\bin\mcc18.exe" -p=18F8520 "user_routines_DDT.c" -fo="user_routines_DDT.o" /i"c:\mcc18\h" -D_FRC_BOARD -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
C:\2005 Botcode\user_routines_DDT.c:320:Warning [2058] call of function without prototype

Also, would i put my printf statement to tell me a breaker tripped in the if loop or the for loop?


[edit]
Is it Ok if I just put it right here like this?
The compiler is happy

Code:
/*******************************************************************************
* FUNCTION NAME: Process_Data_From_Master_uP
* PURPOSE:       Executes every 26.2ms when it gets new data from the master 
*                microprocessor.
* CALLED FROM:   main.c
* ARGUMENTS:     none
* RETURNS:       void
*******************************************************************************/
void Process_Data_From_Master_uP(void)
{
  static unsigned char i;
  static unsigned char delay;
  unsigned char Breaker_Tripped(unsigned char id);
[/edit]
__________________

Last edited by doyler : 07-02-2005 at 18:31.
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
Help - new interface, old servos HolyOne207 Robotics Education and Curriculum 3 12-01-2005 10:52
2003 robot controller & interface LGuY Control System 3 04-04-2004 16:01
how to create custom interface _GP_ Technical Discussion 1 18-01-2004 21:24
Keyang Motor Thermal breaker. archiver 2000 1 24-06-2002 00:24
Chain and chain breaker source? kmcclary Off-Season Events 4 22-10-2001 22:51


All times are GMT -5. The time now is 19:18.

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