| | The oCompare Object takes the Value of the Object to which the input property links and performs 2 comparisons on it. These comparisons result in one of 3 properties (Above, Between and Below) to be set while the remaining two are cleared to 0. The normal operation of the oCompare Object is to make these comparisons once every Object list loop. If the property option "C" is used, then the operation is modified so that this function only occurs once each time the Flag-property to which the ClockIn property points transitions in the manner specified by the InvertC property. In normal operation, the input value is first compared to the value of the Object linked to by the ReferenceIn1 property plus the value of the fuzziness property. If the input value is greater than the ReferenceIn1 value plus the fuzziness value, then the Above property is set to 1. If the input value is equal to or less than the ReferenceIn1 plus fuzziness value, then a second comparison is made where the input property is compared against the ReferenceIn1 value minus the fuzziness value. If the input value is less than the ReferenceIn1 value minus the fuzziness value, then the Below property is set to 1; otherwise, the Between property is set to 1. Property options are also available that change the number of references with which the compare is made . When the property option "0" (zero) is specified, no reference pointers are used and the comparison is made against a value of 0. When the property of "2" is used, the comparison is made against two references. If the "0" (for zero references) property option is specified, then the oCompare Object operates as it does normally, except that the ReferenceIn1 value is replaced with 0. If the "2" (for two references) property option is specified, then the oCompare Object operates as it does normally except that in the second comparison, the ReferenceIn1 property is replaced with a ReferenceIn2 property. |
| | The following table lists the Properties of the oCompare Object:| Property | Description | | Above | A value that indicates if the value property of the Object to which the Input property links is greater than the value of the Object to which the ReferenceIn1 property links plus the value specified by the Fuzziness property. Data-Type: Bit, Flag Data-Range: 0 - 1 | | Address | Returns a pointer to the address of the oCompare Object instance. Data-Type: Address, Read-Only Data-Range: 0 - 127 | | Below | A value that indicates if the value property of the Object to which the Input property links is lower than the values of the Objects pointed to by the References minus the value specified by the Fuzziness property. Data-Type: Bit, Flag Data-Range: 0 - 1 | | Between | A value that indicates if the value property of the Object to which Input points is lower than the value of the Object pointed to by Reference 1 minus the value specified by the Fuzziness property and is higher than the value of the Object pointed to by Reference2 plus the value specified by the Fuzziness property. In the case of oCompare0 and oCompare0C the between property indicates that the value property of the Object pointed to by Input is with the values of -Fuzziness and +Fuzziness. Data-Type: Bit, Flag Data-Range: 0 - 1 | | ClockIn | A pointer to an Object's flag property that will be used to determine when the oCompare Object performs its function. Data-Type: Flag-Pointer Data-Range: 0 - 127 Availability: oCompareC oCompare0C oCompare2C | | Fuzziness | A value that specifies a dead area around the references in which the input value must pass before the Above or Below properties are set. Data-Type: Byte Data-Range: 0 - 127 | | Input | A pointer to an Object whose value property is compared to the value properties of the Objects pointed to by ReferenceIn1 and ReferenceIn2. Data-Type: Object-Pointer Data-Range: 0 - 127 | | InvertC | A value that specifies the active transition state of the flag property linked to by ClockIn. Data-Type: Bit, Flag Data-Range: 0 - 1 Availability: oCompareC oCompare0C oCompare2C | Value | Constant | Copy is performed when then flag-property pointed to by ClockIn transitions |
|---|
| 0 | | From 0 to 1 |
|---|
| 1 | | From 1 to 0 |
|---|
| | Operate | A value that specifies whether or not the values are compared. Data-Type: Bit, Flag,
Default Data-Range: 0 - 1 | | ReferenceIn1 | A pointer to an Object whose value property is compared to the value property of the Object pointed to by Input. Data-Type: Object-Pointer Data-Range: 0 - 127 Availability: oCompare oCompareC oCompare2 oCompare2C | | ReferenceIn2 | A pointer to an Object whose value property is compared to the value property of the Object pointed to by Input. Data-Type: Object-Pointer Data-Range: 0 - 127 Availability: oCompare2 oCompare2C |
|