To debug my program, I need to log data, but datalogging into NXT is limited and data can only be seen after run. While running, RobotC can poll continously, so data are read from NXT to PC. My idea is to catch data that go through bluetooth between NXT and PC. Unfortunatly, I still haven't found any way to do this.
I'd like to record these data (in a first time), and if possible write an application to draw curves, alert me on flag, and so on...
Does someone know a way to do that (just catch data, I'll do the program by myself) , or give me clues to help me?
Does RobotC protocol for polling data is known and free to use?

Thanx

Sat Mar 08, 2008 7:15 pm

blainegray

Rookie

Joined: Mon Sep 24, 2012 3:03 pmPosts: 14

Re: Direct datalogging on PC

GreetingsDid you ever find a solution to logging the polling results? I see lots of people have looked at the question.I am finding that the same code running on a real robot and a virtual robot does not produce the same results. Looking at a log of the polling would help diagnose the problem.Blaine

Thu Sep 27, 2012 7:40 am

Spiked3

Expert

Joined: Tue Feb 28, 2012 3:10 pmPosts: 197

Re: Direct datalogging on PC

I was never able to get any decent throughput on bluetooth. its slow, drops data and otherwise gets totally hung up where it wont connect for hours, walk way for a day and it connects first time, without any changes. I don't think that's unique to NXT, every bluetooth device I have has done that at one time or another. Ask Xander how he likes bluetooth

Writing to a file for logging is not too bad, and it is free. RobotC has a built in file transfer dialog that makes it easy to get it to a PC, after the fact. I got stuff done using that method before the XBees.

Hello Mike aka Spike3Thanks for your comment. I looked at your site but I must have missed something.I am new to this NXT robot world, but I have lots of experience in engineering.Looking at the data counts!

I found an NXT command for saveNxtDatalog and put that at the end of the program. Nothing appeared in the file manager utility. I tried putting it at the beginning. Still nothing appeared. According to the help page, there should be a file DATAnnnn.rdt.

The process I am using is compile and download the program via USB, run the program, and then look for the data. In the NXT brick menu, there is a file manager. Nothing appears. There is even a sublist for datalog files. Still nothing.

What do you recommend? I can see the polling data on the PC but that goes by too quickly to analyze.

Apologies, but my code at that time was ummm, somewhat disorganized and changing often enough even if it was organized I probably couldn't find it.

But I did dig up 2 relative files (not entire projects) - one is the RobotC side which had logging to a file in it (look for comment "data logging")

and the partial class of the C# that read the file.

You will have to cut and paste, and convert for robotc 3.5.

I will someday soon (ahemm NXT-Generation) release the code for the real-time logging with XBees, but it is used as an 'assignment' at the moment and I don't want to give out homework answers quite yet.

...I will someday soon (ahemm NXT-Generation) release the code for the real-time logging with XBees, but it is used as an 'assignment' at the moment and I don't want to give out homework answers quite yet.

I'm working on it. I have multiple projects. Just lost a couple days of usage getting Win-8 Enterprise Eval installed, so I could use the desktop version of Visual Studio. Trust me, I want it too...

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

Who is online

Users browsing this forum: No registered users and 2 guests

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