RuleGo RuleGo
🏠Home
  • Quick Start
  • Rule Chain
  • Standard Components
  • Extension Components
  • Custom Components
  • Visualization
  • RuleGo-Server
  • AOP
  • Trigger
  • Advanced Topics
  • Performance
  • Standard Components
  • Extension Components
  • Custom Components
  • Components Marketplace
  • Overview
  • Quick Start
  • Routing
  • DSL
  • API
  • Options
  • Components
🔥Editor (opens new window)
  • RuleGo Editor (opens new window)
  • RuleGo Server (opens new window)
  • StreamSQL
  • AI Agent Framework
  • TPCLAW Agent Platform (opens new window)
  • Github (opens new window)
  • Gitee (opens new window)
  • Changelog (opens new window)
  • English
  • 简体中文
🏠Home
  • Quick Start
  • Rule Chain
  • Standard Components
  • Extension Components
  • Custom Components
  • Visualization
  • RuleGo-Server
  • AOP
  • Trigger
  • Advanced Topics
  • Performance
  • Standard Components
  • Extension Components
  • Custom Components
  • Components Marketplace
  • Overview
  • Quick Start
  • Routing
  • DSL
  • API
  • Options
  • Components
🔥Editor (opens new window)
  • RuleGo Editor (opens new window)
  • RuleGo Server (opens new window)
  • StreamSQL
  • AI Agent Framework
  • TPCLAW Agent Platform (opens new window)
  • Github (opens new window)
  • Gitee (opens new window)
  • Changelog (opens new window)
  • English
  • 简体中文

广告采用随机轮播方式显示 ❤️成为赞助商
  • Quick Start

  • Rule Chain

  • Standard Components

  • Extension Components

    • Extension Components Overview
    • filter

    • action

    • transform

    • external

    • ai

    • ci

    • IoT

      • IoT Components Overview
      • Input Endpoints

      • Protocol Acquisition

        • OPC_UA Read
        • OPC_UA Write
        • Modbus Node
        • Serial Communication
        • S7 Read
        • S7 Write
        • EtherNet/IP Read
        • EtherNet/IP Write
        • SNMP Read
        • SNMP Write
        • Modbus Read Points Node
        • Modbus Write Points Node
          • Configuration
            • Point table (points)
          • Write Rules
          • Input/Output
          • Example
          • Related
        • Universal Acquisition Read
        • IoT Write
        • IEC 104 Read
        • IEC 104 Write
        • FINS Node
        • FINS Read
        • FINS Write
        • MC Node
        • MC Read
        • MC Write
        • DL/T 645 Node
        • DL/T 645 Read
        • DL/T 645 Write
      • Time-Series Database

      • 控制

      • IoT Scenarios
    • Stream Processing

    • Service Discovery

    • file

  • Custom Components

  • Components marketplace

  • Visualization

  • AOP

  • Trigger

  • Advanced Topic

  • Agent Framework

  • RuleGo-Server

  • FAQ

  • Endpoint Module

  • Support

  • StreamSQL

目录

Modbus Write Points Node

x/modbusWrite component: v0.37.0+ batch-writes Modbus points over TCP/RTU, using industry-standard Modicon traditional addresses. Routes to Success/Failure.

Unlike the imperative x/modbus (single Cmd/Address/Quantity), this component is point-table oriented and shares the same point structure and connection config as x/modbusRead.

Requires the extension library: rulego-components-iot (opens new window)

# Configuration

Field Type Description Default
server string Modbus server address (tcp://host:port or rtu:///dev/ttyUSB0) tcp://127.0.0.1:502
unitId uint8 Slave unit ID 1
points array Default write point table (see below). Points in msg.Data take precedence none
tcpConfig object TCP config (timeout/certFile/certKeyFile/caFile) none
rtuConfig object RTU serial config (speed/dataBits/parity/stopBits) none
encodingConfig object Encoding (endianness/wordOrder for multi-register values) big-endian high-word

# Point table (points)

Field Description
name Point name
addr Modicon address (1-based): 00001=Coil, 10001=Discrete Input, 30001=Input Register, 40001=Holding Register; extended 6-digit 400001+ = Holding Register
type Data type: BOOL/UINT16/INT16/UINT32/INT32/UINT64/INT64/FLOAT32/FLOAT64
value Write value (string form, e.g. "23.5", "true", "0x1F"), supports ${msg.xx} templates
endian Multi-register byte order: ABCD/CDAB/BADC/DCBA

All fields support ${msg.xx} / ${metadata.xx} templates.

# Write Rules

  • Read-only areas rejected: 10001(Discrete Input) / 30001(Input Register) are read-only; writes fail
  • BOOL writes only to Coil: BOOL type can only write 00001(Coil); registers have no atomic bit-write
  • Multi-register types: UINT32/INT32/FLOAT32/UINT64/INT64/FLOAT64 span multiple registers, encoded by endian

# Input/Output

  • Input: msg.Data with point list [{"name","addr","type","value"}] (takes precedence over configured points)
  • Output: Success/Failure (any point failure fails the batch)

# Example

Configured default write points:

{
  "id": "modbus_write",
  "type": "x/modbusWrite",
  "configuration": {
    "server": "tcp://192.168.1.100:502",
    "unitId": 1,
    "points": [
      {"name": "setpoint", "addr": "40010", "type": "FLOAT32", "value": "${msg.targetTemp}"},
      {"name": "motor", "addr": "00001", "type": "BOOL", "value": "true"}
    ]
  }
}
1
2
3
4
5
6
7
8
9
10
11
12

On-demand write (msg.Data with point list, takes precedence):

[{"name": "setpoint", "addr": "40010", "type": "FLOAT32", "value": "50.5"}]
1

# Related

  • Read: x/modbusRead
  • Universal write entry: x/iotWrite (driver=modbus)
  • Imperative (legacy): x/modbus (kept)
Edit this page on GitHub (opens new window)
Last Updated: 2026/07/29, 07:07:39
Modbus Read Points Node
Universal Acquisition Read

← Modbus Read Points Node Universal Acquisition Read→

Theme by Vdoing | Copyright © 2023-2026 RuleGo Team | Apache 2.0 License

  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式