String to Enum
R2026bInput string signal to enumerated signal
Libraries:
Simulink /
String
Description
The String To Enum block converts the input string signal to an enumerated signal. To use this block, create an enumeration class in the current folder and use that class name in the Output data type parameter.
The String to Enum block generates efficient code for enumerations by generating a shared function for each enumeration type. For more information on enumerations, see Simulink Enumerations.
Ports
Input
Output
Parameters
Block Characteristics
Data Types |
|
Direct Feedthrough |
|
Multidimensional Signals |
|
Variable-Size Signals |
|
Zero-Crossing Detection |
|
Programmatic Use: Add Block
To add the block programmatically, use the add_block function with one of these library block paths as the source.
"simulink/String/String to Enum"
Example: add_block("simulink/String/String to Enum","myModel/myBlock",MakeNameUnique="on")