5.2.4 [309] Position comparator (long)
Type Function Type Function
I1 L Comparative val-
ue 1
O1 b Output I1 > I2
I2 L Comparative val-
ue 2
O2 b O1 inverted
I3 b Master-Set P1 % positive hysteresis (low word)
I4 b Master Reset P2 % negative hysteresis (low word)
Description:
This function compares inputs I1 and I2. This function is intended for long variables (positions,
ramps of table positioning).
O1 is TRUE if I1 > I2.
O1 is FALSE if I1 < I2.
If a hysteresis (P1 and P2) is set up:
O1 is TRUE if I1 > (I2 + P1).
O1 is FALSE if I1 < (I2 - P2).
O1 remains unchanged if I1 is in the range of the hysteresis: (I2 - P2) < I1 < (I2 + P1).
The comparator has three working ranges:
Range 1
(I2 + P1) < I1 O1 = TRUE
Range 2 (I2 - P2) < I1 < (I2 + P1) O1 remains unchanged.
Range 3 I1 < (I2 - P2) O1 = FALSE
O2 = 1O
The output value can be changed by means of the two Boolean inputs:
− Master Set sets output O1 to TRUE.
− Master Reset sets output O1 to FALSE. Master Reset has priority over Master Set.