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

  1. In Neblex open Connect › Connections and click New Connection.
  2. Search for Modbus TCP and give the connection a clear name.
  3. Fill in the fields. Secret values are encrypted and never shown again.
  4. 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.
FieldWhat to enter
Connection setupRequired
HostRequired
PortOptionalExample: 502
Connection stringRequiredSecretPaste 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.

EventWhat it doesHow
Point value changedPolls 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

  1. Open a flow, open the node library and search for Modbus TCP.
  2. Drag it onto the canvas and choose an Operation and your connection.
  3. Map the operation's fields from earlier steps, or click Map with Matt.
  4. 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 coilsreadCoilsRead the on/off state of a range of coils (function 0x01).
Write a coilwriteSingleCoilSwitch one coil on or off (function 0x05).
Write coilswriteMultipleCoilsSet a range of coils from a list of true/false values (function 0x0F).
Connection1
Test the connectionpingOpen a Modbus TCP connection to the device or gateway.
Device3
Read device identificationreadDeviceIdentificationRead vendor, product code, revision and further identification objects (function 0x2B / 0x0E).
Report server IDreportServerIdRead the device-specific server identification and run status (function 0x11).
Send a custom functionsendCustomFunctionSend a user-defined or vendor-specific function code with raw data and return the raw response.
Diagnostics4
Get event countergetCommEventCounterRead the communication status word and event counter (function 0x0B).
Get event loggetCommEventLogRead the communication status, event and message counters and the event log bytes (function 0x0C).
Read exception statusreadExceptionStatusRead the device's eight exception status outputs (function 0x07).
Run a diagnosticexecuteDiagnosticRun a diagnostics sub-function such as return query data, restart communications or read a counter (function 0x08).
Discrete inputs1
Read discrete inputsreadDiscreteInputsRead the state of a range of discrete inputs (function 0x02).
Files2
Read file recordreadFileRecordRead registers from a record of a device file (function 0x14).
Write file recordwriteFileRecordWrite typed values into a record of a device file (function 0x15).
Points1
Read pointsreadPointsRead a range from any table and return one record per point, ready for mapping and change detection.
Registers7
Mask write a registerwriteMaskRegisterChange selected bits of one holding register: (current AND andMask) OR (orMask AND NOT andMask) (function 0x16).
Read FIFO queuereadFifoQueueRead the queued registers behind a FIFO pointer address (function 0x18).
Read holding registersreadHoldingRegistersRead a range of holding registers and decode them as typed values (function 0x03).
Read input registersreadInputRegistersRead a range of input registers and decode them as typed values (function 0x04).
Write a registerwriteSingleRegisterWrite one 16-bit holding register (function 0x06).
Write and read registerswriteAndReadRegistersWrite holding registers and read a range back in one atomic exchange (function 0x17).
Write registerswriteMultipleRegistersEncode typed values and write them to consecutive holding registers (function 0x10).