---
title: Setup registration of stop code
description: "Go to the Configuration-&gt;Datasource page:  Select the unit you wish to setup the registration for(The units here are examples and are different from yours):  Click the Add button:  Select Stop Code: C"
---

[Skip to content](https://kb.dataintel.dk/setup-registration-of-stop-code#main-content)

English

Show submenu for translations

[Submit a request](https://kb.dataintel.dk/kb-tickets/new?hsLang=en)

![DIAP-1.png\]](https://kb.dataintel.dk/hs-fs/hubfs/DIAP-1.png?height=41&name=DIAP-1.png)

- [Default HubSpot Blog](https://diap-6547305.hs-sites.com/blog)

Open main navigation

Close main navigation

- [Default HubSpot Blog](https://diap-6547305.hs-sites.com/blog)
- English
  
  Show submenu for translations
- [Submit a request](https://kb.dataintel.dk/kb-tickets/new)
- Go to Data Intelligence A/S

 Go to Data Intelligence A/S

 Hello. How can we help you?

- There are no suggestions because the search field is empty.

1. [Help Center](https://kb.dataintel.dk/?hsLang=en)
2. [OEE site](https://kb.dataintel.dk/oee-site?hsLang=en)
3. [Configuration](https://kb.dataintel.dk/oee-site?hsLang=en#configuration)

# Setup registration of stop code

### Introduction

- This guide describes how to setup the registration of stop codes. This is used when one has a state code describing the state of the production.

### Setup

Go to the **Configuration-\>Datasource** page:

![](https://kb.dataintel.dk/hubfs/image-png-Jul-02-2021-11-43-17-23-AM.png)

Select the unit you wish to setup the registration for(The units here are examples and are different from yours):

![](https://kb.dataintel.dk/hubfs/image-png-Jul-02-2021-11-44-01-88-AM.png)

Click the **Add** button:

![](https://kb.dataintel.dk/hubfs/image-png-Jul-02-2021-11-20-09-41-AM.png)

Select **Stop Code:**

![](https://kb.dataintel.dk/hubfs/Knowledge%20Base%20Import/eltronic.zendesk.comhcarticle_attachments360037703554mceclip2.png)

Click **Save**, to add the event server:

![](https://kb.dataintel.dk/hubfs/image-png-Jul-02-2021-11-20-41-24-AM.png)

### Configuration of Stop Code

- **Name:** The name of the event server, that is collecting the data.
- **Small stop time**: This is how long a small stop can last in seconds. A stop is consisted a small stop as long as it hasn't lasted longer than this period.
- **Small Stop Reason**: This is the stop reason that is used with small stops.
- **Registration Type**: The registration type that is used. There are the following type:  
    - **Keep stop reason**:  This type keeps the first registered stop reason between run registrations. Use this type when the first stop code should represent the stop.
    - **Start new stop**: This type starts a new stop reason for each different stop codes registered between run registrations. Use this type when each stop code registered in a stop should have a representation of the stop(as a series of stops adjacent to each other).
    - **Change stop reason**: This type uses the last registered stop reason between run registrations. Use this type when the last stop code should represent the stop.
- **Diap Tag**: The Diap tag is where the stop codes are collected from. The structure of the name is  \[DIAP\]-\[PLC\]-\[Tag\]
- **Run Code:** The code, that is used to state, that the unit is running.

### Diap tag data type

- **Type:** Double(It gets converted into int)

The expected data type is hold numbers like : 0, 1, 2, 3, 5.

### Example - Registration Type, Keep stop reason:

Run Code = 1.

A unit is running, then it receives the stop code 12, then 17 and last 20, with registration type set to **Keep stop reason**, the first stop code is used to represent the stop:

![](https://kb.dataintel.dk/hubfs/Knowledge%20Base%20Import/eltronic.zendesk.comhcarticle_attachments360037778414mceclip3-1.png)

### Example - Registration Type, Start new stop:

Run Code = 1.

A unit is running, when it receives the stop code 12, then 17 and last 20, with registration type set to **Start new stop**, all of the stop codes are used to represent the stop as more stops adjacent to each other:

![](https://kb.dataintel.dk/hubfs/Knowledge%20Base%20Import/eltronic.zendesk.comhcarticle_attachments360038611893mceclip4-1.png)

### Example - Registration Type, Change stop reason:

Run Code = 1.

A unit is running, when it receives the stop code 12, then 17 and last 20, with registration type set to **Change stop reason**, the last stop code is used to represent the stop:

![](https://kb.dataintel.dk/hubfs/Knowledge%20Base%20Import/eltronic.zendesk.comhcarticle_attachments360038612153mceclip5-1.png)

### Codes Setup:

You can bind a code to a stop cause for a unit in **Configuration-\>Units**:

![](https://kb.dataintel.dk/hubfs/Knowledge%20Base%20Import/eltronic.zendesk.comhcarticle_attachments360019960440mceclip0.png)

Select your unit:

![](https://kb.dataintel.dk/hubfs/Knowledge%20Base%20Import/eltronic.zendesk.comhcarticle_attachments360019977999mceclip12.png)

Click tab **Stop codes**:

![](https://kb.dataintel.dk/hubfs/image-png-Apr-01-2022-08-05-49-64-AM.png)

Click **Add stop code**:

![](https://kb.dataintel.dk/hubfs/image-png-Apr-01-2022-08-06-26-92-AM.png)

Enter your code:

![](https://kb.dataintel.dk/hubfs/Knowledge%20Base%20Import/eltronic.zendesk.comhcarticle_attachments360019976959mceclip4.png)

Click **Add**:

![](https://kb.dataintel.dk/hubfs/Knowledge%20Base%20Import/eltronic.zendesk.comhcarticle_attachments360019961100mceclip5.png)

Click the edit icon on the row of your stop code:

![](https://kb.dataintel.dk/hubfs/Knowledge%20Base%20Import/eltronic.zendesk.comhcarticle_attachments360019977079mceclip7.png)

Select a stop cause:

![](https://kb.dataintel.dk/hubfs/Knowledge%20Base%20Import/eltronic.zendesk.comhcarticle_attachments360019977179mceclip8.png)

 

Click Change:

![](https://kb.dataintel.dk/hubfs/Knowledge%20Base%20Import/eltronic.zendesk.comhcarticle_attachments360019961320mceclip9.png)

 

Now your code is bind to a stop cause for the selected unit(Here we bind code 20 to stop cause Power Failure for unit Demo 1):

![](https://kb.dataintel.dk/hubfs/image-png-Apr-01-2022-08-10-04-72-AM.png)

### Example - Configure a state code

Select a name for the event server, that is collecting the data. Here we called it "State":

![](https://kb.dataintel.dk/hubfs/Knowledge%20Base%20Import/eltronic.zendesk.comhcarticle_attachments360037776214mceclip0.png)

Set how long a small may last in seconds. Stops that last to this period and not longer, are consisted small stops. Here we sat it to 30 seconds:

![](https://kb.dataintel.dk/hubfs/Knowledge%20Base%20Import/eltronic.zendesk.comhcarticle_attachments360016324139mceclip0.png)

Select a small stop reason, when a small stop is created, it uses this stop reason. Here we used "Small Stop":

![](https://kb.dataintel.dk/hubfs/Knowledge%20Base%20Import/eltronic.zendesk.comhcarticle_attachments360016324179mceclip1.png)

Select a registration type, this decide whether the first stop code(Type **Keep stop reason**), all of the stop codes(Type **Start new stop**) or the last stop code represent the stop(Type **Change stop reason**), Here we used "Change stop reason":

![](https://kb.dataintel.dk/hubfs/Knowledge%20Base%20Import/eltronic.zendesk.comhcarticle_attachments360037779134mceclip6.png)

Select the Diap tag, where the data comes from. Here we selected "dev00225 - Demo - Tag 1":

![](https://kb.dataintel.dk/hubfs/Knowledge%20Base%20Import/eltronic.zendesk.comhcarticle_attachments360037779234mceclip7-2.png)

(You can type in this box to quicker search for the tag):

![](https://kb.dataintel.dk/hubfs/Knowledge%20Base%20Import/eltronic.zendesk.comhcarticle_attachments360037779314mceclip8-3.png)

Set the Run code, Here we set it to 1:

![](https://kb.dataintel.dk/hubfs/Knowledge%20Base%20Import/eltronic.zendesk.comhcarticle_attachments360016324399mceclip2.png)

 

When you are done, the configuration should look something like this (But with your values):

![](https://kb.dataintel.dk/hubfs/Knowledge%20Base%20Import/eltronic.zendesk.comhcarticle_attachments360016324439mceclip3.png)

Click **Save** to save the configuration:

![](https://kb.dataintel.dk/hubfs/Knowledge%20Base%20Import/eltronic.zendesk.comhcarticle_attachments360037673894mceclip11-Feb-23-2021-12-27-23-95-PM.png)

Now you have a configuration for state code signal on a unit, which represent the current state of the unit.

### Start collecting data

When you have made your configurations in the **Data source**, then you need to start the event server for the configuration, so the data get collected.

Go to the **Configuration-\>Data source status** page:

![](https://kb.dataintel.dk/hubfs/image-png-Jul-02-2021-11-47-27-99-AM.png)

Select your unit:

![](https://kb.dataintel.dk/hubfs/Knowledge%20Base%20Import/eltronic.zendesk.comhcarticle_attachments360038505433mceclip13-Feb-23-2021-12-27-25-44-PM.png)

Click the switch for the event server with the configuration:

![](https://kb.dataintel.dk/hubfs/Knowledge%20Base%20Import/eltronic.zendesk.comhcarticle_attachments360037780054mceclip10.png)

Then the light turns green and the Last run timestamp is updated, when your event server has run your configuration for the first time:

![](https://kb.dataintel.dk/hubfs/Knowledge%20Base%20Import/eltronic.zendesk.comhcarticle_attachments360038507553mceclip14-Feb-23-2021-12-27-27-32-PM.png)

That it. Now your configuration are done and you are collecting data.

 

 

 

 

- [DIAP Gateway](https://kb.dataintel.dk/diap-gateway?hsLang=en#main-content)

    - [Getting Started](https://kb.dataintel.dk/diap-gateway?hsLang=en#getting-started)
    - [Troubleshooting](https://kb.dataintel.dk/diap-gateway?hsLang=en#troubleshooting)
    - [Known issues/limitations](https://kb.dataintel.dk/diap-gateway?hsLang=en#known-issues-limitations)
- [General](https://kb.dataintel.dk/general?hsLang=en#main-content)

    - [FAQ](https://kb.dataintel.dk/general?hsLang=en#faq)
- [Configuration](https://kb.dataintel.dk/configuration?hsLang=en#main-content)

    - [FAQ](https://kb.dataintel.dk/configuration?hsLang=en#faq)
    - [Troubleshooting](https://kb.dataintel.dk/configuration?hsLang=en#troubleshooting)
    - [Guides](https://kb.dataintel.dk/configuration?hsLang=en#guides)
    - [Protocols](https://kb.dataintel.dk/configuration?hsLang=en#protocols)
- [Live/Real time site](https://kb.dataintel.dk/live-real-time-site?hsLang=en#main-content)

    - [Getting Started](https://kb.dataintel.dk/live-real-time-site?hsLang=en#getting-started)
    - [FAQ](https://kb.dataintel.dk/live-real-time-site?hsLang=en#faq)
    - [Guide](https://kb.dataintel.dk/live-real-time-site?hsLang=en#guide)
    - [Features](https://kb.dataintel.dk/live-real-time-site?hsLang=en#features)
- [OEE site](https://kb.dataintel.dk/oee-site?hsLang=en#main-content)

    - [Getting Started](https://kb.dataintel.dk/oee-site?hsLang=en#getting-started)
    - [FAQ](https://kb.dataintel.dk/oee-site?hsLang=en#faq)
    - [Guides](https://kb.dataintel.dk/oee-site?hsLang=en#guides)
    - [Configuration](https://kb.dataintel.dk/oee-site?hsLang=en#configuration)
- [Remote Access](https://kb.dataintel.dk/remote-access?hsLang=en#main-content)

    - [Getting Started](https://kb.dataintel.dk/remote-access?hsLang=en#getting-started)
    - [FAQ](https://kb.dataintel.dk/remote-access?hsLang=en#faq)
    - [Guides](https://kb.dataintel.dk/remote-access?hsLang=en#guides)
- [API](https://kb.dataintel.dk/api?hsLang=en#main-content)

    - [API](https://kb.dataintel.dk/api?hsLang=en#api)
- [Release information](https://kb.dataintel.dk/release-information?hsLang=en#main-content)

    - [DIAP Release Notes](https://kb.dataintel.dk/release-information?hsLang=en#diap-release-notes)
    - [Live/Real time site](https://kb.dataintel.dk/release-information?hsLang=en#live-real-time-site)
    - [OEE site](https://kb.dataintel.dk/release-information?hsLang=en#oee-site)
    - [Management site](https://kb.dataintel.dk/release-information?hsLang=en#management-site)
    - [DIAP Gateway](https://kb.dataintel.dk/release-information?hsLang=en#diap-gateway)

- [Default HubSpot Blog](https://diap-6547305.hs-sites.com/blog)

[![Chill listening crop-3](https://kb.dataintel.dk/hs-fs/hubfs/Sk%C3%A6rmbillede%202021-05-04%20kl.%2017.46.04.png?width=221&height=26&name=Sk%C3%A6rmbillede%202021-05-04%20kl.%2017.46.04.png "Chill listening crop-3")](https://diap.hubspotpagebuilder.com/-temporary-slug-5b226bcb-69c8-45c1-82ff-e060e2d4037d?hsLang=en)

Copyright © 2026, Data Intelligence A/S