> ## Documentation Index
> Fetch the complete documentation index at: https://docs.directenergypartners.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Digital I/O

### Naming Conventions

While not mandatory, it is recommended to adopt the following naming conventions for clarity and usability:

* **Write Operations:** Prefix register names with `control.` to indicate that the register is used to set the digital output.
* **Read Operations:** Prefix register names with `measure.` to signify that the register is used to read the digital input signal.

See the example address map below for register naming conventions.

### Required Parameters

<ParamField path="name" type="string" required>
  A unique name for the register.

  **Example:** `measure.start`
</ParamField>

<ParamField path="address" type="int" required>
  Corresponds to the number on the digital input or output module.

  **Example:** `6`

  <Note>
    Please note that the address should start from 0, not from 1. However, the physical address on the I/O module begins at 1.
  </Note>
</ParamField>

<ParamField path="type" type="string" required>
  Indicates whether the register is an input or an output.

  **Options:** `input | output`
</ParamField>

### Optional Parameters

<ParamField path="invert" type="bool">
  Indicates whether to invert the input or output of the digital I/O, meaning that "on" becomes "off" and vice versa. This relates to the digital input or output being a normally open or normally closed contact.
</ParamField>

### Example

```json dio_address_map.json icon="code" theme={null}
[
  {        
    "name": "control.reset",
    "address": 2,
    "type": "output"
  },
  {        
    "name": "measure.start",
    "address": 6,
    "type": "input"
  },
  {        
    "name": "measure.stop",
    "address": 7,
    "type": "input",
    "invert": true
  }
]
```
