Difference between revisions of "HANtune/Logging"

From OpenMBD
Jump to: navigation, search
Line 13: Line 13:
 
The log file will (by default) be saved in the “log” subfolder in the HANtune folder. If desired, this folder can be changed by going to '''Preferences'''→'''User Preferences'''. Type or browse your desired folder in the '''Log Location''' field.
 
The log file will (by default) be saved in the “log” subfolder in the HANtune folder. If desired, this folder can be changed by going to '''Preferences'''→'''User Preferences'''. Type or browse your desired folder in the '''Log Location''' field.
  
Using a spreadsheet capable of reading .csv format, you can examine a log file.
+
Using a spreadsheet capable of reading .csv format, you can examine the contents of a log file.
  
  
<b>Log File Contents</b>
+
===Log File Contents===
  
A log file consists of two parts: a header and log values. Both are in human readable format.  
+
A log file consists of two parts: a log header and log data values. Both are in human readable format.  
 
The header contains additional information as:
 
The header contains additional information as:
 
* The name of the project
 
* The name of the project
Line 24: Line 24:
 
* The sample frequency of each DAQ list
 
* The sample frequency of each DAQ list
 
* The time and date of the log file
 
* The time and date of the log file
* 2 lines containing a description of signals logged per column. First line contains the protocol used. Second line contains the name of each signal.
+
* 2 lines containing a description of signals logged per column. First line contains the protocol name. Second line contains the name of each signal.
  
 
Next to the header, the actual log values are written into the file.
 
Next to the header, the actual log values are written into the file.
Each line starts with a timestamp (in Seconds), followed by all the values of the signals received at that time. Each signal value is separated by a semicolon (;). A dot (.) or a comma (,) (depending on your locale settings) denotes a decimal separator. A thousands separator is not used in logfiles.
+
Each line starts with a timestamp (in Seconds), followed by all the values of the signals received at that time. Each signal value is separated by a semicolon (;). A dot (.) or a comma (,) denotes a decimal separator (depending on your locale settings). A thousands separator is not used in HANtune logfiles.
  
  
  
<b>Reading Log File</b><br>
+
===Reading Log File===
 
HANtune is capable of reading and showing signal values of a previously recorded logfile. The content of that logfile will be displayed on the signal elements on screen.
 
HANtune is capable of reading and showing signal values of a previously recorded logfile. The content of that logfile will be displayed on the signal elements on screen.
  
Line 41: Line 41:
  
  
*[[File:LogDialogSlider.png|left|frameless|300px]]The slider can be used to navigate within the logfile. Dragging the slider will display signal values from the logfile at the given position. The position of the slider can also be moved by entering the desired time position of the logfile. Shortcut key: '''G'''<br><br>
+
*[[File:LogDialogSlider.png|left|frameless|300px]]The slider can be used to navigate within the logfile. It shows the relative location within the logfile. Dragging the slider will display signal values from the logfile at the given position. The position of the slider can also be moved by entering the desired time position of the logfile. Shortcut key: '''G'''<br><br>
*[[File:TotalsLabel.png|110px]]Displays the total number of csv lines in the file and the total time span (in seconds) of the logfile since start of logging. When hovering above this label, the log header info will be displayed.<br><br>
+
*[[File:TotalsLabel.png|110px]] Displays the total time span (in seconds) of the logfile since start of logging and the total number of csv lines in the file. When hovering above this label, the log header info will be displayed. See also Log File Contents above.<br><br>
 
*[[File:Buttonleft.png|30px]] or [[File:ButtonRight.png|30px]] Navigate 1 step (1 line) backward or forward in logfile. Shortcut key: '''Left''' or '''Right''' cursor<br><br>
 
*[[File:Buttonleft.png|30px]] or [[File:ButtonRight.png|30px]] Navigate 1 step (1 line) backward or forward in logfile. Shortcut key: '''Left''' or '''Right''' cursor<br><br>
 
*[[File:ButtonStart.png|30px]] or [[File:ButtonEnd.png|30px]] Go to Beginning or End of logfile. Shortcut key: '''B''' or '''E'''<br><br>
 
*[[File:ButtonStart.png|30px]] or [[File:ButtonEnd.png|30px]] Go to Beginning or End of logfile. Shortcut key: '''B''' or '''E'''<br><br>
Line 51: Line 51:
  
  
<b>Read-while-write Log File</b><br>
+
===Read-while-write Log File===
 
HANtune can read a log file, while - at the same time - logging data into the file. Using this feature, you can read a logfile at any position in the file, while data is appended to the same file when incoming signals are received from the target.
 
HANtune can read a log file, while - at the same time - logging data into the file. Using this feature, you can read a logfile at any position in the file, while data is appended to the same file when incoming signals are received from the target.
  
To start Read-while-write go to "File -> Enable Read while write log". Make sure "Communication -> Enable Datalogging" is also activated or click on the log file button at the bottom status bar:[[File:LogButtonRWWStandby.png|266px]]
+
To start Read-while-write go to '''File'''&rarr;'''Enable Read while write log'''. Make sure '''Communication'''&rarr;'''Enable Datalogging''' is also activated or click on the log file button at the bottom status bar:[[File:LogButtonRWWStandby.png|266px]]<br><br>
 
When connected to the target the Read-while-write dialog will be displayed:<br>
 
When connected to the target the Read-while-write dialog will be displayed:<br>
[[File:ReadWhileWriteDialog.png|left|400px]]Similar to the Read Log dialog, you can navigate within the selected logfile. Most components have the same functionality as the Read Log dialog. The differences will be explained below.<br><br><br><br><br><br>
+
[[File:ReadWhileWriteDialog.png|left|400px]] Similar to the Read Log dialog, you can navigate within the selected logfile. Most components have the same functionality as the Read Log dialog. The differences will be explained below.<br><br><br><br><br><br>
  
 
*[[File:ButtonReadWhileWrite.png|30px]]Live play mode. Moves the slider to the end of the logfile, while this end moves further as new data is being received from the target. Current, up-to-date signal values are now displayed live on the screen. Shortcut key: '''E'''<br><br>
 
*[[File:ButtonReadWhileWrite.png|30px]]Live play mode. Moves the slider to the end of the logfile, while this end moves further as new data is being received from the target. Current, up-to-date signal values are now displayed live on the screen. Shortcut key: '''E'''<br><br>
 
*[[File:TotalsLabelReadWhileWrite.png|110px]]Total values increment continuously when new signal values are being received from the target.<br><br>
 
*[[File:TotalsLabelReadWhileWrite.png|110px]]Total values increment continuously when new signal values are being received from the target.<br><br>
 
*[[File:SliderReadWhileWrite.png|left|155px]]When in Live play mode, the position of the logfile is displayed in green and continuously updates to reflect the increasing length of the file. The playback speed indicator shows a moving rotator, similar to the Receive indicator at the bottom status bar, as new data arrives from the target.<br><br>
 
*[[File:SliderReadWhileWrite.png|left|155px]]When in Live play mode, the position of the logfile is displayed in green and continuously updates to reflect the increasing length of the file. The playback speed indicator shows a moving rotator, similar to the Receive indicator at the bottom status bar, as new data arrives from the target.<br><br>

Revision as of 13:22, 20 February 2020


HANtune has the option to write and read data received from target communication into a log file. The logged parameter values are written into a .csv file.

To start logging incoming signal values, enable it by going to CommunicationEnable Datalogging or click on the log file button at the bottom status bar: LogButton.png

When logging is active, the log file button will display the logfile name: LogButtonActive.png
Pressing this button again will stop logging.


The first part of the name of the log file can be changed by going to CommunicationModify Datalog Filename. The current date and time will automatically be appended to the filename each time a new logging is started.

The log file will (by default) be saved in the “log” subfolder in the HANtune folder. If desired, this folder can be changed by going to PreferencesUser Preferences. Type or browse your desired folder in the Log Location field.

Using a spreadsheet capable of reading .csv format, you can examine the contents of a log file.


Log File Contents

A log file consists of two parts: a log header and log data values. Both are in human readable format. The header contains additional information as:

  • The name of the project
  • The name of the ECU currently connected
  • The sample frequency of each DAQ list
  • The time and date of the log file
  • 2 lines containing a description of signals logged per column. First line contains the protocol name. Second line contains the name of each signal.

Next to the header, the actual log values are written into the file. Each line starts with a timestamp (in Seconds), followed by all the values of the signals received at that time. Each signal value is separated by a semicolon (;). A dot (.) or a comma (,) denotes a decimal separator (depending on your locale settings). A thousands separator is not used in HANtune logfiles.


Reading Log File

HANtune is capable of reading and showing signal values of a previously recorded logfile. The content of that logfile will be displayed on the signal elements on screen.

To start reading a logfile go to "File -> Read Logfile..." and select the desired logfile. After selecting a logfile, a dialog will appear on the HANtune screen:

ReadLogDialog.png
This dialog will enable you to navigate within the selected logfile. When moving around within the logfile, the signals on the HANtune screen will update with the values from the logfile at the location displayed at the timestamp.





  • LogDialogSlider.png
    The slider can be used to navigate within the logfile. It shows the relative location within the logfile. Dragging the slider will display signal values from the logfile at the given position. The position of the slider can also be moved by entering the desired time position of the logfile. Shortcut key: G

  • TotalsLabel.png Displays the total time span (in seconds) of the logfile since start of logging and the total number of csv lines in the file. When hovering above this label, the log header info will be displayed. See also Log File Contents above.

  • Buttonleft.png or ButtonRight.png Navigate 1 step (1 line) backward or forward in logfile. Shortcut key: Left or Right cursor

  • ButtonStart.png or ButtonEnd.png Go to Beginning or End of logfile. Shortcut key: B or E

  • ButtonFastBackward.png or ButtonFastForward.png Rewind or Fast-Forward logfile 5x, 10x or 20x (press repeatedly). Speed indicator will change accordingly. Shortcut key: R or W

  • ButtonPlay.png or ButtonPause.png Play or Pause real-time playback of logfile. Shortcut key: P

  • PlaybackSpeed.png Indicator for play back speed. Value 1x indicates real-time playback. Values 5x, 10x or 20x indicate fast-forward or rewind speeds (forward or backward).


Read-while-write Log File

HANtune can read a log file, while - at the same time - logging data into the file. Using this feature, you can read a logfile at any position in the file, while data is appended to the same file when incoming signals are received from the target.

To start Read-while-write go to FileEnable Read while write log. Make sure CommunicationEnable Datalogging is also activated or click on the log file button at the bottom status bar:LogButtonRWWStandby.png

When connected to the target the Read-while-write dialog will be displayed:

ReadWhileWriteDialog.png
Similar to the Read Log dialog, you can navigate within the selected logfile. Most components have the same functionality as the Read Log dialog. The differences will be explained below.





  • ButtonReadWhileWrite.pngLive play mode. Moves the slider to the end of the logfile, while this end moves further as new data is being received from the target. Current, up-to-date signal values are now displayed live on the screen. Shortcut key: E

  • TotalsLabelReadWhileWrite.pngTotal values increment continuously when new signal values are being received from the target.

  • SliderReadWhileWrite.png
    When in Live play mode, the position of the logfile is displayed in green and continuously updates to reflect the increasing length of the file. The playback speed indicator shows a moving rotator, similar to the Receive indicator at the bottom status bar, as new data arrives from the target.