# ### Site Tools

한국어

cubloc:comparison_logic:index

# Comparison Logic

Compare 2 word(16 bit) or 2 double word(32 bit) values and turn on an output when the conditions are satisfied.

Comparison Command Data Types Explanation
=, s1, s2 Word(16 bit) Turns on when s1 and s2 are equal.
<>, s1, s2 Word(16 bit) Turns on when s1 and s2 are not equal.
>, s1, s2 Word(16 bit) Turns on when s1 > s2.
<, s1, s2 Word(16 bit) Turns on when s1 < s2.
>=, s1, s2 Word(16 bit) Turns on when s1 >= s2.
⇐, s1, s2 Word(16 bit) Turns on when s1 ⇐ s2.
D=, s1, s2 DWord(32 bit) Turns on when s1 and s2 are equal.
D<>, s1, s2 DWord(32 bit) Turns on when s1 and s2 are not equal.
D>, s1, s2 DWord(32 bit) Turns on when s1 > s2.
D<, s1, s2 DWord(32 bit) Turns on when s1 < s2.
D>=, s1, s2 DWord(32 bit) Turns on when s1 >= s2.
D<=, s1, s2 DWord(32 bit) Turns on when s1 <= s2. You can mix comparison logic as shown below: When either D0=T1 or D1<100 and if C0>=99, M0 will turn ON. In other words, either D0 has to equal to value of T1 or D1 has to be less than 100 while C0 must be greater than or equal to 99.

## Monitoring Comparisons

As of CUBLOC Studio v4.3, Ladder Logic comparisons are no longer displayed when monitoring. To view a comparison, send the result to a relay and monitor the relay. For example:

cubloc/comparison_logic/index.txt · Last modified: 2018/09/07 17:59 by COMFILE Technology

### Page Tools 