User Manual

Table Of Contents
Page 121 of 129 54A0028-6 042019 © LeddarTech Inc.
Appendix A Example of a 0x04 function (read
input register)
Transmitted message
01 04 00 01 00 27 E1 D0
Use the 0x04 command to read 39 consecutive registers starting at address 01. On device with
Modbus address 01, using the CRC D0 E1.
Received message
01 04 4E 00 01 00 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 08 00 64 00 00 B0 F7
00 00 00 0F 00 0E 00 0C 00 0D 00 0E 00 12 00 16 00 19 5A E3 5B F5 5E 26 62 29 63 92 75 13
7C 2B 5B 66 00 01 00 01 00 01 00 01 00 01 00 09 00 09 00 01 66 6F
1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 8, 100, 0, 45303, 0, 15, 14, 12, 13, 14, 18, 22, 25, 23267, 23541, 24102,
25129, 25490, 29971, 31787, 23398, 1, 1, 1, 1, 1, 9, 9, 1
Header: 1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 8, 100, 0, 45303, 0
(Address 1) Status for polling mode: 1 = Detections ready
(2) Number of segments: 8 = 8 segments
(11) Number of detection: 8 = 8 detections
(12) Light source power: 100 = 100%
(14&15) TimeStamp: 45303 = 45303 ms
Distance (first detection only): 15, 14, 12, 13, 14, 18, 22, 25
(Address 16) Segment #8 = 15cm
(17) Segment #7 = 14cm
(18) Segment #6 = 12cm
(19) Segment #5 = 13cm
(20) Segment #4 = 14cm
(21) Segment #3 = 18cm
(22) Segment #2 = 22cm
(23) Segment #1 = 25cm