From 9ca964741987fcda85cbb285b0fd63aa64f01c12 Mon Sep 17 00:00:00 2001 From: Ege Korkan Date: Wed, 19 Aug 2026 15:52:09 +0200 Subject: [PATCH 1/3] explain modbus address ranges --- bindings/protocols/modbus/index.html | 23 +++++++++++++------ bindings/protocols/modbus/index.template.html | 7 ++++++ bindings/protocols/modbus/ontology.html | 16 +++++++------ bindings/protocols/modbus/ontology.ttl | 20 ++++++++-------- 4 files changed, 42 insertions(+), 24 deletions(-) diff --git a/bindings/protocols/modbus/index.html b/bindings/protocols/modbus/index.html index c454125f..c1da2a83 100644 --- a/bindings/protocols/modbus/index.html +++ b/bindings/protocols/modbus/index.html @@ -431,7 +431,7 @@

Function

readDiscreteInput Read Discrete Inputs 2 - Read Physical Discrete Inputs (bit access). Address range 10001-19999 + Read Physical Discrete Inputs (bit access). Usually in the address range 10001-19999 @@ -449,7 +449,7 @@

Function

readHoldingRegisters Read Multiple Holding Registers 3 - Read Multiple Holding Registers (16 bit access). Address range 40001-49999 + Read Multiple Holding Registers (16 bit access). Usually in the address range 40001-49999 @@ -458,7 +458,7 @@

Function

readInputRegisters Read Multiple Input Registers 4 - Read Multiple Physical Input Registers (16 bits). Address range 30001-39999 + Read Multiple Physical Input Registers (16 bits). Usually in the address range 30001-39999 @@ -467,7 +467,7 @@

Function

writeMultipleCoils Write Multiple Coils 15 - Write Multiple Physical Coils (internal bits). Address range 00001-09999 + Write Multiple Physical Coils (internal bits). Usually in the address range 00001-09999 @@ -476,7 +476,9 @@

Function

writeMultipleHoldingRegisters Write Multiple Holding Registers 16 - Write Multiple Holding Registers (output registers, 16 bit). Address range 40001-49999 + + Write Multiple Holding Registers (output registers, 16 bit). Usually in the address range 40001-49999 + @@ -485,7 +487,7 @@

Function

writeSingleCoil Write Single Coil 5 - Write Single Physical Coil (internal bit). Address range 00001-09999 + Write Single Physical Coil (internal bit). Usually in the address range 00001-09999 @@ -494,12 +496,19 @@

Function

writeSingleHoldingRegister Write Single Holding Register 6 - Write Single HoldingRegister (internal bits). Address range 40001-49999 + Write Single HoldingRegister (internal bits). Usually in the address range 40001-49999 +

+ The address ranges indicated are based on the observations of the Modbus community and are not part of the + official Modbus specification. While you can use any address within the 0-65535 range, it is recommended for + new devices to adhere to these ranges for better compatibility with existing Modbus devices and systems. A WoT + Consumer application should not assume that a specific address range is used for a particular type of register + or coil, and should always use the Thing Description as the source of truth. +

Payload DataType

diff --git a/bindings/protocols/modbus/index.template.html b/bindings/protocols/modbus/index.template.html index bbeb3543..d3b69737 100644 --- a/bindings/protocols/modbus/index.template.html +++ b/bindings/protocols/modbus/index.template.html @@ -261,6 +261,13 @@

Function

%s +

+ The address ranges indicated are based on the observations of the Modbus community and are not part of the + official Modbus specification. While you can use any address within the 0-65535 range, it is recommended for + new devices to adhere to these ranges for better compatibility with existing Modbus devices and systems. A WoT + Consumer application should not assume that a specific address range is used for a particular type of register + or coil, and should always use the Thing Description as the source of truth. +

Payload DataType

diff --git a/bindings/protocols/modbus/ontology.html b/bindings/protocols/modbus/ontology.html index a80e0b1d..47a8ee17 100644 --- a/bindings/protocols/modbus/ontology.html +++ b/bindings/protocols/modbus/ontology.html @@ -744,7 +744,7 @@

Read Device Identification

Read Discrete Inputs

IRI: https://www.w3.org/2019/wot/modbus#readDiscreteInput

- Read Physical Discrete Inputs (bit access). Address range 10001-19999 + Read Physical Discrete Inputs (bit access). Usually in the address range 10001-19999 @@ -774,7 +774,7 @@

Read File Record

Read Multiple Holding Registers

IRI: https://www.w3.org/2019/wot/modbus#readHoldingRegisters

- Read Multiple Holding Registers (16 bit access). Address range 40001-49999 + Read Multiple Holding Registers (16 bit access). Usually in the address range 40001-49999
@@ -789,7 +789,7 @@

Read Multiple Holding Registers

Read Multiple Input Registers

IRI: https://www.w3.org/2019/wot/modbus#readInputRegisters

- Read Multiple Physical Input Registers (16 bits). Address range 30001-39999 + Read Multiple Physical Input Registers (16 bits). Usually in the address range 30001-39999
@@ -804,7 +804,7 @@

Read Multiple Input Registers

Write Multiple Coils

IRI: https://www.w3.org/2019/wot/modbus#writeMultipleCoils

- Write Multiple Physical Coils (internal bits). Address range 00001-09999 + Write Multiple Physical Coils (internal bits). Usually in the address range 00001-09999
@@ -819,7 +819,9 @@

Write Multiple Coils

Write Multiple Holding Registers

IRI: https://www.w3.org/2019/wot/modbus#writeMultipleHoldingRegisters

- Write Multiple Holding Registers (output registers, 16 bit). Address range 40001-49999 + Write Multiple Holding Registers (output registers, 16 bit). Usually in the address range 40001-49999
@@ -834,7 +836,7 @@

Write Multiple Holding Registers

Write Single Coil

IRI: https://www.w3.org/2019/wot/modbus#writeSingleCoil

- Write Single Physical Coil (internal bit). Address range 00001-09999 + Write Single Physical Coil (internal bit). Usually in the address range 00001-09999
@@ -849,7 +851,7 @@

Write Single Coil

Write Single Holding Register

IRI: https://www.w3.org/2019/wot/modbus#writeSingleHoldingRegister

- Write Single HoldingRegister (internal bits). Address range 40001-49999 + Write Single HoldingRegister (internal bits). Usually in the address range 40001-49999
diff --git a/bindings/protocols/modbus/ontology.ttl b/bindings/protocols/modbus/ontology.ttl index 3cfc227b..22b36949 100644 --- a/bindings/protocols/modbus/ontology.ttl +++ b/bindings/protocols/modbus/ontology.ttl @@ -254,7 +254,7 @@ binding:assignment rdf:type owl:AnnotationProperty . rdfs:comment "Function code identifies the operation requested by client, indicates to the server what kind of action to perform. For a normal response, the server simply echoes to the request the original function code."@en ; rdfs:label "Function"@en . - + ### https://www.w3.org/2019/wot/modbus#PayloadDataType :PayloadDataType rdf:type owl:Class ; owl:equivalentClass [ rdf:type owl:Class ; @@ -283,7 +283,7 @@ binding:assignment rdf:type owl:AnnotationProperty . :FunctionField rdf:type owl:Class ; rdfs:subClassOf :Payload ; rdfs:comment """Function Field class represents the value of the function in a Modbus frame. Each operation identified with a human readable name have a corresponding code. -The response function code corresponds exactly to the request function code sent by the client when no error occurs. +The response function code corresponds exactly to the request function code sent by the client when no error occurs. On the contrary, the response operation is identified with an error code or exception function code corresponding to the request function code + 0x80."""@en ; rdfs:label "Function Field" . @@ -334,7 +334,7 @@ On the contrary, the response operation is identified with an error code or exce ### https://www.w3.org/2019/wot/modbus#DataRequest :DataRequest rdf:type owl:Class ; rdfs:subClassOf :DataField ; - rdfs:comment """Data request contains additional information sent from a client to server that the server uses to take the action defined by the function code. + rdfs:comment """Data request contains additional information sent from a client to server that the server uses to take the action defined by the function code. This can include items like register address, the quantity of items to be handled, and the count of actual data bytes in the field. The data request field may be nonexistent (zero length) in certain kind of requests, in this case the server does not require any additional information. The function code alone specifies the action."""@en ; @@ -495,7 +495,7 @@ The data request field may be nonexistent (zero length) in certain kind of reque :Function ; :readFrom :DiscreteInput ; :hasCodeNumber 2 ; - rdfs:comment "Read Physical Discrete Inputs (bit access). Address range 10001-19999"@en ; + rdfs:comment "Read Physical Discrete Inputs (bit access). Usually in the address range 10001-19999"@en ; rdfs:label "Read Discrete Inputs"@en . @@ -504,7 +504,7 @@ The data request field may be nonexistent (zero length) in certain kind of reque :Function ; :readFrom :HoldingRegister ; :hasCodeNumber 3 ; - rdfs:comment "Read Multiple Holding Registers (16 bit access). Address range 40001-49999"@en ; + rdfs:comment "Read Multiple Holding Registers (16 bit access). Usually in the address range 40001-49999"@en ; rdfs:label "Read Multiple Holding Registers"@en . @@ -513,7 +513,7 @@ The data request field may be nonexistent (zero length) in certain kind of reque :Function ; :readFrom :InputRegister ; :hasCodeNumber 4 ; - rdfs:comment "Read Multiple Physical Input Registers (16 bits). Address range 30001-39999"@en ; + rdfs:comment "Read Multiple Physical Input Registers (16 bits). Usually in the address range 30001-39999"@en ; rdfs:label "Read Multiple Input Registers"@en . @@ -522,7 +522,7 @@ The data request field may be nonexistent (zero length) in certain kind of reque :Function ; :writesOn :Coil ; :hasCodeNumber 15 ; - rdfs:comment "Write Multiple Physical Coils (internal bits). Address range 00001-09999"@en ; + rdfs:comment "Write Multiple Physical Coils (internal bits). Usually in the address range 00001-09999"@en ; rdfs:label "Write Multiple Coils"@en . @@ -531,7 +531,7 @@ The data request field may be nonexistent (zero length) in certain kind of reque :Function ; :writesOn :HoldingRegister ; :hasCodeNumber 16 ; - rdfs:comment "Write Multiple Holding Registers (output registers, 16 bit). Address range 40001-49999"@en ; + rdfs:comment "Write Multiple Holding Registers (output registers, 16 bit). Usually in the address range 40001-49999"@en ; rdfs:label "Write Multiple Holding Registers"@en . @@ -540,7 +540,7 @@ The data request field may be nonexistent (zero length) in certain kind of reque :Function ; :writesOn :Coil ; :hasCodeNumber 5 ; - rdfs:comment "Write Single Physical Coil (internal bit). Address range 00001-09999"@en ; + rdfs:comment "Write Single Physical Coil (internal bit). Usually in the address range 00001-09999"@en ; rdfs:label "Write Single Coil"@en . @@ -549,7 +549,7 @@ The data request field may be nonexistent (zero length) in certain kind of reque :Function ; :writesOn :HoldingRegister ; :hasCodeNumber 6 ; - rdfs:comment "Write Single HoldingRegister (internal bits). Address range 40001-49999"@en ; + rdfs:comment "Write Single HoldingRegister (internal bits). Usually in the address range 40001-49999"@en ; rdfs:label "Write Single Holding Register"@en . ### https://www.w3.org/2019/wot/modbus#readFileRecord From a6b90a89eeba91830429005a244114c16bc71670 Mon Sep 17 00:00:00 2001 From: Ege Korkan Date: Wed, 19 Aug 2026 15:59:40 +0200 Subject: [PATCH 2/3] add range to modv:address --- bindings/protocols/modbus/index.html | 2 +- bindings/protocols/modbus/ontology.html | 2 +- bindings/protocols/modbus/ontology.ttl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bindings/protocols/modbus/index.html b/bindings/protocols/modbus/index.html index c1da2a83..a4d59df2 100644 --- a/bindings/protocols/modbus/index.html +++ b/bindings/protocols/modbus/index.html @@ -186,7 +186,7 @@

URL terms

- + diff --git a/bindings/protocols/modbus/ontology.html b/bindings/protocols/modbus/ontology.html index 47a8ee17..26b92eb8 100644 --- a/bindings/protocols/modbus/ontology.html +++ b/bindings/protocols/modbus/ontology.html @@ -436,7 +436,7 @@

Datatype Properties

hasAddress

IRI: https://www.w3.org/2019/wot/modbus#hasAddress

- Specifies the starting address of the Modbus operations + Specifies the starting address of the Modbus operations. Between 0 and 65535
modv:addressSpecifies the starting address of the Modbus operationsSpecifies the starting address of the Modbus operations. Between 0 and 65535 required integer
diff --git a/bindings/protocols/modbus/ontology.ttl b/bindings/protocols/modbus/ontology.ttl index 22b36949..54ce20f6 100644 --- a/bindings/protocols/modbus/ontology.ttl +++ b/bindings/protocols/modbus/ontology.ttl @@ -144,7 +144,7 @@ binding:assignment rdf:type owl:AnnotationProperty . :hasAddress rdf:type owl:DatatypeProperty ; rdfs:domain :Request ; rdfs:range xsd:integer ; - rdfs:comment "Specifies the starting address of the Modbus operations"@en ; + rdfs:comment "Specifies the starting address of the Modbus operations. Between 0 and 65535"@en ; rdfs:label "hasAddress"@en ; binding:assignment binding:required . From 9196ec1325f03204415206606a0b8ea25b7d6c4e Mon Sep 17 00:00:00 2001 From: Ege Korkan Date: Thu, 20 Aug 2026 13:09:57 +0200 Subject: [PATCH 3/3] correct ranges of terms --- bindings/protocols/modbus/index.html | 9 +++++---- bindings/protocols/modbus/ontology.html | 24 ++++++++++++++---------- bindings/protocols/modbus/ontology.ttl | 16 ++++++++-------- 3 files changed, 27 insertions(+), 22 deletions(-) diff --git a/bindings/protocols/modbus/index.html b/bindings/protocols/modbus/index.html index a4d59df2..6babf820 100644 --- a/bindings/protocols/modbus/index.html +++ b/bindings/protocols/modbus/index.html @@ -196,8 +196,9 @@

URL terms

@@ -246,8 +247,8 @@

Form terms

diff --git a/bindings/protocols/modbus/ontology.html b/bindings/protocols/modbus/ontology.html index 26b92eb8..1e85d2d0 100644 --- a/bindings/protocols/modbus/ontology.html +++ b/bindings/protocols/modbus/ontology.html @@ -17,7 +17,10 @@
-

Vocabulary to represent Modbus messages in RDF.

+

+ This document defines a vocabulary to represent Modbus messages in RDF. Even though it is provided by the Web of + Things, it can be used independently. +

@@ -448,7 +451,7 @@

hasAddress

@@ -546,7 +549,7 @@

hasPollingTime

@@ -567,7 +570,7 @@

hasQuantity

@@ -577,8 +580,8 @@

hasQuantity

hasTimeout

IRI: https://www.w3.org/2019/wot/modbus#hasTimeout

Modbus response maximum waiting time. Defines how much time the runtime should wait until it receives a - reply from the device.Maximum waiting time for a response. Defines how much time the runtime should wait until it receives a + reply from the device. Defined as integer of milliseconds.
modv:unitID - The Unit ID is technically not needed for ModbusTCP, since the IP-address works as unique identifier, - but for compatibility reasons it MUST be included + Sometimes also called the Slave or Server ID, the Unit ID is technically not needed for ModbusTCP, since + the IP-address works as unique identifier, but for compatibility reasons it MUST be included. Mostly + between 1 and 247 but 255 is technically possible required integer
modv:timeout - Modbus response maximum waiting time. Defines how much time the runtime should wait until it receives a - reply from the device. + Maximum waiting time for a response. Defines how much time the runtime should wait until it receives a + reply from the device. Defined as integer of milliseconds. optional integer
Range - integer + unsignedShort
Range - integer + unsignedInt
Range - integer + unsignedShort
@@ -591,7 +594,7 @@

hasTimeout

@@ -601,8 +604,9 @@

hasTimeout

hasUnitID

IRI: https://www.w3.org/2019/wot/modbus#hasUnitID

The Unit ID is technically not needed for ModbusTCP, since the IP-address works as unique identifier, but - for compatibility reasons it MUST be includedSometimes also called the Slave or Server ID, the Unit ID is technically not needed for ModbusTCP, since + the IP-address works as unique identifier, but for compatibility reasons it MUST be included. Mostly between + 1 and 247 but 255 is technically possible
Range - integer + unsignedInt
@@ -615,7 +619,7 @@

hasUnitID

diff --git a/bindings/protocols/modbus/ontology.ttl b/bindings/protocols/modbus/ontology.ttl index 54ce20f6..12e6768b 100644 --- a/bindings/protocols/modbus/ontology.ttl +++ b/bindings/protocols/modbus/ontology.ttl @@ -23,7 +23,7 @@ ] ; vann:preferredNamespacePrefix "modv" ; vann:preferredNamespaceUri : ; - rdfs:comment "Vocabulary to represent Modbus messages in RDF."@en ; + rdfs:comment "This document defines a vocabulary to represent Modbus messages in RDF. Even though it is provided by the Web of Things, it can be used independently."@en ; rdfs:label "Modbus in RDF"@en . ################################################################# @@ -143,7 +143,7 @@ binding:assignment rdf:type owl:AnnotationProperty . ### https://www.w3.org/2019/wot/modbus#hasAddress :hasAddress rdf:type owl:DatatypeProperty ; rdfs:domain :Request ; - rdfs:range xsd:integer ; + rdfs:range xsd:unsignedShort ; rdfs:comment "Specifies the starting address of the Modbus operations. Between 0 and 65535"@en ; rdfs:label "hasAddress"@en ; binding:assignment binding:required . @@ -162,7 +162,7 @@ binding:assignment rdf:type owl:AnnotationProperty . ### https://www.w3.org/2019/wot/modbus#hasPollingTime :hasPollingTime rdf:type owl:DatatypeProperty ; rdfs:domain :Request ; - rdfs:range xsd:integer ; + rdfs:range xsd:unsignedInt ; rdfs:comment "Modbus TCP maximum polling rate. The Modbus specification does not define a maximum or minimum allowed polling rate, however specific implementations might introduce such limits. Defined as integer of milliseconds." ; rdfs:label "hasPollingTime"@en . @@ -170,7 +170,7 @@ binding:assignment rdf:type owl:AnnotationProperty . ### https://www.w3.org/2019/wot/modbus#hasQuantity :hasQuantity rdf:type owl:DatatypeProperty ; rdfs:domain :Request ; - rdfs:range xsd:integer ; + rdfs:range xsd:unsignedShort ; rdfs:comment "Specifies the amount of either registers or coils to be read or written to"@en ; rdfs:label "hasQuantity"@en . @@ -178,16 +178,16 @@ binding:assignment rdf:type owl:AnnotationProperty . ### https://www.w3.org/2019/wot/modbus#hasTimeout :hasTimeout rdf:type owl:DatatypeProperty ; rdfs:domain :Request ; - rdfs:range xsd:integer ; - rdfs:comment "Modbus response maximum waiting time. Defines how much time the runtime should wait until it receives a reply from the device." ; + rdfs:range xsd:unsignedInt ; + rdfs:comment "Maximum waiting time for a response. Defines how much time the runtime should wait until it receives a reply from the device. Defined as integer of milliseconds." ; rdfs:label "hasTimeout"@en . ### https://www.w3.org/2019/wot/modbus#hasUnitID :hasUnitID rdf:type owl:DatatypeProperty ; rdfs:domain :Request ; - rdfs:range xsd:integer ; - rdfs:comment "The Unit ID is technically not needed for ModbusTCP, since the IP-address works as unique identifier, but for compatibility reasons it MUST be included" ; + rdfs:range xsd:unsignedByte ; + rdfs:comment "Sometimes also called the Slave or Server ID, the Unit ID is technically not needed for ModbusTCP, since the IP-address works as unique identifier, but for compatibility reasons it MUST be included. Mostly between 1 and 247 but 255 is technically possible" ; rdfs:label "hasUnitID"@en .
Range - integer + unsignedByte