> For the complete documentation index, see [llms.txt](https://docs.jcore.io/clarity-gateway/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.jcore.io/clarity-gateway/connections/local-i-o/configuring-digital-outputs.md).

# Configuring Digital Outputs

To make a Local I/O Channel operate as a digital output, first click the channel in the sidebar to go to the channel settings view:

<figure><img src="/files/7LDjKpW8bPwkWhb0iy9y" alt=""><figcaption></figcaption></figure>

Then click **Digital Output** in the view that appears:

<figure><img src="/files/19mX5rFnPFUgR5m92bK3" alt=""><figcaption></figcaption></figure>

Finally, click **Save**:

<figure><img src="/files/noWnrSlHLjvvJAPZ0XwB" alt=""><figcaption></figcaption></figure>

### Control Mode: Output a Tag

After the preceeding steps, we've configured Channel 1 to output a tag, but the configured tag (**channel1**) doesn't currently have a value (**Control Value: NA**), so the configured **Safe State** is being sent to the output:

<figure><img src="/files/Ig6rMRg9WDj2IMuExF73" alt=""><figcaption></figcaption></figure>

This is because there's currently no source for the **channel1** tag, which is why Clarity Gateway reports **There is currently 1 mapping problem:**

<figure><img src="/files/LpbO6pRrw0vPBnc6Kq9y" alt=""><figcaption></figcaption></figure>

If you click that link you'll see that **channel1** is listed under **Output Tags with no source** in the mapping problems view:

<figure><img src="/files/QJH0J7FTiViUralggtb9" alt=""><figcaption></figcaption></figure>

If you change the **Safe State** to **Output On** and click **Save**, the **Safe State** and **Raw Output** will change to **1**:

<figure><img src="/files/MZvweX3PA1uIeUOsS7Ts" alt=""><figcaption></figcaption></figure>

Let's configure Channel 1 to output the **channel2** tag, which is currently being set from Channel 2, which is configured as a digital input in this example. Go back to the settings for Channel 1 and change **Tag** to **channel2**:

<figure><img src="/files/DwKulHTdC5qAVgfueA4P" alt=""><figcaption></figcaption></figure>

Then click **Save**. After you do, you should see the arrow leading from the **Control Value** to the **Raw Output,** and **Raw Output** should have the same value as **Control Value**, which corresponds to the state of Channel 2 in the sidebar:

<figure><img src="/files/NrVubLcl32ACm3HjgFka" alt=""><figcaption></figcaption></figure>

You can also output values coming from other sources like Modbus, MQTT, and EtherNet/IP connections by setting the **Tag** to a connection channel's configured **System Tag**.

### Control Mode: Condition

This control mode allows you to use boolean logic on other tags to control the output value. For example, let's say **channel2** is a digital input, **channel3** is an analog input, and we want to output **1** when **channel2** is **1** or **channel3** is **> 5**.

First make sure **Tag** is **channel1**. The value determined by the condition will be written to this tag:

<figure><img src="/files/R5M7nss1RMxXYXJfCmRB" alt=""><figcaption></figcaption></figure>

Then change the **Control Mode** to **Condition**:

<figure><img src="/files/dEgSXdKLJxy3OUx3d43e" alt=""><figcaption></figcaption></figure>

In the **Control Logic** table that appears, click **Add Condition**:

<figure><img src="/files/O62W2NXjii1qLdivDW17" alt=""><figcaption></figcaption></figure>

In the row that appears below, enter **channel2** for the tag:

<figure><img src="/files/wGGklf0Kc8uDX8rBLgTR" alt=""><figcaption></figcaption></figure>

And **= 1** in the following fields:

<figure><img src="/files/Fs01QZAXpLInEn1hDZr3" alt=""><figcaption></figcaption></figure>

Now we need to add the condition for **channel3**. Click **Add Condition** again:

<figure><img src="/files/S5Y1VYOHOpat9Q1ZdYvB" alt=""><figcaption></figcaption></figure>

In the second row will appear with an **AND** operator:

<figure><img src="/files/smylO7vLwXfySfUs5Jsk" alt=""><figcaption></figcaption></figure>

Change this to **OR**, and enter **channel3 > 5** in the following fields:

<figure><img src="/files/XGuTTArT82agzxLmlp1z" alt=""><figcaption></figcaption></figure>

Finally, click **Save**:

<figure><img src="/files/bumes5R6H0ciPsn2LqY6" alt=""><figcaption></figcaption></figure>

The following screenshots show how the **Control Value** and **Raw Output** now apply this control logic:

<figure><img src="/files/XD3JkwkgD9JcXBmsR86S" alt=""><figcaption><p><strong>channel2 = 0, channel3 &#x3C;= 5</strong></p></figcaption></figure>

<figure><img src="/files/AvBfV16bW85w6tncoRae" alt=""><figcaption><p><strong>channel2 = 1</strong></p></figcaption></figure>

<figure><img src="/files/7314CasVRFVG1DM1JcLq" alt=""><figcaption><p><strong>channel3 > 5</strong></p></figcaption></figure>

### Control Mode: Force Off/Force On

These modes force the **Control** **Value** to be **0** or **1** and don't read or write any tags.

<figure><img src="/files/UJdL960aOJM1DwSjgH1D" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/TRZaNHvfAgxGvSPCsjg1" alt=""><figcaption></figcaption></figure>

Note that **Reversed Polarity** can still cause the **Raw Output** to be the opposite of the **Control Value**:

<figure><img src="/files/shpHz7Vf2M0ouuKzBBxO" alt=""><figcaption></figcaption></figure>
