---
title: Use the Conversion Function
slug: manufacturing-connect-edge-v2/use-the-conversion-function
docTags: 
createdAt: 2024-05-24T20:17:47.087Z
---

You can use the Conversion processor to convert commonly used units.

You have the following base conversion options:

- timestamp -> local time&#x20;
- timestamp -> UTC&#x20;
- Celsius -> Fahrenheit&#x20;
- Fahrenheit -> Celsius&#x20;
- degree -> radian&#x20;
- radian -> degree&#x20;
- degree -> gon&#x20;
- gon -> degree&#x20;
- radian -> gon&#x20;
- gon -> radian

# User Scenarios

Review the following scenarios for converting several tag values. For these scenarios, you will simulate data coming from a PLC and make the following conversions.&#x20;

## User Scenario 1

You have multiple manufacturing sites across several time zones. For monitoring and analysis purposes, you'd like to synchronize your data based on time measurements for all sites.&#x20;

You will then complete the following conversion:

- timestamp -> UTC&#x20;

## Use Scenario 2

Some of your manufacturing equipment uses Fahrenheit for temperature control, while other equipment uses Celsius. This requires you to standardize the temperature measurements of all equipment for consistent and efficient process control.&#x20;

You will then complete the following conversion:

- Fahrenheit -> Celsius

## Use Scenario 3

Your manufacturing site has CNC machines, which use toolpaths defined in degrees. However, some trigonometric calculations and algorithms used in CNC programming require angular measurements to be in radians.&#x20;

You will then complete the following conversion:

- degree -> radian

# Step 1: Add a Device

Follow the steps to [Connect a Device](docId\:SqalV8ImyZmn8xA-56gno) 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 Tags](docId:-5nFrBQ-uriWOY3GACnPt) to learn more. Each tag will represent one of the user scenario mentioned above.

## Tag 1 (User Scenario 1)

- **Name**: Select **S - Random value generator**.
- **Value Type**: Select **int64**.&#x20;
- **Polling Interval**: Enter **5**.
- **Tag Name**: Enter **Timestamp**.&#x20;
- **Min\_value**: Enter **50**.
- **Max\_value**: Enter **50**.

## Tag 2 (User Scenario 2)

- **Name**: Select **S - Random value generator**.
- **Value Type**: Select **int64**.&#x20;
- **Polling Interval**: Enter **5**.
- **Tag Name**: Enter **Temperature**.&#x20;
- **Min\_value**: Enter **75**.
- **Max\_value**: Enter **75**.

## Tag 3 (User Scenario 3)

- **Name**: Select **S - Random value generator**.
- **Value Type**: Select **int64**.&#x20;
- **Polling Interval**: Enter **5**.
- **Tag Name**: Enter **Angle**.&#x20;
- **Min\_value**: Enter **65**.
- **Max\_value**: Enter **65**.

# Step 3: Create Analytics Flows

You can now create the analytics flows using data from the device and tags you previously created.&#x20;

**To create the analytics flow:**

1. Navigate to **Analytics**.&#x20;
2. On the analytics canvas, click **Add processor**.
   The *Create a processor&#x20;*&#x64;ialog displays.
   ![](https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/YHa732YOaWEx5YrECiO8y_image.png "The Add processor option")
3. Select **DataHub Subscribe**.&#x20;
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 *Timestamp&#x20;*&#x74;ag.
   ::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/qNTctxGzAOBAR54Pl736u_image.png" size="80" width="1141" height="571" position="center" caption="Create a processor dialog box" showCaption="true"}
5. Click **Save**.&#x20;
6. Click **Add processor** again and select **Conversion**.&#x20;
7. In the **Conversion&#x20;**&#x66;ield, select **timestamp to UTC**, and click **Save**.&#x20;
8. Connect the two processors, select **Events**, and enter a definition of **timestamp&#x20;**&#x66;or the connection.
   ::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/6VgIsQTaj3sM0kvpnioQ8_image.png" size="80" width="594" height="362" position="center" caption="Processor flow for Timestamp tag" showCaption="true"}
9. Repeat steps 2-8 for the Temperature tag and configure the following:
   - In the *DataHub Subscribe* processor, select the alias topic for the Temperature tag.&#x20;
   - In the *Conversion* processor, select a conversion of **Celsius -> Fahrenheit**.&#x20;
   - When you connect the two processors, select **Events&#x20;**&#x61;nd enter a definition of **temperature** for the connection.&#x20;
10. Repeat steps 2-8 for the Angle tag and configure the following:
    - In the *DataHub Subscribe* processor, select the alias topic for the Angle tag.&#x20;
    - In the *Conversion* processor, select a conversion of **degree -> radian**.&#x20;
    - When you connect the two processors, select **Events&#x20;**&#x61;nd enter a definition of **angle** for the connection.&#x20;
11. On the analytics canvas, click **Save**.&#x20;

The configured analytics flows should look like the following.

::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/vOlykWyzQozPylGMr0elp_image.png" size="80" width="733" height="577" position="center" caption="Completed analytics flows canvas" showCaption="true"}

# Step 4: View Conversion Data

You can view data on the analytics canvas by clicking the **View&#x20;**&#x69;con in each *Conversion&#x20;*&#x70;rocessor.&#x20;

::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/GNvypnLAUMuUqoDM7OGiY_image.png" size="80" width="733" height="577" position="center" caption="View icons for Conversion processors" showCaption="true"}

## Conversion Data for Timestamp Tag11.

A value for the time the data was generated in UTC is included in the payload.&#x20;

::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/_T-7P_2zjC8vMoBo8TQWC_image.png" size="80" width="956" height="804" position="center" caption="Time in UTC included in payload" showCaption="true"}

## Conversion Data for Temperature Tag

The temperature value of 75 Celsius is converted to 167 Fahrenheit.&#x20;

::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/Uzw_hm5aVCcFtdaRIU9_L_image.png" size="80" width="929" height="784" position="center" caption="Converted value from Celsius to Fahrenheit" showCaption="true"}

## Conversion Data for Angle Tag

The value of 65 degrees is converted to 1.1344640137963142 radian.&#x20;

::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/WKvdjsxFFbkzGJEvPPUWp_image.png" size="80" width="923" height="802" position="center" caption="Converted value from degrees to radian" showCaption="true"}

