Library
rtlab/Monitoring
Block
This block allows user to output values from its own code to the Simulink model.
Mask
Description
This block allows the user to output values from its own code to the Simulink model. A public double array 'OpExternVar' is available by inserting this block inside the model. The size of the array is specified by setting the number of indexes in array parameter. Consequently, the block will adjust its number of outport to match the size of the array.
To use this variable, declare the extern variable in your code and assign values to OpExternVar[ ]: EX:
extern double * OpExternVar;
...
if(OpExternVar != NULL)
OpExternVar[idx] = (double) MyLocalVar; /* 0 < idx < nbOutput - 1. */
Parameters
Number of index in array | Specifies the number of double that the block should allocate for the OpExternVar variable. |
---|
Inputs
This block has no inputs.
Outputs
Each output corresponds to a value in the OpExternVar array. The number of outputs depends on the value of the number of indexed in array parameters.
For example, if the number of indexes specified is 3, the block should have 3 outputs, and each output corresponds to:
- output 1 is the value of OpExternVar[0]
- output 2 is the value of OpExternVar[1]
- output 3 is the value of OpExternVar[2]
Characteristics and Limitations
Direct Feedthrough | No |
---|---|
Discrete sample time | Yes |
XHP support | Yes |
Work offline | No |