Engee documentation

From Workspace

Loads data from the workspace as a signal.

blockType: FromWorkspace

Path in the library:

/Basic/Sources/From Workspace

Description

The From Workspace block reads data into the model from the workspace and represents it as a signal. Block From Workspace can be located at any level of model nesting and can be used to transfer data to any model or subsystem from the workspace.

Features of data loading

Block From Workspace is designed to read data from variables in the form of vector, matrix or WorkspaceArray type (special type, which is obtained either as a result of data unloading using block To Workspace, or can be created manually, see details). Working with WorkspaceArray in Engee).

The name of the variable to be read is set in the parameters Data.

Depending on the loaded data, the output signal can be scalar, vector or matrix.

Parameters value Data

Value of parameter Time Values

`vector

`matrix

matrix N by 1

WorkspaceArray type :pair

WorkspaceArray type :time

WorkspaceArray type :value

enabled

error

vector

error

value type WorkspaceArray

error

error

disabled

scalar

vector

vector

value type WorkspaceArray

error

WorkspaceArray value type

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 scalar, vector or matrix.

Data types

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

Complex numbers support

No

Parameters

Main

# Data — data to download from the workspace object

Details

A variable in the workspace in the form of a vector, matrix, or type WorkspaceArray (for more information, see Working with WorkspaceArray in Engee).

If the variable is set as a vector, then it is always a single column of data (checkbox Time Values cannot be installed).

If the variable is set as a matrix, then the first column can be considered both as a time column and as a data column, depending on whether the checkbox is selected. Time Values.

For more information, see table.

Default value

workspace_in

Program usage name

VariableName

Tunable

No

Evaluatable

No

# Sample time — the interval between the calculation steps
SampleTime (real number / vector of two real numbers)

Details

Specify the interval between the calculation steps as a non-negative number. To inherit the calculation step, set this parameter to −1.

Default value

0

Program usage name

SampleTime

Tunable

No

Evaluatable

Yes

# Time Values — interpretation of time data
Logical

Details

Select the checkbox to enable interpretation of time data.

Default value

true (switched on)

Program usage name

TimeValues

Tunable

No

Evaluatable

No

# Interpolate — interpolate data
Logical

Details

An interpolation method used to calculate intermediate values of a signal (missing from the source data). If the box is checked, then the block From Workspace uses linear interpolation of intermediate values, if removed— constant interpolation.

The value of the Interpolate parameter also affects how the block From Workspace extrapolates the output values for the simulation time to the first data point. When the checkbox is selected, the block uses the first two points to extrapolate the output values linearly. When the flag is unchecked, the output signal is 0.

Default value

true (switched on)

Program usage name

Interpolate

Tunable

No

Evaluatable

No

# Output After Final Value — method for determining the block output after the data endpoint
Extrapolation | Setting to zero | Holding final value | Cyclic repetition

Details

Block From Workspace uses parameters Interpolate and Output After Final Value to calculate the block output for the simulation time after the last point available in the uploaded data.

Parameter value Output After Final Value Parameter value Interpolate The value of the block output after the last data value

Extrapolation

enabled

Extrapolated based on the last two data points

turned off

Mistake

Setting to zero

enabled

Zero

turned off

Holding final value

enabled

The last value

turned off

Cyclic repetition

enabled

Mistake

turned off

This mode can only be used if the parameters Interpolate and Time Values turned off, and a discrete mode is set. Sample time. In this case, the data is cyclically repeated from the first value, otherwise an error occurs.

Values

Extrapolation | Setting to zero | Holding final value | Cyclic repetition

Default value

Extrapolation

Program usage name

OutputAfterFinalValue

Tunable

No

Evaluatable

No