View unanswered posts | View active topics It is currently Fri Oct 31, 2014 6:23 pm






Reply to topic  [ 7 posts ] 
See all variables without being global? 
Author Message
Senior Roboticist
User avatar

Joined: Wed Sep 28, 2011 10:13 pm
Posts: 630
Location: If I told you, I'd have to kill you.
Post See all variables without being global?
I wanna see the status of all my variables without them being global!! Is this still possible?

_________________
A.K.A. inxt-generation
Self-proclaimed genius, and future world dominator.
My Brickshelf Folder
"Don't they teach recreational mathematics anymore?" - The Tenth Doctor
Bow down to Nikola Tesla, King of the Geek Gods.


Sat Sep 15, 2012 6:22 pm
Profile WWW
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3240
Location: Rotterdam, The Netherlands
Post Re: See all variables without being global?
In the new 3.50, it is possible to see the local variables, too. They're in a different window, though.

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Sun Sep 16, 2012 12:00 am
Profile WWW
Senior Roboticist
User avatar

Joined: Wed Sep 28, 2011 10:13 pm
Posts: 630
Location: If I told you, I'd have to kill you.
Post Re: See all variables without being global?
mightor wrote:
In the new 3.50, it is possible to see the local variables, too. They're in a different window, though.

- Xander
Yeah, but only if you pause code execution. Which is bad for me.

_________________
A.K.A. inxt-generation
Self-proclaimed genius, and future world dominator.
My Brickshelf Folder
"Don't they teach recreational mathematics anymore?" - The Tenth Doctor
Bow down to Nikola Tesla, King of the Geek Gods.


Sun Sep 16, 2012 9:03 am
Profile WWW
Expert

Joined: Tue Feb 28, 2012 3:10 pm
Posts: 195
Post Re: See all variables without being global?
You could use some sort of real time data plotter with XBees :roll:

If only someone would help you out, and get you a set of XBees :roll:

By the way, How's the XBee project coming?

_________________
Mike aka Spiked3
http://www.spiked3.com


Sun Sep 16, 2012 12:19 pm
Profile
Senior Roboticist
User avatar

Joined: Wed Sep 28, 2011 10:13 pm
Posts: 630
Location: If I told you, I'd have to kill you.
Post Re: See all variables without being global?
Somewhat. I'm still trying to get through C#, and then I've gotta get a handle on Java to convert the code. This, combined with life, school, my other robots and Civ make for slow progress on everything. But I haven't stopped working on it! I'll get there. In time.

_________________
A.K.A. inxt-generation
Self-proclaimed genius, and future world dominator.
My Brickshelf Folder
"Don't they teach recreational mathematics anymore?" - The Tenth Doctor
Bow down to Nikola Tesla, King of the Geek Gods.


Sun Sep 16, 2012 2:34 pm
Profile WWW
Expert

Joined: Tue Feb 28, 2012 3:10 pm
Posts: 195
Post Re: See all variables without being global?
Just saying, this is a good application, and I know someone who has working code :poke:

The first time I did the line follower I used a non real-time version to log data, and it helped a lot in tuning the PID. I plan on using the latest (real-time) version again with the light sensor array once I get a IMU I can depend on working (real soon now™).

_________________
Mike aka Spiked3
http://www.spiked3.com


Sun Sep 16, 2012 4:15 pm
Profile
Site Admin
Site Admin

Joined: Wed Jan 24, 2007 10:42 am
Posts: 613
Post Re: See all variables without being global?
In ROBOTC 3.50 and above, there is a new debugger window called "Local Variables". There are two windows now for variables:

1. Global Variables - Displays all variables declared outside of any procedure or task.
2. Local Variables - Displays all variable in the currently selected function when the debugger has the program suspended.

The reason why the Local Variables is not able to display the variables during execution is that for each function calls the variables are released from the stack and ROBOTC can't keep track of which variables are associated to the stack memory addresses between function calls. This is similar to most modern IDE's (such as Visual Studio) that cannot display variables unless the program is currently suspended via a breakpoint or Step command which only show the variables in the current procedure or function. Global variables do not have this issue as they are assigned a fixed memory address at compile time.

If you need a "live update" of local values, I would recommend looking at using the "WriteDebugStream" commands and watching the Debug Stream debugger window which will give you a "printf" style printing capability to a terminal like window. To learn more, take a look at http://www.robotc.net/wiki/Debug_Stream

_________________
Timothy Friez
ROBOTC Developer - SW Engineer
tfriez@robotc.net


Sat Sep 22, 2012 8:22 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 7 posts ] 

Who is online

Users browsing this forum: KeesSmit and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.