FromCSVnoHeader

This block reads data from a CSV file where the header line may or may not be present.

    FromCSVnoHeader

Library

Activate/SignalImporters

Description

If the block is activated by external activation and a time stamp is also defined, the output is displayed at event activation times. The external activation may be turned off, if time instants are provided.

Parameters

FromCSVnoHeader_0

NameLabelDescriptionData TypeValid Values

fname

Filename

Defines the name (path and full name, in between quotes) of the input .csv file.

String

timeColumn

Time column number (-1 if no time is available)

If no time is available, the block should be activated by an external activation. If a time column is specified no external activation is required.

Scalar

nout

Number of requested variables

Number of variables in the .csv file that are to be read. One variable corresponds to one column.

Number

outports

Variable selection

Structure

outports/colnum

Column number

Cell of scalars

outports/vardatatype

Datatype

Cell of strings

'double'
'int32'
'int16'
'int8'
'uint32'
'uint16'
'uint8'
'boolean'

outevent

Generate events at time instants

If a time column is specified, then the values in that column are the times of the event activations.

Number

0
1

externalActivation

External activation

If no time is available, the block should be activated by an external activation. If a time column is specified no external activation is required.

Number

0
1

FromCSVnoHeader_1

NameLabelDescriptionData TypeValid Values

Method

Interpolation method

Defines how to interpolate the data that is read in from the .csv file.

String

'ZeroOrder'
'Linear'
'Not_a_knot'
'Natural'
'Clamped_To_Zero'
'Akima'
'Fritsch_Butland'
'Steffen'

Leftside

Behavior before the data time span

String

'Zero'
'Hold'
'Extrapolation'
'Repeat'
'Error'

Rightside

Behavior after the data time

String

'Zero'
'Hold'
'Extrapolation'
'Repeat'
'Error'

Offset

Data starts from line #

Line from which to start reading the .csv file. Default is 1.

Scalar

Separator

CSV or text file delimiter character

Enter a separator character in this field. If the field is left empty, Activate considers the first character following the variable time in the first line as the CSV separator.

String

Ports

NameTypeDescriptionIO TypeNumber

Port 1

explicit

output

nout

Port 2

activation

input

externalActivation

Port 3

activation

output

outevent