Vocabulary to represent Modbus messages in RDF.

This document is a work in progress

Introduction

To use in TD forms.

Axiomatization

Classes

Data request

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

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 discree and register address, the quantity of items to be handled, and the count of actual data bytes in the field. The data request field my be nonexistent (zero length) in certain kid of requests, in this case the server does not require any additional information. The function code alone specifies the action.
Sub-class ofData Field

Data response

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

Data response contains the informations requested by the client to the server.
Sub-class ofData Field

Data Field

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

The Data Field of a Modbus messages can contain different kind of informations: additional informations that the server uses to take the action defined by the function code (data request), informations regarded the performed action requested by the client (data response), informations about the reason of the error (exception code).
Sub-class ofPayload
Super-class ofData request
Data response
Exception code

Entity

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

A Modbus registry type
Enumeration membersCoil
Discrete Input
Holding Register
Input Register

Exception function

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

In case of error, the server replaces the normal function code with an exception function code (or error code) corresponding to the request function code +0x80.
Sub-class ofFunction Field

Exception response

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

Response sent by server to client when error occurs.
Sub-class ofResponse

Function

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

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.
Sub-class ofFunction Field
Enumeration membersRead Single Coil
Read Device Identification
Read Discrete Inputs
Read Multiple Holding Registers
Read Multiple Input Registers
Write Multiple Coils
Write Multiple Holding Registers
Write Single Coil
Write Single Holding Register

Function Field

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

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. On the contrary, the response operation is identified with an error code or exception function code corresponding to the request function code + 0x80.
Sub-class ofPayload
Super-class ofException function
Function

A Modbus Message

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

A Modbus Message class represents the comunication between client and server
Super-class ofRequest
Response

Normal response

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

Response sent by server to client when no error occurs.
Sub-class ofResponse

Payload

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

In a Modbus message the content of a requested operation (sent by client to server) or of a response (elaborated by server and sent to client) is expressed with a specific code. This code is made by two field: function field and data field.
Super-class ofData Field
Function Field

Request

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

A Request message is sent by a client device to a server device. The comunication client/server stats only with a request sent by the client.
Sub-class ofA Modbus Message

Response

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

A Response message is sent by a server device to client device in return to a client's query.
Sub-class ofA Modbus Message
Super-class ofException response
Normal response

Exception code

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

For an Exception Response, the server returns an exception code as data response field. Exception code defines the server condition that caused the exception as well as the reason of the error.
Sub-class ofData Field
Enumeration membersILLEGAL FUNCTION
ILLEGAL DATA ADDRESS
ILLEGAL DATA VALUE
SLAVEDEVICE FAILURE
ACKNOWLEDGE
SLAVEDEVICE BUISY

Object Properties

hasEntity

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

A registry type to let the runtime automatically detect the right function code
DomainRequest
RangeEntity

hasFunction

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

Function Code sent by the master in every request. Specifying the desired interaction.
DomainNormal response
Request
RangeFunction

Datatype Properties

hasAddress

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

Specifies the starting address of the Modbus operations
DomainRequest
Rangeinteger

hasCodeNumber

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

Specifies the Modbus function/exception code number
DomainException function
Function
Exception code
Rangeinteger

hasPollingTime

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

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.
DomainRequest
Rangeinteger

hasQuantity

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

Specifies the amount of either registers or coils to be read or written to
DomainRequest
Rangeinteger

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.
DomainRequest
Rangeinteger

hasUnitID

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

The Unit ID is usually not needed for ModbusTCP, since the IP-address works as unique identifier, but for compability reasons still often included
DomainRequest
Rangeinteger

hasZeroBasedAddressingFlag

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

Modbus implementations can differ in the way addressing works, as the first coil/register can be either referred to as True or False.
DomainEntity
Rangeboolean

Named Individuals

Coil

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

Represent a modbus coil register. These entities can be read or written
Instance ofEntity

Discrete Input

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

Represent a modbus discrete input. These entities can only be read
Instance ofEntity

Holding Register

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

Represent a modbus holding register. These entities can be read or written
Instance ofEntity

Input Register

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

Represent a modbus input register. These entities can only be read
Instance ofEntity

Read Single Coil

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

Read a single coil (i.e. boolean/bit access) value. Usually in the address range 00001-09999
Instance ofFunction

Read Device Identification

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

Read Device Identification for diagnostic purposes. Avaiable in the majority of Modbus implementations.
Instance ofFunction

Read Discrete Inputs

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

Read Physical Discrete Inputs (bit access). Address range 10001-19999
Instance ofFunction

Read Multiple Holding Registers

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

Read Multiple Holding Registers (16 bit access). Address range 40001-49999
Instance ofFunction

Read Multiple Input Registers

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

Read Multiple Physical Input Registers (16 bits). Address range 30001-39999
Instance ofFunction

Write Multiple Coils

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

Write Multiple Physical Coils (internal bits). Address range 00001-09999
Instance ofFunction

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
Instance ofFunction

Write Single Coil

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

Write Single Physical Coil (internal bit). Address range 00001-09999
Instance ofFunction

Write Single Holding Register

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

Write Single HoldingRegister (internal bits). Address range 40001-49999
Instance ofFunction

ILLEGAL FUNCTION

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

Function code received in the query is not recognized or allowed by slave
Instance ofException code

ILLEGAL DATA ADDRESS

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

Data address of some or all the required entities are not allowed or do not exist in slave
Instance ofException code

ILLEGAL DATA VALUE

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

Value is not accepted by slave
Instance ofException code

SLAVEDEVICE FAILURE

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

An unrecoverable error occurred while the slave was attempting to perform the requested action
Instance ofException code

ACKNOWLEDGE

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

The server has accepted the request and is processing it, but a long duration of time will be required to do so. This response is returned to prevent a timeout error from occurring in the client. The client can next issue a Poll Program Complete message to determine if processing is completed
Instance ofException code

SLAVEDEVICE BUISY

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

Slave is engaged in processing a long-duration command. Master should retry later
Instance ofException code
Deploys by Netlify