To CSV
Saves data to a csv file.
blockType: ToCsv
Path in the library:
|
Description
The To CSV block writes the values of its input signal to a csv file. The block writes data to the output file gradually, with minimal memory consumption during simulation.
The file header contains the names of the recorded columns, the first column being time
, followed by the columns ‘Component name/signal name’, the number of which corresponds to the number of input ports.
If the output file exists when the simulation starts, it will be overwritten. The file is automatically closed when you pause the simulation or when the simulation ends. If the simulation ends abnormally, the To CSV block saves the data it recorded before the abnormal termination.
The To CSV block icon shows the name of the output file.
Ports
Input
#
1
—
input signal
scalar
| matrix
| matrix
| array
Details
Signal to save to file. Each count consists of a timestamp and the corresponding signal value. Data can be represented as an array.
Data types |
|
Complex numbers support |
Yes |
Parameters
Main
# Inputs amount — number of input ports
Details
Specify the number of input ports. Ports in the block are numbered sequentially, starting from one.
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
Yes |
# File name — path or file name
Details
Specify the path or name of the CSV file in which you want to save the data. If the file exists, it will be overwritten.
By clicking the folder icon, you can select the location where you want to save the file using the file manager.
You can specify either an absolute path to the file (starting with /user
) or a relative path. In this case, the relative path is determined from the current directory (pwd
).
You can also specify only the file name. In this case, Engee will first search for a file with that name using the relative path (i.e., in the current directory), and then in the search paths: Engee Path Editor.
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
No |