Skip to content

03_modbus_services

César García edited this page Jun 19, 2020 · 4 revisions

Modbus Services

Modbus Server

Modbus Device

Modbus Sim

Scalar Types

Object Value
Boolean boolean
Byte byte
Short short
Integer int
Long long
Byte ubyte
Short ushort
Integer uint
Long ulong
Float float
Double double
String string

Simple function

Accept the following variables:

Field Description
name Unique name for this function.
device_address Address (UID) of the internal device.
function_code 'func', fixed string.
scan_rate Scan of the function in milliseconds. Always > 100 ms.
f_modbus_address Modbus address for value returned from function.
x_modbus_address Modbus address for variable x.
y_modbus_address Modbus address for variable y.
z_modbus_address Modbus address for variable z.
function String that represents the function.
Example:
suma=12,func,1,input-register:100:float,holding-register:104:float,holding-register:108:float,holding-register:112:float,x+y+z

Random function

Accept the following variables

Field Description
name Unique name for this function.
device_address Address (UID) of the internal device.
function_code 'rand', fixed string.
scan_rate Scan of the function in milliseconds. Always > 100 ms.
f_modbus_address

Example:

suma=12,func,1,input-register:100:float,holding-register:104:float,holding-register:108:float,holding-register:112:float,x+y+z

Signal function

Accept the following variables:

Field Description
name Unique name for this function.
device_address Address (UID) of the internal device.
function_code 'signal', fixed string.
scan_rate Scan of the function in milliseconds. Always == 100 ms.
f_modbus_address Modbus address for value returned from function.
frequency Modbus address for variable frecuencie.
phase Modbus address for variable y.
amplitude Modbus address for variable z.
signal String that represents the signal.['square','sine','triangular','sawtooth']

Example:

sine=12,signal,100,input-register:100:float,holding-register:104:float,holding-register:108:float,holding-register:112:sine

Sidebar

Clone this wiki locally