ROBOTC.net forums
http://www.robotc.net/forums/

RobotC Datalog Analyzer
http://www.robotc.net/forums/viewtopic.php?f=1&t=2159
Page 1 of 1

Author:  wbmstr2good [ Wed Feb 03, 2010 12:33 am ]
Post subject:  RobotC Datalog Analyzer

I'm in the process of developing a RobotC datalog analyzer that will basically prevent the user from having to transpose the data in excel before it can be graphed, as well as allow the ability to union log files to make them longer. The resulting datalogs will be graphed, and an entire set (folder) of datalogs can be examined quickly. Currently I'm developing this for personal use, but if there is a need for it, I'd love to polish what I've got and distribute an installer?

I'm curious if there is a need for this? Has someone come up with other solutions? What would you like to see in a piece of software like this?

An example (very simple):
Image

Author:  Aswin [ Wed Feb 03, 2010 3:15 am ]
Post subject:  Re: RobotC Datalog Analyzer

Hi,

I already made such a tool. It sends data over BlueTooth to excel, allowing you to analyse data in excel real time. You might want to take a look a it. It is called NXT2excel and can be found on my blog:http://nxttime.wordpress.com

Author:  sekai [ Thu Feb 04, 2010 6:23 pm ]
Post subject:  Re: RobotC Datalog Analyzer

Hallo,

Looks really super,

it's Worth working on it ...

Will it be possible to data log floats in your Datalog Analyzer?

It's a little bit off this topic but I do suffer with DataLog in RobotC (2.01).
I have problems with floats data loging, as well as with integers / floats lower than 0 ...

that's the exact example code:

float GyroGetAngleVelocity()
{
float offset = GyroGetAngleOffset();
angle = (float) SensorRaw[gyro] - offset;
if (i < kDatalogSize & toSave==true)
{
AddToDatalog(1,100*angle);
i++;
}
if (i >= kDatalogSize & toSave==true) {
SaveNxtDatalog();
}
return angle;
}

what I get with this code, is:

129, 104
129, 114
129, 114
129, 129
129, 129
129, 127
129, 127
129, 95
129, 95
129, 48
129, 48
129, 14
129, 14
129, 0
129, 0
129, 65526
129, 65526
129, 65513
129, 65513
129, 65502
129, 65502
129, 65495
129, 65495
129, 65496


Red marked values are for negative angle values ...

Any idea how to solve this ...


Live with RobotC and your Datalog Analyzer wolud be easer :-) ...
best regards
Maciej

Author:  wbmstr2good [ Thu Feb 04, 2010 7:56 pm ]
Post subject:  Re: RobotC Datalog Analyzer

sekai,

The datalog analyzer fixes the wrapping "issue". However, it's not really an issue, it's just storing the data point as an unsigned 16 bit integer. To get the negative value back just cast the unsigned 16 bit integer to a signed 16 bit integer and you're good.

An example in C# would look like this

Int16 signedInt = (Int16)UInt16.Parse(dataPointValue);

Does that help?

I'm not sure how to log floats, but perhaps you could simply multiply your float value by 1000, then when you get it in excel or somewhere else, divide by 1000? Just a thought.

Aswin,

I'm going to check out your program. Might solve my problem. I analyze my logs currently in excel, but not in real time. I'll give it a look.

Dylan

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/