EasyManua.ls Logo

Hukseflux SR05 series - Network Communication: Example Master Request to SR05

Hukseflux SR05 series
83 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
SR05-D1A3-PV manual v1801 54/83
6.6 Network communication: example master request to SR05
Normal sensor operation consists of requesting the output of registers 0x1002 + 0x1003;
the temperature compensated solar radiation. For quality assurance also the sensor
serial number, register 0x1028 and the temperature in register 0x1006, are useful.
In this example a SR05-D1A3-PV has address 64. The example requests the solar
radiation (temperature compensated) register 0x1002 + 0x1003, sensor serial number,
register 0x1028, and the temperature of the instrument register 0x1006. The values are
represented in hexadecimals.
Note: 32 bit data are represented in 2 registers. MSW and LSW should be read together
in one request.
Request for solar radiation, register 2 + 3:
Master Request:
0x40 0x03 0x1000 0x0004 0x4FD8
0x40 = Modbus slave address, decimal equivalent = 64
0x03 = Modbus function code: 0x03 Read holding registers
0x1000 = Starting register, the master requests data starting from register
0x1000.
0x0004 = Length, the number of registers the master wants to read. 4 registers
0x4FD8 = CRC, the checksum of the transmitted data
Sensor response:
0x40 0x03 0x08 0x0040 0x0005 0x0001 0x7C4F 0x79DA
0x40 = Modbus slave address, decimal equivalent = 64
0x03 = Modbus function
0x08 = Number of bytes returned by the sensor. 8 bytes transmitted by the sensor
0x0040 = Register 0x1000; Modbus address
0x0005 = Register 0x1001; Serial settings, 19200 baud, 8 data bits, even parity
bit, 1 stop bit
0x0001 = Register 0x1002; Temperature compensated signal, Most Significant
Word (MSW). Decimal equivalent = 1
0x7C4F = Register 0x1003; Temperature compensated signal, Least Significant
Word (LSW) = Decimal equivalent = 31823
0x79DA = CRC, the checksum of the transmitted data
Together, register 0x1002 and 0x1003 are representing the temperature
compensated solar radiation output measured by the SR05-D1A3-PV. The MSW is
in register 0x1002 and the LSW in 0x1003. The output has to be calculated by the
formula: ((MSW x 2
16
) + LSW)/100. In this example the result is: ((2
16
x 1) +
31823)/100 = 973.59 W/m²

Table of Contents