Go to Post 50% of the time that 330 used mcmaster 2717T51, we went to Einstein. Your mileage may vary. - Joe Ross [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 21-01-2003, 21:22
virusmirusne virusmirusne is offline
Registered User
#1083 (The Crew)
 
Join Date: Jan 2003
Location: Orlando, Florida
Posts: 23
virusmirusne is an unknown quantity at this point
Send a message via AIM to virusmirusne
TAB command in Pbasic

I was looking around in the various forums and things and I wasn't able to find any documentation discussing the tab character in PBasic. Specifically in its relation to debug statements (we would like to be able to dump debug data easily from the debug window into an excel spreadsheet.) Our problem now, with the tab command is the necessity of dumping the data into a word document and replacing all of the spaces in between the columns of data with tab characters. It's somewhat inefficient. Our thinking was it would be nice to be able to copy and paste these multiple columns of debug data directly into Excel.
  #2   Spotlight this post!  
Unread 21-01-2003, 21:30
n[ate]vw's Avatar
n[ate]vw n[ate]vw is offline
Registered User
#0933 (Adler Attack)
 
Join Date: Jan 2003
Location: Rockford, IL
Posts: 48
n[ate]vw is an unknown quantity at this point
Send a message via AIM to n[ate]vw
A tab is an ASCII character value 9. Try sending debug 9 and see if it gives a tab.
__________________
Adler Attack #933 -- Trigos
  #3   Spotlight this post!  
Unread 21-01-2003, 21:35
n[ate]vw's Avatar
n[ate]vw n[ate]vw is offline
Registered User
#0933 (Adler Attack)
 
Join Date: Jan 2003
Location: Rockford, IL
Posts: 48
n[ate]vw is an unknown quantity at this point
Send a message via AIM to n[ate]vw
Just tried it myself:
Code:
debug "A"
debug 9
in the main loop spits out A's separated with tabs.

For all the ascii characters, http://www.asciitable.com .
__________________
Adler Attack #933 -- Trigos
  #4   Spotlight this post!  
Unread 21-01-2003, 21:44
virusmirusne virusmirusne is offline
Registered User
#1083 (The Crew)
 
Join Date: Jan 2003
Location: Orlando, Florida
Posts: 23
virusmirusne is an unknown quantity at this point
Send a message via AIM to virusmirusne
I thank you for the assistance. It seems like excel may have some difficulty dealing with tabs from the debug window... but, the ASCII does separate the data enough to parse it, so it's okay. (Try copy and pasting the A's into excel.) My problem was the data wasn't automatically behaving like other tabbed data that one would copy and paste into excel... I was curious. Thanks again.
  #5   Spotlight this post!  
Unread 21-01-2003, 21:48
virusmirusne virusmirusne is offline
Registered User
#1083 (The Crew)
 
Join Date: Jan 2003
Location: Orlando, Florida
Posts: 23
virusmirusne is an unknown quantity at this point
Send a message via AIM to virusmirusne
Ooo yeah... your A's will work, I think... but I'm looking at multiple variables... p1_y, p1_x, PWM1, and PWM2 in one debug statement...

debug DEC p1_y, 9, DEC p1_x, 9, DEC PWM1, 9, DEC PWM2, CR
  #6   Spotlight this post!  
Unread 21-01-2003, 21:52
n[ate]vw's Avatar
n[ate]vw n[ate]vw is offline
Registered User
#0933 (Adler Attack)
 
Join Date: Jan 2003
Location: Rockford, IL
Posts: 48
n[ate]vw is an unknown quantity at this point
Send a message via AIM to n[ate]vw
You could separate fields with commas and linefeeds, save the data to a file with a .csv (comma separated values) extension and open it in excel.

But I have a question for you:
How do you copy and paste data from the debug window?
__________________
Adler Attack #933 -- Trigos
  #7   Spotlight this post!  
Unread 21-01-2003, 21:56
virusmirusne virusmirusne is offline
Registered User
#1083 (The Crew)
 
Join Date: Jan 2003
Location: Orlando, Florida
Posts: 23
virusmirusne is an unknown quantity at this point
Send a message via AIM to virusmirusne
Just highlight all of the data and Ctrl+C, Ctrl+V it. I'll probably just stick to parsing...
  #8   Spotlight this post!  
Unread 21-01-2003, 22:01
virusmirusne virusmirusne is offline
Registered User
#1083 (The Crew)
 
Join Date: Jan 2003
Location: Orlando, Florida
Posts: 23
virusmirusne is an unknown quantity at this point
Send a message via AIM to virusmirusne
Attached is an example of me shaking around the joystick a bit

I'm sure you've thought of this, but you can add another debug statement outside of the main operational loop that'll label your columns for you for easy, easy dumping and graphing...

Code:
debug p1_y, 9, p1_x, 9, PWM1, 9, PWM2, 9, cr
Doing that outside the loop will run that code only once, as opposed to the 38.687 (or whatever) times per second that the other observed variables are sent.
Attached Files
File Type: xls debug data.xls (33.0 KB, 32 views)
  #9   Spotlight this post!  
Unread 21-01-2003, 22:01
n[ate]vw's Avatar
n[ate]vw n[ate]vw is offline
Registered User
#0933 (Adler Attack)
 
Join Date: Jan 2003
Location: Rockford, IL
Posts: 48
n[ate]vw is an unknown quantity at this point
Send a message via AIM to n[ate]vw
Quote:
Originally posted by virusmirusne
Just highlight all of the data and Ctrl+C, Ctrl+V it.
I thought I tried that, but on this laptop keyboard, I had hit [Fn] instead. I should be more awake by this time in the day.
__________________
Adler Attack #933 -- Trigos
  #10   Spotlight this post!  
Unread 21-01-2003, 22:04
virusmirusne virusmirusne is offline
Registered User
#1083 (The Crew)
 
Join Date: Jan 2003
Location: Orlando, Florida
Posts: 23
virusmirusne is an unknown quantity at this point
Send a message via AIM to virusmirusne
(Understandable... these stupid laptop keyboards can be annoying in their layout... my new Toshiba doesn't have a serial port... so I have to program off my server. This, of course, is also fun at this hour of high usage.)
  #11   Spotlight this post!  
Unread 22-01-2003, 09:13
Jeff Waegelin's Avatar
Jeff Waegelin Jeff Waegelin is offline
El Jefe de 148
AKA: Midwest Refugee
FRC #0148 (Robowranglers)
Team Role: Engineer
 
Join Date: Aug 2001
Rookie Year: 2001
Location: Greenville, TX
Posts: 3,132
Jeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond repute
Quote:
Originally posted by virusmirusne
(my new Toshiba doesn't have a serial port... so I have to program off my server. This, of course, is also fun at this hour of high usage.)
You can use a USB to Serial adapter for programming. Just make sure you don't get one for PDA's (they're not standard serial ports).
__________________
Jeff Waegelin
Mechanical Engineer, Innovation First Labs
Lead Engineer, Team 148 - The Robowranglers
  #12   Spotlight this post!  
Unread 25-01-2003, 02:51
Lloyd Burns Lloyd Burns is offline
Registered User
FRC #1246 (Agincourt Robotics)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Toronto
Posts: 292
Lloyd Burns is an unknown quantity at this point
Back in the days of yore, spreadsheets could import text files in which data was separated by "," as in

"2","5","seventeen monkeys","0"<cr>.

HTH
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
Obscure PBASIC for RoboEmu rbayer Programming 1 28-03-2003 23:57
PBasic 2.5 vs. 2.0 Anthony Kesich Programming 6 09-02-2003 22:06
Broken PBASIC 2.5 Complier? Mike Yan Programming 12 01-02-2003 09:11
RoboEmu 1.09 (supports PBASIC 2.5) rbayer Programming 22 21-01-2003 17:22
Another PBASIC Question Ian W. Programming 4 31-01-2002 21:36


All times are GMT -5. The time now is 09:22.

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