View unanswered posts | View active topics It is currently Fri Jul 25, 2014 5:11 am






Reply to topic  [ 7 posts ] 
Direct datalogging on PC 
Author Message
Rookie

Joined: Sat Dec 15, 2007 5:08 am
Posts: 7
Post Direct datalogging on PC
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
Profile
Rookie

Joined: Mon Sep 24, 2012 3:03 pm
Posts: 14
Post Re: Direct datalogging on PC
Greetings
Did 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
Profile
Expert

Joined: Tue Feb 28, 2012 3:10 pm
Posts: 195
Post 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 :)

Anyhow, I eventually ended up using XBee ; http://www.spiked3.com/?p=488. They are reasonably priced, about $100 for all you need.

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.

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


Thu Sep 27, 2012 8:40 am
Profile
Rookie

Joined: Mon Sep 24, 2012 3:03 pm
Posts: 14
Post Re: Direct datalogging on PC
Hello Mike aka Spike3
Thanks 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.

Thanks for your help.
PS
Your suggestions for new robots look great.
Blaine


Mon Oct 01, 2012 1:50 pm
Profile
Rookie

Joined: Mon Sep 24, 2012 3:03 pm
Posts: 14
Post Re: Direct datalogging on PC
Of course at the end I saw the line about attach a file.
Here is the file I am using.
Blaine


Attachments:
File comment: Program to show a display, make sounds, and log data for a REMbot.
Labyrinth Challenge Sound Display Real.c [1.66 KiB]
Downloaded 100 times
Mon Oct 01, 2012 1:52 pm
Profile
Expert

Joined: Tue Feb 28, 2012 3:10 pm
Posts: 195
Post Re: Direct datalogging on PC
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.


Attachments:
pie2qtr.zip [3.59 KiB]
Downloaded 122 times

_________________
Mike aka Spiked3
http://www.spiked3.com
Mon Oct 01, 2012 3:35 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: Direct datalogging on PC
Spiked3 wrote:
...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-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.


Mon Oct 01, 2012 4:05 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 7 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.