Write to a block state
Simulink / Signal Routing
The State Writer block sets the state of a supported state owner block. When creating a library block with a State Writer block also include the state owner block.
Add a State Writer block to your model from the Simulink® Library Browser.
State Writer blocks can write state to these state owner blocks:
Discrete Transfer Fcn
Discrete FIR Filter
Conditional subsystem blocks such as Enabled Subsystem, Triggered Subsystem, and Function-Call Subsystem.
S-Function with multiple discrete states.
To configure an S-Function block as a state owner block, exactly one data type work vector must be declared as discrete state vector using ssSetDWorkUsedAsDState and named using ssSetDWorkName or ssSetDWorkRTWIdentifier in mdlInitializeSizes.
In— State value
State value written to a state owner block.
When writing to a state owner block with an input scalar, the scalar value is expanded to match the dimension of the state. All elements of the state are set to the same value.
State owner block— Show the state owner block
Show the state owner block whose state this block is writing. To change the state owner block, select a block from the State Owner Selector Tree.
|Type: character vector|