Docs
/
Tags
/

Creating a Modbus TCP Tag

Creating a Modbus TCP Tag

After creating a tag on a Modbus TCP device, you need to tell Koios which register to read or write and how to interpret its value. You can configure these fields during creation or afterwards on the tag's Configuration tab.

Protocol Fields

Register Type

The type of Modbus register this tag reads from.

TypeDescriptionAccess
CoilSingle-bit read/write registers — typically used for on/off controlsRead/Write
Discrete InputSingle-bit read-only registers — typically used for digital sensor statesRead Only
Input Register16-bit read-only registers — typically used for analog measurementsRead Only
Holding Register16-bit read/write registers — the most common type for configuration and dataRead/Write
  • Required

Register Address

The address of the register on the device.

  • Required
  • Range: 0–65535
  • If the device has one-based addressing enabled, the display adds 1 to the address for readability, but the underlying communication always uses the 0-based value

Data Type

How Koios interprets the raw register value(s).

Data TypeRegisters UsedDescription
Boolean1Single bit — used with Coil/Discrete or bit extraction from a holding register
Int16116-bit signed integer (-32,768 to 32,767)
UInt16116-bit unsigned integer (0 to 65,535)
Int32232-bit signed integer — reads two consecutive registers
UInt32232-bit unsigned integer — reads two consecutive registers
Float32232-bit floating point — reads two consecutive registers
Float64464-bit floating point — reads four consecutive registers
  • Required
  • Multi-register types (Int32, UInt32, Float32, Float64) read consecutive registers starting from the configured address

Byte Swap

Reverses the byte order within each 16-bit register.

  • Default: Off
  • Enable this when the device stores values in a different byte order than expected — common with some manufacturers

Word Swap

Reverses the order of registers for multi-register data types (Int32, UInt32, Float32, Float64).

  • Default: Off
  • Only visible when using a multi-register data type
  • If a 32-bit value reads as a nonsensical number, try toggling this setting

Bit Number

When using Boolean data type with an Input Register or Holding Register, this specifies which bit within the 16-bit register to extract.

  • Optional — only shown when data type is Boolean and register type is Input or Holding
  • Range: Bit 0 (least significant) through Bit 15 (most significant)
  • Leave empty to use the entire register value as a boolean (0 = false, non-zero = true)

Using the Register Browser

The Modbus register browser lets you scan and interpret register values directly from the device.

  1. Open the tag's Configuration tab and click Browse
  2. Select the register type and enter a start address and count
  3. Click Scan to read raw register values from the device
  4. Use the interpretation tools to test different data types, byte swap, and word swap combinations
  5. When you find the correct interpretation, apply it to populate the tag's configuration

This is especially useful for unfamiliar devices where the register map isn't well documented.

After Configuration

  1. Save the tag configuration
  2. Test the tag — click
    Test
    to verify Koios reads the correct value (see Testing a Tag)
  3. Enable the tag — flip the enable switch to start collecting data