View unanswered posts | View active topics It is currently Sun Dec 16, 2018 12:01 pm






Reply to topic  [ 4 posts ] 
Debug Stream Refresh Button Continuous -> Paused 
Author Message
Rookie

Joined: Thu Mar 24, 2011 8:45 pm
Posts: 14
Post Debug Stream Refresh Button Continuous -> Paused
Hi Y'all,

i'm trying to use the DebugStream to collect long term data (over a period of several hours). I am writing to the debug stream every 10 seconds. At intervals of exactly 8 minutes, the refresh button in the Program Debug window automatically switches over from "continuous" to "paused". At this point if you switch it back to continuous, it has buffered the data and displays it, BUT the buffer size is limited and I lose data if I wait too long before switching back to continuous. This happens regarding of the amount of data or the frequency as which I am sending data from the NXT to the computer (I tried the sample program below changing the sending interval to 1000ms, 3000ms, and 10000ms).

Needless to say, this makes the debugstream really useless for long term experiments. I'd love to see this fixed... with the Arduino IDE you can leave the serial monitor open for several days and collect all of that data easily.

I have seen this problem with both RobotC 3.62 and RobotC 4.27. Windows 8, NXT mode with external controllers set (tetrix platform)

Here is the sample program I am using:

#pragma config(Hubs, S1, HTMotor, none, none, none)
#pragma config(Sensor, S1, , sensorI2CMuxController)
#pragma config(Motor, mtr_S1_C1_1, Dyno, tmotorTetrix, PIDControl, encoder)
#pragma config(Motor, mtr_S1_C1_2, motorE, tmotorTetrix, openLoop)
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//


task main()
{
long currentEncoder = 0;
long previousEncoder = 0;
float speed = 0;
long previousTime = 0;

clearDebugStream();
while(true)
{
motor[Dyno] = -80; //set speed to refresh DC motor controller
if(nPgmTime - previousTime > 10000) // has ten seconds passed?
{

currentEncoder = nMotorEncoder[Dyno]; //read current encoder position
speed = -(currentEncoder - previousEncoder)/10; //basically in units of encoder counts per second
writeDebugStreamLine("Time: %i, Speed: %i, Battery: %i", nPgmTime, speed, externalBatteryAvg);
previousEncoder = currentEncoder;
previousTime = nPgmTime; //do a timestamp
}
wait1Msec(50);
}


}


Fri Jan 23, 2015 11:15 am
Profile
Site Admin
Site Admin
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3654
Location: Rotterdam, The Netherlands
Post Re: Debug Stream Refresh Button Continuous -> Paused
Hey there,

Try setting the value of the maximum polling time to something much, much larger here:
Attachment:
Screenshot at 07-52-20.png
Screenshot at 07-52-20.png [ 29.55 KiB | Viewed 4130 times ]

= 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]


Sat Jan 24, 2015 2:53 am
Profile WWW
Rookie

Joined: Thu Mar 24, 2011 8:45 pm
Posts: 14
Post Re: Debug Stream Refresh Button Continuous -> Paused
works! max setting is 60 minutes, which is still not ideal, but a lot better than before. thanks.


Sat Jan 24, 2015 4:13 pm
Profile
Site Admin
Site Admin
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3654
Location: Rotterdam, The Netherlands
Post Re: Debug Stream Refresh Button Continuous -> Paused
Check if setting it to 0 disables it :)

= 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]


Sat Jan 24, 2015 4:18 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users 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.