High precision sensor Modbus protocol
High-precision sensor Modbus protocol
Instructions for use:
The serial port sending command must be completed within 10S, otherwise it will be automatically locked. To avoid automatic locking, you can perform the following steps first.
Enter the unlock command
Enter the command that needs to modify or read the data
Save the command
Register table
ADDR (Hex) | ADDR (Dec) | REGISTER NAME | FUNCTION | SERIAL I/F | Bit15 | Bit14 | Bit13 | Bit12 | Bit11 | Bit10 | Bit9 | Bit8 | Bit7 | Bit6 | Bit5 | Bit4 | Bit3 | Bit2 | Bit1 | Bit0 |
00 | 00 | SAVE | save/reboot/reset | R/W | SAVE[15:0] | |||||||||||||||
01 | 01 | CALSW | calibration mode | R/W | CALSW[3:0] | |||||||||||||||
04 | 04 | BAUD | Serial port baud rate | R/W | BAUD[3:0] | |||||||||||||||
05 | 05 | AXOFFSET | Acceleration X offset | R/W | AXOFFSET[15:0] | |||||||||||||||
06 | 06 | AYOFFSET | Acceleration Y offset | R/W | AYOFFSET[15:0] | |||||||||||||||
07 | 07 | AZOFFSET | Acceleration Z offset | R/W | AZOFFSET[15:0] | |||||||||||||||
08 | 08 | GXOFFSET | Angular velocity X zero bias | R/W | GXOFFSET[15:0] | |||||||||||||||
09 | 09 | GYOFFSET | Angular velocity Y zero bias | R/W | GYOFFSET[15:0] | |||||||||||||||
0A | 10 | GZOFFSET | Angular velocity Z zero bias | R/W | GZOFFSET[15:0] | |||||||||||||||
0B | 11 | HXOFFSET | Magnetic Field X Zero Bias | R/W | HXOFFSET[15:0] | |||||||||||||||
0C | 12 | HYOFFSET | Magnetic field Y zero bias | R/W | HYOFFSET[15:0] | |||||||||||||||
0D | 13 | HZOFFSET | Magnetic field Z zero bias | R/W | HZOFFSET[15:0] | |||||||||||||||
0E | 14 | WORKMODE【1】 | Z-axis operation mode | R/W | WORKMODE[15:0] | |||||||||||||||
10 | 16 | GYROPTP【1】 | Z-axis static peak-to-peak | R/W | GYROPTP[15:0] | |||||||||||||||
11 | 17 | GPTPTIME【1】 | Z-axis peak-to-peak acquisition time | R/W | GPTPTIME[15:0] | |||||||||||||||
12 | 18 | GYROBAIS【1】 | Z axis zero bias value | R/W | GYROBAIS[15:0] | |||||||||||||||
13 | 19 | GBAISTIME【1】 | Z axis zero bias acquisition time | R/W | GBAISTIME[15:0] | |||||||||||||||
14 | 20 | GSTATICTHRE【1】 | Z axis static threshold | R/W | GSTATICTHRE[15:0] | |||||||||||||||
15 | 21 | GSTATICTIME【1】 | Z axis stabilization time | R/W | GSTATICTIME[15:0] | |||||||||||||||
16 | 22 | PGSCALE【1】 | Z-axis calibration factor P | R/W | PGSCALE[15:0] | |||||||||||||||
18 | 24 | GSCALERANGE【1】 | Z-axis calibration angle | R/W | GSCALERANGE[15:0] | |||||||||||||||
1A | 26 | IICADDR | device address | R/W | IICADDR[7:0] | |||||||||||||||
1B | 27 | LEDOFF | Turn off the LED lights | R/W | LEDOFF | |||||||||||||||
1C | 28 | MAGRANGX | Magnetic Field X Calibration Range | R/W | MAGRANGX[15:0] | |||||||||||||||
1D | 29 | MAGRANGY | Magnetic Field Y Calibration Range | R/W | MAGRANGY[15:0] | |||||||||||||||
1E | 30 | MAGRANGZ | Magnetic Field Z Calibration Range | R/W | MAGRANGZ[15:0] | |||||||||||||||
1F | 31 | BANDWIDTH | bandwidth | R/W | BANDWIDTH[3:0] | |||||||||||||||
20 | 32 | GYRORANGE | Gyroscope range | R/W | GYRORANGE[3:0] | |||||||||||||||
21 | 33 | ACCRANGE | Acceleration range | R/W | ACCRANGE[3:0] | |||||||||||||||
22 | 34 | SLEEP | sleep | R/W | SLEEP | |||||||||||||||
23 | 35 | ORIENT | Installation direction | R/W | ORIENT | |||||||||||||||
24 | 36 | AXIS6 | algorithm | R/W | AXIS6 | |||||||||||||||
25 | 37 | FILTK | Dynamic filtering | R/W | FILTK[15:0] | |||||||||||||||
26 | 38 | GPSBAUD | GPS baud rate | R/W | GPSBAUD[3:0] | |||||||||||||||
27 | 39 | READADDR | read register | R/W | READADDR[7:0] | |||||||||||||||
2A | 42 | ACCFILT | acceleration filter | R/W | ACCFILT[15:0] | |||||||||||||||
2E | 46 | VERSION | version number | R | VERSION[15:0] | |||||||||||||||
30 | 48 | YYMM | year/mouth | R/W | MOUTH[15:8] | YEAR[7:0] | ||||||||||||||
31 | 49 | DDHH | day/hour | R/W | HOUR[15:8] | DAY[7:0] | ||||||||||||||
32 | 50 | MMSS | minutes/seconds | R/W | SECONDS[15:8] | MINUTE[7:0] | ||||||||||||||
33 | 51 | MS | millisecond | R/W | MS[15:0] | |||||||||||||||
34 | 52 | AX | acceleration X | R | AX[15:0] | |||||||||||||||
35 | 53 | AY | acceleration Y | R | AY[15:0] | |||||||||||||||
36 | 54 | AZ | acceleration Z | R | AZ[15:0] | |||||||||||||||
37 | 55 | GX | Angular velocityX | R | GX[15:0] | |||||||||||||||
38 | 56 | GY | Angular velocityY | R | GY[15:0] | |||||||||||||||
39 | 57 | GZ | Angular velocity Z | R | GZ[15:0] | |||||||||||||||
3A | 58 | HX | Magnetic FieldX | R | HX[15:0] | |||||||||||||||
3B | 59 | HY | Magnetic field Y | R | HY[15:0] | |||||||||||||||
3C | 60 | HZ | Magnetic field Z | R | HZ[15:0] | |||||||||||||||
3D | 61 | LRoll | X-axis angle low | R | LRoll[15:0] | |||||||||||||||
3E | 62 | HRoll | X-axis angle high | R | HRoll[15:0] | |||||||||||||||
3F | 63 | LPitch | Y-axis angle low | R | LPitch[15:0] | |||||||||||||||
40 | 64 | HPitch | Y-axis angle high | R | HPitch[15:0] | |||||||||||||||
41 | 65 | LYaw | Z-axis angle low | R | LYaw[15:0] | |||||||||||||||
42 | 66 | HYaw | Z-axis angle high | R | HYaw[15:0] | |||||||||||||||
43 | 67 | TEMP | Module temperature | R | TEMP[15:0] | |||||||||||||||
61 | 97 | GYROCALITHR | Gyro Calibration Threshold | R/W | GYROCALITHR[15:0] | |||||||||||||||
63 | 99 | GYROCALTIME | Gyro calibration time | R/W | GYROCALTIME[15:0] | |||||||||||||||
69 | 105 | KEY | unlock | R/W | KEY[15:0] | |||||||||||||||
6A | 105 | WERROR | Gyroscope change value | R/W | WERROR[15:0] | |||||||||||||||
6E | 110 | WZTIME | Z-axis still time threshold | R/W | WZTIME[15:0] | |||||||||||||||
6F | 111 | WZSTATIC | Z-axis static threshold | R/W | WZSTATIC[15:0] | |||||||||||||||
74 | 116 | MODDELAY | 485 data response delay | R/W | MODDELAY[15:0] | |||||||||||||||
7F | 127 | NUMBERID1 | Device No.1-2 | R | ID2[15:8] | ID1[7:0] | ||||||||||||||
80 | 128 | NUMBERID2 | Device No3-4 | R | ID4[15:8] | ID3[7:0] | ||||||||||||||
81 | 129 | NUMBERID3 | Device No5-6 | R | ID6[15:8] | ID5[7:0] | ||||||||||||||
82 | 130 | NUMBERID4 | Device No7-8 | R | ID8[15:8] | ID7[7:0] | ||||||||||||||
83 | 131 | NUMBERID5 | Device No9-10 | R | ID10[15:8] | ID9[7:0] | ||||||||||||||
84 | 132 | NUMBERID6 | Device No11-12 | R | ID12[15:8] | ID11[7:0] | ||||||||||||||
95 | 149 | LREFROLL | ROLL angle zero is low | R/W | LREFROLL[15:0] | |||||||||||||||
96 | 150 | HREFROLL | ROLL angle zero bias high | R/W | HREFROLL[15:0] | |||||||||||||||
97 | 151 | LREFPITCH | PITCH corner zero bias low | R/W | LREFPITCH[15:0] | |||||||||||||||
98 | 152 | HREFPITCH | PITCH corner zero bias high | R/W | HREFPITCH[15:0] |
explanation:
1. The callout register is only applicable to HWTX073
Protocol format
Read register format
Data is sent in hexadecimal, not ASCII.
Each register address, the number of read registers, and the read data are represented by two bytes. The high and low bits of the register address are represented by ADDRH and ADDRL, the high and low bits of the number of registers to be read are represented by LENH and LENL, and the high and low bits of the read data are represented by DATA1H and DATA1L.
The last two bits of the read command are standard CRC check bits. It can be calculated using the CRC check digit calculation tool.
command send
Modbus address | function code | registers high 8 bits | registers lower 8 bits | Read length high 8 bits | Read length lower 8 bits | Check digit high 8 bits | Check digit lower 8 bits |
ID | 0x03(read) | ADDRH[15:8] | ADDRL[7:0] | LENH[15:8] | LENL[7:0] | CRCH[15:8] | CRCL[7:0] |
Data return
Modbus address | function code | read length | Data high 8 bits | Data lower 8 bits | Data high 8 bits | Data lower 8 bits | Data high 8 bits | Data lower 8 bits | Check digit high 8 bits | Check digit lower 8 bits |
ID | 0x03(read) | LENL[7:0] | DATA1H[15:8] | DATA1L[7:0] | …… | …… | DATAnH | DATAnL | CRCH[15:8] | CRCL[7:0] |
Example:Read acceleration, angular velocity, magnetic field
Read register format
Data is sent in hexadecimal, not ASCI.
For each register address, the write data is represented by two bytes. The high and low bits of the register address are represented by ADDRH and ADDRL, and the high and low bits of the written data are represented by DATAH and DATAL.
command send
Modbus address | function code | register high 8 bits | register lower8 bits | Data high 8 bits | Data lower 8 bits | Check digit high 8 bits | Check digit lower 8 bits |
ID | 0x06(write) | ADDRH[15:8] | ADDRL[7:0] | DATAH[15:8] | DATAL[7:0] | CRCH[15:8] | CRCL[7:0] |
Data return
Modbus address | function code | register high 8 bits | register lower8 bits | Data high 8 bits | Data lower 8 bits | Check digit high 8 bits | Check digit lower 8 bits |
ID | 0x06(write) | ADDRH[15:8] | ADDRL[7:0] | DATAH[15:8] | DATAL[7:0] | CRCH[15:8] | CRCL[7:0] |
Register Description
All the following examples are commands when the Modbus address is 0x50 (default). If you change the Modbus address, you need to change the address and CRC check bit in the command accordingly.
SAVE(save/reboot/reset)
Register Name: SAVE Register Address: 0 (0x00) Read and write direction: R/W Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:0 | SAVE[15:0] | Save: 0x0000 Reboot: 0x00FF Factory reset: 0x0001 |
example: send:50 06 00 00 00 FF C4 0B(reboot) return:50 06 00 00 00 FF C4 0B |
CALSW
Register Name: CALSW Register Address: 1 (0x01) Read and write direction: R/W Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:4 | ||
3:0 | CAL[3:0] | To set the calibration mode: 0000(0x00): normal working mode 0001(0x01): Auto adder calibration 0011(0x03): height reset 0100(0x04): Set the heading angle to zero 0111(0x07): Magnetic Field Calibration (Spherical Fitting) 1000(0x08): set angle reference 1001(0x09): Magnetic Field Calibration (Dual Plane Mode) |
example: send:50 06 00 01 00 04 D4 48(Heading angle set to zero) return:50 06 00 01 00 04 D4 48 |
BAUD RATE
Register Name: BAUD RATE Register Address: 4 (0x04) Read and write direction: R/W Default: 0x0002 | ||
Bit | NAME | FUNCTION |
15:4 | ||
3:0 | BAUD[3:0] | Set serial port baud rate: 0001(0x01): 4800bps 0010(0x02): 9600bps 0011(0x03): 19200bps 0100(0x04): 38400bps 0101(0x05): 57600bps 0110(0x06): 115200bps 0111(0x07): 230400bps 1000(0x08): 460800bps(Only supportWT931/JY931/HWT606/HWT906) 1001(0x09): 921600bps(Only support WT931/JY931/HWT606/HWT906) |
example: send:50 06 00 04 00 06 45 88(Set serial port baud rate 115200) return:50 06 00 04 00 06 45 88 |
AXOFFSET~HZOFFSET(Zero bias setting)
Register Name: AXOFFSET~HZOFFSET Register Address: 5~13 (0x05~0x0D) Read and write direction: R/W Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:0 | AXOFFSET[15:0] | Acceleration X-axis offset, actual acceleration offset=AXOFFSET[15:0]/10000(g) |
15:0 | AYOFFSET[15:0] | Acceleration Y-axis offset, actual acceleration offset=AYOFFSET[15:0]/10000(g) |
15:0 | AZOFFSET[15:0] | Acceleration Z-axis offset, actual acceleration offset=AZOFFSET[15:0]/10000(g) |
15:0 | GXOFFSET[15:0] | Angular velocity X-axis offset, actual angular velocity offset=GXOFFSET[15:0]/10000(°/s) |
15:0 | GYOFFSET[15:0] | Angular velocity Y-axis offset, actual angular velocity offset=GYOFFSET[15:0]/10000(°/s) |
15:0 | GZOFFSET[15:0] | Angular velocity Z-axis offset, actual angular velocity offset=GZOFFSET[15:0]/10000(°/s) |
15:0 | HXOFFSET[15:0] | Magnetic field X-axis zero bias |
15:0 | HYOFFSET[15:0] | Magnetic field Y-axis zero bias |
15:0 | HZOFFSET[15:0] | Magnetic field Z-axis zero bias |
example: send:50 06 00 05 03 E8 94 F4(Set acceleration X-axis zero bias0.1g),0x03E8=1000,1000/10000=0.1(g) return:50 06 00 05 03 E8 94 F4 |
WORKMODE(Z-axis operation mode)
Register Name: WORKMODE Register address: 14(0x0E) Read and write direction: R/W Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:4 | ||
3:0 | WORKMODE[3:0] | Set the Z-axis operation mode: 0000(0x00): normal data mode 0001(0x01): peak-to-peak mode 0010(0x02): seek zero bias mode 0011 (0x03): find scale factor mode |
example: send:50 06 00 0E 00 01 24 48(Automatically obtain zero bias) return:50 06 00 0E 00 01 24 48 |
GYROPTP(Z-axis static peak-to-peak)
Register Name: GYROPTP Register address: 16(0x10) Read and write direction: R/W Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:0 | GYROPTP[15:0] | Parameters used in calculating zero offset, no need to set for sensor automatic acquisition |
Write 0x01 to the "WORKMODE" register to enter the "peak-to-peak mode", in this mode the sensor automatically calculates the maximum and minimum values of the Z-axis angular velocity within the time set by "GPTPTIME" and records them in "GYROPTP". In "Zero Offset Mode", this data will be used to calculate and filter the zero offset. Z-axis static peak-to-peak value = GYROPTP/1000 (°/s) eaxmple: send:50 03 00 10 00 01 88 4E(read Z-axis static peak-to-peak) return:50 03 02 00 64 44 63 0x0064=100,Z-axis static peak-to-peak = 100/1000=0.1(°/s) |
GPTPTIME(Z-axis peak-to-peak acquisition time)
Register name: GPTPTIME Register address: 17(0x11) read and write direction: R/W Defaults: 0x000A | ||
Bit | NAME | FUNCTION |
15:0 | GPTPTIME[15:0] | Calculate the peak-to-peak time, the default is 10S |
Example: Send: 50 06 00 11 00 0A 54 49 (set the Z-axis peak-to-peak acquisition time to 10S) Return: 50 06 00 11 00 0A 54 49 After entering the "Peak-to-Peak Mode", obtain the difference between the maximum value and the minimum value of the Z-axis angular velocity within the "GPTPTIME" time, store it in "GYROPTP", and use this data for zero bias in the "Zero Bias Mode". calculation filter. |
GYROBAIS(Z-axis zero bias value)
Register Name: GYROBAIS Register address: 18(0x12) Read and write direction: R/W Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:0 | GYROBAIS[15:0] | The zero bias value of the horizontal gyroscope, which can be obtained through the "Zero Bias Mode" |
The Z-axis horizontal gyroscope has a certain zero bias value when placed at rest, and the angular velocity at rest can be eliminated by this zero bias value. The zero offset value can be automatically calculated by automatically obtaining the zero bias. Enter the "Zero bias Mode" to automatically calculate the zero bias value according to the peak-to-peak value of "GYROPTP" and the "GBAISTIME" bias acquisition time. Z axis zero bias value = GYROBAIS/1000 (°/s) example: send:50 03 00 12 00 01 88 4E(Read Z-axis static peak-to-peak value) return:50 03 02 00 64 B1 0F 0x0064=100,Z-axis static peak-to-peak value = 100/1000=0.1(°/s) |
GBAISTIME(Z-axis zero bias acquisition time)
Register Name: GBAISTIME Register Address: 19(0x13) Read and write direction: R/W Default: 0x000A | ||
Bit | NAME | FUNCTION |
15:0 | GBAISTIME[15:0] | Time required to calculate the zero offset value of the horizontal gyroscope |
Example: Send: 50 06 00 13 00 0A 2F5 89 (set the Z-axis zero bias acquisition time to 10S) Return: 50 06 00 13 00 0A 2F5 89 The time required to obtain the Z-axis zero biast, and the zero bias value is obtained according to this time when the zero bias is obtained. |
GSTATICTHRE(Z-axis static threshold)
Register Name: GSTATICTHRE Register address: 20(0x14) Read and write direction: R/W Default: 0x0032 | ||
Bit | NAME | FUNCTION |
15:0 | GSTATICTHRE[15:0] | The larger the GSTATICTHRE[15:0], the weaker the seismic performance and the smaller the error The smaller the GSTATICTHRE[15:0], the better the seismic performance and the larger the error. Default value 50 |
The Z-axis horizontal gyroscope has slight data jitter when it is placed at rest. This parameter can filter out these slight jitters. When the angular velocity is less than the "GSTATICTHRE" setting value and continues for the time set by "GSTATICTIME", it is regarded as stationary, and the Z-axis angular velocity is zero. This parameter can be appropriately increased when it is used in scenes with jitter and the Z-axis is accumulated due to jitter, and this parameter can be appropriately decreased in scenes with very slow and uniform rotation. Z-axis zero bias value = GSTATICTHRE/1000 (°/s)) example: send:50 06 00 14 00 64 C5 A4((set Z-axis static threshold0.1g),0x0064=100,100/10000=0.1(°)) return:50 06 00 14 00 64 C5 A4 |
GSTATICTIME(Z-axis stabilization time)
Register Name: GSTATICTIME Register address: 21(0x15) Read and write direction: R/W Default: 0x0064 | ||
Bit | NAME | FUNCTION |
15:0 | GSTATICTIME[15:0] | Z-axis judges the still time |
Z-axis static judgment time threshold. It is considered stationary when the angular velocity is less than the value set by "GSTATICTHRE" for the time set by "GSTATICTIME". If the stabilization time is required to be higher, this parameter can be adjusted appropriately. Lowering this parameter can speed up settling time but may also increase error. Z-axis stabilization time = GSTATICTIME/1000 (s) example: send:50 06 00 15 00 32 14 5A((Set Z-axis stabilization time 0.05s),0x0032=50,50/10000=0.05(°)) return:50 06 00 15 00 32 14 5A |
PGSCALE(Z-axis calibration factor P)
Register Name: PGSCALE Register address: 22(0x16) Read and write direction: R/W Default: 0x2710 | ||
Bit | NAME | FUNCTION |
15:0 | PGSCALE[15:0] | range:0~20000 This parameter is written in the factory using a high-precision turntable, please do not modify it |
There is an error in the measurement of the Z-axis gyroscope, and a high-precision turntable will be used to measure this error when leaving the factory, and this parameter will be written into the sensor. Do not modify this parameter unless necessary. This parameter can be automatically calculated in the "scale factor mode". After entering the "scale factor mode", rotate the sensor by the angle set by "GSCALERANGE" to calculate the calibration factor. Z-axis calibration factor P=PGSCALE/10000.0 example: send:50 03 00 16 00 01 68 4F(Read Z-axis calibration factor P) return:50 03 02 27 74 24 48 0x2774 = 10100,Read Z-axis calibration factor P= 10100/10000=1.01 |
GSCALERANGE(Z-axis calibration angle)
Register Name: GSCALERANGE Register address: 24(0x18) Read and write direction: R/W Default: 0x02D0 | ||
Bit | NAME | FUNCTION |
15:0 | GSCALERANGE[15:0] | When calibrating factors, it is necessary to calibrate according to this parameter |
example: send:50 06 00 18 01 68 04 32((Set the Z-axis calibration angle to 360),0x0168=360) return:50 06 00 18 01 68 04 32 The angle of rotation required in the Z-axis "scale factor mode", generally set to an integer multiple of 360°. |
IICADDR(Device address)
Register Name: IICADDR Register Address: 26 (0x1A) Read and write direction: R/W Default: 0x0050 | ||
Bit | NAME | FUNCTION |
15:8 | ||
7:0 | IICADDR[7:0] | Set the device address for I2C and Modbus communication 0x01~0x7F |
example: send:50 06 00 1A 00 02 24 4D(Set the device address to0x02) return:50 06 00 1A 00 02 24 4D |
LEDOFF(turn off LED light)
Register Name: LEDOFF Register Address: 27 (0x1B) Read and write direction: R/W Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:1 | ||
0 | LEDOFF | 1: turn off LED light 0: turn on LED light |
example: send:50 06 00 1B 00 01 35 8C(turn off LED light ) return :50 06 00 1B 00 01 35 8C |
MAGRANGX~MAGRANGZ(Magnetic Field Calibration Range)
Register Name: MAGRANGX~MAGRANGZ Register Address: 28~30 (0x1C~0x1E) Read and write direction: R/W Default: 0x01F4 | ||
Bit | NAME | FUNCTION |
15:0 | MAGRANGX[15:0] | Magnetic field calibration X-axis range |
15:0 | MAGRANGY[15:0] | Magnetic Field Calibration Y-axis Range |
15:0 | MAGRANGZ[15:0] | Magnetic field calibration Z-axis range |
example: send:50 06 00 1C 01 F4 45 9A(Set the magnetic field calibration X-axis range to 500) return:50 06 00 1C 01 F4 45 9A |
BANDWIDTH(bandwidth)
Register Name: BANDWIDTH Register Address: 31 (0x1F) Read and write direction: R/W Default: 0x0004 | ||
Bit | NAME | FUNCTION |
15:4 | ||
3:0 | BANDWIDTH[3:0] | set bandwidth 0000(0x00): 256Hz 0001(0x01): 188Hz 0010(0x02): 98Hz 0011(0x03): 42Hz 0100(0x04): 20Hz 0101(0x05): 10Hz 0110(0x06): 5Hz |
Example: Send: 50 06 00 1F 00 01 74 4D (set the bandwidth to 188Hz) Return: 50 06 00 1F 00 01 74 4D |
GYRORANGE(Gyroscope range)
Register Name: GYRORANGE Register Address: 32 (0x20) Read and write direction: R/W Default: 0x0003 | ||
Bit | NAME | FUNCTION |
15:4 | ||
3:0 | GYRORANGE[3:0] | Set the gyro range 0011(0x03): 2000°/s The default is 2000°/s, fixed and cannot be set |
Example: Send: 50 06 00 20 00 03 C5 80 (set the gyro range to 2000°/s) Return: 50 06 00 20 00 03 C5 80 |
ACCRANGE(Accelerometer range)
Register Name: ACCRANGE Register Address: 33 (0x21) Read and write direction: R/W Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:4 | ||
3:0 | ACCRANGE[3:0] | Set the accelerometer range 0000(0x00): ±2g 0011(0x03): ±16g This parameter cannot be set. The internal adaptive acceleration range of the product will automatically switch to 16g when the acceleration exceeds 2g. |
example: send:50 06 00 21 00 03 94 40(Set the accelerometer range to 16g) return:50 06 00 21 00 03 94 40 |
SLEEP(sleep)
Register Name: SLEEP Register Address: 34 (0x22) Read and write direction: R/W Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:1 | ||
0 | SLEEP | set sleep 1(0x01): sleep Any serial port data, can wake up |
example: send:50 06 00 22 00 01 E5 81(enter sleep) return:50 06 00 22 00 01 E5 81 |
ORIENT(Installation direction)
Register Name: ORIENT Register Address: 35 (0x23) Read and write direction: R/W Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:1 | ||
0 | ORIENT | Set the installation direction 0 (0x00): horizontal installation 1(0x01): vertical installation (the Y-axis arrow of the coordinate axis must be upward) |
example: send:50 06 00 23 00 01 B4 41(Set up vertical installation) return:50 06 00 23 00 01 B4 41 |
AXIS6(algorithm)
Register Name: AXIS6 Register Address: 36 (0x24) Read and write direction: R/W Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:1 | ||
0 | AXIS6 | set algorithm 0(0x00): 9-axis algorithm (magnetic field solution navigation angle, absolute heading angle) 1(0x01): 6-axis algorithm (integral solution navigation angle, relative heading angle) |
Example: Send: 50 06 00 24 00 01 05 80 (set the 6-axis algorithm mode) Return: 50 06 00 24 00 01 05 80 |
FILTK(K value filter)
Register Name: FILTK Register Address: 37 (0x25) Read and write direction: R/W Default: 0x001E | ||
Bit | NAME | FUNCTION |
15:0 | FILTK[15:0] | Range: 1~10000, the default is 30 (it is not recommended to modify, once modified, if the angle does not meet the requirements for use, please modify it to 30) The smaller the FILTK[15:0], the stronger the seismic performance and the weaker the real-time performance. The larger the FILTK[15:0], the weaker the seismic performance and the stronger the real-time performance. |
example: send:50 06 00 25 00 1E 15 88(Set the K value filter to 30) return:50 06 00 25 00 1E 15 88 |
ACCFILT(acceleration filter)
Register Name: ACCFILT Register Address: 42 (0x2A) Read and write direction: R/W Default: 0x01F4 | ||
Bit | NAME | FUNCTION |
15:0 | ACCFILT[15:0] | Range: 1~10000, the default is 500 (it is not recommended to modify, once modified, if the angle does not meet the requirements for use, please modify it to 500) The smaller the ACCFILT[15:0], the stronger the seismic performance and the weaker the real-time performance. The larger the ACCFILT[15:0], the weaker the seismic performance and the stronger the real-time performance. This parameter is an empirical value, which needs to be debugged according to different environments. In the tractor environment, ACCFILT[15:0] can be adjusted to 100, because the vibration of the tractor is serious and the anti-vibration performance needs to be improved |
Example: Send: 50 06 00 2A 01 F4 A5 94 (set acceleration filter 500) Return: 50 06 00 2A 01 F4 A5 94 |
VERSION(version number)
Register Name: VERSION Register Address: 46 (0x2E) Read and write direction: R Default: none | ||
Bit | NAME | FUNCTION |
15:0 | VERSION[15:0] | Different products, different version numbers |
Example: Send: 50 03 00 2E 00 01 E9 82 (read version number) Return: 50 03 00 02 VH VL CRCH CRCL VERSION[15:0]=(short)(((short)VH<<8)|VL) |
YYMM~MS(on-chip time)
Register Name: YYMM~MS Register address: 48~51 (0x30~0x33) Read and write direction: R/W Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:8 | YYMM[15:8] | mouth |
7:0 | YYMM[7:0] | year |
15:8 | DDHH[15:8] | hour |
7:0 | DDHH[7:0] | day |
15:8 | MMSS[15:8] | second |
7:0 | MMSS[7:0] | munite |
15:0 | MS[15:0] | millisecond |
Example: Send: 50 06 00 30 03 16 05 7A (set year 22-03) Return: 50 06 00 30 03 16 05 7A Send: 50 06 00 31 09 0C D3 D1 (set date 12-09) Return: 50 06 00 31 09 0C D3 D1 Send: 50 06 00 32 3A 1E B7 2C (set minutes and seconds 30:58) Return: 50 06 00 32 3A 1E B7 2C Send: 50 06 00 33 01 F4 74 53 (set milliseconds 500) Return: 50 06 00 33 01 F4 74 53 |
AX~AZ(acceleration)
Register Name: AX~AZ Register address: 52~54 (0x34~0x36) Read and write direction: R Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:0 | AX[15:0] | acceleration X=AX[15:0]/32768*16g (g is the gravitational acceleration, preferably 9.8m/s2) |
15:0 | AY[15:0] | acceleration Y=AY[15:0]/32768*16g (g is the gravitational acceleration, preferably 9.8m/s2) |
15:0 | AZ[15:0] | acceleration Z=AZ[15:0]/32768*16g (g is the gravitational acceleration, preferably 9.8m/s2) |
Example: Send: 50 03 00 34 00 03 49 84 (read three-axis acceleration) Return: 50 03 06 AXH AXL AYH AYL AZH AZL CRCH CRCL AX[15:0]=((short)AXH <<8)|AXL; AY[15:0]=((short)AYH <<8)|AYL; AZ[15:0]=((short)AZH <<8)|AZL; |
GX~GZ(Angular velocity)
Register Name: GX~GZ Register address: 55~57 (0x37~0x39) Read and write direction: R Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:0 | GX[15:0] | Angular velocityX=GX[15:0]/32768*2000°/s |
15:0 | GY[15:0] | Angular velocityY=GY[15:0]/32768*2000°/s |
15:0 | GZ[15:0] | Angular velocityZ=GZ[15:0]/32768*2000°/s |
Example: Send: 50 03 00 37 00 03 B9 84 (read triaxial angular velocity) Return: 50 03 06 GXH GXL GYH GYL GZH GZL CRCH CRCL GX[15:0]=((short)GXH <<8)|GXL; GY[15:0]=((short)GYH <<8)|GYL; GZ[15:0]=((short)GZH <<8)|GZL; |
HX~HZ(magnetic field)
Register name: HX~HZ Register Address: 58~60 (0x3A~0x3C) Read and write direction: R Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:0 | HX[15:0] | magnetic field X=HX[15:0] (unit:LSB) |
15:0 | HY[15:0] | magnetic field Y=HY[15:0] (unit:LSB) |
15:0 | HZ[15:0] | magnetic field Z=HZ[15:0] (unit :LSB) |
example: send:50 03 00 3A 00 03 28 47(Read the three-axis magnetic field) return:50 03 06 HXH HXL HYH HYL HZH HZL CRCH CRCL HX[15:0]=((short)HXH <<8)|HXL; HY[15:0]=((short)HYH <<8)|HYL; HZ[15:0]=((short)HZH <<8)|HZL; |
Roll~Yaw(angle)
Register Name: Roll~Yaw Register address: 61~66 (0x3D~0x42) Read and write direction: R Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:0 | LRoll[15:0] | Roll Angle X Low |
15:0 | HRoll[15:0] | Roll angle X high position, roll angle X=(((int)HRoll<<16)| LRoll)/1000° |
15:0 | LPitch[15:0] | Pitch angle Y low |
15:0 | HPitch[15:0] | Pitch angle Y high position, pitch angle X=(((int)HPitch<<16)| LPitch)/1000° |
15:0 | LYaw[15:0] | Heading Angle Z Low |
15:0 | HYaw[15:0] | Heading angle Z high position, heading angle Z=(((int)HYaw<<16)| LYaw)/1000° |
example: send:50 03 00 3D 00 06 59 85(Read the 3-axis angle) return:50 03 0C LRollH LRollL HRollH HRollL LPitchH LPitchL HPitchH HPitchL LYawH LYawL HYawH HYawL CRCH CRCL |
TEMP(temperature)
Register Name: TEMP Register Address: 67 (0x43) Read and write direction: R Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:0 | TEMP[15:0] | temperature=TEMP[15:0]/100℃ |
example: send:50 03 00 67 00 01 38 54(Read Triaxial Magnetic Fields) return:50 03 02 TEMPH TEMPL CRCH CRCL TEMP[15:0]=((short)TEMPH <<8)|TEMPL ; |
q0~q3(Quaternion)
Register Name: q0~q3 Register Address: 81~84 (0x51~0x54) Read and write direction: R Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:0 | q0[15:0] | Quaternion0=q0[15:0]/32768 |
15:0 | q1[15:0] | Quaternion1=q1[15:0]/32768 |
15:0 | q2[15:0] | Quaternion2=q2[15:0]/32768 |
15:0 | q3[15:0] | Quaternion3=q3[15:0]/32768 |
example: send:50 03 00 51 00 04 18 59(read quaternion) return:50 03 08 q0H q0L q1H q1L q2H q2L q3H q3L CRCH CRCL q0[15:0]=((short)q0H <<8)|q0L ; q1[15:0]=((short)q1H <<8)|q1L ; q2[15:0]=((short)q2H <<8)|q2L ; q3[15:0]=((short)q3H <<8)|q3L ; |
GYROCALITHR(Gyro Still Threshold)
Register Name: GYROCALITHR Register Address: 97 (0x61) Read and write direction: R/W Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:0 | GYROCALITHR[15:0] | set Gyro Still Threshold: Gyro Still Threshold value=GYROCALITHR[15:0]/1000(°/s) |
example: send:50 06 00 61 00 32 54 40(Set the gyro static threshold to 0.05°/s) return:50 06 00 61 00 32 54 40 When the angular velocity change is less than 0.05°/s and lasts for the time of "GYROCALTIME", the sensor recognizes it as stationary and automatically resets the angular velocity less than 0.05°/s to zero The setting rule of the static threshold of the gyroscope can be determined by reading the value of the "WERROR" register. The general setting rule is: GYROCALITHR=WERROR*1.2, unit: °/s. This register needs to be used in conjunction with the GYROCALTIME register |
GYROCALTIME(Gyro auto calibration time)
Register Name: GYROCALTIME Register Address: 99 (0x63) Read and write direction: R/W Default: 0x03E8 | ||
Bit | NAME | FUNCTION |
15:0 | GYROCALTIME[15:0] | set gyro auto calibration time |
example: send:50 06 00 63 01 F4 74 42(Set gyroscope auto-calibration time500ms,0x01F4=500(ms)) return:50 06 00 63 01 F4 74 42 When the angular velocity change is less than "GYROCALITHR" and lasts for 500ms, the sensor recognizes that it is stationary and automatically resets the angular velocity less than 0.05°/s to zero This register needs to be used in conjunction with the GYROCALITHR register |
KEY(unlock)
Register Name: KEY Register Address: 105 (0x69) Read and write direction: R/W Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:0 | KEY[15:0] | Unlock register: When performing a write operation, you need to set this register first |
Example: Send: 50 06 00 69 B5 88 22 A1 (unlocked) Return: 50 06 00 69 B5 88 22 A1 Unlock, write 0xB588 to this register (other values are invalid) |
WERROR(Gyroscope change value)
Register Name: WERROR Register Address: 106 (0x6A) Read and write direction: R Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:0 | WERROR[15:0] | Gyroscope change value=WERROR[15:0]/1000*180/3.1415926(°/s) When the sensor is stationary, the "GYROCALITHR" register can be set by changing this register |
WZTIME(Angular velocity continuous rest time)
Register Name: WZTIME Register Address: 110 (0x6E) Read and write direction: R/W Default: 0x01F4 | ||
Bit | NAME | FUNCTION |
15:0 | WZTIME[15:0] | Angular velocity continuous rest time |
Example: Send: 50 06 00 6E 01 F4 E5 81 (set the angular velocity continuous static time 500ms, 0x01F4=500(ms)) Return: 50 06 00 6E 01 F4 E5 81 When the angular velocity is less than "WZSTATIC" and lasts for 500ms, the angular velocity output is 0, and the Z-axis heading angle is not integrated This register needs to be used in conjunction with the "WZSTATIC" register |
WZSTATIC(Angular velocity integral threshold)
Register Name: WZSTATIC Register Address: 111 (0x6F) Read and write direction: R/W Default: 0x012C | ||
Bit | NAME | FUNCTION |
15:0 | WZSTATIC[15:0] | Angular velocity integral threshold=WZSTATIC[15:0]/1000(°/s) |
Example: Send: 50 06 00 6F 01 F4 E5 81 (set the angular velocity integration threshold to 0.5°/s, 0x01F4=500, 500/1000=0.5(°/s)) Return: 50 06 00 6F 01 F4 E5 81 When the angular velocity is greater than 0.5°/s, the Z-axis heading angle starts to integrate the acceleration When the angular velocity is less than 0.5°/s, and the duration set by the register "WZTIME", the angular velocity output is 0, and the Z-axis heading angle is not integrated This register needs to be used in conjunction with the "WZTIME" register |
MODDELAY(485 data response delay)
Register Name: MODDELAY Register Address: 116 (0x74) Read and write direction: R/W Default: 0x0BB8 | ||
Bit | NAME | FUNCTION |
15:0 | MODDELAY[15:0] | Set 485 data response delay, default 3000, unit: us |
Example: Send: 50 06 00 74 03 E8 C4 EF (set 485 data response delay 1000us) Return: 50 06 00 74 03 E8 C4 EF When the sensor receives the Modbus read command, the sensor delays 1000us and returns data This register only supports Modbus version of the sensor |
NUMBERID1~NUMBERID6(device number)
Register Name: NUMBERID1~NUMBERID6 Register address: 127~132 (0x7F~0x84) Read and write direction: R Default: none | ||
Bit | NAME | FUNCTION |
15:0 | NUMBERID1[15:0] | |
15:0 | NUMBERID2[15:0] | |
15:0 | NUMBERID3[15:0] | |
15:0 | NUMBERID4[15:0] | |
15:0 | NUMBERID5[15:0] | |
15:0 | NUMBERID6[15:0] | |
Device number:WT4200000001 |
XREFROLL~YREFPITCH(Angle zero reference value)
Register Name: LREFROLL~HREFPITCH Register address: 149~152 (0x95~0x98) Read and write direction: R/W Default: 0x00000 | ||
Bit | NAME | FUNCTION |
15:0 | LREFROLL[15:0] | Roll angle zero reference value low |
15:0 | HREFROLL[15:0] | Roll Angle Zero Reference Value High, Roll Angle Zero Reference = |
15:0 | LREFPITCH[15:0] | (((int)HREFROLL<<16)| LREFROLL)/1000(°) |
15:0 | HREFPITCH[15:0] | Pitch angle zero reference value low |
Example: The current roll angle is 2°, set the roll angle zero, subtract 2°, then REFROLL[31:0]=2*1000=2000=0x07D0 LREFROLL[15:0]=0x07D0, HREFROLL[15:0]=0; Send: 50 06 00 95 07 D0 97 CB (set "LREFROLL") Return: 50 06 00 95 07 D0 97 CB Send: 50 06 00 96 00 00 64 67 (set "HREFROLL") Return: 50 06 00 96 00 00 64 67 |
Last updated