Import from CSV
#
DescriptionIn SAFE you can import csv
files to make it convenient to process tables from e.g. Excel.
The format of the .csv
file is as follows for an MxN
data size. The header consists of the sample rate fs
the xlabel
, the ylabel
and the tag and unit for each channel. It is important that the tags for x
and
y
match, and the units for x
and y
match respectively. After the header the data is inserted. All the x
data first, followed
by the y
data.
fs=int | ... | ... | |||
xlabel=str | ... | ... | |||
ylabel=str | ... | ... | |||
tag_0 [x_unit ] | ... | tag_N [x_unit ] | tag_0 [y_unit ] | ... | tag_N [y_unit ] |
x_data_0_0 | ... | x_data_0_N | y_data_0_0 | ... | y_data_0_N |
... | ... | ... | ... | ... | ... |
x_data_M_0 | ... | x_data_M_N | y_data_M_0 | ... | `y_data_M_N |
#
OutputThe output is MxN
and is the data from the .csv
file, with the specified sample rate and x- and y-label
#
AttributesAttribute | Value |
---|---|
Name | ImportCsv |
Settings | |
Path | ' ' |
Separator | , |
Outputs | 1 |
#
NameName specifies the name of the block.
#
PathPath specifies the path to the .csv
file and will open a file explorer.
#
SeparatorSeparator specifies the separator type used in the .csv
file. The separator can either be ,
or ;
.
#
OutputsOutputs specifies the number of output(s) the block will have. Each output will output the same csv import.
#
ExamplesA single channel import.
Multicolumn data import.