Unsigned Comparison (DWORD)
Instruction Parameters
Supported PLC Series
| XPnA/1R | XPnB | XPnE | XPnF | CP3A/B/P/U CP4A~D/U | CPnE | CPnF | BP | PLC-S |
|---|---|---|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Supported Data Registers
| M | X | Y | K | L | F | T | C | S | Z | R | Q | D | @D | Constant | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| S1 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | - | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| S2 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | - | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Supported Flags
| Flag | Bit | Support |
|---|---|---|
| Error | F11.0 | ✓ |
| Zero | F11.1 | - |
| Carry | F11.2 | - |
Number of Steps
| Steps |
|---|
| 3 |
Operands
| Operand | Description |
|---|---|
| S1 | The first operand. Entries are unsigned DWORD data registers or constants. The unsigned value range is 0 ~ 4,294,967,295 (232-1). The Hexadecimal value range is H00000000 ~ HFFFFFFFF. Only unsigned or Hexadecimal values will be compared. |
| S2 | The second operand. Entries are unsigned DWORD data registers or constants. The unsigned value range is 0 ~ 4,294,967,295 (232-1). The Hexadecimal value range is H00000000 ~ HFFFFFFFF. Only unsigned or Hexadecimal values will be compared. |
Notice
Error Flag (F11.0) Notice
The error flag, F11.0, will be ON for one scan when the address of the data register assigned by @D exceeds the range of the data register, D. The range of the data register, D, is dependent on the CPU type.
| Comparison | Operator | Flag | Comparison Range |
|---|---|---|---|
| Less Than | S1 < S2 | F12.0 | 0 ~ 4,294,967,295 |
| Less Than Equal To | S1 ≤ S2 | F12.1 | 0 ~ 4,294,967,295 |
| Equal | S1 = S2 | F12.2 | 0 ~ 4,294,967,295 |
| Greater Than | S1 > S2 | F12.3 | 0 ~ 4,294,967,295 |
| Greater Than Equal To | S1 ≥ S2 | F12.4 | 0 ~ 4,294,967,295 |
| Not Equal | S1 ≠ S2 | F12.5 | 0 ~ 4,294,967,295 |
Comparison Flags
The UDCMP instruction must be accompanied by a BOOL-type flag (F12.0 ~ F12.5).
Please refer to each example on how to use the different flags.