# Sending values to EtherNet/IP

In this example we'll configure Clarity Gateway to send the value of an Iron Pi analog input to an EtherNet/IP connection.

## Read / Write channels

Read / Write channels are read from the device on every scan cycle, but can also be written in response to a user or software command. This is useful for control setpoints and other user-settable values.

To enable read / write behavior on a channel, set up a "From EtherNet/IP" channel, and then turn on the "Settable" switch in the channel settings.

{% hint style="info" %}
Read / Write EtherNet/IP channels are available in Clarity Gateway version 5.6.0 and higher.
{% endhint %}

## Channels To EtherNet/IP

In contrast to Read / Write channels, Channels To EtherNet/IP write data from a Clarity Gateway internal tag to an EtherNet/IP tag on every scan cycle.

In the page for your EtherNet/IP connection, scroll down to the **Channels To EtherNet/IP** section. Click the **Show Detected** switch if it is not already on:

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

All EtherNet/IP tags you can send to will then appear in the table. In this example we'll be sending to **Real Tag 1**:

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

First check the **Enabled** checkbox to enable this mapping:

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

Then enter the **System Tag** to send values from. In this example we'll use **channel1:**

![](https://1557066017-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSPy42kVbNL57hubF20gF%2Fuploads%2Fgit-blob-ad695814bdc5cfe27253ee6aed6bd969cf88d761%2Flocalhost_50000_connections_13%20\(5\).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-52cbd90a9a490e5e3270f330583d4babc5a4c84d%2Flocalhost_50000_connections_13%20\(6\).png?alt=media)

Once the mapping is applied, the arrow should change color from gray to blue to indicate that the mapping is active:

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

## Advanced mapping

For more options when mapping a channel, click the `+` icon in the **Channels To EtherNet/IP** section:

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

This will take you to a separate **Create Channel** page. In that page, first enter the Clarity Gateway **System Tag** you would like to send to MQTT. In this example, we'll be using **channel1**, which is configured as a Local I/O analog input:

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

Optionally, you can enter a **Slope** and **Offset** to transform the values that get sent to EtherNet/IP. In this example we will enter **2** and **3**:

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

Finally, enter the **EtherNet/IP Tag** to send to. In this example, we'll send values to **Real Tag 1**:

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

Finally, click **Save** to create the channel:

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

Once the channel has been created, you will return to the connection page. The new channel should appear in the **Channels To EtherNet/IP** table.

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