Skip to content

Relational Int ​

Compares int input a against a second int input b (or a constant int threshold) and outputs an integer flag: 1 when the comparison holds, 0 otherwise. Operators: >, ≥, <, ≤, =, ≠. On integers, = and ≠ are safe to use, which makes it the block for testing a counter value, a mode number or a flag. The int output drives breaker commands, fault enables, logic gates and the Signal Switch directly. To compare double signals, use Relational Double.

Category: Digital Logic / Compare

Ports ​

PortKindSignalNotes
in_aControl inputInteger
in_bControl inputIntegerShown when Compare to is Second input
outControl outputInteger

Parameters ​

ParameterTypeDefaultUnitsDescriptionID
OperatorChoice: > / ≥ / < / ≤ / = / ≠>—Comparison applied between a (left) and b (right), e.g. a > b. The output is 1 when it holds and 0 otherwise.op
Compare toChoice: Second input / ConstantSecond input—Second input = compare against the `b` port. Constant = compare against the Threshold parameter (the `b` port is removed).compare_to
ThresholdInteger0—Constant int right-hand side `b` used when Compare to = Constant.threshold

In the course ​