Chapter 4. Ladder Diagram (LD) Programming
GFK-2950C February 2018 79
Operands for Masked Compare Function
The number of DWORDs or WORDs in the two
compared strings.
DWORD: 1 Length 2,048
WORD: 1 Length 4,096
The first bit string to be compared
All. Constants are legal only when
Length is 1
The second bit string to be compared
All. Constants are legal only when
Length is 1
The bit string mask containing the ongoing
status of the compare
All except flow or variables in %S
memory. Constants are legal only
when Length is 1
BIT+1=the bit number where the next
comparison starts
All except variables in %S - %SC
memories
The output copy of the compare mask bit string
The number of the bit where the latest
miscompare occurred, or the highest bit
number in the inputs if no miscompare
occurred
All except constants and variables in
%S memory
Can be used to determine if a miscompare has
occurred.
When %I00001 is set, MASK_COMP_WORD compares the bits
represented by the reference VALUES against the bits represented
by the reference EXPECT. Comparison begins at BITNUM+1. If an
unmasked miscompare is detected, the comparison stops. The
corresponding bit is set in the mask RESULT. BITNUM is updated to
contain the bit number of the miscompared bit. In addition, the
output string NEWVALS is updated with the new value of RESULT,
and coil %Q00002 is turned on. Coil %Q00001 is turned on
whenever MASK_COMP_WORD receives power flow.