# Addressing

For addressing a single value, use the following address format:

```
START_ADDRESS@DATA_TYPE, where START_ADDRESS indicates the area and the starting address of the element,
and DATA_TYPE – the data type
```

To address one of the bits of the word, you must use the following format:&#x20;

```
START_ADDRESS.BIT_INDEX, where START_ADDRESS indicates the area and the starting address
of the element, 
and BIT_INDEX – the bit number in the 16-bit word (from 0 to 15)
```

An array of values can be set using the following address format:&#x20;

```
START_ADDRESS[LENGTH]@DATA_TYPE, where START_ADDRESS specifies the area and the starting address
of the element, 
LENGTH – number of elements in the array, 
and DATA_TYPE – the data type
```

{% hint style="info" %}
Note that zero-based addressing is used for all types of data areas. This means that the addresses entered by the user are not shifted by 1 when constructing a Modbus frame
{% endhint %}

The table below maps data areas to supported address ranges, data types and access modes.&#x20;

| **Data Area**      | **Address Range** | **Data Type**                                                                                | **OPC UA Access Mode**                                 |
| ------------------ | ----------------- | -------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
| Output Coils       | 0 - 65535         | Boolean                                                                                      | Read/Write                                             |
| Input Coils        | 100000 - 165535   | Boolean                                                                                      | <p>Read Only,</p><p>Read/Write (in slave mode)<br></p> |
| Internal Registers | 300000 - 365535   | <p>Boolean, Byte, Word,</p><p>Int, DWord, DInt,</p><p>Float, Double, QWord, Long, String</p> | <p>Read Only,</p><p>Read/Write (in slave mode)</p>     |
| Holding Registers  | 400000 - 465535   | <p>Boolean, Byte, Word,</p><p>Int, DWord, DInt,</p><p>Float, Double, QWord, Long, String</p> | Read/Write                                             |

{% hint style="info" %}
For byte data type you must specify the byte order in the word (MSB or LSB) after the @ character, for example: 400000@MSB&#x20;
{% endhint %}

The following are examples of available addresses:

* 400020@INT
* 300001.14
* 300999@FLOAT
* 400005\[10]INT
* 100035\[12]
* 000021
