Connectors
Protocols & Custom Connectors
Modbus TCP
Industrial devices over Modbus TCP: read and write coils and registers, and run diagnostics
- Signs in with
- Connection details
- Runs on
- Cloud or On-Prem Worker
- Operations
- 22
- Ready-made triggers
- 1
Connect Modbus TCP
- In Neblex open Connect › Connections and click New Connection.
- Search for Modbus TCP and give the connection a clear name.
- Fill in the fields. Secret values are encrypted and never shown again.
- Click Test, then Create Connection.
If the system is only reachable inside your network, choose an On-Prem Worker under Test from and run the flow on that Worker. See On-Prem Workers.
| Field | What to enter |
|---|---|
| Connection setupRequired | |
| HostRequired | |
| PortOptional | Example: 502 |
| Connection stringRequiredSecret | Paste a modbus:// connection string such as modbus://plc.example:502/. The unit ID is chosen per step. |
Triggers
Start a flow when something changes in Modbus TCP: add a Poll for changes trigger, choose Modbus TCP and pick the event.
| Event | What it does | How |
|---|---|---|
| Point value changed | Polls a range of points and fires for each coil, input or register whose value changed since the last check. | Checks for changes |
Use it in a flow
- Open a flow, open the node library and search for Modbus TCP.
- Drag it onto the canvas and choose an Operation and your connection.
- Map the operation's fields from earlier steps, or click Map with Matt.
- Use Test this step to see what it returns, then save.
Operations
22 operations in 8 groups. Each one is a step you can add to a flow.
Coils3
Read coilsreadCoils | Read the on/off state of a range of coils (function 0x01). | |
Write a coilwriteSingleCoil | Switch one coil on or off (function 0x05). | |
Write coilswriteMultipleCoils | Set a range of coils from a list of true/false values (function 0x0F). |
Connection1
Test the connectionping | Open a Modbus TCP connection to the device or gateway. |
Device3
Read device identificationreadDeviceIdentification | Read vendor, product code, revision and further identification objects (function 0x2B / 0x0E). | |
Report server IDreportServerId | Read the device-specific server identification and run status (function 0x11). | |
Send a custom functionsendCustomFunction | Send a user-defined or vendor-specific function code with raw data and return the raw response. |
Diagnostics4
Get event countergetCommEventCounter | Read the communication status word and event counter (function 0x0B). | |
Get event loggetCommEventLog | Read the communication status, event and message counters and the event log bytes (function 0x0C). | |
Read exception statusreadExceptionStatus | Read the device's eight exception status outputs (function 0x07). | |
Run a diagnosticexecuteDiagnostic | Run a diagnostics sub-function such as return query data, restart communications or read a counter (function 0x08). |
Discrete inputs1
Read discrete inputsreadDiscreteInputs | Read the state of a range of discrete inputs (function 0x02). |
Files2
Read file recordreadFileRecord | Read registers from a record of a device file (function 0x14). | |
Write file recordwriteFileRecord | Write typed values into a record of a device file (function 0x15). |
Points1
Read pointsreadPoints | Read a range from any table and return one record per point, ready for mapping and change detection. |
Registers7
Mask write a registerwriteMaskRegister | Change selected bits of one holding register: (current AND andMask) OR (orMask AND NOT andMask) (function 0x16). | |
Read FIFO queuereadFifoQueue | Read the queued registers behind a FIFO pointer address (function 0x18). | |
Read holding registersreadHoldingRegisters | Read a range of holding registers and decode them as typed values (function 0x03). | |
Read input registersreadInputRegisters | Read a range of input registers and decode them as typed values (function 0x04). | |
Write a registerwriteSingleRegister | Write one 16-bit holding register (function 0x06). | |
Write and read registerswriteAndReadRegisters | Write holding registers and read a range back in one atomic exchange (function 0x17). | |
Write registerswriteMultipleRegisters | Encode typed values and write them to consecutive holding registers (function 0x10). |