Skip to main content

Set Schedule from Servers

Data Types

CodeData TypeDescription
00INT1616-bit signed integer
01UINT1616-bit unsigned integer
02INT32 [MSB]Most significant 32-bit signed integer
03INT32 [LSB]Least significant 32-bit signed integer
04FLOAT32 [MSB]Most significant 32-bit floating-point number
05FLOAT32 [LSB]Least significant 32-bit floating-point number

Payload Structure

ParameterTypeDescriptionDefaultValid Range
FieldIntegerData field identifier11–255
slaveldIntegerID of the slave device11–247
functionCodeIntegerFunction code for the operation (e.g., read, write)31–6, 15, 16
EnableIntegerEnable flag (1 for enabled, 0 for disabled)10 or 1
datatypeIntegerSpecifies the data type of the value to read0100–05
groupParaNoIntegerNumber of registers in a single group11–125
RegisteraddressIntegerAddress of the registers00–65535

One-Time Modbus Register Read

Example payload (JSON):

{ 
"slaveId": 1,
"functionCode": 3,
"dataType": 1,
"numberOfParameters": 1,
"Registeraddress": 257
}
note

Use FPort = 13

Modbus Register Update

Example payload (JSON):

{ 
"Field": 1,
"slaveld": 2,
"functionCode": 3,
"Enable": 1,
"datatype": 2,
"numberOfParameters": 1,
"Registeraddress": 3036
}
note

Use FPort = 10

Updating Device Heartbeat

Example payload (JSON):

{ 
"txTime": 60
}
note

Use FPort = 06 & Times in seconds

Modifying Slave Id & Registers/Coils

Example payload (JSON):

{ 
"slaveid": 4,
"value": 255 ,
"numberofreg": 1,
"address": 0
}
note

Use FPort = 08 for registers & FPort = 09 for coils

Verifying Modbus Registers

Example payload (JSON):

{ 
"index": 1
}
note

Use FPort = 15

Configuring Baud Rate & Parity

Example payload (JSON):

{ 
"baud": 9600,
"parity": 1
}
note

Use FPort = 12 for RS485 read operations.

ParityDescription
None0
Odd1
Even2

Modifying Schedules from Server

Example payload (JSON):

{ 
"index": 1,
"enable": 1,
"relayOnTime": 3600,
"relayOffTime": 7200,
"day": 127,
"relayStatus": 1,
"alarmType": 1
}
note

Use FPort = 11 , Time in Seconds

ParameterTypeDescription
IndexIntegerAlarm index
startTimeIntegerAlarm Start Time
stopTimeIntegerAlarm Stop Time
dayDataIntegerDay
relayStatusIntegerRelay Status
triggerTypeIntegerAlarm Type (e.g. Cyclic, Trigger, Regular)
enableIntegerAlarm enable

Test Realy from Server

Example payload (JSON):

{ 
"relay1": 1,
"relay2": 1
}
note

Note : Use FPort = 5

Read Schedule Settings from Server

Example payload (JSON):

{ 
"index": 1
}
note

Note : Use FPort = 14