---
title: "SPC:Perspective:Tag:Configure Custom Spec Limits"
id: "spc-perspective-tag-configure-custom-spec-limits"
project: "Tutorials"
url: "https://docs.sepasoft.com/articles/mes-module-tutorials/spc-perspective-tag-configure-custom-spec-limits"
updated: 2026-07-23T18:14:02Z
---

# SPC:Perspective:Tag:Configure Custom Spec Limits

### Configure Spec Limits
Collecting sample history for Tags can also include collecting Tag data in relation to pre-configured or custom Control Limits and/or Signals configured at the Enterprise level of the Production Model (using the [MES Equipment Manager](/articles/user-manual/MES-Equipment-Manager) component).

* * *

### Create Custom Control Limits

For this tutorial, create two custom Control Limit Scripts in the MES Scripts section of the Project Browser:

![](/resources/Storage/mes-module-tutorials/spc-perspective-tag-configure-custom-spec-limits/spc-perspective-tag-configure-custom-spec-limits-2025-08-14.png)

* Under **MES Scripts** --&gt; **SPC Calculations** right click **Control Limit** and Add Folder.
    * Rename folder to Custom Spec Limits
* Right click Custom Spec Limits folder and Add Script.
    * 
    * Rename script to Upper Spec Limit
    * 
    * Add the following script to the script block:

* 
```python
logger = system.util.getLogger('Spec Limit Logger')
logger.warn('Setting Upper Spec Limit')
event.setControlLimitValue(8.0)
```


    * Rename script to Upper Spec Limit
    * Add the following script to the script block:
* Right click Custom Spec Limits folder and Add Script.
    * 
    * Rename script to Lower Spec Limit.
    * 
    * Add the following script to the script block:

* 
```python
logger = system.util.getLogger('Spec Limit Logger')
logger.warn('Setting Lower Spec Limit')
event.setControlLimitValue(6.0)
```


### 
**Add Custom Spec Limits to SPC**

* Open Equipment Manager

    * Select New Enterprise (Enterprise Equipment Object)
    * In the SPC panel, select **Control Limits**
    * Click Add**![](/resources/Storage/mes-module-tutorials/spc-perspective-tag-configure-custom-spec-limits/spc-perspective-tag-configure-custom-spec-limits-2025-08-14-1.png)**

        * Find New Control Limit and rename to **Upper Spec Limit**
        * Set Kind to **Individual UCL**
        * Set Script to **Custom Spec Limits\Upper Spec Limit**
        * ![](/resources/Storage/mes-module-tutorials/spc-perspective-tag-configure-custom-spec-limits/spc-perspective-tag-configure-custom-spec-limits-2025-08-14-2.png)
        * Click Save ![](/resources/Storage/mes-module-tutorials/spc-perspective-tag-configure-custom-spec-limits/spc-perspective-tag-configure-custom-spec-limits-2025-08-14-4.png)
* Add Lower spec limit: Click Add**![](/resources/Storage/mes-module-tutorials/spc-perspective-tag-configure-custom-spec-limits/spc-perspective-tag-configure-custom-spec-limits-2025-08-14-1.png)**
    * 
    * Find New Control Limit and rename to **Lower Spec Limit**
    * Set Kind to **Individual LCL**
    * Set Script to **Custom Spec Limits\Lower Spec Limit**
    * ![](/resources/Storage/mes-module-tutorials/spc-perspective-tag-configure-custom-spec-limits/spc-perspective-tag-configure-custom-spec-limits-2025-08-14-3.png)
    * Click Save ![](/resources/Storage/mes-module-tutorials/spc-perspective-tag-configure-custom-spec-limits/spc-perspective-tag-configure-custom-spec-limits-2025-08-14-4.png)

* Apply Custom Spec Limits to Sample Definition
    * Open Sample Definition Manager
    * Select **pH Sensor** sample definition
    * Select Control Limits
    * Find and Check Upper Spec Limit and Lower Spec Limit
    * ![](/resources/Storage/mes-module-tutorials/spc-perspective-tag-configure-custom-spec-limits/spc-perspective-tag-configure-custom-spec-limits-2025-08-14-5.png)
    * Save ![](/resources/Storage/mes-module-tutorials/spc-perspective-tag-configure-custom-spec-limits/spc-perspective-tag-configure-custom-spec-limits-2025-08-14-4.png)

###