Use the Counts/Duration KPI control
- Last UpdatedNov 26, 2024
- 2 minute read
When configuring Counts/Duration KPI control, the designer will typically set a default CountsAndDurationControlStyle (counts or duration or both), the CountsAndDurationGraphType (UtilStates, ReasonGroups, or Reasons), and filter defaults (TypeFilter, FilterDuration, CDKPIFilter.FilterTime, CDKPIFilter.FilterStartOffset, CDKPIFilter.FilterEndOffset). The user can also set the maximum number of bars to be seen in the graph (NumberOfBars), the duration refresh rate (DurationRefreshRate), filtering based on utilization state (OEEStatusFilter), and reason group colors (ReasonGroupColors). It is also possible to specify that various property values will be configured by the operator at run time and saved to or retrieved from the MES database on a per-user basis. If this is the case, configuring these properties will be disabled at design time. See the FilterDefaultsFromDB property for more on this.
At design time or run time, when configuring filters, a Filter dialog exists to help coordinate the setting of several properties at once. This Filter dialog can be invoked at design time by selecting the browse button next to the TypeFilter property. At run time, it is invoked by calling the Filter() method or using the button bar.

At run time, the control is refreshed whenever a UtilizationStateChanged event is detected from the MES database if utilization states are being displayed, or when an UtilizationReasonChanged event is detected from the MES database if reason groups or reasons are being displayed. This event is handled internally by the control. The control is also refreshed when the CountsAndDurationControlStyle or CountsAndDurationGraphType property is set. Setting the other properties will not cause an automatic refresh, so you will need to call the RefreshData() method (for more information on this method, see RefreshData() method). If durations are being displayed, the control can also be refreshed based on a timer that is set to the value of the DurationRefreshRate property. The IgnoreRefreshEvents property can be set to True to avoid unwanted refreshes from occurring while you are setting properties.
The Counts/Duration KPI control has a context menu that allows a user with the proper permissions to save the configuration of the control to the database for either a specific entity, all the logged on entities, or as a default. Only the button bar setup and the current filter settings will be saved as configuration data.