Go to Post I know FIRST is all about changing society. But my approach is one person at a time. - Phil 33 [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 09-11-2007, 20:20
seanl's Avatar
seanl seanl is offline
"The Everything person"
FRC #0867 (Absolute Value)
Team Role: Leadership
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Arcadia, CA
Posts: 267
seanl will become famous soon enoughseanl will become famous soon enough
Compiling with MPLAB

heres what i get:

Clean: Deleting intermediary and output files.
Clean: Done.
Couldn't locate build tool. Check tool locations.
BUILD FAILED: Fri Nov 09 17:10:01 2007

i looked for the build tool but i cant figure it out. i just got a new laptop and i had mplab on my old laptop that broke. and it was working find i did the programming for 2006 on that computer. could it be that vista is causing the problem. any ideas?
__________________
, Sean

TEAM 867
-electrical
-pneumatics
-programming



2008 Autodesk Visualization Grand Prize Winner
  #2   Spotlight this post!  
Unread 09-11-2007, 20:26
RyanN's Avatar
RyanN RyanN is offline
RyanN
AKA: Ryan Nazaretian
FRC #4901 (Garnet Squadron)
Team Role: Mentor
 
Join Date: Jun 2006
Rookie Year: 2005
Location: Columbia, SC
Posts: 1,126
RyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond repute
Re: Compiling with MPLAB

MPLAB works fine for me on Windows Vista Home Premium. Did you install the C18 compiler?
__________________
Garnet Squadron
FRC 4901
Controls Mentor
@rnazaretian

Previous mentor and student from Team Fusion, FRC 364
  #3   Spotlight this post!  
Unread 09-11-2007, 20:28
seanl's Avatar
seanl seanl is offline
"The Everything person"
FRC #0867 (Absolute Value)
Team Role: Leadership
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Arcadia, CA
Posts: 267
seanl will become famous soon enoughseanl will become famous soon enough
Re: Compiling with MPLAB

i might not have do you have a link to the c 18 compiler because i got it off of the microchip website. i can reinstall it.
__________________
, Sean

TEAM 867
-electrical
-pneumatics
-programming



2008 Autodesk Visualization Grand Prize Winner
  #4   Spotlight this post!  
Unread 09-11-2007, 20:34
RyanN's Avatar
RyanN RyanN is offline
RyanN
AKA: Ryan Nazaretian
FRC #4901 (Garnet Squadron)
Team Role: Mentor
 
Join Date: Jun 2006
Rookie Year: 2005
Location: Columbia, SC
Posts: 1,126
RyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond repute
Re: Compiling with MPLAB

The C18 compiler is the software that your team received in the KOP. You cannot simply download it as it would cost money. I wish I could help you out here, but there isn't much I can legally do. I'd suggest looking around at your next robotics meeting for the MPLAB disk.

Now if you want, you can send me an instant message and send your code to me through AIM, and I can compile it here. That should be legal to do.
__________________
Garnet Squadron
FRC 4901
Controls Mentor
@rnazaretian

Previous mentor and student from Team Fusion, FRC 364
  #5   Spotlight this post!  
Unread 09-11-2007, 20:36
seanl's Avatar
seanl seanl is offline
"The Everything person"
FRC #0867 (Absolute Value)
Team Role: Leadership
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Arcadia, CA
Posts: 267
seanl will become famous soon enoughseanl will become famous soon enough
Re: Compiling with MPLAB

my aim sn is boredouttahell99 i will be on in a few mins
__________________
, Sean

TEAM 867
-electrical
-pneumatics
-programming



2008 Autodesk Visualization Grand Prize Winner
  #6   Spotlight this post!  
Unread 11-11-2007, 11:33
seanl's Avatar
seanl seanl is offline
"The Everything person"
FRC #0867 (Absolute Value)
Team Role: Leadership
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Arcadia, CA
Posts: 267
seanl will become famous soon enoughseanl will become famous soon enough
Re: Compiling with MPLAB

thanks for your help i got it working but i have another quick question.
how would i go about programing in a delay like>
relay 1 turns on for like 1/4 a second and then turns off for like a second and then relay 2 turns on for like 1/4 a second and so on until relay 8.
any ideas because i tried it with for loops and tried to delay it, it compiles and when i run it i get a code error is there any way around the code error?
__________________
, Sean

TEAM 867
-electrical
-pneumatics
-programming



2008 Autodesk Visualization Grand Prize Winner
  #7   Spotlight this post!  
Unread 11-11-2007, 14:44
whitetiger0990's Avatar
whitetiger0990 whitetiger0990 is offline
Registered User
no team
Team Role: Programmer
 
Join Date: Mar 2006
Rookie Year: 2006
Location: Earth
Posts: 157
whitetiger0990 is a glorious beacon of lightwhitetiger0990 is a glorious beacon of lightwhitetiger0990 is a glorious beacon of lightwhitetiger0990 is a glorious beacon of lightwhitetiger0990 is a glorious beacon of light
Re: Compiling with MPLAB

There is no way (as far as I know) you can just halt execution and wait. There are routines the bot has to run or else it will die (As seen by that Code Error).

The best way (that I know) is to count the loops. There's two loops you normally put code into. The one in user_routines.c and the one in user_routines_fast.c

Process_Data_From_Master_uP() in user_routines.c is run every 26.2ms. It has to wait for user input (from the Operator Interface) so there is a large delay on it.

Process_Data_From_Local_IO() in user_routines_fast.c is run ever loop. It's bound by how fast the processor is. It's not exactly practical to count those. They are not run at a set interval.

The problem with the 26.2ms loop is that it doesn't often match up to the delay you really want. To get close to a quarter of a second, you'd loop it 10 seconds. (Which is actually .262 seconds.)

Oh, User_Autonomous_Code() in user_routines_fast.c is also bound by the 26.2ms. It gets data from the OI. (You can put an autonomous mode selector on your OI if you wish. =) )


Using a forloop to stop execution is also kind of a programming no-no. It might work, but then you add something that slows (or speeds up) the code, and that changes the delay. Also, if you run it on a different processor, it'll run way differently (think older DOS games running on modern processors.) Ideally you'd use some sort of timer function with ms resolution. You record the time, loop until the difference between the current time and the recorded time is what you want, and them move on. (Else a sleep function that does that all for you)

Either way, delaying like that won't work on the Robot Controller. There's too many functions which need to be called a lot in order to assure its own survival. I -think- one of those functions is called in order to detect an infinite loop. When you delay too long it rips out of your execution (via an interrupt), and displays the nice Code Error. That's what I've always figured, can someone confirm this?
__________________
print$q=chr(ord($q)+$1)while("7443-0201-8465130105-12-03135-82482113-06-7672-070208-0613-70"=~/(-?\d\d)/g);
  #8   Spotlight this post!  
Unread 12-11-2007, 19:46
Nathan's Avatar
Nathan Nathan is offline
Registered User
FRC #1501 (Team T.H.R.U.S.T.)
Team Role: Alumni
 
Join Date: Sep 2006
Rookie Year: 2007
Location: United States
Posts: 149
Nathan has a spectacular aura aboutNathan has a spectacular aura aboutNathan has a spectacular aura about
Re: Compiling with MPLAB

You have to set the tool locations...

This isn't very efficient, but you could calculate how fast the processor executes your code, and then simply turn on/off the relay depending on how many times the code has been looped (e.g. have a counting variable).
__________________
Save money with PriceWombat, a shopping comparison and price tracking tool (that I made!).

Check out my hobby electronics business!

My former robotics team: Huntington County 4-H Robotics

Last edited by Nathan : 12-11-2007 at 19:52.
  #9   Spotlight this post!  
Unread 12-11-2007, 22:14
steve d steve d is offline
Registered User
FRC #1277
 
Join Date: Jan 2007
Location: Groton, ma
Posts: 38
steve d is an unknown quantity at this point
Re: Compiling with MPLAB

Seanl: You'll have to count loops. The processor MUST update every 26.5 mSec or will hang-up, "red light of death". This is mentioned in one of the RC manuals.
  #10   Spotlight this post!  
Unread 12-11-2007, 22:47
DanDon's Avatar
DanDon DanDon is offline
ohhh MY god
AKA: Dan Hoizner
FRC #0375 (The Robotic Plague)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Staten Island, NY
Posts: 1,432
DanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond repute
Send a message via ICQ to DanDon Send a message via AIM to DanDon Send a message via MSN to DanDon
Re: Compiling with MPLAB

You can either use a loop count (Kind of inaccurate) or you can use one of the built-in timers that are part of the RC. I believe there was a good interrupts white-paper released by IFI called "Interrupts for Dummies" that also talked about timers.
__________________
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 with MPLAB burningpig Programming 9 17-01-2007 13:10
MPLAB Help, programming and compiling RedOctober Programming 2 23-12-2005 17:46
compiling in MPlab Greg Needel Programming 2 16-12-2005 12:43
Problems With Compiling KWalsh Programming 5 23-02-2004 16:11
White Paper Discuss: IFI Loader for Linux with compiling instructions CD47-Bot Extra Discussion 1 09-02-2004 16:46


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

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