---
title: Use the Inputs Processor Function
slug: manufacturing-connect-edge/use-the-inputs-processor-function
docTags: 
createdAt: 2024-05-24T20:17:14.372Z
---

You can use multiple inputs to create time-series functions and calculate Key Performance Indicators (KPIs). Multiple inputs are to be provided with the value type connection, and then the respective functions are calculated.

# Understanding Different Inputs Functions

Use one of the following functions for your inputs:

- **Inputs Average:&#x20;**&#x43;alculate the average of the inputs in the Flow.&#x20;
- **Inputs Maximum:&#x20;**&#x46;ind the maximum value between the inputs in the Flow.
- **Inputs Minimum:&#x20;**&#x46;ind the minimum value between the inputs in the Flow.
- **Inputs Sum:&#x20;**&#x41;dd all the input values in the Flow.

# User Scenario

Review the following scenario for the inputs processor function. Then, you will simulate PLC data and calculate KPIs using multiple inputs processor functions.

In a production facility, several PLCs use multiple sensors to monitor parameters such as temperature, pressure, and speed.

- You can calculate the average temperature of various sections of the production line using th&#x65;**&#x20;Inputs Average** function.
- You can track the highest pressure with the **Inputs Maximum** function.
- You can track machine downtime by using the **Inputs Minimum** function.
- You can aggregate total production output over a specified period using the **Inputs Sum** function.

# Step 1: Add a Device

Follow the steps to [Connect a Device](docId\:nm1lQfefyA-DSIfFitIty) and configure the following parameters:

- **Device Type**: Simulator
- **Driver Name**: Generator
- **Enable Alias Topics**: Select the checkbox.&#x20;

# Step 2: Add Tags

After connecting the device, add the following tags. See [Add a Tag](docId\:h5heqIcXrCY3NCH9KBg9I) to learn more. Each tag will be used for simulating the different Inputs processor outputs mentioned above.

## Tag 1: tag1

- **Name**: Select **S - Random value generator**
- **Value Type:** Select **int64**
- **Polling Interval**: Enter **5**
- **Tag Name**: Enter **tag1**
- **Min\_value**: Enter **49**.
- **Max\_value**: Enter **49**.

## Tag 2: tag2

- **Name**: Select **S - Random value generator**
- **Value Type:** Select **int64**
- **Polling Interval**: Enter **5**
- **Tag Name**: Enter **tag2**
- **Min\_value**: Enter **50**.
- **Max\_value**: Enter **50**.

## Tag 3: tag3

- **Name**: Select **S - Random value generator**
- **Value Type:** Select **int64**
- **Polling Interval**: Enter **5**
- **Tag Name**: Enter **tag3**
- **Min\_value**: Enter **51**.
- **Max\_value**: Enter **51**.

# Step 3: Create Analytics Flows

You can now create the analytics flows using data from the device and tags you previously created. Follow the appropriate step out of 3a, 3b, 3c, or 3d based on the Inputs Processor Function you want to use.

**To create an analytics flow with the Inputs Processor function:**

1. Navigate to **Analytics**. &#x20;
2. On the analytics canvas, click **Add processor**.
   The *Create a processor&#x20;*&#x64;ialog box displays.
   ![](https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/rt7p3X1QYLtBtS6pRH1Yo_image.png "The Add processor option")
3. Select **DataHub Subscribe**.
4. In the *Topic&#x20;*&#x66;ield, click the **Search&#x20;**&#x69;con, select the device you previously created, and then select the alias topic for the **tag1**.
   ::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/xkImsyLO2_Szu1XZnNsSU_image.png" size="80" width="1141" height="571" position="center" caption="Create a Processor dialog box" showCaption="true"}
5. Click **Save**.
6. Repeat steps 2-5 to add another *DataHub Subscribe* node. Select the alias topic for the **tag2&#x20;**&#x61;nd **tag3&#x20;**&#x72;espectively.&#x20;

## Step 3a: Configure Inputs Average Processor

1. Click **Add processor** again and select **Inputs Average**.
   The following information defines this function:
   - **Field Name**: Select the field name for which you want to apply the function. The field name must be available in all the inputs. For example, **value&#xA0;**&#x6F;r **downtime**.
   - **Processing Type**: Select **unsigned&#xA0;**&#x66;rom the drop-down list.
2. Click **Save**.
   ::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/xkJni_dXmOfNrC2ARBcuy_image.png" size="80" width="565" height="481" position="center" caption="Inputs Average dialog box" showCaption="true"}
3. Connect the DataHub Subscribe processor (tag: *tag1)* to the Inputs Average processor with a wire and enter the definition of **Avg\_tag1&#x20;**&#x66;or the **values&#x20;**&#x63;onnection.
4. Connect the DataHub Subscribe processor (tag: *tag2*) to the Inputs Average processor with a wire and enter a definition of **Avg\_tag2&#x20;**&#x66;or the **values&#x20;**&#x63;onnection.
5. Connect the DataHub Subscribe processor (tag: *tag3*) to the Inputs Average processor with a wire and enter a definition of **Avg\_tag3&#x20;**&#x66;or the **values&#x20;**&#x63;onnection.
6. On the analytics canvas, click **Save**.

The configured analytics flows should look like the following:&#x20;

::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/dNri5YGoc2aLdgK0JOJyg_image.png" size="80" width="733" height="475" position="center" caption="Completed Inputs Average flow canvas" showCaption="true"}

## Step 3b: Configure Inputs Maximum Processor

1. Click **Add processor** again and select **Inputs Maximum**.
   The following information defines this function:
   - **Field Name**: Select the field name for which you want to apply the function. The field name must be available in all the inputs. For example, **value&#xA0;**&#x6F;r **downtime**.
   - **Processing Type**: Select **unsigned&#xA0;**&#x66;rom the drop-down list.
2. Click **Save**.
   ::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/p_w4jsu6r4msXdL8aBKIO_image.png" size="80" width="571" height="485" position="center" caption="Inputs Maximum dialog box" showCaption="true"}
3. Connect the DataHub Subscribe processor (tag: *tag1)* to the Inputs Maximum processor with a wire and enter the definition of **Max\_tag1&#x20;**&#x66;or the **values&#x20;**&#x63;onnection.
4. Connect the DataHub Subscribe processor (tag: *tag2*) to the Inputs Maximum processor with a wire and enter a definition of **Max\_tag2&#x20;**&#x66;or the **values&#x20;**&#x63;onnection.
5. Connect the DataHub Subscribe processor (tag: *tag3*) to the Inputs Maximum processor with a wire and enter a definition of **Max\_tag3&#x20;**&#x66;or the **values&#x20;**&#x63;onnection.
6. On the analytics canvas, click **Save**.

The configured analytics flows should look like the following:

::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/cNUVwafPVPXdXBG1ND6cH_image.png" size="80" width="557" height="487" position="center" caption="Completed Inputs Maximum flow canvas" showCaption="true"}

## Step 3c: Configure Inputs Minimum Processor

1. Click **Add processor** again and select **Inputs Minimum**.
   The following information defines this function:
   - **Field Name**: Select the field name for which you want to apply the function. The field name must be available in all the inputs. For example, **value&#xA0;**&#x6F;r **downtime**.
   - **Processing Type**: Select **unsigned&#xA0;**&#x66;rom the drop-down list.
2. Click **Save**.
   ::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/TpBPp4smUPEPfimxOOxBa_image.png" size="80" width="569" height="426" position="center" caption="Inputs Minimum dialog box" showCaption="true"}
3. Connect the DataHub Subscribe processor (tag: *tag1)* to the Inputs Minimum processor with a wire and enter the definition of **Min\_tag1&#x20;**&#x66;or the **values&#x20;**&#x63;onnection.
4. Connect the DataHub Subscribe processor (tag: *tag2*) to the Inputs Minimum processor with a wire and enter a definition of **Min\_tag2&#x20;**&#x66;or the **values&#x20;**&#x63;onnection.
5. Connect the DataHub Subscribe processor (tag: *tag3*) to the Inputs Minimum processor with a wire and enter a definition of **Min\_tag3&#x20;**&#x66;or the **values&#x20;**&#x63;onnection.
6. On the analytics canvas, click **Save**.

The configured analytics flows should look like the following:&#x20;

::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/cBuLUb3JPCSrIZqDkuEpz_image.png" size="80" width="502" height="436" position="center" caption="Completed Inputs Minimum flow canvas" showCaption="true"}

## Step 3d: Configure Inputs Sum Processor

1. Click **Add processor** again and select **Inputs Sum**.
   The following information defines this function:
   - **Field Name**: Select the field name for which you want to apply the function. The field name must be available in all the inputs. For example, **value&#xA0;**&#x6F;r **downtime**.
   - **Processing Type**: Select **unsigned&#xA0;**&#x66;rom the drop-down list.
2. Click **Save**.
   ::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/IwlXZhzk1BsCTgU_h9IS__image.png" size="80" width="563" height="426" position="center" caption="Inputs Sum dialog box" showCaption="true"}
3. Connect the DataHub Subscribe processor (tag: *tag1)* to the Inputs Sum processor with a wire and enter the definition of **Sum\_tag1&#x20;**&#x66;or the **values&#x20;**&#x63;onnection.
4. Connect the DataHub Subscribe processor (tag: *tag2*) to the Inputs Sum processor with a wire and enter a definition of **Sum\_tag2&#x20;**&#x66;or the **values&#x20;**&#x63;onnection.
5. Connect the DataHub Subscribe processor (tag: *tag3*) to the Inputs Sum processor with a wire and enter a definition of **Sum\_tag3&#x20;**&#x66;or the **values &#x20;**&#x63;onnection.
6. On the analytics canvas, click **Save**.

The configured analytics flows should look like the following:&#x20;

::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/xpRKYUVl-5NI8Nn0y4K8c_image.png" size="80" width="565" height="502" position="center" caption="Completed Inputs Sum flow canvas" showCaption="true"}

# Step 4: View Output of Processor

Click the **View&#x20;**&#x69;con in the *Inputs* processor to view the output values.

## View Inputs Average Output

The average function calculates the average of three defined tag values.&#x20;

::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/wIkGQkRpddbvoCtVsEQkW_image.png" size="80" width="661" height="766" position="center" caption="Average of inputs value" showCaption="true"}

## View Inputs Maximum Output

The maximum function finds the largest of three defined tag values.

::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/Za-eFdr__fKtY6QmV5sLM_image.png" size="80" width="749" height="769" position="center" caption="Maximum of all inputs" showCaption="true"}

## View Inputs Minimum Output

The minimum function finds the lowest of three defined tag values.

::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/EcLVQYRftNfNSimzDsdR__image.png" size="80" width="660" height="765" position="center" caption="Minimum of inputs value" showCaption="true"}

## View Inputs Summation Output

&#x20;The summation function calculates the total of three defined tag values.

::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/DL5cus6jEN-_vFmbNPRXS_image.png" size="80" width="726" height="735" position="center" caption="Summation of inputs value" showCaption="true"}

