Engee documentation

To CSV

Writes data to a csv file.

blockType: ToCsv

Path in the library:

/Basic/Sinks/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 retains 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

# 1 — input signal
scalar | vector | matrix | array

Details

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.

Complex numbers support

No

Parameters

Main

# Количество входных портов — number and names of input ports

Details

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

Default value

1

Program usage name

inputPortsNumber

Tunable

No

Evaluatable

Yes

# File name — path or file name

Details

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

It is allowed to specify both absolute path to the file (starts with /user) and relative path. The relative path is defined from the current directory (pwd).

It is also possible to specify only the file name. In this case Engee will search for a file with this name first in the relative path (i.e. in the current directory) and then in the search paths: Engee path editor.

Default value

untitled.csv

Program usage name

FileName

Tunable

No

Evaluatable

No