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 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 |
|
| Program usage name |
|
| 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 |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
Yes |
#
Time Values —
interpretation of time data
Logical
Details
Select the checkbox to enable interpretation of time data.
| Default value |
|
| Program usage name |
|
| 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 |
|
| Program usage name |
|
| 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 |
|---|---|---|
|
|
Extrapolated based on the last two data points |
|
Mistake |
|
|
|
Zero |
|
||
|
|
The last value |
|
||
|
|
Mistake |
|
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 |
|
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
No |