Counters store per ToolGroupItem the number of execution results and additional information in a SQLite database. Only executions started by a external trigger are counted.

Counters have a descriptive name and one counter value per counter group. A counter group defines a set of counter variables by means of a group name. The counter groups can be used to perform a count depending on preconditions. An example of use would be a test of adhesive beads produced by several feeders. By recording the results of each dispenser in a separate counter group, it is possible to analyze whether errors are frequently caused by individual dispensers. The following figure shows the counter results of a tool group that records the five counters Sum, Pass, Warn, Fail, and Error in the three counter groups Total, Dispenser1, and Dispenser2:


In which countergroups the respective counter values should be incremented during a TolgroupItem execution is controlled with a CounterDataBlock within the toolgroup. The creation of a new counter group is done automatically on first access. The predefined counter group Total captures results of all triggered executions.

The counters themselves are specified by Viper.NET and derived from the ToolgroupItem settings. The following counters are created:

  • Sum: Counted trigger signals in the counter group.

  • Pass: Number of evaluations with the result IO.

  • Warning: Number of evaluations with the result Warning.

  • Fail: Number of evaluations with the result NIO.

  • Error: Number of evaluations with the result Error.

  • Criteria-Bits: Each criteria-bit automatically defines a counter of the same name.

A Counter reading subdisplay can be configured as a user display of current counter readings. A display of all current counters is accessible via the Main menu:

  1. Toolgroup: Selection of the ToolGroupItem whose counter values will be displayed. The display name contains the type: <type>.<ToolGroupItem>.

  2. Name: The column lists the names of the counters.

  3. Total: Total Counter column: Number of events counted across all hardware-triggered executions.

  4. Counter Groups: Each counter group is displayed in its own column.

  5. Reset: resets the counters of the selected ToolGroupItem to “0”.


The display will only show counter groups that have either already been used by a toolgroup execution or have been entered in the Plugin-configuration (initialCounterGroups)

Usually only the single counter values are stored in the counter database. If the option countersStoreSingleIncrements is set in the Configuration, the individual increment events are also stored. With the CounterDataBlock a string PartInfo can also be stored.


Counter configuration adjustments are made in the Vision plugin configuration of the Viper.NET project file.

CounterData block

As CounterDataBlock is a CogToolGroup that extends the behavior of toolgroups within Viper.NET per naming-convention.

If a toolgroup contains a CogToolGroup with the name CounterDataBlock, additional information for counter is provided.


The ToolGroup contains a ToolBlock CounterGroups. The values of the input terminals are used to specify in which CounterGroups the results are to be counted (in addition to the default Total group): The string values of the terminals each determine the name of a CounterGroup. If no group with the given name exists yet, a new one will be created automatically. If no group is to be counted, the terminal values are to be set to ‘zero’. A count in the standard group Total always takes place.

In the PartInfo input terminal, information about the part can be passed as a string to be stored in the counter database. However, saving only occurs if countersStoreSingleIncrements is active in the configuration. Counter readings can be displayed in a Counter reading subdisplay.