Go to Post Ken Patton rocks my socks off! - Josh Hambright [more]
Home
Go Back   Chief Delphi > Old Forum Archives > 2001
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 24-06-2002, 00:34
archiver archiver is offline
Forum Archival System
#0047 (ChiefDelphi)
 
Join Date: May 2001
Location: Pontiac, MI
Posts: 21,214
archiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond repute
Debug function in programming?

Posted by Eric Reed at 2/9/2001 9:10 PM EST


Coach on team #481, NASA Ames / De Anza High School, from De Anza High School and It could be you!.



Howdy,

Can somebody tell me how to get the debug function to spit out a decimal (rather than ascii). Let's say we want to know the value of sensor1. I have tried:

debug sensor1 ' I get ascii
debug #sensor1 ' I get unrecognized character
debug "Sensor 1 = " sensor1 ' yup, ascii
debug "#sensor1" 'I get #sensor1

Help!

Thanks,

Eric
Team 481


__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.
  #2   Spotlight this post!  
Unread 24-06-2002, 00:34
archiver archiver is offline
Forum Archival System
#0047 (ChiefDelphi)
 
Join Date: May 2001
Location: Pontiac, MI
Posts: 21,214
archiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond repute
Re: Debug function in programming?

Posted by Matt Leese at 2/9/2001 9:42 PM EST


Other on team #73, Tigerbolt, from Edison Technical HS and Alstom & Fiber Technologies & RIT.


In Reply to: Debug function in programming?
Posted by Eric Reed on 2/9/2001 9:10 PM EST:



This is off the top of my head and with the disclaimer that I haven't touched any of the control system this year but I believe what you want is:
debug ? sensor1

Then again, I could be totally out of it. Check the PBasic manual.

Matt
__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.
  #3   Spotlight this post!  
Unread 24-06-2002, 00:34
archiver archiver is offline
Forum Archival System
#0047 (ChiefDelphi)
 
Join Date: May 2001
Location: Pontiac, MI
Posts: 21,214
archiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond repute
debug dec variablename

Posted by Joe Johnson at 2/9/2001 9:53 PM EST


Engineer on team #47, Chief Delphi, from Pontiac Central High School and Delphi Automotive Systems.


In Reply to: Debug function in programming?
Posted by Eric Reed on 2/9/2001 9:10 PM EST:



By decimal I assume you mean the ascii for the
characters that display the value of the variable in
decimal.

variablename var byte

variablename = 0

Main:

debug hex2 variablename, " ", bin8 variablename, "
",dec variablename, " ",cr

variablename = variablename + 1

Goto Main

The above code would pin
00 00000000 0
01 00000001 1
02 00000010 2
03 00000011 3
04 00000100 4
05 00000101 5
06 00000110 6
07 00000111 7
08 00001000 8
09 00001001 9
0A 00001010 10
.
.
.
FE 11111110 254
FF 11111111 255
00 00000000 0
01 00000001 1
02 00000010 2
.
.
.

If you don't have the PBASIC manual, buy one. I bought
Version 2.0 of the manual (new this year) and I am very
happy with it. It is a pretty big improvement over
Version 1.9 in my opinion. Worth the price.

Good luck.

Joe J.


__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.
  #4   Spotlight this post!  
Unread 24-06-2002, 00:34
archiver archiver is offline
Forum Archival System
#0047 (ChiefDelphi)
 
Join Date: May 2001
Location: Pontiac, MI
Posts: 21,214
archiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond repute
Re: Debug function in programming?

Posted by Stephen at 2/9/2001 9:57 PM EST


Other on team #122, NASA Knights, from Grafton High School (Robotics team is at NHGS) and NASA.


In Reply to: Debug function in programming?
Posted by Eric Reed on 2/9/2001 9:10 PM EST:



here's how you do it:

debug "var", dec var, cr

where dec means decimal, hex would mean hexadecimal, etc.


__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.
  #5   Spotlight this post!  
Unread 24-06-2002, 00:34
archiver archiver is offline
Forum Archival System
#0047 (ChiefDelphi)
 
Join Date: May 2001
Location: Pontiac, MI
Posts: 21,214
archiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond repute
Thanks, All

Posted by Eric Reed at 2/11/2001 3:24 AM EST


Coach on team #481, NASA Ames / De Anza High School, from De Anza High School and It could be you!.


In Reply to: Debug function in programming?
Posted by Eric Reed on 2/9/2001 9:10 PM EST:



Thanks, all. That is exactly what I needed. For some reason the manual that comes with the kit does not properly address this (and many other things)

Eric.


__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.
 


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 Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Programming Compatition Angela06 Programming 30 08-04-2005 23:12
variable? manodrum Programming 11 01-04-2003 17:20
basic stamp editor debug capture dave_l Programming 4 17-03-2003 19:35
Pneumatics electrical wiring and programming archiver 2001 1 23-06-2002 23:10
Error found in programming for the pump and pressure switch sjharobotics Programming 4 06-02-2002 17:46


All times are GMT -5. The time now is 21:25.

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