Go to Post Unfortunately, there's no special type of transmission that will magically get you past defense. The best way to deal with defense is to practice, regardless of gearing. - connor.worley [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 02-02-2006, 17:12
LightWaves1636's Avatar
LightWaves1636 LightWaves1636 is offline
is all over it.
AKA: Sarah Le
no team
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Austin, TX
Posts: 603
LightWaves1636 is a splendid one to beholdLightWaves1636 is a splendid one to beholdLightWaves1636 is a splendid one to beholdLightWaves1636 is a splendid one to beholdLightWaves1636 is a splendid one to beholdLightWaves1636 is a splendid one to beholdLightWaves1636 is a splendid one to behold
Send a message via AIM to LightWaves1636 Send a message via Yahoo to LightWaves1636
Cam works but RC won't

I'm using "Bells and Whistles". the pwm outputs 13-16 aren't sending out any kind of signal and thus the speed controllers aren't amking the motors run. I uncommented Generate_pwm and now I'm stuck at a deadend. any ideas?
  #2   Spotlight this post!  
Unread 02-02-2006, 17:28
d.courtney's Avatar
d.courtney d.courtney is offline
Registered User
AKA: David
FRC #0781 (Kinetic Knights)
Team Role: Alumni
 
Join Date: Jan 2005
Rookie Year: 2003
Location: Kincardine, Ontario
Posts: 196
d.courtney has much to be proud ofd.courtney has much to be proud ofd.courtney has much to be proud ofd.courtney has much to be proud ofd.courtney has much to be proud ofd.courtney has much to be proud ofd.courtney has much to be proud ofd.courtney has much to be proud ofd.courtney has much to be proud ofd.courtney has much to be proud of
Re: Cam works but RC won't

I had the same problem... it was the fact that Default_Routine wasn't called from main... hope that helps.
__________________
  #3   Spotlight this post!  
Unread 02-02-2006, 21:17
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: Cam works but RC won't

Pwm outputs 13-16 are special. They're generated by the user processor and can be updated more often than the 26.2 ms communication burst. But you need to call the Generate_PWMs() function in order for them to work. The line with that function call is present in Kevin's camera code, but it has been commented out.

They also have a reputation of being prone to "twitchiness" if you have lots of interrupts going, or if you call the Generate_PWMs() function repeatedly with too short a delay.
  #4   Spotlight this post!  
Unread 02-02-2006, 22:56
LightWaves1636's Avatar
LightWaves1636 LightWaves1636 is offline
is all over it.
AKA: Sarah Le
no team
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Austin, TX
Posts: 603
LightWaves1636 is a splendid one to beholdLightWaves1636 is a splendid one to beholdLightWaves1636 is a splendid one to beholdLightWaves1636 is a splendid one to beholdLightWaves1636 is a splendid one to beholdLightWaves1636 is a splendid one to beholdLightWaves1636 is a splendid one to behold
Send a message via AIM to LightWaves1636 Send a message via Yahoo to LightWaves1636
Re: Cam works but RC won't

okay , it works now, thanks for all the help yay we finally can drive
  #5   Spotlight this post!  
Unread 02-02-2006, 23:29
Eldarion's Avatar
Eldarion Eldarion is offline
Electrical Engineer / Computer Geek
AKA: Eldarion Telcontar
no team (Teamless Orphan)
Team Role: Alumni
 
Join Date: Nov 2005
Rookie Year: 2005
Location: Númenor
Posts: 558
Eldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond repute
Send a message via AIM to Eldarion Send a message via Yahoo to Eldarion
Re: Cam works but RC won't

Quote:
Originally Posted by Alan Anderson
Pwm outputs 13-16 are special. They're generated by the user processor and can be updated more often than the 26.2 ms communication burst. But you need to call the Generate_PWMs() function in order for them to work. The line with that function call is present in Kevin's camera code, but it has been commented out.

They also have a reputation of being prone to "twitchiness" if you have lots of interrupts going, or if you call the Generate_PWMs() function repeatedly with too short a delay.
I've had a few quesions on this and Putdata, maybe you can clear them up

How long does Generate_PWMs() take to return? Can I call it from within a timer ISR?

If I call Putdata more than once every 26.6ms, will it update the PWMs faster?
How long does it take to return?

And finally, the master processor seems to allow the user processor more than 26.6ms?!??
This makes no sense, but our code is definitely taking longer than 26.6ms (because of serial communications bogging us down) and yet I do not get the BRLOD?!??

Thanks for any light you can shed on this!
__________________
CMUCam not working? Tracks sporadically? Try this instead: http://www.falconir.com!
PM me for more information if you are interested (it's open source!).

Want the FIRST Email blasts? See here: http://www.chiefdelphi.com/forums/sh...ad.php?t=50809

"The harder the conflict, the more glorious the triumph. What we obtain too cheaply, we esteem too lightly; it is dearness only that gives everything its value."
-- Thomas Paine

If it's falling apart it's a mechanical problem. If it's spewing smoke it's a electrical problem.
If it's rampaging around destroying things it's a programming problem.

"All technology is run on 'Magic Smoke' contained within the device. As everyone knows, whenever the magic smoke is released, the device ceases to function."
-- Anonymous

I currently speak: English, some German, Verilog, x86 and 8051 Assembler, C, C++, VB, VB.NET, ASP, PHP, HTML, UNIX and SQL
  #6   Spotlight this post!  
Unread 03-02-2006, 00:14
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: Cam works but RC won't

Sorry, Eldarion, I don't know the answers to most of those questions. I would avoid calling any nontrivial functions from within an interrupt service routine.

Are you sure your serial communication is slowing down your code? The IFI Loader's terminal window is slow to display; maybe that's what you're seeing.
  #7   Spotlight this post!  
Unread 03-02-2006, 00:23
Eldarion's Avatar
Eldarion Eldarion is offline
Electrical Engineer / Computer Geek
AKA: Eldarion Telcontar
no team (Teamless Orphan)
Team Role: Alumni
 
Join Date: Nov 2005
Rookie Year: 2005
Location: Númenor
Posts: 558
Eldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond repute
Send a message via AIM to Eldarion Send a message via Yahoo to Eldarion
Re: Cam works but RC won't

Quote:
Originally Posted by Alan Anderson
Are you sure your serial communication is slowing down your code? The IFI Loader's terminal window is slow to display; maybe that's what you're seeing.
I am monitoring the routines' speed through how many times a Parallax PING))) sensor is triggered. Every time it triggers, a green LED flashes. When the camera is not hooked up (therefore preventing any serial communication), the light is almost steadily on. As soon as I hook up the camera and serial communication is established, the light slows down quite noticeably.

Also, I tried putting limit switches on a moving part of our robot, but they took much longer than 1/40 of a second (26.6ms) to respond. The response time was more on the order of 1/4 of a second! This ate several limit switches, unfortunately.

All the code I have mentioned was placed within the main "26.6ms" loop. I am basing my code off of last year's camera code; were there improvements made for this year? I was under the impression that last year's default code used buffered serial communications; however I am at a loss to explain this behavior.

Can anyone help me on this? Maybe someone from IFI (hint hint)?

Thanks,

Eldarion
__________________
CMUCam not working? Tracks sporadically? Try this instead: http://www.falconir.com!
PM me for more information if you are interested (it's open source!).

Want the FIRST Email blasts? See here: http://www.chiefdelphi.com/forums/sh...ad.php?t=50809

"The harder the conflict, the more glorious the triumph. What we obtain too cheaply, we esteem too lightly; it is dearness only that gives everything its value."
-- Thomas Paine

If it's falling apart it's a mechanical problem. If it's spewing smoke it's a electrical problem.
If it's rampaging around destroying things it's a programming problem.

"All technology is run on 'Magic Smoke' contained within the device. As everyone knows, whenever the magic smoke is released, the device ceases to function."
-- Anonymous

I currently speak: English, some German, Verilog, x86 and 8051 Assembler, C, C++, VB, VB.NET, ASP, PHP, HTML, UNIX and SQL
  #8   Spotlight this post!  
Unread 03-02-2006, 06:40
X-Istence X-Istence is offline
Melt the RC controller!
AKA: Bert JW Regeer
no team
Team Role: Alumni
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Montville
Posts: 151
X-Istence will become famous soon enoughX-Istence will become famous soon enough
Send a message via AIM to X-Istence Send a message via MSN to X-Istence
Re: Cam works but RC won't

well, the easiest way to test if the new code is better, is by running the new code.

Grab the new code from Kevin's site, then proceed to modify anything that needs to be modified, and test it.
__________________
My Blog!
  #9   Spotlight this post!  
Unread 03-02-2006, 10:10
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: Cam works but RC won't

Quote:
Originally Posted by Eldarion
I am basing my code off of last year's camera code; were there improvements made for this year?
It's quite different this year. Whether or not you would consider it to be an "improvement" probably depends on how clever you are with programming your own camera communication routines.

If your limit switches are taking that long to respond, I suspect you have significant delays built in to your code. Even with buffered and interrupt-driven serial communication, you will slow things down a lot if you're sending commands and waiting for an ACK to come back before continuing.
  #10   Spotlight this post!  
Unread 03-02-2006, 13:15
Eldarion's Avatar
Eldarion Eldarion is offline
Electrical Engineer / Computer Geek
AKA: Eldarion Telcontar
no team (Teamless Orphan)
Team Role: Alumni
 
Join Date: Nov 2005
Rookie Year: 2005
Location: Númenor
Posts: 558
Eldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond repute
Send a message via AIM to Eldarion Send a message via Yahoo to Eldarion
Re: Cam works but RC won't

Quote:
Originally Posted by Alan Anderson
It's quite different this year. Whether or not you would consider it to be an "improvement" probably depends on how clever you are with programming your own camera communication routines.

If your limit switches are taking that long to respond, I suspect you have significant delays built in to your code. Even with buffered and interrupt-driven serial communication, you will slow things down a lot if you're sending commands and waiting for an ACK to come back before continuing.
That's the exact problem!

A few hours after I posted my plea for help, I remembered last year I had to deal with a certain wait_for_data() IFI put into the camera routine. It was blocking execution for quite a while, and probably explains the slowdown. I'm not sure why they tried to make the camera communication appear synchronous, but it should work just fine in asynchronous mode (I hope!).

I am still curious why this didn't trip the supposed 26.6ms code execution limit. In my testing, that limit seemed more on the order of a full half second. (I had added a timer without adding the ISR, causing it to crash almost immediately, but the BRLOD didn't show up for about a second).

Anyway, thanks for your help.
__________________
CMUCam not working? Tracks sporadically? Try this instead: http://www.falconir.com!
PM me for more information if you are interested (it's open source!).

Want the FIRST Email blasts? See here: http://www.chiefdelphi.com/forums/sh...ad.php?t=50809

"The harder the conflict, the more glorious the triumph. What we obtain too cheaply, we esteem too lightly; it is dearness only that gives everything its value."
-- Thomas Paine

If it's falling apart it's a mechanical problem. If it's spewing smoke it's a electrical problem.
If it's rampaging around destroying things it's a programming problem.

"All technology is run on 'Magic Smoke' contained within the device. As everyone knows, whenever the magic smoke is released, the device ceases to function."
-- Anonymous

I currently speak: English, some German, Verilog, x86 and 8051 Assembler, C, C++, VB, VB.NET, ASP, PHP, HTML, UNIX and SQL
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
Fried Cam? Denz Programming 5 01-02-2006 21:43
Steps to make cam work? magical hands Programming 7 31-01-2006 17:43
CMU Cam GUI Arc736UV Programming 2 15-03-2005 19:26
Questions about cam magical hands Programming 1 04-02-2005 17:13
Some Blank Code That you Know works chantilly_team Programming 5 18-01-2005 22:00


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

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