if
Selects an action output from a boolean expression over the inputs.
📝Syntax
Block type: if
📥Input Arguments
Parameter Description
input ports The signals u1..un referenced by the expressions.
📤Output Arguments
Parameter Description
output ports One output for the if clause, one per elseif, plus an optional else output.
📄Description

Selects an action output from a boolean expression over the inputs.

The if clause and each elseif clause are evaluated in order over the inputs u1..un; the first true clause drives its output to 1.0 and every other output to 0.0. With ShowElse set to on, an all-false result drives the last (else) output. The expression grammar is restricted: comparisons (< <= > >= == ~=), logic (& | ~), parentheses, unary minus, numeric literals and u<k> inputs. These outputs are meant to gate action subsystems.

Parameters

Parameter Default value
IfExpression u1 > 0
ElseIfExpressions (comma-separated, empty by default)
ShowElse on

Block Characteristics

Block type if
Family Logic blocks
Phases ALGEBRAIC

Extended Capabilities

Code generation: supported for C and Rust.

🔗See Also
switchCasemerge
🕔Version History
Version Description
1.0.0 initial version
Edit this page on GitHub