<!-- Source: https://docs.captron.com/trms/series4x/led-control -->

# LED (and Display) Control

series4x (Display) supports three modes for controlling its LEDs (and Display):

- Automatic Scene Selection
- Scene controlled by IO-Link-Process Data
- Advanced Control by IO-Link Process Data

The control mode can be selected via IO-Link parameter **LED Control Mode** (see [ISDU Indices](isdu-indices.md)).

## Automatic Scene Selection

The LEDs (and Display) behave like the selected Scene. Scene n is selected by the state of Touch (Sensor actuation) and the state of the input pins E1 and E2:

<table>
  <colgroup>
    <col style={{ minWidth: '140px' }} />
  </colgroup>
  <thead>
    <tr>
      <th>LED Scene</th>
      <th>Actuation Flag</th>
      <th>E1</th>
      <th>E2</th>
      <th>None</th>
      <th>Pin2 (E1)</th>
      <th>Pin2 (E1) and Pin5 (E2)</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>0</td>
      <td>0</td>
      <td>0</td>
      <td>0</td>
      <td>&#10003;</td>
      <td>&#10003;</td>
      <td>&#10003;</td>
    </tr>
    <tr>
      <td>1</td>
      <td>1</td>
      <td>0</td>
      <td>0</td>
      <td>&#10003;</td>
      <td>&#10003;</td>
      <td>&#10003;</td>
    </tr>
    <tr>
      <td>2</td>
      <td>0</td>
      <td>1</td>
      <td>0</td>
      <td></td>
      <td>&#10003;</td>
      <td>&#10003;</td>
    </tr>
    <tr>
      <td>3</td>
      <td>1</td>
      <td>1</td>
      <td>0</td>
      <td></td>
      <td>&#10003;</td>
      <td>&#10003;</td>
    </tr>
    <tr>
      <td>4</td>
      <td>0</td>
      <td>0</td>
      <td>1</td>
      <td></td>
      <td></td>
      <td>&#10003;</td>
    </tr>
    <tr>
      <td>5</td>
      <td>1</td>
      <td>0</td>
      <td>1</td>
      <td></td>
      <td></td>
      <td>&#10003;</td>
    </tr>
    <tr>
      <td>6</td>
      <td>0</td>
      <td>1</td>
      <td>1</td>
      <td></td>
      <td></td>
      <td>&#10003;</td>
    </tr>
    <tr>
      <td>7</td>
      <td>1</td>
      <td>1</td>
      <td>1</td>
      <td></td>
      <td></td>
      <td>&#10003;</td>
    </tr>
  </tbody>
</table>

The number of applicable scenes depends on parameter **Active Inputs**:

<table>
  <colgroup>
    <col style={{ minWidth: '140px' }} />
  </colgroup>
  <thead>
    <tr>
      <th>Active Inputs</th>
      <th>Applicable Scenes</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>None (3 pin mode)</td>
      <td>0, 1</td>
    </tr>
    <tr>
      <td>Pin2 (E1) (4 pin mode)</td>
      <td>0 ... 3</td>
    </tr>
    <tr>
      <td>Pin2 (E1) and Pin5 (E2) (5 pin mode)</td>
      <td>0 ... 7</td>
    </tr>
  </tbody>
</table>

## Scene Controlled by IO-Link Process Data

The active Scene is set to the value written to the **LED Scene** field of the Process Data. For **LED Scene** = 255, the active Scene is selected by inputs like "Automatic Scene Selection" (LED Control Mode = 0).

LEDs always act like described in the active Scene. The Display behavior depends on the **Display Mode** field of Process Data: It can show the Display Text of the selected Scene, or a number or a text given in the respective field of Process Data.

## Advanced Control by IO-Link Process Data

The LED pattern, color, brightness, effect, and effect frequency is controlled by IO-Link process data. For more information see [Process Data](process-data.md).

The LED indexing is clockwise starting from the top left LED (LED 1).

## Output Locking

The "Output Locking" was designed for applications without IO-Link only. The sensor needs to be set to **LED Control Mode** "Automatic Scene selection". It locks the **Pin 4** output signal but has no impact on the **Actuation Flag**.

The "Output Locking" has no influence on the scene or scene change. This means touching/inputs on E1/E2 will change the scene accordingly.

For locking, the inputs must be set active (**Active Inputs** parameter).

Output locking can be used to interrupt an infinite timer / terminate an output signal.
