Home Security System User Manual

Appendix A: Modbus Communications User Guide: LDRA6
www.rletech.com 970 484-6510 20
Table 9: Modbus Slave Address
Address SW2 (1..8) Address SW2 (1..8) Address SW2 (1..8) Address SW2 (1..8)
0 00000000 16 00010000 32 00100000 48 00110000
1 00000001 17 00010001 33 00100001 49 00110001
2 00000010 18 00010010 34 00100010 50 00110010
3 00000011 19 00010011 35 00100011 51 00110011
4 00000100 20 00010100 36 00100100 52 00110100
5 00000101 21 00010101 37 00100101 53 00110101
6 00000110 22 00010110 38 00100110 54 00110110
7 00000111 23 00010111 39 00100111 55 00110111
8 00001000 24 00011000 40 00101000 56 00111000
9 00001001 25 00011001 41 00101001 57 00111001
10 00001010 26 00011010 42 00101010 58 00111010
11 00001011 27 00011011 43 00101011 59 00111011
12 00001100 28 00011100 44 00101100 60 00111100
13 00001101 29 00011101 45 00101101 61 00111101
14 00001110 30 00011110 46 00101110 62 00111110
15 00001111 31 00011111 47 00101111 63 00111111
For address’s 64-127, set SW1-7 to on, then subtract 64 from the address and use the table.
For address’s 128-191, set SW1-7 to off, #8 to on, then subtract 128 from the address and use the table.
For address’s 192-254, set SW1-7 & 8 to on, then subtract 192 from the address and use the table.
A-3 RTU FRAMING
The example below shows a typical Query/Response from a LDRA6 module.
Table 10: Query Sample
Slave
Address
Functions
Code
Starting
Register
“Msb”
Starting
Register
“Lsb”
Number of
Registers
“Msb”
Number of
Registers
“Lsb”
CRC 16
“Lsb”
CRC 16
”Msb”
02 03 00 32 00 03 E5 FA
Table 11: Response Sample
Slave
Address
Function
Code
Count
Bytes of
Data
Register
Data
Msb Lsb
Register
Data
Msb Lsb
Register
Data
Msb Lsb
CRC 16
“Lsb”
CRC
16”Msb”
02 03 06 01 58 00 FA 00 54 1B 0D
Slave address 2 responds to Function Code 3 with 6 bytes of hexadecimal data and ends with CRC16
checksum.
Register Values:
40051 = 0158 (hex) = 344 (decimal)
40052 = 00FA (hex) = 250 (decimal)
40053 = 0054 (hex) = 84 (decimal)