Missing data, no explanation why

General Q&A specific to RaceCapture/Pro. For app related questions post in the RaceCapture App forum. also see the <a href="http://www.autosportlabs.net/RaceCapture">RaceCapture Information Page</a>

Moderators: JeffC, rdoherty, stieg, brentp

Copper280z
Posts: 30
Joined: Sun Mar 15, 2015 3:03 am
Location: United States

Missing data, no explanation why

Post by Copper280z »

I've had 2 autocrosses so far this year. So far I've only gotten data for about half of the runs I've taken. Most times a file is created, but it has no data, or it's cut off after some period of time. I'm not seeing the error light on after a run at all. I'm using a lua script to read the canbus, but I don't think that's the problem. I believe this was 2.7.8 firmware, see config attached.

Right now I think it might be SD card related, but I have some issues with that idea. The SD card seems to be firmly in place, it's not coming out or anything. Also, if it were an intermittent connection I'd expect a write to fail and just be missing a chunk of data right in the middle, not have a created file with zero data, not even headers! Maybe the card is just a dud?

The card is a class 10 PNY 16gb micro SD.

Here is a screenshot of the files and sizes from my most recent event, it only caught 4 full runs, I believe RC_5 cut off half way through. Again, no error light, no outward signs of trouble during the event, just no data after.

Image

Think we could get some troubleshooting options, like have the RCP spit out a text file on the sd card with any errors it encounters?
Attachments
CANlogging1.zip
configuration
(1.97 KiB) Downloaded 348 times

JMcDonough
Posts: 70
Joined: Tue Mar 10, 2015 3:31 pm
Location: Detroit, MI

Post by JMcDonough »

Had a somewhat similar experience during an autocross run:

Did 2 runs back to back. Started RCP before the first run. Stopped it after the 2nd run. 1 log file resulted (as expected), but only included the final half of the 2nd run.

It also jumped from RC_31.LOG (preceding file) to RC_43.LOG when that happened. Was also on firmware 2.7.8 at the time. 32gb class 10 SanDisk ultra card.

The malfunction has not happened again in the handful of subsequent logs.
Josh

Copper280z
Posts: 30
Joined: Sun Mar 15, 2015 3:03 am
Location: United States

Post by Copper280z »

Used the RCP at the NJ Prosolo, data looked a lot like what I pictured above, most of it missing.

rdoherty
Posts: 215
Joined: Fri Mar 08, 2013 3:32 am

Post by rdoherty »

Hi folks, thanks for letting us know about this problem. Do you have RCP setup with any Luascript for auto start-stop logging? MK1 or MK2 RCP?
Ryan Doherty
Autosports Labs

brentp
Site Admin
Posts: 6274
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

Hi,

For error logging, in 2.8.0+ firmware we've greatly expanded the logfile from 1K byte size to 10K bytes in size. Which means you'll be able to go into the app and look at the current log and see what kind of error messages are on there. We'll look at logging to SD card as well; we have to be careful of this so the system isn't competing with the primary logging routine.

Also really important to know is, how are you triggering the logging start/stop? Speed, RPM, or other? Please post the Lua script, if applicable, so we can see how it's triggered.
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

Copper280z
Posts: 30
Joined: Sun Mar 15, 2015 3:03 am
Location: United States

Post by Copper280z »

Right now I'm triggering the logging with the button, nothing in the script should be triggering it. Here is the script:

Code: Select all

&#65279;--500K baud. set your baud rate here.
initCAN&#40;0, 500000&#41; 

setTickRate&#40;30&#41;  --onTick&#40;&#41; will be called at 30Hz.

steering = addChannel&#40;"Steering",50&#41;
tps = addChannel&#40;"TPS",50&#41;
RPM = addChannel&#40;"RPM",50&#41;


function outputCAN&#40;&#41;

 repeat
  
  id, ext, data = rxCAN&#40;0, 100&#41;
  
  if id == 1242 then
    setChannel&#40;steering,&#40;data&#91;1&#93;*256+data&#91;2&#93;&#41;&#41;
  end

  if id == 513 then
    setChannel&#40;tps,data&#91;7&#93;&#41;
    setChannel&#40;RPM,&#40;data&#91;1&#93;*256+data&#91;2&#93;&#41;&#41;
  end
  
 until id == nil
 
end
 
function onTick&#40;&#41;
 outputCAN&#40;&#41;
end

brentp
Site Admin
Posts: 6274
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

Thanks. Next time you do a logging session, carefully note when the button is pushed (before each run, etc). If you already have these notes from last session add them here. Start with an empty SD card, too.

If you're pushing the button early, RCP might reset if the car is started (voltage sag), so details on how and when it's triggered will be helpful. If RCP resets, then it won't continue logging if logging is triggered manually.

Also, if you have RPM connected as a channel, you can trigger a start log when the engine is started, and a stop logging when the engine is shut off.

Or, you can do a speed based logging, so you get log files that crisply start / stop when the car moves and then stops.

Let's keep at this until things are running well for you!
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

Copper280z
Posts: 30
Joined: Sun Mar 15, 2015 3:03 am
Location: United States

Post by Copper280z »

I don't have detailed info on when the log was started or stopped, but I'm pretty confident that it's not resetting due to voltage sag on start. In one case I have a log that ends several turns into a run. I will be sure to start the log only after the engine is running at the next event.

I do know that I checked after each run to see if the logging indicator light is still on. At both the prosolo and the event when I started this thread I'm confident that the logging indicator light was on and the error light off at the end of each run.

brentp
Site Admin
Posts: 6274
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

Got it. Can you try the speed based logging, perhaps around the block in the form of additional testing before it matters at the event? We'll be doing some testing here as well in concert with our new firmware and app release.

Speaking of firmware and app, we're releasing a version that allows you to set start / finish right from the beta app to make it easier to time your ad-hoc runs. Watch for it today!
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

JMcDonough
Posts: 70
Joined: Tue Mar 10, 2015 3:31 pm
Location: Detroit, MI

Post by JMcDonough »

Running 2.8.1 firm and the 1.3.1 app.

I now also get files with zero data, but the subsequent file has the correct data, so no runs were actually missed. All runs were started with a manual RCP button press. I did notice a quick flash of the red LED on the RCP right after the button is pressed.

To help with GPS and distance calculation accuracy, I dropped down to 10hz. The files with data have "0" for all of the distance values. Speed is there and seems good, 10 Sats, "3" for GPS Qual, "1.4" for GPSDOP.

The first 9 data lines also get repeated when I look at the raw file:

https://drive.google.com/open?id=0B2GPM ... authuser=0
https://drive.google.com/file/d/0B2GPMi ... sp=sharing
Josh

toga94m
Posts: 127
Joined: Wed Jun 05, 2013 1:57 am
Location: Upstate NY

Post by toga94m »

Similar results on my MK1 on 2.8.2. Not 100% sure what firmware version the issue started with, but I'm suspecting 2.8.0 because notes say I was testing that version on 5/7/15. Now it looks like every buttonpress gets a red blink or two, and a 0-byte file, then the real file picks up afterward. Here's the tail of my card dir (I'm UTC-4 at the moment, New York):

Code: Select all

03/28/2015  11&#58;34 PM           645,397 RC_43.LOG
03/28/2015  11&#58;38 PM           379,472 RC_44.LOG
05/09/2015  02&#58;05 AM                 0 RC_45.LOG
05/09/2015  02&#58;06 AM            13,631 RC_46.LOG
01/01/2098  12&#58;00 AM                 0 RC_47.LOG
01/01/2098  12&#58;00 AM             4,629 RC_48.LOG
05/23/2015  01&#58;32 AM                 0 RC_49.LOG
05/23/2015  01&#58;32 AM            24,534 RC_50.LOG
05/23/2015  01&#58;47 AM                 0 RC_51.LOG
05/23/2015  01&#58;53 AM           418,573 RC_52.LOG
05/23/2015  01&#58;55 AM                 0 RC_53.LOG
05/23/2015  02&#58;03 AM           490,667 RC_54.LOG
05/23/2015  06&#58;15 PM                 0 RC_55.LOG
05/23/2015  06&#58;16 PM            12,020 RC_56.LOG
05/23/2015  06&#58;23 PM                 0 RC_57.LOG
05/23/2015  06&#58;24 PM             3,791 RC_58.LOG
05/23/2015  06&#58;31 PM                 0 RC_59.LOG
05/23/2015  06&#58;41 PM           660,271 RC_60.LOG
05/26/2015  02&#58;11 AM                 0 RC_61.LOG
05/26/2015  02&#58;11 AM            14,947 RC_62.LOG
And the usb-attached console logging level 4 shows nothing.. I was getting Init errors for a while, till I realized the card was in the computer and not the RCP :oops: This is the same card I've been using all along - an old Lexar 32MB card.
------------
Learning Race Capture Pro... on someone else's car
Learning Python/Kivy on my own PC

brentp
Site Admin
Posts: 6274
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

Thanks for the updates. Some questions and things to try:

1) Do you only see this phenomenon after pressing the button for the first time after RCP powers up?
2) What about a subsequent logging stop / re-start while the unit is powered up?
3) What if RCP remains powered up and the card is removed and re-inserted, then logging is started? do you see the flicker of the red light?

The theory here is that when the SD card is first powered up there is a longer initialization process required. Some SD cards require longer first power up initialization. After the card has been initialized, subsequent operations are faster. The theory is that for some cards the initialization takes too long and the logging routine 'gives up' and then tries again, with a new logfile.

A possible solution is to always do a file system initialization upon RCP power up (like read the contents of the directory). In addition, we may try to extend the initialization timeout even further.

SD cards vary greatly- some behave significantly different, especially for initialization times. If you have a collection of different cards it would be interesting to see the results of 1,2 and 3 above with different cards.
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

JMcDonough
Posts: 70
Joined: Tue Mar 10, 2015 3:31 pm
Location: Detroit, MI

Post by JMcDonough »

In my case, I was powered on the entire time the logs were collected (RCP powered through the OBD connection). It stays powered on whenever connected to the OBD port, even if the car is off. I've been using the same micro SD card from the beginning. 32gb class 10 SanDisk ultra card.

I didn't see the empty file behavior until I upgraded to 2.8.1 firmware. Was on 2.7.9 before 2.8.1.
Josh

Copper280z
Posts: 30
Joined: Sun Mar 15, 2015 3:03 am
Location: United States

Post by Copper280z »

JMcDonough wrote:In my case, I was powered on the entire time the logs were collected (RCP powered through the OBD connection). It stays powered on whenever connected to the OBD port, even if the car is off. I've been using the same micro SD card from the beginning. 32gb class 10 SanDisk ultra card.

I didn't see the empty file behavior until I upgraded to 2.8.1 firmware. Was on 2.7.9 before 2.8.1.
Mine is powered in the same way. I'm going to update the firmware to the most recent and give the unit to my codriver to experiment with this week, he owns the car.

brentp
Site Admin
Posts: 6274
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

Thanks, we'll double check 2.7.9 vs the current 2.8.2 as well. Let us know what you find out, and how you end up doing the triggering (manual vs automatic)
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

Post Reply