# Transfer Data Between Connections

In this example we'll configure Clarity Gateway to send values from an EtherNet/IP connection to MQTT. To do so we have to use use **System Tags** as an intermediary. The EtherNet/IP connection will transfer the values from EtherNet/IP tags to the System Tags, and the MQTT connection will transfer the values from the System Tags to MQTT tags:

<table><thead><tr><th width="218.26878474712117">EtherNet/IP Tag</th><th>→ System Tag</th><th>→ MQTT Tag</th></tr></thead><tbody><tr><td><code>CURING/HEATED_MIN_TEMP</code></td><td>→ <code>Site 1/Heated Min Temp</code></td><td>→ <code>heatedMinTemp</code></td></tr><tr><td><code>CURING/HEATED_MAX_TEMP</code></td><td>→ <code>Site 1/Heated Max Temp</code></td><td>→ <code>heatedMaxTemp</code></td></tr></tbody></table>

We'll assume an EtherNet/IP connection [has been created](https://docs.jcore.io/clarity-gateway/connections/ethernet-ip/adding-an-ethernet-ip-connection) and provides the tags `CURING/HEATED_MIN_TEMP` and `CURING/HEATED_MAX_TEMP`:

![](https://1557066017-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSPy42kVbNL57hubF20gF%2Fuploads%2Fgit-blob-45eec5b1c75efa1e6e2091a50c49133f5606576c%2Flocalhost_50000_connections_15.png?alt=media)

First we'll set the **System Tag Prefix** to **Site 1/**:

![](https://1557066017-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSPy42kVbNL57hubF20gF%2Fuploads%2Fgit-blob-e62dd254fdb8781d83b7cb32e68fcb8155cee600%2Flocalhost_50000_connections_15%20\(1\).png?alt=media)

Then we'll click the checkboxes at the left to enable and change the **System Tags** for these channels to Site 1/**Heated Max Temp** and Site 1/**Heated Min Temp**:

![](https://1557066017-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSPy42kVbNL57hubF20gF%2Fuploads%2Fgit-blob-fec57bc3a49a33463df90138157a17d4a42d9b9d%2Flocalhost_50000_connections_15%20\(2\).png?alt=media)

Finally, click **Save**:

![](https://1557066017-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSPy42kVbNL57hubF20gF%2Fuploads%2Fgit-blob-a775e4355df086f452633e19297a7c6c8aecaa6f%2Flocalhost_50000_connections_15%20\(3\).png?alt=media)

Once these changes have been saved, if EtherNet/IP is connected you should see the values getting routed to the system tags (you may need to change the search to see the channels again):

![](https://1557066017-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSPy42kVbNL57hubF20gF%2Fuploads%2Fgit-blob-412ab8cd93bf38659f2047ddb91aa2e1ad141b35%2Flocalhost_50000_connections_16%20\(8\).png?alt=media)

Next we'll assume an [MQTT connection has been created](https://docs.jcore.io/clarity-gateway/connections/mqtt/adding-a-sparkplug-mqtt-connection). Navigate to it by clicking it in the sidebar:

![](https://1557066017-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSPy42kVbNL57hubF20gF%2Fuploads%2Fgit-blob-e621ef74a9b44a3b42428df459d3fa1ce9978ca9%2Flocalhost_50000_connections_16%20\(1\).png?alt=media)

In the **Channels To MQTT** table, make sure that **Show All Tags** is turned on:

![](https://1557066017-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSPy42kVbNL57hubF20gF%2Fuploads%2Fgit-blob-8cc2cd9d31811c28555e01ce0be2c761aaa0df45%2Flocalhost_50000_connections_16%20\(2\).png?alt=media)

Then if you search or scroll down you should be able to find the **System Tags** we're writing from EtherNet/IP (**Site 1/Heated Min Temp** and **Site 1/Heated Max Temp**):

![](https://1557066017-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSPy42kVbNL57hubF20gF%2Fuploads%2Fgit-blob-83b1259cb0b18f1656152d16aedf2967f00188e9%2Flocalhost_50000_connections_16%20\(3\).png?alt=media)

Click the checkboxes at the left to enable these, then set the desired **MQTT Tags** (in this example, **Heated Max Temp** and **Heated Min Temp**):

![](https://1557066017-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSPy42kVbNL57hubF20gF%2Fuploads%2Fgit-blob-80621e70a89e1aefe352c09ff3e13dab67336401%2Flocalhost_50000_connections_16%20\(4\).png?alt=media)

Finally, click **Save**:

![](https://1557066017-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSPy42kVbNL57hubF20gF%2Fuploads%2Fgit-blob-3f26c9a3079471226249c92892357b14c3a395a5%2Flocalhost_50000_connections_16%20\(6\).png?alt=media)

Once the changes have been saved, if MQTT is connected, you should see the values being sent to MQTT:

![](https://1557066017-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSPy42kVbNL57hubF20gF%2Fuploads%2Fgit-blob-4479856be1b804974c7fa68a301d38c97ada469e%2Flocalhost_50000_connections_16%20\(7\).png?alt=media)
