Difference between revisions of "HANcoder/STM32/Blocks/File Logger Init"

From OpenMBD
< HANcoder‎ | STM32‎ | Blocks
Jump to: navigation, search
Line 22: Line 22:
 
! Description
 
! Description
 
|-
 
|-
| File name
+
| Filename
| Instead of using a fixed error code and error parameter (see below), it is possible to use input port to the block to specify the error code and eror parameter.
+
| Here you can enter the file name of the log file.
 
|-
 
|-
|Error code
+
|Add auto-incrementing number to file name
|The error code (ID) that needs to be deleted when this block is triggered can be specified .
+
|When this box is ticked the program will add a three digit number behind the file name. Each time a new file is made the number will be incremented.
 
|-
 
|-
|Error parameter
+
|First line in log file
|The error parameter of the error that needs to be deleted when this block is triggered can be specified.
+
|The user can specify the first line in the log file. This way the file can be easily read.
 +
|-
 +
|Logging interval (ms)
 +
|The logging interval and so inherently the frequency is entered here. Note that the first column of the log file contains the actual time at which the signals were written to the logfile.
 +
|-
 +
|Maximum signals to log
 +
|The amount of signals in the model that need to be logged, this needs to be the same as the number of File Logger Signal blocks
 +
|-
 +
|Use dot-character as decimal separator (comma otherwise)
 +
|When this box is ticked the decimal separator will be a '.' instead of a ','.
 +
|-
 +
|Automatically start logging
 +
|When this box is ticked the logging will start as soon as the target is started. Otherwise the logging has to be started by using the trigger input.
 
|}
 
|}
  

Revision as of 07:54, 21 April 2017

Supported Targets: Olimexino, E407, P405

General information about File Logger Init

The 'File Logger Init' block instructs the code generator to enable support for the File Logger module. This module allows the logging of Simulink signals (at a fixed time interval) into a file that is written to the SD-card. All signals in the ASCII log-file are separated by a semicolon. This data format allows the log-files to be opened by any tool that can read CSV files, such as Microsoft Excel.

Block

FileLoggerInit.png

Mask

FileLoggerInitMask.png

Block inputs (inports)

Trigger input: When the value of this signal changes from 0 to 1 the file logger close block will be executed, a new file will be generated on the SD card and logging to this file will be started.

Block parameters

Parameter Description
Filename Here you can enter the file name of the log file.
Add auto-incrementing number to file name When this box is ticked the program will add a three digit number behind the file name. Each time a new file is made the number will be incremented.
First line in log file The user can specify the first line in the log file. This way the file can be easily read.
Logging interval (ms) The logging interval and so inherently the frequency is entered here. Note that the first column of the log file contains the actual time at which the signals were written to the logfile.
Maximum signals to log The amount of signals in the model that need to be logged, this needs to be the same as the number of File Logger Signal blocks
Use dot-character as decimal separator (comma otherwise) When this box is ticked the decimal separator will be a '.' instead of a ','.
Automatically start logging When this box is ticked the logging will start as soon as the target is started. Otherwise the logging has to be started by using the trigger input.

Examples

SD card logger

See Also

File logger close | File logger signal