Knowledge Base

Build Modbus PLC InfluxDB Logger

Duration: ~25 min · Level: Intermediate · Template: #128 Modbus PLC → InfluxDB Logger · Deployment: On-prem / Runtime

Prerequisites: PLC reachable on LAN (Modbus TCP port 502), InfluxDB 2.x endpoint. This template is on-prem only — run in Studio on-prem or export a runtime agent on the gateway PC.

Build an industrial Modbus telemetry pipeline: poll PLC holding registers on a schedule and write readings to InfluxDB for dashboards and alerting.

What this template does

  1. Every MinuteCron Schedule trigger.
  2. Read PLC RegistersModbus TCP Request (holding registers).
  3. Write to InfluxDB — time-series point with tags for PLC identity.

Step 1 — Load the template

  1. Studio → Templates → search Modbus PLC InfluxDB or IoT Automation.
  2. Load template #128. Confirm the cloud badge shows on-prem requirement on Modbus nodes.

Step 2 — PLC connection

  1. Select Read PLC Registers. Set Host to your PLC IP (e.g. 192.168.1.10).
  2. Configure Unit ID, Start address, Count, and Data type per your device manual.
  3. Use Direct connect — no Discovery scan required for Modbus TCP.

Step 3 — InfluxDB

  1. Select Write to InfluxDB. Set URL, token, org, bucket, and measurement name.
  2. Map Value from {{values}} or a specific register index.
  3. Store credentials in {{$var.influxToken}} rather than plain text when possible.

Step 4 — Schedule

  1. Adjust the cron expression if one minute is too aggressive for your PLC.
  2. Example: */5 * * * * for every five minutes.

Step 5 — Test on-prem

  1. Run from an on-prem Studio host or exported runtime on the same subnet as the PLC.
  2. Dry Run validates graph wiring; live Modbus requires activation.
  3. Check InfluxDB for new points and Jobs → History for run traces.

Deploy to edge

For factory gateways, export the runtime agent and install as a Windows/Linux service. The agent polls locally — no cloud hop for PLC traffic.

Related tutorials

Nodlyn Assistant
Ask me anything about Nodlyn
Hi! 👋 I'm the Nodlyn assistant. Ask me about the product, workflow components, connectors, agent runtime, agent capabilities, deployment, and more. If I don't know an answer, I'll point you to our contact form.