Edge Counter On Off 2Ch
The Edge Counter On Off 2Ch counts the amount of raised on- and off-events. An on-event is raised when the signal of the first input channel passes the configured edge at a specific on-threshold and an off-event is raised when the off-threshold is passed by the signal of the second channel.
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
- Type of the edge: Specifies whether the edge counter should respond to a rising or falling edge.
- Threshold On: Threshold of the signal at the respective edge. The On event is triggered when the signal passes this threshold.
- Reset On Multiple On: If the checkbox is checked, the "Count On" counter increments with every On event. Otherwise, the On events are only counted after a counter reset (Off event).
- Threshold Off: Threshold of the signal at the respective edge. The Off event is triggered when the signal passes this threshold.
- Tolerance (optional): Tolerance value for the Equal / NotEqual comparisons.
Output values
- Is On: Indicates TRUE within the timespan between the On event and the Off result, otherwise FALSE.
- Edge On: Indicates TRUE on a rising edge.
- Edge Off: Indicates TRUE on a falling edge.
- Count On: Counts the number of triggered On events.
- Count Off: Counts the number of triggered Off events.
- 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 Edge Counter On Off 2Ch algorithm, the following HMI controls are available for generating an Analytics Dashboard:
1. The EdgeCounterOnOff control visualizes the output values Is On, Count On, Count Off and Last Event.
2. The SingleValue control visualizes the output values Count On and Last Event.
3. The BinaryState control visualizes the output value Is On.
4. The Table Control or Multivalue Control visualizes all output values: Flanks (Is On, Edge On, Edge Off), Count On, Count Off, Last Event.
Alternatively, custom HMI controls can be mapped in the Edge Counter On Off 2Ch algorithm using the Mapping Wizard.