In the Boss’nX component editor, a Modbus datapoint reads a register of a device reached through a Modbus TCP gateway, writes a command to it or monitors loss of signal. You set the gateway, the Unit ID, the registers and function codes, the value decoding, then how it is presented on the component card.
Intended for administrators and installers with Manage components, in the relevant supervision, on a computer. To create read-only datapoints in one go from existing configurations, use the Modbus import from monitoring instead. Historical readings independent of components are configured in Data logging → Modbus registers.
Before you start
Section titled “Before you start”- The Modbus gateway is declared in Boss’nX.
- The device’s Unit ID and register table are confirmed by the installer. The examples in this guide are fictitious.
Add the Modbus datapoint
Section titled “Add the Modbus datapoint”- Open Components in your bar or through Menu → Components, then click the Edit component pencil on the card. For a new component, use Add component; the name and location are described in the common form.
- Click Add point, or find the existing datapoint.
- In the datapoint’s header, choose Modbus, then fill in its Label.
- Check its functions in the same header: Feedback for reading, Cmd for a command. Uncheck Cmd if the datapoint should only read. The Alarm checkbox is used to monitor loss of signal, described below.
- Select the Modbus gateway. This choice is separate from the component’s general Gateway: check the name, address and port shown in the list.
- Fill in Unit ID, an integer from 1 to 247 confirmed for the device.
Fill in the registers and decoding
Section titled “Fill in the registers and decoding”- If the settings are collapsed, click Show options.
- For reading, fill in Feedback register and Function code (read).
- For a command, fill in Command register and Function code (write).
- Choose Data type, then review both function codes.
- Fill in Scale factor, the read options and, if needed, Advanced (swap bytes / words), in accordance with the device’s table.
| Setting | Choice and check |
|---|---|
| Function code (read) | 1 — Read Coils, 2 — Read Discrete Inputs, 3 — Read Holding Registers, 4 — Read Input Registers. The form suggests code 3: use the code intended for the register. |
| Function code (write) | 5 — Write Single Coil, 6 — Write Single Register, 16 — Write Multiple Registers. The list offers all these codes: have it confirmed that the device accepts the chosen write. |
| Data type | Suggested as UINT16. INT16 / UINT16 take one word; INT32 / UINT32 / FLOAT32, two words. Choose the type that matches the device’s encoding. |
| Scale factor | For a numeric reading, the decoded value is multiplied by this factor; left empty, it equals 1. Fictitious example: 215 × 0.1 = 21.5. A numeric command applies the inverse conversion: have a non-zero factor and the command range confirmed before sending a command. |
| Poll interval (s) | Suggested at 10 seconds, with a minimum of 5 seconds. Choose a rate suited to the installation. |
| Swap bytes / Swap words | Checkboxes shown by Advanced (swap bytes / words). Set them according to the byte and word order confirmed for the device, not by successive attempts until a plausible value appears. |
| Save to history (1 pt/min) | Read option that keeps at most one point per minute. It guarantees neither a measurement every minute nor the recovery of old values. |
The = feedback register button, whose tooltip is Reuse the feedback register address, copies only the read address to the command. Use it only if the device’s table specifies the same address for writing; it does not check write capabilities.
The write code is suggested according to the read code and the type: read 1/2 → write 5; otherwise a one-word type → 6, a two-word type → 16. The auto: hint, to the right of this button, shows the type, the suggested code and the number of words. Changing Data type can replace the write code already chosen. After each change, review both codes and compare them with the device’s table.
Choose the presentation and the command
Section titled “Choose the presentation and the command”Numeric value
Section titled “Numeric value”For a datapoint without Alarm, explicitly choose Format d’affichage → Numeric (display format). With Cmd, fill in Min, Max and Pas (step), in line with the allowed commands, then Display style → + / − buttons (current) or Slider. In read-only mode, these command settings are not offered. Unit gives the displayed unit; the Modbus conversion is set in Scale factor. For using these controls on the card, see adjusting a numeric value.
Value list
Section titled “Value list”Choose Value list, then click + Add value and fill in, on each row, the expected number and its Label. Remove an unnecessary row with its trash can. With Cmd, the style can be Dropdown (current) or Buttons. In read-only mode, the list translates the received values into labels.
Boolean value and pulse
Section titled “Boolean value and pulse”A datapoint read with code 1 or 2, or commanded with code 5 without a read register, is treated as boolean. The Valeur si VRAI (value if true), Label si VRAI (label if true), Valeur si FAUX (value if false), Label si FAUX (label if false) and Couleur (color) settings then replace the numeric options. Check the meaning of the 1/0 values.
With Cmd, Pulse (impulse relay) sends the same value on each press: 1, or 0 if Send 0 (instead of 1) is checked. Button label (optional) customizes its text. This setting defines neither a duration nor an automatic 1 then 0 sequence. See buttons and pulses.
Confirmation, tag and pending installation
Section titled “Confirmation, tag and pending installation”With Cmd, check Confirm command in the header if needed: a confirmation is then requested before sending from the dashboard. Also check Tag, described in tag management, and Pending installation. This marking is not a command lock; its display is described in the component card.
Monitor loss of signal
Section titled “Monitor loss of signal”- Add a dedicated datapoint or find the intended alarm datapoint, choose Modbus and check Alarm.
- Check Modbus gateway, Unit ID, Feedback register, Function code (read), Data type and the read settings.
- Fill in Poll interval (s), then No signal — delay (s). The delay must be at least three times the polling interval: for 10 seconds, the minimum is 30 seconds.
- Save, then reopen the datapoint to check both durations.
To remove this monitoring, clear No signal — delay (s) and save again. As long as the datapoint is marked Pending installation, no alarm is created.
The alarm reports that no value was received during the delay; the hardware cause still has to be found on the installation. This Modbus form offers only this delay, with no threshold, comparison or severity setting. For a temperature alarm or another need whose settings are not established, contact support.
Test the reading and save
Section titled “Test the reading and save”With Feedback checked, Test the reading reads the register with the settings entered, even before saving. This button does not test a command. To interpret its result, follow testing and troubleshooting a Modbus datapoint.
- Leave the last field, then review the settings.
- Click Create or Save. The interface returns to the original page.
Before saving, Back discards the pending changes. After saving, reopen the datapoint, correct it and save again; a command already executed on the installation is not cancelled.
Check the result
Section titled “Check the result”- Reopen the component and review the settings that were kept, in particular both function codes and the durations.
- View the component card and compare the displayed value with the expected measurement.
- For a command, send it from the card and watch the equipment or its feedback. Saving stores the configuration; communication with the device is checked on the installation.
Troubleshooting
Section titled “Troubleshooting”- Create or Save refused, a Test the reading message, an inconsistent value or a command with no effect: follow testing and troubleshooting a Modbus datapoint.
- Min, Max and Pas missing: check that Cmd is checked, Alarm unchecked and Format d’affichage → Numeric selected.
If the problem persists, contact support@can-nx.com.
French labels: Composants, Menu, Ajouter un composant / Modifier le composant, Ajouter un point, Cmd / Re.Etat / Alarme, Passerelle Modbus, Unit ID, Afficher les options / Masquer les options, Registre retour d’état, Code fonction (lecture), Registre commande, Code fonction (écriture), = registre retour d’état, Type de données, Facteur d’échelle, Intervalle de scrutation (s), Avancé (swap bytes / words), Enregistrer dans l’historique (1 pt/min), Absence de signal — délai (s), Tester la lecture, Confirmation envoi commande, Créer / Enregistrer / Retour. The labels Format d’affichage, Pas, Valeur si VRAI, Valeur si FAUX, Label si VRAI, Label si FAUX and Couleur stay in French; the choices are Numérique / Liste de valeurs, Style d’affichage, Slider, Menu déroulant (actuel) or Boutons.