Skip to main content

Unsigned Comparison (DWORD)

Instruction Parameters

Supported PLC Series

XPnA/1RXPnBXPnEXPnFCP3A/B/P/U
CP4A~D/U
CPnECPnFBPPLC-S

Supported Data Registers

MXYKLFTCSZRQD@DConstant
S1-
S2-

Supported Flags

FlagBitSupport
ErrorF11.0
ZeroF11.1-
CarryF11.2-

Number of Steps

Steps
3

Operands

OperandDescription
S1The 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.
S2The 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.

ComparisonOperatorFlagComparison Range
Less ThanS1 < S2F12.00 ~ 4,294,967,295
Less Than Equal ToS1 ≤ S2F12.10 ~ 4,294,967,295
EqualS1 = S2F12.20 ~ 4,294,967,295
Greater ThanS1 > S2F12.30 ~ 4,294,967,295
Greater Than Equal ToS1 ≥ S2F12.40 ~ 4,294,967,295
Not EqualS1 ≠ S2F12.50 ~ 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.

Examples