> ## 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.

# Precharge

### 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:** `control.contactor.main`
</ParamField>

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

  **Example:** `0`

  <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>

### Required Registers

<ParamField path="control.contactor.main" type="string" required>
  This register is used to control the main contactor.
</ParamField>

<ParamField path="control.contactor.auxiliary" type="string" required>
  This register is used to control the auxiliary contactor.
</ParamField>

### Optional Registers

**Reference Contactor**

<ParamField path="control.contactor.reference" type="string">
  This register is used to control the reference contactor. Required when `referenceContactorFeedback` is enabled on the device.
</ParamField>

**Contactor Feedback**

<ParamField path="measure.contactor.main" type="string">
  This register is used to measure the main contactor. Required when `mainContactorFeedback` is enabled on the device.
</ParamField>

<ParamField path="measure.contactor.auxiliary" type="string">
  This register is used to measure the auxiliary contactor. Required when `auxiliaryContactorFeedback` is enabled on the device.
</ParamField>

<ParamField path="measure.contactor.reference" type="string">
  This register is used to measure the reference contactor. Required when `referenceContactorFeedback` is enabled on the device.
</ParamField>

**Breaker Feedback**

<ParamField path="measure.breaker" type="string">
  This register is used to measure the breaker state. Required when `breakerFeedback` is enabled on the device.
</ParamField>

### Example

The example below shows a complete address map for a precharge device with all required and optional registers.

```json precharge_address_map.json icon="code" theme={null}
[
  {        
    "name": "control.contactor.main",
    "address": 0,
    "type": "output"
  },
  {        
    "name": "control.contactor.auxiliary",
    "address": 1,
    "type": "output"
  },
  {        
    "name": "control.contactor.reference",
    "address": 2,
    "type": "output"
  },
  {        
    "name": "measure.contactor.main",
    "address": 8,
    "type": "input"
  },
  {        
    "name": "measure.contactor.auxiliary",
    "address": 9,
    "type": "input"
  },
  {        
    "name": "measure.contactor.reference",
    "address": 10,
    "type": "input"
  },
  {        
    "name": "measure.breaker",
    "address": 11,
    "type": "input"
  }
]
```
