Logic Operation Counter

The Logic Operation Counter executes a logical operation on the values of two or more channels and provides the result of this logical operation. Therefore, each input value can be combined with a threshold and an operator. Furthermore, the logic operator and the count mode can be configured individually.
Optionally, a Boolean signal can be selected for the Enable Execution input so that the algorithm is only active if the value of the selected signal is TRUE.
Configuration options
- Num Channels: adds or removes an input channel.
- Threshold 00: threshold for the signal of the first channel.
- Threshold 01 ..n: threshold for the signal of the second to nth channel.
- Logic Operator: logical operator for the operation:
Logical OR
Logical XOR (EXCLUSIVE OR)
Logical AND
Logical NAND (NOT AND)
Logical NOR (NOT OR)
- Count Mode: mode of the result counter.
OnChange: the counter counts every time the result changes to TRUE.
Cyclic: the counter increments every cycle when the condition is TRUE. - Use Absolute Values: if the checkbox is checked, the absolute values of the input signal are used.
- Tolerance (optional): tolerance value for the Equal / NotEqual comparisons.
Output values
- Operation Out: Result of the logical operation.
- Count: Incremented when the output value is TRUE. The behavior depends on the parameter Count Mode.
- Last Event: Indicates the time of the last triggered event → the event can be dragged and dropped into the Scope chart to display it as a trigger-event
Standard HMI Controls
For the Logic Operation Counter algorithm, the following HMI controls are available for generating an Analytics Dashboard:
1. The Comparison control visualizes the output values Operation Out and Count as well as the configuration option Logic Operator.

2. The SingleValue control visualizes the output values Count and Last Event.

3. The BinaryState control visualizes the output value Operation Out.

4. The Table Control or Multivalue Control visualizes all output values: Operation Out, Count, Last Event.



Alternatively, customer-specific HMI controls can be mapped in the Logic Operation Counter algorithm using the Mapping Wizard.