Integration with Modbus TCP Clients (acts as Modbus Slave).
NOTE — Modbus Slave vs. Server Terminology
Modbus Server is the modern Modbus TCP/IP term for a Modbus Slave (traditional Modbus RTU/ASCII serial term).
As a Modbus Server (Slave), this plugin acts as a passive listener (by default on TCP port 502), exposing an internal memory table of coils and registers that external Modbus Clients (Masters) can query or write to.
2. Technical Architecture
The Modbus Server plugin acts as an industrial Modbus TCP slave listening on port 502 (or custom port). It hosts internal memory tables for Coils (0x), Discrete Inputs (1x), Holding Registers (4x), and Input Registers (3x), handles inbound Modbus function codes (FC01, FC02, FC03, FC04, FC05, FC06, FC15, FC16) from external masters, and synchronizes memory register updates with Uniflow catalog tags.
System Interaction
The Modbus Server plugin runs an embedded Modbus TCP Slave. It maintains holding registers, input registers, coils, and discrete inputs in memory, allowing external SCADA/HMI masters to query or write Uniflow values.
Register Memory Mapping & Data Types
In standard Modbus protocol, memory is structured into 16-bit register words (2 bytes per register) and 1-bit discrete values. Uniflow automatically manages multi-register data packing, allocation boundaries, and UTF-8 string memory resetting:
Memory Allocation Table by Data Type
Data Type
Memory Area
Registers / Bits Consumed
Address Range Example
Description
BoolCoils (0x) / Discrete Inputs (1x)
↳
1 Bit
Address 0
Single 1-bit discrete memory location.
BoolHolding (4x) / Input Registers (3x)
↳
1 Register (16-bit)
Address 0
16-bit register word (0 = False, != 0 = True).
Int16Holding (4x) / Input Registers (3x)
↳
1 Register (16-bit)
Address 0
16-bit signed integer (-32,768 to 32,767) occupying 1 single register.
UInt16Holding (4x) / Input Registers (3x)
↳
1 Register (16-bit)
Address 0
16-bit unsigned integer (0 to 65,535) occupying 1 single register.
Int32Holding (4x) / Input Registers (3x)
↳
2 Registers (32-bit)
Address 0 .. 1
32-bit signed integer combining 2 consecutive 16-bit registers (High Word, Low Word).
Int64Holding (4x) / Input Registers (3x)
↳
4 Registers (64-bit)
Address 0 .. 3
64-bit signed integer combining 4 consecutive 16-bit registers.
DoubleHolding (4x) / Input Registers (3x)
↳
4 Registers (64-bit)
Address 0 .. 3
64-bit IEEE 754 floating-point value combining 4 consecutive 16-bit registers.
StringHolding (4x) / Input Registers (3x)
↳
120 Registers (240 Bytes)
Address 0 .. 119
UTF-8 encoded text string allocated across 120 consecutive registers (2 bytes per register).
IMPORTANT — Register Allocation Overlap & Boundary Checks
Uniflow enforces a built-in ModbusRegisterSanitizer during point configuration.
Overlap Prevention: If a point is assigned HoldingRegister 0 with Int32 (spanning Address 0..1), no other data point can be assigned to Address 0 or Address 1.
Allocation Boundary Limit: The maximum Modbus address is 65535. Defining a multi-register point (e.g., Int64 consuming 4 registers) starting at Address 65534 is automatically blocked because it would exceed the 65535 allocation table boundary.
Special Treatment for String Data Type (UTF-8 Capacity & Zero-Padding Reset)
When a Holding Register is configured as a String, Uniflow allocates a multi-register byte capacity (default 120 registers = 240 bytes, compliant with the standard Modbus TCP PDU receive buffer limit). Because UTF-8 character length can vary (1 to 4 bytes per character):
1. Automatic Zero-Padding Reset on Write: When writing a string shorter than the allocated capacity (e.g. writing "OK" = 2 bytes into a 240-byte / 120-register allocation), Uniflow automatically resets all remaining unused byte positions to null bytes (0x00).
2. Stale Data Prevention: Without zero-padding, writing a shorter string over a previously written longer string (e.g. writing "OK" over "TEMPERATURE_HIGH") would leave trailing garbage characters. Zero-padding ensures the entire memory block is clean and subsequent reads accurately return "OK".
Architecture Diagram
VISUAL ARCHITECTURE FLOW DIAGRAM
Rendering Flow Architecture Diagram...
3. Configuration Parameters
The following configuration fields are available in the User Interface for this plugin:
Configuration Setting
Description
Listening Port
Numeric value specifying the listening port.
Unit ID
Specifies the unit id.
4. Exposed Routes & Data Types
This plugin exposes catalog fields across the following rule graph nodes:
Input Source
The Input Source node reads live values held inside the local Modbus server memory map.
Value stored in local Modbus server memory space (Holding Register, Input Register, Coil, Discrete Input).
Auto-Generated Unit Point ({PointName}_Unit)String
↳
Read-only engineering unit metadata string (e.g., "%", "RPM", "V").
Event Input
The Event Input node intercepts master access requests and memory update triggers emitted by the local Modbus server listener.
Human-Readable Event Name
Event Type Identifier
Event Category
Data Type
Exposed Schema Ports & Data Types
Description
Master Write Receivedmodbus.master_write_received
↳
Server Event
Event Object
Address (Int32)
Value (String)
Area (String)
Timestamp (DateTime)
Emitted when a remote master writes to a server register or coil.
Master Read Receivedmodbus.master_read_received
↳
Server Event
Event Object
Address (Int32)
Count (Int32)
Area (String)
Timestamp (DateTime)
Emitted when a remote master queries server registers.
Register Updatedmodbus.register_updated
↳
Memory Event
Event Object
Address (Int32)
Value (Variant)
Area (String)
Timestamp (DateTime)
Internal memory table update event.
Data Source
The Data Source node provides secondary query access to all local Modbus server registers and their auto-generated engineering unit metadata points ({PointName}_Unit).
Value payload to write to local server memory address.
Direct AccessString
↳
Type (Type)
String
True
Target memory area (Coils, Discrete Input, Holding Register, Input registers).
↳
Address (Address)
Int32
True
Memory offset address.
↳
Value (Value)
String
True
Value to write into server register memory.
4.1 Auto-Generated Engineering Unit Points ({PointName}_Unit)
For every defined Modbus data point (e.g. HoldingRegister_200) that specifies a non-empty engineering unit (e.g., %, RPM, V), Uniflow automatically generates and exposes a secondary string data point suffixed with _Unit (e.g., HoldingRegister_200_Unit).
NOTE
Conditional Generation: The secondary {PointName}_Unit data point is generated only when the Unit field is populated in the point configuration editor. If the Unit field is left empty or blank, Uniflow intentionally omits the _Unit entry to keep the catalog clean and avoid clutter in the Rule Engine point picker.
Catalog Exposure: Automatically listed in the Source Manager catalog alongside primary data points when Unit is set.
Rule Engine Accessibility: Fully readable in both Input Source and Data Source rule graph nodes.
Dynamic Unit Inspection: Allows rules to extract, evaluate, or log raw engineering units alongside telemetry values for dynamic formatting and automated alerting.
5. Usage Examples
Scenario A: OPC UA Tank Level Value Mirrored to Local Modbus Server Holding Register for SCADA Polling
Workflow Overview:
Uniflow reads real-time tank level telemetry from an OPC UA Client node (TankLevelPercent). Whenever the level updates, Uniflow writes the value into the Modbus Server memory map (Holding Register 200). An legacy external SCADA system polls Holding Register 200 via Modbus TCP to display the tank level on plant floor HMIs.
When an external SCADA system issues a Modbus FC05 Write command setting local Modbus Server Coil 5 to True (Master Write Received / modbus.master_write_received), Uniflow intercepts the write event and triggers a high-priority alarm (AlarmId: 501-SCADA-PANIC) in Avigilon Control Center.
Rule Node Configuration:
1. Event Input Node: Modbus Server Listener
Filter Event: Master Write Received (modbus.master_write_received)
Exposed Schema Fields: Address (Int32), Value (String), Timestamp (DateTime)
2. Logic Filter Node: And Condition
Expression: Address == 5 AND Value == "True"
3. Output Target Node: Avigilon ACC Action
Action Target: Alarms (avigilon:alarm)
AlarmId: 501-SCADA-PANIC
Action: TRIGGER
Notes: Panic trigger written by SCADA Master on Modbus Server Coil 5
Logic Flow Diagram:
VISUAL ARCHITECTURE FLOW DIAGRAM
Rendering Flow Architecture Diagram...
Legal & Open Source Compliance
Release Notes & Version History
UNIFLOW SOFTWARE LICENSE AGREEMENT
Version 2.1 — Effective September 2026
Before downloading Uniflow Package, you must read, understand, and agree to the license terms below: