Skip to content

Relational Double ​

Compares double input a against a second double input b (or a constant threshold) and outputs an integer flag: 1 when the comparison holds, 0 otherwise. Operators: >, ≥, <, ≤, =, ≠. Equality is exact (bit-for-bit on doubles), so prefer ≥ / ≤ against a threshold when comparing computed values. The int output drives breaker commands, fault enables, logic gates and the Signal Switch directly. To compare int signals such as counter values or mode flags, use Relational Int.

Category: Digital Logic / Compare

Ports ​

PortKindSignalNotes
in_aControl inputReal
in_bControl inputRealShown 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
ThresholdNumber0—Constant right-hand side `b` used when Compare to = Constant.threshold

In the course ​