Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Problem with Modified Code (http://www.chiefdelphi.com/forums/showthread.php?t=53024)

Brigander 29-01-2007 17:18

Problem with Modified Code
 
Whenever I try to upload modified code to our robot controller, it refuses the modified code. but when i try the default code it works fine. can anyone help me figure out a solution to this?

Alan Anderson 29-01-2007 22:16

Re: Problem with Modified Code
 
Can you be more specific? "Refuses the modified code" is a nice turn of phrase, but it doesn't say much about what is happening.

Shinigami2057 29-01-2007 22:17

Re: Problem with Modified Code
 
Define "refuses." If the code loads all the way, but does not run (code error), then make sure you are calling Getdata/Putdata and not getting stuck in an infinite loop. If the user processor cannot communicate with the master processor (by means of Getdata/Putdata) then the code will not run at all.

Goldeye 30-01-2007 00:44

Re: Problem with Modified Code
 
I find the same problem happens if you try to upload for the wrong processor.
Make sure if you are working with the full size controller, you're setup to work with the new (18F8722 iirc) processor.

Brigander 30-01-2007 08:15

Re: Problem with Modified Code
 
The code loads but does not run... so you are saying that it might be a Getdata error? I will try this.

Mike Betts 30-01-2007 08:20

Re: Problem with Modified Code
 
Quote:

Originally Posted by Brigander (Post 568040)
The code loads but does not run... so you are saying that it might be a Getdata error? I will try this.

It comes down to this... What did you change?

65_Xero_Huskie 30-01-2007 08:24

Re: Problem with Modified Code
 
If you post part of the code u changed, im sure the "Pro"grammers on here can help you with your problems. Turst me, ive seen it done before.

Brigander 30-01-2007 08:25

Re: Problem with Modified Code
 
I only changed the inputs for the PWM outputs... made it so that you use two joysticks to drive with

analog inputs to pwm outputs
pwm01 = p1_y;
pwm02 = p1_y;
pwm03 = p2_y;
pwm04 = p2_y;
pwm05 = p1_x;
pwm06 = p1_x;
pwm07 = p2_x;
pwm08 = p2 _x;
pwm09 = p1_wheel;
pwm10 = p2_wheel;
pwm11 = p3_wheel;
pwm12 = p4_wheel;

65_Xero_Huskie 30-01-2007 08:28

Re: Problem with Modified Code
 
I remembered when we switched our program to run a 360 controller, all of our PWMs were out of order so we had to imput the correct PWMs into the code, maybe you dont have the correct pwms set up for what you need to drive.

Bomberofdoom 30-01-2007 08:45

Re: Problem with Modified Code
 
I think there's a typo:
pwm08 = p2 _x;
it's
pwm08 = p2_x;

But I think he rewrote the whole code into the post and accidently typed space there.
Ah, ok. What did you plug in to what PWM output?

Brigander 30-01-2007 08:54

Re: Problem with Modified Code
 
only tested the first 4 pwm ports for the motors nothing was hooked into 5-12 at the time

more description... when i load non-default code all i get in the terminal window is "IFI>"

Mike Betts 30-01-2007 21:18

Re: Problem with Modified Code
 
Quote:

Originally Posted by Brigander (Post 568050)
I only changed the inputs for the PWM outputs... made it so that you use two joysticks to drive with

analog inputs to pwm outputs
pwm01 = p1_y;
pwm02 = p1_y;
pwm03 = p2_y;
pwm04 = p2_y;
pwm05 = p1_x;
pwm06 = p1_x;
pwm07 = p2_x;
pwm08 = p2 _x;
pwm09 = p1_wheel;
pwm10 = p2_wheel;
pwm11 = p3_wheel;
pwm12 = p4_wheel;

Andrew,

You changed something else. Try running windiff to compare default and modified source code files.

Mike

Brigander 31-01-2007 08:20

Re: Problem with Modified Code
 
what is windiff? where can I find it?

Mike Betts 31-01-2007 09:02

Re: Problem with Modified Code
 
Quote:

Originally Posted by Brigander (Post 568721)
what is windiff? where can I find it?

A google search yields many references including this.

Brigander 31-01-2007 13:25

Re: Problem with Modified Code
 
ok i think the issue is resolved. thanks for all the advice.


All times are GMT -5. The time now is 03:59.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi