FANUC PMC-MODEL SD7
EDIT DATE DESIG.
The Masked Compare (function compares the contents of two separate
bit strings. It provides the ability to mask selected bits.
Tip: Input string 1 might contain the states of outputs such as solenoids
or motor starters. Input string 2 might contain their input state
feedback, such as limit switches or contacts.
When the function receives power flow, it begins comparing the bits in
the first string with the corresponding bits in the second string.
Comparison continues until a miscompare is found or until the end of
the string is reached.
The BIT input stores the bit number where the next comparison should
start (a 0 indicates the first bit in the string). The BN output stores the
bit number where the last comparison occurred (where a 1 indicates the
first bit in the string). Using the same reference for BIT and BN causes
the compare to start at the next bit position after a miscompare; or, if
all bits compared successfully upon the next invocation of the function
block, the compare starts at the beginning.
Tip: If you want to start the next comparison at some other location in
the string, you can enter different references for BIT and BN. If the
value of BIT is a location that is beyond the end of the string, BIT is
reset to 0 before starting the next comparison.
The function passes power flow whenever it receives power. The other
outputs of the function depend on the state of the corresponding mask
If all corresponding bits in strings IN1 and IN2 match, the function sets
the miscompare output MC to 0 and BN to the highest bit number in
the input strings. The comparison then stops. On the next invocation of
a Masked Compare Word, it is reset to 0.
If a Miscompare is found, i.e., when the two bits currently being
compared are not the same, the function checks the correspondingly
numbered bit in string M (the mask). If the mask bit is a 1, the
comparison continues until it reaches another miscompare or the end of
the input strings.
If a miscompare is detected and the corresponding mask bit is a 0, the
function does the following: