Différences entre versions de « SBK-unexpected-data »

De MCHobby - Wiki
Sauter à la navigation Sauter à la recherche
Ligne 43 : Ligne 43 :
  
 
The main process --''who's handle the LCD display and user input''-- will then collect the data from the ring buffer then save it to the CSV file.
 
The main process --''who's handle the LCD display and user input''-- will then collect the data from the ring buffer then save it to the CSV file.
 +
 +
IF the data are pushed into the ring buffer faster that it is read from THEN some data will miss in the CSV file.
 +
 +
As carriage return is part of the data (going to the next line), concatenation of two lines may also appears in the CSV file.
  
 
{{SBK-TRAILER}}
 
{{SBK-TRAILER}}

Version du 7 juillet 2024 à 00:11

Forewords

The SBK Datalogger generates CSV files that can be imported into spreadsheet (see this tutorial on Spreadsheet usage).

Upon condition, charting may reveal few data deviating from standard/common values.

This tutorial shows: why it happens, how to identify the data, how to fix it and what to do to avoids such situation.

The unexpected data

Drawing the data of the temperature sensor (content of the CSV) reveal an unexpected value.

SBK-unexpected-data-01.png

By exploring the spreadsheet data, we can locate the line where appears the 180 °C value.

SBK-unexpected-data-02.png

A close inspection reveal that "180" value is not a temperature but the next iteration number.

SBK-unexpected-data-03.png

Conclusion:

  • The iteration 153 as no value.
  • The line of iteration 153 must be removed.
  • Iteration 153 to 179 are missing (lot of data has not been logged).

Why did it happens?

This may happens when collecting too much data (from too many sensors) with a too high sample rate (10 ms or burst).

To avoids that issue:

  • Either reduce the collected data
  • Either increase the sampling time (time between two successive samples)

How this happens?

The sampling process does acquire the data as fast as possible to to respect the sampling time.

Then the data is pushed into a ring buffer for the sampling process to get ready for the next sample.

Ring-buffer.png

The main process --who's handle the LCD display and user input-- will then collect the data from the ring buffer then save it to the CSV file.

IF the data are pushed into the ring buffer faster that it is read from THEN some data will miss in the CSV file.

As carriage return is part of the data (going to the next line), concatenation of two lines may also appears in the CSV file.


Written by Meurisse D. for MCHobby


MCHobby investit du temps et de l'argent dans la réalisation de traduction et/ou documentation. C'est un travail long et fastidieux réalisé dans l'esprit Open-Source... donc gratuit et librement accessible.
SI vous aimez nos traductions et documentations ALORS aidez nous à en produire plus en achetant vos produits chez MCHobby.