You are on page 1of 1

Modbus Functions ComPact NSX – Modbus Communication

Master Request Slave Reply

Field Name Example Field Name Example

Modbus slave address 0x2F Modbus slave address 0x2F


Function code 0x2B Function code 0x2B
Subfunction code 0x0F Subfunction code 0x0F
Reserved 0x00 Reserved 0x00
– – Date and time Refer to the DATETIME data type

Set Date and Time Example


The following table shows how to set date and time of a Modbus slave. The
Modbus address of the Modbus slave is 47 = 0x2F, the new date is October 2,
2014, and the new time is 2:32:03:500 p.m.
NOTE: Use the broadcast mode (with Modbus slave address = 0) to set the
date and time of all Modbus slaves.

Master Request Slave Reply

Field Name Example Field Name Example

Modbus slave address 0x2F Modbus slave address 0x2F


Function code 0x2B Function code 0x2B
Subfunction code 0x10 Subfunction code 0x10
Reserved1 0x00 Reserved1 0x00
Not used 0x00 Not used 0x00
Year = 2014 0x0E Year = 2014 0x0E
Month = October 0x0A Month = October 0x0A
Day Of Month = 2 0x02 Day Of Month = 2 0x02

Hour = 14 0x0E Hour = 14 0x0E


Minutes = 32 0x20 Minutes = 32 0x20
3 sec. 500 ms 0x0DAC 3 sec. 502 ms 0x0DAE

The normal response is an echo of the request, returned after the date-time has
been updated in the remote device. If the date-time structure content is not
consistent with a true date-time (that is, an invalid date-time), the value returned in
the Date-Time field is set to 0 by the device.
In case of 24 Vdc power loss, the date and time of the Modbus slaves without
battery is not refreshed anymore. It is therefore mandatory to set date and time for
all Modbus slaves after recovering the 24 Vdc power supply.
Furthermore, due to the clock drift of each Modbus slave, it is mandatory to set
date and time for all Modbus slaves periodically. Recommended period is at least
every 15 minutes.

Scattered Holding Register Read Function


The scattered holding register read function is available:

Function Code Subfunction Code Name Description

100 (0x64) 4 (0x04) Read scattered holding register Read n non-contiguous registers

The maximum value for n is 100 but when using a MasterPact MicroLogic A or E
trip unit, it is recommended to have n lower or equal to 21.

DOCA0091EN-08 45

You might also like