Engee documentation

To CSV

Writing data to a csv file.

to csv

Description

The To CSV block writes its input values to a csv file. The block writes data to the output file incrementally, with minimal memory consumption during the simulation. If an output file exists when the simulation runs, it will be overwritten. The file is automatically closed when you pause the simulation or when the simulation terminates. If the simulation terminates abnormally, the To CSV block saves the data it has logged up to the point of abnormal termination.

The To CSV block icon shows the name of the output file.

Ports

Input

Port_1 - input signal
scalar | vector | matrix | array

A signal to be saved to a file. Each sample consists of a timestamp and the corresponding signal value. The data can be represented as an array.

Data types: Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Bool.

Parameters

Number of inputs - number and names of input ports
1 (By default)

The number of input ports of the block is equal to the number of characters in this string. The characters become the names of these ports.

File name - path or file name
untitled.csv (by default) | path or name of csv file

Specify the path or filename of the csv file in which to save the data. If the file exists, it will be overwritten.

Usage in program code

Block parameter

FileName

Value

path or name of csv file

*By default *

untitled.csv untitled.csv