|
Page 1 of 1
|
[ 7 posts ] |
|
| Author |
Message |
|
bichoncby
Rookie
Joined: Sat Dec 15, 2007 5:08 am Posts: 7
|
 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 |
|
 |
|
blainegray
Rookie
Joined: Mon Sep 24, 2012 3:03 pm Posts: 14
|
 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 |
|
 |
|
Spiked3
Expert
Joined: Tue Feb 28, 2012 3:10 pm Posts: 195
|
 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 |
|
 |
|
blainegray
Rookie
Joined: Mon Sep 24, 2012 3:03 pm Posts: 14
|
 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 |
|
 |
|
blainegray
Rookie
Joined: Mon Sep 24, 2012 3:03 pm Posts: 14
|
 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
|
| Mon Oct 01, 2012 1:52 pm |
|
 |
|
Spiked3
Expert
Joined: Tue Feb 28, 2012 3:10 pm Posts: 195
|
 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.
_________________Mike aka Spiked3 http://www.spiked3.com
|
| Mon Oct 01, 2012 3:35 pm |
|
 |
|
NeXT-Generation
Senior Roboticist
Joined: Wed Sep 28, 2011 10:13 pm Posts: 510 Location: Totally not spying on Hassenplug to see what he has for the Brickworld Chicago 2013 sumo contest.
|
 Re: Direct datalogging on PC
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 |
|
|
|
Page 1 of 1
|
[ 7 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 4 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
|
|