GE VersaMax PLC User Manual page 133

Table of Contents

Advertisement

Input/ Output
enable
I1
I2
M
BIT
MC
Q
BN
length
Instruction Set Reference
For public disclosure
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.
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.
10.1.10.1 Parameters of the Masked Compare Function
Choices
Permissive logic to enable the function.
flow
R, AI, AQ
For WORD only: I, Q, M,
Reference for the first bit string to be compared.
T, S, G
R, AI, AQ
Reference for the second bit string to be
For WORD only: I, Q, M,
compared.
T, S, G
R, AI, AQ
Reference for the bit string mask.
For WORD only: I, Q, M,
T, SS, SB, SC, G
Reference for the bit number where the next
I, Q, M, T, S, G, R, AI,
comparison should start.
AQ, constant
User logic to determine if a miscompare has
flow, none
occurred.
R, AI, AQ
For WORD only: I, Q, M,
Output copy of the mask (M) bit string.
T, SA, SB, SC, G
I, Q, M, T, S, G, R, AI,
Bit number where the last miscompare occurred.
AQ
The number of words in the bit string. Max. is
Constant
4095 for WORD and 2047 for DWORD.
10.1.10.2 Operation of the Masked Compare
If all corresponding bits in strings I1 and I2 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. 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:
Sets the corresponding mask bit in M to 1.
1.
2.
Sets the miscompare (MC) output to 1.
Description
GFK-1503E User Manual 133

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the VersaMax PLC and is the answer not in the manual?

Table of Contents

Save PDF