Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


This kb article will explain how to edit spec limits for sample definitions




There are three proposed methods to accomplish this, a: 

  1. Graphical User Interface approach
  2. Simple Scripting based approach at run-time
  3. System Level Scripting approach based on configuration

Applies To and Version Info

This feature applies to SPC module and is available in all versions.


There are a couple of methods to edit the spec limits that include:


The GUI Approach:

To set a hard-coded spec limit through the user interface:

1) Right click on the control limits value on the right side of a control chart. You can also set the Edit Control Limit Image property on any of the control chart components and it will display an icon that the user can click on to display the control limit panel.



See screenshots below.

Image Modified



After you type in the value, select the "Set" button to manifest the new value, then close the pop-up interface.  Done!

The Simple Scripting Approach:

You can set a control limit simply by calling the following script:



and passing in the spec limit as the control limit value.  

The System Level Scripting Approach:

The simple scripting approach is fine for some use cases, but a more robust and manageable solution may be necessary.  Further, you may not want to over-ride the calculated control limits (e.g. Individual UCL, etc.), but supplement it with a separate specification limit.  This last approach addresses these concerns.

For the system level approach, we will add new control limits at the Enterprise level of the production model hierarchy as seen here:

Image Added

 In this example, we called them "Spec Limit Lower" and "Spec Limit Upper".  You can add/edit control limits with admin privileges and a right click. 

After adding the new spec limits, they must be configured.  The initial configuration is shown below, followed by a sample script:

Image Added

Image Added

Obviously a hard-coded value is an over-simplification.  Apply logical conditions based on the product code and location, reference external DB tables, or Ignition tags as appropriate.

Code Block
titleSpec Limit Script
limitName = event.getControlLimitName()
data = event.getData()
sampleUUID = data.getValueAt(0, 'SampleUUID')
sample =
productCode = sample.getProductCode()
locationPath = sample.getLocationPath()
##Do some logic with the limitName, productCode, locationPath to determine the spec limits.

After the new spec limits have been added to the Control Limits on the system, they can be selected for use with appropriate Sample Definitions, and then displayed on Control Charts:

Image Added

Image Added