String Compare 2Ch
The String Compare 2Ch compares the values of the first input string with the values of the second string and counts the string matches. Therefore case sensitivity can be taken into account or not and the count mode can be changed.
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
- String Compare Mode: enumeration for different string compare modes.
Equals: input string equals the reference string.
BeginsWith: input string begins with the reference string.
Contains: input string contains the reference string. - Case Sensitivity: if the checkbox is checked the input is case-sensitive, otherwise it is not case-sensitive.
- 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.
Output values
- String Match: TRUE, if the value of the first input string matches the value of the second input string, otherwise FALSE.
- 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 String Compare 2Ch algorithm, the following HMI controls are available for generating an Analytics Dashboard:
1. The Comparison control visualizes the output values String Match and Count as well as the configuration option String Compare Mode.
2. The SingleValue control visualizes the output values Count and Last Event.
3. The BinaryState Control visualizes the output value String Match.
4. The Table Control or Multivalue Control visualizes all output values: String Match, Count, Last Event.
Alternatively, customer-specific HMI controls can be mapped in the String Compare 2Ch algorithm using the Mapping Wizard.