--- title: Configure a Modbus register reading for history in Boss’nX description: "Read a Modbus TCP meter or value every 60 s in Boss’nX: register, function code 3 or 4, data type, Unit ID, scale factor, swaps, live test and duplication." canonical: https://wiki.can-nx.com/en/guides/boss-modbus-config/ language: en product: Boss’nX audience: - administrateur - installateur context: "Boss’nX, supervision on a computer: Menu → Data logging, Modbus registers tab" --- # Configure a Modbus register reading for history in Boss’nX Context: Boss’nX, supervision on a computer: Menu → Data logging, Modbus registers tab In Boss’nX, the **Modbus registers** tab of the **Data logging** page defines the Modbus TCP registers to read for the history, for example a meter or a temperature, with a planned rate of sixty seconds. Each configuration describes one value: gateway, register, function code, type, Unit ID, scale and byte order. Intended for administrators and installers. These configurations are separate from a component’s Modbus datapoints, which have [their own polling and history settings](https://wiki.can-nx.com/en/guides/boss-point-modbus/). ## Before you start - Your role has **Manage components**. You are working in the relevant supervision, on a computer. - The device’s read parameters are confirmed: Modbus access, register address, type, length, Unit ID, scale and byte or word order. The values in this guide are fictitious. ## Open the list of Modbus configurations 1. In the supervision, open **Menu → Data logging**, in the **Integration** family. 2. Select the **Modbus registers** tab, next to **KNX addresses**. The **KNX addresses** tab is used to [choose the KNX addresses to log](https://wiki.can-nx.com/en/guides/boss-knx-monitoring/). 3. Check the **Modbus Configurations** title. The rows are grouped by gateway and show **Name**, **Register**, **Type** and **Unit ID**. To find a configuration: - Here, the **Search by address, component or label…** bar searches the name, the register address and the data type, ignoring capitals and accents. - A chip bearing a gateway’s name limits the list to that gateway. Click the same chip again to remove this filter. - The column headers change the sort order. ## Create a measurement configuration 1. If a form is already open, save it or discard it with **Cancel**. Check that it is closed before starting a new configuration or a duplication. 2. Click **New configuration**, above the list. The form opens on the right. 3. Check **Gateway**: a first choice may be offered automatically. Select the Modbus access actually intended. 4. Enter a non-empty, recognizable **Name**. 5. Complete the parameters in the table below, leave the last field, then review the form. | Field | Parameter to confirm | | --- | --- | | **Register address** | Integer address, positive or zero, intended for the measurement. Have the addressing convention confirmed: do not systematically subtract an offset from the number shown in a manual. | | **Word length** | Read length, an integer of at least one: one word for a sixteen-bit value, two words for a thirty-two-bit value. Choosing the type does not fill in this field: check it after each type change. | | **Function code** | To read a register, the confirmed code: **3 — Read Multiple Holding Registers** or **4 — Read Input Registers**. Check the device’s table before switching from one to the other. | | **Data type** | **INT16**, **UINT16**, **INT32**, **UINT32** or **FLOAT32**, depending on how the value is encoded. The sign and representation must match the device. | | **Unit ID** | Integer identifier of the Modbus device, from one to two hundred forty-seven. It is not the register number. | | **Scale factor** | Multiplier applied to the read value. Fictitious example: a factor of **0.1** turns a raw value of **215** into **21.5**. | | **Swap Bytes** | Swaps the bytes within the words, only if the device’s encoding requires it. | | **Swap Words** | Swaps the order of the words, only if this is intended for this value. | Fictitious example: **Name Flow temperature**, correct **Gateway** confirmed, **Register address 100**, **Word length 2**, **Function code 3**, **Data type FLOAT32**, **Unit ID 3**, factor **1** and swaps according to the manual. Have these parameters confirmed before reusing them on an installation. Increasing **Word length** does not create several configurations: create one configuration per value. The **Function code** list also offers codes for binary inputs and writes; for these uses, see [the limits described in the troubleshooting guide](https://wiki.can-nx.com/en/guides/boss-modbus-config-help/). If no suitable gateway is offered, click the **Integration › Modbus gateways** link at the top of the page and [declare the Modbus access](https://wiki.can-nx.com/en/guides/boss-modbus-gateway-create/). This page has no button to create a gateway, and gateway management requires its own permissions: have the administrator check them. ## Test, then save **Live test** tries the parameters currently in the form, without saving them. Its results and errors are explained in [the test and troubleshooting guide](https://wiki.can-nx.com/en/guides/boss-modbus-config-help/). 1. Click **Save**. **Saving…** indicates the operation in progress. 2. Wait for **Saved successfully.** and for the form to close. Before saving, **Cancel** closes the form and discards your input. It does not undo a save already made: to correct, reopen the row, change the values and save again. ## Edit or duplicate a configuration To edit, click the row, check its name and gateway, correct the necessary fields, then save. To create a similar measurement from an existing configuration: 1. First close any open form, after saving it if that is your intention, or with **Cancel**. 2. On the source row, click the two-sheet **Duplicate** icon, on the right. 3. Check the **Duplicate configuration** title, the copied name and the parameters of the correct source. 4. Give a distinct name and adapt the parameters of the new measurement, in particular the register and the Unit ID, which must not be kept by default. 5. Click **Save**. Duplication creates an additional configuration and keeps the source. Check that two configurations of the same measurement are really wanted. ## Delete a configuration Deletion applies to the measurement configuration, not to the gateway. No restore is offered on this page. If you need to keep uses or the measurement’s history, contact support before editing or deleting the configuration: deletion neither erases nor keeps all the history automatically. 1. Find the exact row and check its uses. 2. Click its **Delete** trash can, on the right. 3. In the browser confirmation **Delete configuration "…"?**, check the name, then cancel to keep it or confirm the deletion. 4. Wait for **Deleted successfully.** ## Check the result 1. Find the configuration in the list, after checking the search and the gateway filter. After a duplication, check both rows; after a deletion, check that the row no longer appears, with the filters removed. 2. Click the row. The **Edit Modbus configuration** form opens on the right: review the gateway and all the stored parameters. 3. A saved configuration describes the reading to perform. To check reception, run **Live test**, then check the readings over the relevant period. To then create component datapoints from these configurations, follow [the import of Modbus metering configurations](https://wiki.can-nx.com/en/guides/boss-import-modbus/). This import is a one-time copy and requires saving the component separately. ## Troubleshooting - **No Modbus configurations.** also appears when the search or the filter gives no result. Clear the search and remove the filter before concluding that the list is empty. - For an error message on loading, on saving or during the test, or an inconsistent value, follow [the Modbus configuration troubleshooting guide](https://wiki.can-nx.com/en/guides/boss-modbus-config-help/). If the problem persists, contact support@can-nx.com. French labels: **Menu → Historisation → Registres Modbus**; **Configurations Modbus**, **Nouvelle configuration**, **Passerelle**, **Nom**, **Adresse du registre**, **Nombre de mots**, **Code fonction**, **Type de données**, **Unit ID**, **Facteur d'échelle**, **Swap Bytes**, **Swap Words**, **Test en direct**, **Enregistrer**, **Annuler**, **Dupliquer**, **Supprimer**, **Enregistré avec succès.**, **Supprimé avec succès.**, **Aucune configuration Modbus.**