|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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
|
|||||
|
|||||
|
Re: Interface with breaker
Quote:
(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. |
|
#3
|
|||
|
|||
|
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
|
|||||
|
|||||
|
Re: Interface with breaker
Quote:
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) */
}
}
Last edited by Mark McLeod : 05-02-2005 at 17:01. |
|
#5
|
|||
|
|||
|
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
|
||||
|
||||
|
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 |
|
#7
|
|||||
|
|||||
|
Re: Interface with breaker
Quote:
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. |
|
#8
|
|||
|
|||
|
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 Last edited by doyler : 06-02-2005 at 14:33. |
|
#9
|
|||||
|
|||||
|
Re: Interface with breaker
Quote:
|
|
#10
|
|||||
|
|||||
|
Re: Interface with breaker
Quote:
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:
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. Last edited by Mark McLeod : 06-02-2005 at 21:20. |
|
#11
|
|||
|
|||
|
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);
Last edited by doyler : 07-02-2005 at 18:31. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |