# Editing the configuration

You can edit the configuration on the user interface or load it from a JSON file. Once the configuration has been changed, the Apply and the Cancel buttons are displayed.

## ATTENTION

Each variable is mapped to one Modbus register (16 bit) only. If, e. g., a 32-bit variable is mapped to a Modbus register, the upper 16 bits will be truncated.

## NOTICE

Use discrete_input or input_register to read the value of a global variable from the real-time application. Use coil or holding_register to write to a global variable in the real-time application. If you use coil or holding_register for reading, the value of the global variable in the real-time application will be overwritten by the Modbus TCP server.

## NOTICE

If you rename a global variable in your project, you must change the name of the variable in the configuration accordingly.

1. Enter the desired value in the Update interval text box.

2. ## NOTICE

   The update interval indicates the frequency in which the Modbus registers are updated or read.

3. ## NOTICE

   A range of 10 ... 10000 ms is supported by the Modbus TCP server. If you enter a value outside this range, it will be changed to the nearest boundary value at runtime.

4. Click Add.
5. Select a Modbus object type from the drop-down list.
6. The Modbus object type is added to the table in a new row.
7. In the column Address, enter the register address.

8. ## NOTICE

   Each address can only be assigned once per Modbus object type.

9. In the column Global variable, enter the name of the global variable.

After editing, the changes to the configuration must be applied to become effective.

## NOTICE

To edit the configuration in a JSON file, enter Modbus object type, address, global variable and update interval as shown in the example below. The update interval in the file is given in µs.