From Workspace
Loads data from the workspace as a signal.
blockType: FromWorkspace
Path in the library:
|
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 |
|
|
|
|
|
error |
|
error |
value type |
error |
error |
|
|
|
|
value type |
error |
|
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 |
|
Complex numbers support |
No |
Parameters
Main
# Data — data to be loaded from the workspace object
Details
A variable in the workspace in the form of a vector, matrix or WorkspaceArray
type (for details see Working with WorkspaceArray in Engee).
If the variable is specified as a vector, it is always a single column of data (the Time Values checkbox cannot be selected).
If the variable is specified as a matrix, the first column can be treated as both a time column and a data column, depending on whether the Time Values checkbox is selected.
See table for details.
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
No |
#
Sample time —
interval between calculation steps
SampleTime (real number / vector of two real numbers)
Details
Specify the interval between calculation steps as a non-negative number. To inherit a calculation step, set this parameter to -1
.
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
Yes |
#
Time Values —
time data interpretation
Logical
Details
Select the check box to enable interpretation of time data.
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
No |
#
Interpolate —
interpolate data
Logical
Details
Interpolation method used to calculate intermediate signal values (not present in the source data). If the box is checked, the From Workspace block uses linear interpolation of intermediate values, if unchecked - constant interpolation.
The value of the Interpolate parameters also affects how the From Workspace block extrapolates the output values for the simulation time to the first data point. When the checkbox is checked, the block uses the first two points to linearly extrapolate the output values. When unchecked, the output is 0
.
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
No |
#
Output After Final Value —
method of determining the block output after the data endpoint
Extrapolation
| Setting to zero
| Holding final value
| Cyclic repetition
Details
The block From Workspace uses the parameters Interpolate and Output After Final Value, to calculate the block output for the simulation time after the last point available in the loaded data.
Parameter value Output After Final Value | Parameter value Interpolate | Value of block output after last data value |
---|---|---|
|
|
Extrapolated from the last two data points |
|
Error |
|
|
|
Zero |
`off |
||
|
`on |
Last value |
`off |
||
|
|
Error |
|
This mode can only be used if the parameters Interpolate and Time Values are disabled and the discrete Sample time is set. In this case the data is cycled from the first value, otherwise an error occurs. |
Values |
|
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
No |