Compare Mode

Compare Mode (Offset 2)

The Compare Mode is activated only when ‘Compare Output Enable’ flag (Offset16 – Bit#4) is selected.
You can select one of the 7 Compare Modes offered by PLC-S High Speed Counter. The Compare Mode consists of a combination of the >, =, < conditions and also provides the range comparison functions such as ‘include’ / ‘exclude.’ Compared reference value is configured at Offset9-12.
The result according to the configured reference value can be found at the sequence program by reading the ‘Compare Output Flag’ (Offset20 – Bit#2).
If you specify the output contact at the ‘Compare Output Contact (Offset 13),’ you can directly output the comparison result as an electric signal.

 

image-20240326-070908.png

 

Mode 0: Less than ( Current Value < Compare Minimum Value)
When the current value of the count is less than the compare output minimum value (Offset 11, 12), the output is turned ON. When the current value increases and becomes equal or greater than the compare minimum value (Offset 11, 12), the output is turned OFF.

 

image-20240326-070918.png

 

Mode 1: Less than or equal ( Current Value <= Compare Minimum Value)
When the current value of the count is less than or equal to the compare minimum value, the output is turned ON. On the other hand, when the count value increases and becomes greater than the compare minimum value, the output is turned OFF.

 

 

Mode 2: Equal ( Current Value = Compare Minimum Value)
When the current value of the count is equal to the compare minimum value, the output is turned ON. When the count value changes and becomes no longer equal, the output is turned OFF.

 

 

Mode 3: Greater than or equal ( Current Value >= Compare Minimum Value)
When the current count value is greater than or equal to the compare minimum value, the output is turned ON. When the current value is less than the compare value minimum, the output is turned OFF.

 

 

Mode 4: Greater than ( Current Value > Compare Minimum Value)
When the current count value is greater than the compare minimum value, the output is turned ON. When the current value is less than or equal to the compare minimum value, the output is turned OFF.

 

 

Mode 5: Include (Compare Min. Value <= Current Value <= Compare Max. Value)
When the current value of the count is included between the minimum and maximum of the compare values, then the output is turned ON. If not included, the output is turned OFF. It is not necessary to specify the compare value maximum to a value greater than the minimum compare value. Given two values, PLC-S internally takes the larger of the two values as maximum and the lesser as minimum.

 

 

Mode 6: Exclude (Compare Min. > Current Value, Current Value > Compare Max.)
When the current value of the count is excluded between the minimum and maximum of the compare values, the output is turned ON. If included, then the output is turned OFF. It is not necessary to specify the compare value maximum to a value greater than the minimum compare value. Given two values, PLC-S internally takes the larger of the two values as maximum and the lesser as minimum.