← All guides
Guide · Modbus TCP

Free Modbus TCP SCADA, step by step

Many skids, drives, meters and small PLCs speak Modbus TCP. OptiZeus SCADA reads and writes registers and coils directly. This guide connects one Modbus TCP device to the free edition.

Step 1: add the connection

  1. Open Config → PLC Connections and click + Add PLC Connection.
  2. Brand Generic / Other, model Modbus TCP Device, protocol Modbus TCP.
  3. Enter the IP address, port 502 and the Unit ID of the device.
  4. Click Test Connection. OptiZeus opens TCP and tries to read holding register 0. If the register read fails, it still reports the TCP success and tells you to check the unit ID and the register map.

Serial Modbus RTU devices need a Modbus TCP-to-RTU gateway. Configure a Modbus TCP connection to the gateway.

Step 2: addresses

Use the short form or the classic five-digit form, whichever your device manual uses.

AddressRegister typeFunction
HR0 or 40001Holding registerFC03
IR0 or 30001Input registerFC04
C0 or 00001CoilFC01
DI0 or 10001Discrete inputFC02

The short forms count from 0, the five-digit forms from 1. So 40001 and HR0 are the same register.

Step 3: data types and word order

Without a type, a register is read as unsigned 16-bit (0 to 65535). Add a type after a colon:

  • HR100:I16 signed 16-bit
  • HR100:I32 or HR100:U32 32-bit integer (two registers)
  • HR100:F32 32-bit float (two registers)

Devices store 32-bit values in different orders. Add the word order as a third part: 40001:F32:CDAB reads a float with the low word first. The default is ABCD. If a value looks wrong, try CDAB, BADC or DCBA.

A tag of type Bit takes one bit from a register, for example a running or fault bit in a status word. Linear scaling turns raw values into engineering units, for example 0 to 10000 into 0 to 100 %.

How reads and writes work

OptiZeus groups the tags by register type and reads them in blocks of up to 120 registers. A new block starts when the gap to the previous tag is more than 10 registers. If one block fails, only its tags turn bad.

Writes use FC06 for one register, FC16 for 32-bit values and FC05 for a coil. Writes to input registers and discrete inputs are refused, because they are read-only in Modbus. Nothing is sent and the screen shows Write Failed!.

A small skid example

A water-treatment skid with tank level in 40001, pump status bits in 40002, a speed setpoint in 40010 and a start coil 00001 needs five tags. OptiZeus reads 40001, 40002 and 40010 in one request, because the gap is less than 10 registers. That leaves 45 tags for the rest of the machine in the free edition.

Try it free

OptiZeus SCADA Free Edition: 50 tags, 1 PLC, 5 screens, alarms and trends. Free for commercial use on one machine.