From Workspace
Loading data from the workspace as a signal.
blockType: FromWorkspace
Path in the library:
|
Description
Block From Workspace reads data into the model from the workspace and presents it as a signal. Block From Workspace It can be located at any nesting level of the model and can be used to transfer data to any model or subsystem from the workspace.
Features of data loading
Block From Workspace It is designed to read data from variables in the form of a vector, matrix, or type WorkspaceArray (a special type that is either obtained as a result of uploading data using a block To Workspace, or it can be created manually, for more information, see Working with WorkspaceArray in Engee).
The name of the variable to be read is set in the parameter Data.
Depending on the loaded data, the output signal can be scalar, vector, or matrix. If the output signal is an array containing a single element, and the checkbox is selected Interpret 1-D arrays as scalars, then the output of the block will be a scalar.
| Parameter Value Data | ||||||
|---|---|---|---|---|---|---|
Parameter value Time Values |
|
|
|
|
|
|
|
mistake |
|
mistake |
value type |
mistake |
mistake |
|
|
|
|
value type |
mistake |
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 |
|
| 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, it is always a single column of data (check box 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
Check the box 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 |
#
Interpret 1-D arrays as scalars —
convert a single-element array to a scalar
Logical
Details
If the box is selected, the block converts the output array containing one element into a scalar.
If the checkbox is unchecked, the output does not change.
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
No |