Engee documentation

Signal From Workspace

Loads data from the workspace as a signal.

signal from workspace

Description

The Signal From Workspace block reads data into the model from the workspace and represents it as a signal. The Signal parameter specifies the name of the workspace variable containing the imported signal, or any expression defining a matrix or 3D array.

Ports

Output

# OUT_1 — workspace data
scalar | vector | matrix

Details

Data loaded from the workspace as a signal. Depending on the loaded data, the output signal can be a scalar, vector, matrix or three-dimensional array.

  • If the Signal parameter specifies a matrix to ( ), each of the columns is treated as a separate channel. The frame size is specified by the Samples per frame parameter, . The output is a matrix by , containing consecutive samples from each channel of the signal. The sampling period of the output is set by the parameter Sample time, , and the output frame period is set by . For convenience, the imported line vector is treated as a single channel, so the dimensionality of the output frame is by .

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

Data types

Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Bool

Complex numbers support

Yes

Parameters

Main group

# Signal — imported signal

Details

The imported signal from the workspace variable, or the actual expression that defines the signal.

Default value

collect(1:10)

Program usage name

Signal

Tunable

No

Evaluatable

Yes

# Sample time — sampling period

Details

The sampling period of the output frame, , specified as a positive number. The sampling period of the output frame is .

Default value

1

Program usage name

SampleTime

Tunable

No

Evaluatable

Yes

# Samples per frame — samples per output frame

Details

Samples per frame, as a positive integer indicating the number of samples per frame in one output data channel.

Default value

1

Program usage name

SamplesPerFrame

Tunable

No

Evaluatable

Yes

# Form output after final data value by — output values
Setting to zero | Holding final value | Cyclic repetition

Details

Specifies the output signal after all specified signal samples have been generated.

  • If Setting To Zero is specified for this parameter, the block generates output signals with zero value for the entire simulation time after generating the last signal frame.

  • If Holding Final Value is specified for this parameter, the block repeats the last frame throughout the simulation time after the last signal frame is generated.

  • If Cyclic Repetition is specified for this parameter, the block repeats the signal from the beginning after the last frame of the signal is reached. If the frame size specified in the Samples per frame parameter does not evenly divide the length of the input signal to the Signal From Workspace subsystem, an error will be output.

The block does not extrapolate the imported signal beyond the last sample.

Values

Setting to zero | Holding final value | Cyclic repetition

Default value

Setting to zero

Program usage name

FormOutput

Tunable

No

Evaluatable

Yes

Additional options

C code generation: Yes