Skip to content

Command and Programming Manual ​

Rev 1.7.3

Applicable to the public commands and data interfaces of HiPNUC IMU / AHRS / MRU products

Specific features are subject to the actual product model, firmware version, and delivered configuration

© 2016–2026 Beijing HiPNUC Electronic Technology Co., Ltd. All rights reserved. The information contained in this document is subject to change without notice.

Document Scope and Version ​

About This Manual ​

This manual is the Command and Programming Reference for HiPNUC IMU / AHRS / MRU products, intended for engineers who need to interface directly with the module, configure parameters, parse data, or integrate it into a higher-level system.

Applicable products: the public programming interfaces of HiPNUC IMU / AHRS / MRU standard products. Actual functionality depends on the specific product model, firmware version, and delivered configuration; sensors, CAN, RS-485, or MRU functions that are not enabled produce no corresponding output. This manual covers only the programming and data interfaces; for pin definitions, mechanical dimensions, power supply, and electrical specifications, refer to the hardware manual of the corresponding product.

Applicable firmware version: 1.6.9 and later. Some features require newer firmware. Send LOG VERSION over the serial port, or check the current firmware version in CHCenter.

Historical manual: Rev 1.3.0.

NOTE

version number conversion: the APP_VER returned by LOG VERSION is an integer-encoded value: major version = APP_VER / 100, minor version = (APP_VER % 100) / 10, revision = APP_VER % 10 (all divisions are integer divisions, rounded down). For example, APP_VER=172 indicates firmware 1.7.2. CHCenter displays the dotted version directly, and the two sources are consistent.

Quick Start Procedure ​

Connect power, ground, and the communication interface according to the product hardware manual, then choose the corresponding path below. These steps only query information or receive data; they do not require changing configuration, restoring factory defaults, or upgrading firmware first. Use the device's current communication settings; typical defaults are only a reference for first-time integration.

InterfaceConnection and verificationProtocol reference
ASCII serialUse 8N1, typically 115200 bps. Send LOG VERSION terminated by \r\n; reading PNAME and APP_VER confirms communicationASCII Command Reference
Modbus RTUConfirm RS-485 support and the current baud rate and node ID (typically 0x50). Read 0x70–0x82 using the version-query example; check the response address, function code, data length and CRC before decoding the versionVersion query, Modbus RTU Protocol
J1939 / CANFD83Confirm protocol support, wiring, termination and current CAN settings. Classic CAN is typically 500 kbit/s; see CANFD83 for dual bit rates and FD/BRS settings. Receive 29-bit extended frames and check PGN and data length firstCAN integration checks, PGN Message List, CANFD83

Opening a serial port does not prove that the device is communicating. Verify a valid response or frame as described above; if there is no response, start with Fault Diagnosis.

Common Tasks ​

TaskWhere to start
Configure output frames and ratesLOG Commands
Change baud rate or Modbus node IDChanging Communication Parameters
Select 6-axis / 9-axis mode or mounting orientationProduct Features and Configuration
Mount the module off-level or output in the ROS conventionMounting Orientation, Output Data Axes
Use 9-axis heading or calibrate the magnetometerMagnetic Calibration and Magnetic Environment
Decode HI91 / HI83 or bus measurementsBasic Conventions → Unified Data Dictionary → Serial Binary, Modbus or CAN
Use MRU wave compensation outputProduct-Specific Features → Output Coverage Overview
Diagnose missing responses, communication loss, data or heading errorsFault Diagnosis

Notational conventions: command keywords, registers, and hexadecimal values use monospace font; callout boxes use Warning (misuse risks) and Note (supplementary information and examples). Shared definitions are in Basic Conventions; protocol chapters provide formats, fields, and examples.

Basic Conventions ​

This chapter centrally defines the coordinate systems, attitude representations, heading conventions, data types and byte order, timestamps, and status words used throughout the manual. Every protocol chapter references this chapter and does not redefine them. Read this chapter before parsing any data.

Coordinate Systems and Direction Conventions ​

The module involves three right-handed coordinate systems:

FrameSymbolDefinition
Sensor frame—Rigidly attached to the module; the X/Y/Z axis directions are printed on the housing/PCB silkscreen. It is the reference for the mounting orientation code.
Body framebThe frame the output data are expressed in. The mounting orientation URFR declares where the printed arrows point on the vehicle, and the module aligns the data to the vehicle accordingly; the output data axes COORD then decide which convention the data X/Y/Z follow on the vehicle: the default Right-Front-Up (RFU), or Front-Left-Up (FLU) as in ROS. With the default URFR 24 and COORD 0 and the module lying flat, the body frame coincides with the sensor frame.
World framenThe reference frame for attitude: East-North-Up (ENU), X east, Y north, Z up. Where heading zero lies depends on the operating mode and the output data axes; see Heading (yaw) Convention.

The positive rotation direction follows the right-hand rule: point the right thumb along the positive axis, and the direction in which the fingers curl is the positive rotation direction about that axis.

Attitude Representation ​

The module simultaneously outputs two attitude representations: Euler angles and quaternion.

  • Euler angles: roll roll, pitch pitch, heading yaw, in degrees. Ranges: roll ∈ [−180°, 180°], pitch ∈ [−90°, 90°], yaw ∈ [−180°, 180°].
  • Quaternion: order WXYZ (q0 is the scalar part), representing the rotation Qb2n from the body frame to the world frame.

The Euler rotation order, the axis each angle is about and their positive senses follow the output data axes. This is where formulas are most often misapplied:

Output data axesBody frameRotation orderroll aboutpitch aboutyaw aboutPositive pitchPositive roll
Right-Front-Up (COORD 0, default)RFU312 (Z, then X, then Y)YXZNose upRight side down
ROS (COORD 4, REP-103)FLU321 (Z, then Y, then X)XYZNose downRight side down

The conversion formulas are in "Appendix A". The two conventions have different body axes and opposite pitch signs, and their 9-axis heading zeros differ (see Heading (yaw) Convention). After switching, extract the Euler angles from the quaternion with the matching formulas; do not add a fixed angle to one of them.

NOTE

pitch ±90° singularity: when pitch approaches ±90°, the Euler angles have a gimbal-lock singularity and roll/yaw are no longer unique. For high-elevation attitudes, use the quaternion.

Heading (yaw) Convention ​

WARNING

heading is the most easily confused point: the module's representation of yaw is not uniform across the different protocols/frames, so refer to the table below for understanding.

Output locationHeading representationPositive direction
HI91 / HI83 / CANopenRaw yaw, range ±180°Counter-clockwise positive
Modbus YAW registerRaw yaw, range ±180°Counter-clockwise positive
J1939 YAW message (first 4 bytes)Compass heading, 0–360°Clockwise positive
J1939 YAW message (last 4 bytes)Raw yaw, ±180°Counter-clockwise positive
  • 6-axis and other relative-heading modes: yaw is a relative heading, 0 at power-on, drifting slowly over time; the same under both output data axes.
  • 9-axis mode: yaw references magnetic north. Under Right-Front-Up (COORD 0) yaw is 0 with the vehicle nose pointing north; under ROS (COORD 4) it follows REP-103 and is 0 with the nose pointing east, so the same orientation reads 90° more than under Right-Front-Up. The module does not output a true-north-corrected heading; if your system needs true north, the host should correct it using the deployment location, date and a magnetic-declination model.
  • Compass heading (J1939 0xFF41 first 4 bytes) is always computed in Right-Front-Up: the Right-Front-Up yaw negated and wrapped to 0–360°. In 9-axis mode it is 0 with the nose pointing north and 90° with the nose pointing east, whatever the output data axes. The raw yaw fields follow the output data axes.

Data Types, Byte Order, and Scale Factors ​

Data types:

SymbolMeaningBytes
u8 / u16 / u32 / u64Unsigned integer1 / 2 / 4 / 8
i8 / i16 / i32Signed integer (two's complement)1 / 2 / 4
floatIEEE-754 single-precision float4
doubleIEEE-754 double-precision float8

Byte order:

ProtocolByte order
HiPNUC binary (HI91/HI83)Little-endian (low byte first)
J1939 / CANopenLittle-endian
Modbus RTUBig-endian (2 bytes per register, high byte first)

Bit numbering convention: in this manual all bit fields (such as MAIN_STATUS and the HI83 data bitmap) use bit0 for the least significant bit (LSB), with bitN being the N-th bit counted from the least significant bit; thus the bit mask 0x00000FFF is bit0–bit11, and 0x000000FF is bit0–bit7.

Scale factor convention: in integer protocols the physical quantity is recovered with a scale factor, physical value = raw value × scale factor. For example, a Modbus acceleration raw value of 1000 with a scale factor of 0.00048828 gives a physical value = 0.488 G. Floating-point protocols (the float/double fields of HI91/HI83) are already in engineering units, with a scale factor of 1.

WARNING

the same physical quantity has different types/scale factors/units across different protocols; see "Unified Data Dictionary" for details.

Time and Timestamps ​

The meaning of system_time in the data frame (u32 for HI91, in ms) varies with the synchronization state:

  • UTC synchronization not completed: a local millisecond counter, not absolute UTC; wrap-around behavior depends on the firmware version.
  • UTC synchronization completed: the current-day UTC millisecond count (from 00:00:00 of the current day, wrapping every 24 h).

The synchronization state can be determined from the UTC_UNSYNC bit of MAIN_STATUS (see "MAIN_STATUS Status Word"). UTC synchronization is achieved via PPS + a serial time message; for hardware wiring and timing requirements see "Synchronization Function".

Current-day UTC millisecond timestamp:

ItemValue
Range0 ~ 86,399,999 ms
Corresponds to00:00:00.000 ~ 23:59:59.999
Resolution1 ms

After UTC synchronization, convert to a display time using hh=system_time/3600000, mm=(system_time/60000)%60, ss=(system_time/1000)%60, ms=system_time%1000. Conversion examples:

system_time (ms)Corresponding current-day UTC time
000:00:00.000
3,661,00001:01:01.000
43,200,00012:00:00.000
86,399,99923:59:59.999

NOTE

The timestamp contains no date or time-zone information. After UTC synchronization, interpret it as UTC+0; for local time, the host should add the time-zone offset. HI83 additionally provides system_time_us (u64, local high-resolution microseconds) and utc (full year-month-day hour-minute-second); whether utc is valid UTC is likewise determined by UTC_UNSYNC.

MAIN_STATUS Status Word ​

MAIN_STATUS is a 16-bit status word that appears in outputs such as HI91 and HI83.

It is a collection of status bits, not a single error code. A nonzero value does not necessarily indicate a fault, and not all bits need to be zero before using the data. Check the relevant bits for the task: convergence for attitude, magnetometer aiding and field status for 9-axis heading, and time synchronization for absolute UTC. The bit definitions follow.

BitName=1 meaning=0 meaning
0–2Reserved——
3WB_CONVGyro bias not converged, accuracy is poor (recommend staying static for 3~5 s)Bias well converged
4MAG_DISTIn 9-axis mode the runtime magnetic-field confidence is abnormal (field out of range, rotation verification not yet completed, or magnetic disturbance detected), and the heading angle may degrade to inertial holdMagnetic-field confidence normal, or in 6-axis mode
5ACC_SATAccelerometer range saturated currently or within the last 2 sNo accelerometer saturation for 2 consecutive s
6GYR_SATGyroscope range saturated currently or within the last 2 sNo gyro saturation for 2 consecutive s
7ATT_CONVAttitude estimate not sufficiently converged, accuracy is poor (recommend staying static for a moment)Attitude accuracy normal
8Reserved——
9STATICThe device is judged to be staticThe device is not judged to be static
10MAG_AIDINGMagnetometer aiding mode enabled (9-axis mode); the actual magnetic update each cycle is still subject to magnetic-field confidence and algorithm de-weighting controlMagnetometer aiding mode off (6-axis mode)
11UTC_UNSYNCUTC not synchronized; system_time is a local millisecond counterUTC synchronized; system_time is the current-day UTC milliseconds
12SOUT_PULSEThe current data frame corresponds to one SOUT pulse outputThe current frame does not correspond to a SOUT pulse
13Reserved——
14–15Reserved——

NOTE

the UTC_UNSYNC bit means "1 indicates not synchronized"; do not misread it literally as "synchronized". SOUT_PULSE is used to time-synchronize and align with the sampling timing of an external acquisition device or host.

Reserved bits: reserved bits are used internally by the firmware and their values are not guaranteed to be 0; the client should mask and ignore all reserved bits and only evaluate the bits defined in this table, to ensure forward compatibility.

Product Features and Configuration ​

This chapter introduces the module's configuration items, use cases, and operating procedures by function. For specific command syntax, see "ASCII Command Reference"; for output data formats, see "Unified Data Dictionary" and the subsequent protocol chapters.

Configuration and Saving ​

After changing configuration, verify the result by reading parameters back or checking actual output, then perform the corresponding save operation for compatibility across firmware versions. For settings that require a restart, verify again after restarting. Follow the specific procedures for communication changes, attitude resets and calibration.

Interface and request formatSave configurationReset
ASCIISAVECONFIGREBOOT
ModbusWrite 0x0000 to 0x00Write 0x00FF to 0x00
J1939Write 0x00000000 to configuration address 0x0000Write 0x000000FF to configuration address 0x0000

Changing Communication Parameters ​

Before making changes, record the current port, baud rate and node ID, and confirm that the host supports the target settings. These procedures assume communication is already established; for first-time integration, complete communication verification first.

ASCII Serial Baud Rate ​

SERIALCONFIG takes effect immediately. When changing the connected port, switch the host to the new baud rate after sending the command, use LOG COMCONFIG to confirm communication and configuration, then run SAVECONFIG. Changing another port does not change the connected port's baud rate. See System Commands for syntax and supported rates.

Modbus Baud Rate ​

0x04 configures the COM1 baud rate and takes effect after reset. Using the current rate, write and read back 0x04; after confirming the rate index, write 0x0000 to 0x00 to save, then 0x00FF to reset. After restart, switch the host to the new baud rate and read registers again to verify communication. Reset may interrupt the response; confirm the result from a valid response after restart. See Common Configuration Examples for rate-specific messages.

Modbus Node ID ​

The node ID takes effect immediately, without reset. Read 0x05 using the new ID to confirm, then use the new ID to write 0x0000 to 0x00 to save. Update the ID and recompute the CRC in subsequent messages. The normal echo for the ID-changing request still uses the old ID; confirm success with a valid readback using the new ID. See Common Configuration Examples for message formats.

If communication is lost after a change, use Fault Diagnosis to check that host and device settings match; do not immediately restore factory defaults.

Operating Mode (Attitude / Heading Profile) ​

The module selects the attitude / heading profile via CONFIG ATT MODE (see "CONFIG Configuration Commands"). The common public profiles are as follows:

  • 6-axis (VRU) mode: Uses only the accelerometer + gyroscope, outputting relative heading (heading is 0 at power-on), unaffected by magnetic interference, suitable for magnetically complex scenarios such as indoors, robotics, and near motors.
  • 9-axis (AHRS) mode: Fuses the magnetometer, outputting absolute heading (relative to magnetic north). It must be used in a clean magnetic environment with magnetic calibration completed (see "Magnetic Calibration and Magnetic Environment").
  • Dedicated motion profiles: Optimized for specific body motion constraints, such as humanoid robots, low-speed ground platforms, and low-dynamic inclinometers. For the specific selectable values, see "CONFIG ATT MODE".

WARNING

Use 9-axis with caution indoors/on robots: Indoor environments and motor magnetic fields easily interfere with the magnetometer, causing heading errors. For such scenarios, 6-axis mode is recommended as the preferred choice.

Output Data Axes (COORD) ​

CONFIG IMU COORD <VAL> selects which convention the output X/Y/Z follow on the vehicle; it takes effect after a reset or power cycle. Its job differs from the mounting orientation: the mounting orientation declares how the module sits on the vehicle, while the output data axes only decide how the data are expressed. Once the mounting orientation is set, the data follow the vehicle, not the arrows printed on the housing. In CHCenter, set it under "Output Data Axes" on the "Work Mode" page of the configuration dialog.

VALOutput data axesData X / Y / ZEuler order9-axis heading zero
0Right-Front-Up (default)Vehicle right / front / up312Nose pointing north
4ROS (REP-103)Vehicle front / left / up321Nose pointing east
  • Applies to acceleration, angular rate, magnetic field, quaternion and Euler angles; see Attitude Representation for the positive sense of each angle. Velocity and position are always output as east-north-up.
  • Inclination, compass heading (J1939 0xFF41 first 4 bytes) and MRU outputs are always computed in Right-Front-Up and do not follow this setting.
  • In 6-axis and other relative-heading modes, heading is 0 at power-on under either choice.
  • For ROS, choose 4: set the driver's frame_id to base_link (or a frame with no rotation from it), with no extra TF; see the official ROS driver notes.
  • Set it with Modbus register 0x07 or J1939 address 0x0007. Integrated-navigation products accept only 0 in integrated-navigation operating modes.

NOTE

On firmware V1.7.2 and earlier, COORD 4 is North-West-Up (NWU), unlike the table above.

Mounting Orientation (URFR) ​

When the module is not mounted in the default orientation, CONFIG IMU URFR <CODE> (see "CONFIG Configuration Commands") declares where the X/Y/Z arrows printed on the housing or PCB silkscreen point on the vehicle, and the module aligns its output to the vehicle accordingly. It takes effect after a reset or power cycle. The mounting orientation only describes the installation and is independent of the output data axes: with ROS selected the data are output as Front-Left-Up, and the code stays the same.

CODE is written as a three-digit number ABC (a 2-digit value is equivalent to padding with a leading zero, e.g., 24 = 024): A/B/C indicate which sensor-frame direction the vehicle X (right) / Y (front) / Z (up) axes correspond to, respectively:

DigitDirectionDigitDirection
0+X1−X
2+Y3−Y
4+Z5−Z

The three directions must form a right-handed frame (X × Y = Z), giving 24 legal codes. In practice, look up the module's physical orientation on the vehicle in the table below; there is no need to apply the encoding rule by hand. The "Arrow directions" column gives where the printed X / Y / Z arrows actually point on the vehicle, taken from the vehicle's point of view: front is where it drives, right is the driver's right-hand side.

In CHCenter, the "Installation" page of the configuration dialog picks the orientation with two drop-downs, "X arrow points to" and "Y arrow points to"; Z follows. They match the first column of the table one-to-one. The Modbus and J1939 configuration windows have the same page; inclinometer products do not.

Arrow directions (X, Y, Z)CommandDescription
Right, Front, UpURFR 24Default horizontal mounting (=024)
Right, Back, DownURFR 35Flipped upside-down about X (=035)
Right, Down, FrontURFR 43Side mounting (Right+Down)
Right, Up, BackURFR 52Side mounting (Right+Up)
Left, Front, DownURFR 125X reversed, Z downward, inverted
Left, Back, UpURFR 134X/Y reversed, Z upward
Left, Up, FrontURFR 142Left-facing vertical mounting, Y up
Left, Down, BackURFR 153Left-facing vertical mounting, Y down
Front, Right, DownURFR 205Forward mounting, X along the vehicle nose
Back, Right, UpURFR 214Backward mounting, Y to the right
Up, Right, FrontURFR 240Vertical mounting, X up
Down, Right, BackURFR 251Vertical mounting, X down
Front, Left, UpURFR 304Forward mounting, Y to the left
Back, Left, DownURFR 315Backward inverted mounting
Down, Left, FrontURFR 341Left-facing vertical mounting, X down
Up, Left, BackURFR 350Left-facing vertical mounting, X up
Front, Up, RightURFR 402Forward vertical mounting, Z to the right
Back, Down, RightURFR 413Backward vertical mounting
Down, Front, RightURFR 421Vertical mounting, X down, Z to the right
Up, Back, RightURFR 430Vertical mounting, X up, Z to the right
Front, Down, LeftURFR 503Forward vertical mounting, Z to the left
Back, Up, LeftURFR 512Backward vertical mounting
Up, Front, LeftURFR 520Vertical mounting, X up, Z to the left
Down, Back, LeftURFR 531Vertical mounting, X down, Z to the left

After setting it, run SAVECONFIG and REBOOT, then raise the vehicle's nose and lower its right side to check the output: raising the nose gives positive pitch under Right-Front-Up and negative pitch under ROS; lowering the right side gives positive roll under both. Codes not in the table are rejected with ERR. After the mounting orientation is changed and the module restarts, a previously saved attitude zero no longer applies; set it again for the new installation (see attitude reset persistence).

Attitude Calibration ​

CONFIG ATT RST (see "CONFIG Configuration Commands") sets user attitude zeros: zero all, heading reset, relative zero, auto-leveling, and cancel leveling. The device must be stationary during execution; auto-leveling takes effect only when the device is within ±5° of level.

CONFIG USRCAL (see "CONFIG Configuration Commands") is used for user-level gyro scale calibration, calibrating the gyro Z-axis scale factor to reduce the long-term heading accumulation error of a horizontally rotating body. This feature is suitable for controllable horizontal rotation scenarios such as AGVs, large horizontally moving robots, and turntables; it is not suitable for handheld arbitrary rotation or scenarios where the rotation angle cannot be accurately measured. Operating steps:

  1. Place the module together with the body on level, flat ground, with a stable ambient temperature and no strong vibration;
  2. Send CONFIG USRCAL START <ANGLE> (angle 360°~3600°);
  3. Rotate horizontally at a constant 20~100 deg/s through the set angle (any direction, no pausing, no abrupt change);
  4. After the rotation is complete, send CONFIG USRCAL STOP; a successful return is OK. It is recommended that the actual rotation angle, controlled manually or by a turntable, not deviate by more than ±5°; if the actual angle deviates too much from the set angle, the calibration will introduce a new scale error.

Common failure causes: improper rotation (too fast, too slow, pausing midway, or obvious wobbling), environmental vibration, and the actual rotation angle deviating too much from the set value.

Synchronization Function ​

The module's synchronization function relies on the SYNC_IN/PPS and SOUT pins and covers three categories of use. The figure below shows logic-analyzer-measured waveforms, taking the SYNC_IN trigger mode as an example: a rising edge on SYNC_IN/PPS triggers the output of that frame; the module first outputs the SOUT pre-frame pulse before sending the data frame, and the data frame follows immediately after the falling edge of the pulse. Note that the SOUT pre-frame pulse is generated for every output data frame and does not depend on the SYNC_IN trigger (see "SOUT Synchronous Output" for details).

Figure: Logic-analyzer measurement — after SYNC_IN is triggered, SOUT first outputs the pre-frame pulse, and its falling edge is immediately followed by the serial data frame (5A A5…).

SYNC_IN Synchronous Data Trigger ​

Triggers data output via an external pulse. After the module detects a rising edge on the SYNC_IN/PPS pin, it outputs the data frame that has been configured for synchronous trigger mode; that frame is no longer sent periodically.

  • Serial protocol: Use LOG <MSG> ONMARK 1 to configure the target frame as pulse-triggered (see "LOG Commands").
  • J1939: Set the transmission period of the target PGN to 0x8000 (see "J1939 Configuration Protocol").

When this function is not used, the pin is recommended to be left floating or grounded.

PPS Standard Pulse Synchronization ​

Using the SYNC_IN/PPS pin to receive an external 1PPS pulse, combined with receiving a time message over the serial port, can provide precise UTC time synchronization for delivery configurations with this function enabled. After the module detects a valid PPS rising edge and receives a matching time message, its internal clock automatically aligns to the UTC whole second.

ParameterDescriptionValid RangeRecommended
t0Interval between rising edges of adjacent pulses990~1010 ms1000 ms
t1Pulse high-level time (pulse width)1~100 ms10~50 ms
t2Time message transmission timeRelated to baud rate—
t3Delay of the time message relative to the most recent pulse rising edgeWithin the firmware pairing window0~100 ms

WARNING

Core requirement: The time message used for synchronization must carry the whole-second UTC time and arrive within the pairing window of the most recent PPS. In engineering practice, it is recommended to send it as close as possible to the PPS rising edge and to keep the phase stable.

Hardware and Interface Requirements:

  • SYNC_IN/PPS: Rising edge active; high level ≤ 5V (TTL/CMOS compatible).
  • Serial RX: Time message frequency 1~10 Hz (1 Hz recommended); the baud rate must match the module's current configuration; only firmware-defined UTC time messages are supported.

The module extracts only the UTC time (hour/minute/second/millisecond) and date (year/month/day) fields from the time message for synchronization, ignoring all other fields. After successful synchronization, the meaning of system_time is described in "Time and Timestamps". This input message format is part of the delivery configuration; if PPS synchronization is required, refer to the delivery documentation of the corresponding product.

SOUT Synchronous Output ​

SOUT is the synchronous output pin. It is low when there is no data output; before a data frame begins transmitting, it first outputs a high pulse, and the data follows immediately after the falling edge of the pulse. It can be used to trigger devices such as cameras to achieve strict time synchronization. The SOUT_PULSE bit of the corresponding data frame's MAIN_STATUS (see "MAIN_STATUS Status Word") is set to 1.

Multi-function IO Multiplexing (PMUX) ​

The module provides multiple multi-function pins (IOx), each with a default multiplexed function, which can also be remapped via CONFIG PMUX<n> IO<m> (e.g., CONFIG PMUX2 IO3, see "CONFIG Configuration Commands"):

FunctionNameDirectionDescriptionDefault IO
PMUX1SYNC_IN/PPSInputSynchronous pulse input (see "Synchronization Function")IO1
PMUX2SOUTOutputPre-frame sync pulse output (see "SOUT Synchronous Output")IO2
PMUX3LEDOutputOperating status indicatorIO5

NOTE

Not all IO pins are brought out on a specific product; see the corresponding product hardware manual for details.

Product-Specific Features ​

The following features are supported only on specific models or delivery configurations; other models may skip this section.

Inclinometer Output (Only HI50 and Certain Models) ​

The inclinometer outputs the body's tilt relative to the horizontal plane in "inclination" semantics, suitable for scenarios such as platform leveling, angle monitoring, and construction machinery attitude. The inclination is derived from the attitude solution:

  • X-axis inclination: Based on roll, with a range of ±180° dual-axis and a configurable 0–360° single-axis;
  • Y-axis inclination: Based on pitch, with a range of ±90°.

Output locations: HI83 (bit9), Modbus (0x4A / 0x4B), J1939 (PGN 0xFF4A); see "Unified Data Dictionary" for the scale factor of each protocol. Inclination is always computed in Right-Front-Up and does not follow the output data axes.

Direction and zero point: The output direction of each axis can be independently reversed (0=default, 1=reversed; for J1939 configuration see "J1939 Configuration Protocol"); the inclination zero point is achieved via "attitude relative zeroing" (CONFIG ATT RST 2, see "CONFIG Configuration Commands"). After configuration, a reset or power cycle is recommended to recheck.

Wave Compensation / MRU Output (Heave / Surge / Sway) ​

The MRU delivery configuration is used to estimate the periodic motion of ships or offshore platforms, outputting three-axis displacement and main-frequency information:

Motion AxisDescriptionOutput
HeaveHeaveVertical displacement, frequency
SurgeSurgeBow-stern direction displacement, frequency
SwaySwayLeft-right direction displacement, frequency

Surge and sway run along the vehicle's front-back and left-right directions and do not follow the output data axes. The data is output via HI83 (bit10 displacement / bit11 frequency) or Modbus (0x4E–0x50 displacement, 0x51–0x53 frequency); see "Unified Data Dictionary". The MRU output reflects the periodic-motion estimation result and is not used as absolute position or track information.

Application scenarios: Ship dynamic monitoring and attitude control, offshore engineering operation compensation (lifting, docking), wave characteristic research, and offshore platform attitude stability analysis.

Usage limitations:

WARNING

Important limitations:

  • Applicable only to periodic reciprocating motion; the following cases usually cannot be accurately measured: motion with too long a period (> 30 s), unidirectional linear motion, and step-like displacement.
  • Zero-mean assumption: The algorithm assumes that the long-term average of the displacement is 0.
  • Initialization time: A stable 5~20 wave periods are required as the initialization time to obtain correct results.
  • Frequency response range: The typical wave period is 3~20 s; accuracy decreases beyond this range.

Magnetic Calibration and Magnetic Environment ​

Magnetic calibration removes the hard-iron/soft-iron disturbances that move together with the module, and is a prerequisite for obtaining a reliable heading angle in 9-axis (AHRS / magnetometer-aided absolute heading) mode. Magnetic calibration is not required when using 6-axis (VRU) mode only.

NOTE

Procedure overview: Switch to 9-axis mode, save and restart → check the magnetic environment → start calibration and slowly rotate each axis together with the carrier → query calibration status → rotate one full turn to verify heading.

Applicable Scenarios ​

9-axis mode is recommended when all of the following conditions are met simultaneously:

  1. Complete at least one user magnetic calibration before using 9-axis mode for the first time;
  2. The operating environment has no obvious spatial magnetic distortion (an open outdoor area is recommended; an indoor environment with a complex magnetic field makes good results hard to guarantee);
  3. The relative position between the module and its mounting carrier (PCB, enclosure, robot, etc.) stays fixed during use.

WARNING

Prefer 6-axis indoors: Indoor spatial magnetic distortion cannot be removed by calibration; even if calibration succeeds, the 9-axis heading accuracy may still be worse than in 6-axis mode. For scenarios such as equipment rooms, laboratories, workshops, and underground garages, 6-axis mode is recommended.

Run-time trustworthiness assessment:

MAG_AIDING indicates whether magnetometer-aided mode is enabled; it cannot establish heading reliability by itself. Evaluate MAG_DIST, ATT_CONV and actual heading changes together. See "MAIN_STATUS Status Word" for the bit definitions.

Calibration Steps ​

The following procedure uses ASCII commands. For Modbus, substitute the corresponding magnetic calibration register operations; environment checks, rotation, status meanings and result verification use this same procedure.

Step 1: Switch the operating mode ​

First configure the module to 9-axis mode (CONFIG ATT MODE 1, see "Operating Mode"), run SAVECONFIG, then reset or power-cycle. Confirm that magnetometer-aided mode is enabled via MAIN_STATUS.MAG_AIDING=1 or configuration readback.

Step 2: Check the calibration environment ​

Common sources of magnetic interference: magnets, speakers, magnetic screws, iron furniture, steel fixtures, vehicle chassis, computer monitors, motors and transformers, high-current cables, mobile phone chargers, structural building rebar, etc.

Environment levelRequirement
BestOpen outdoor area, away from buildings and vehicles (distance > 5 m)
For temporary verification onlyAn indoor area away from steel structures, motors, high-current cables, and magnets; mass-production acceptance should use an open outdoor area, or a fixed site already validated by B_total and heading-rotation verification

WARNING

Whole-assembly calibration principle: If the module has already been soldered onto the product PCB, uses a magnetic enclosure, or has already been installed on a robot/mechanical equipment, you must rotate and calibrate the entire assembly that is rigidly fixed to the module together. Calibrating the module alone and then installing it into the product will invalidate the calibration.

Step 3: Perform the calibration ​

Send the calibration command: CONFIG MCAL START (requires firmware version ≥ 1.7.0). Once the module enters the calibration process, it collects three-axis magnetic field samples during rotation and automatically fits the hard-iron/soft-iron compensation parameters; no stop command needs to be sent.

Rotation essentials:

  1. Keep the position essentially unchanged within as small a spatial range as possible, and slowly rotate only the module; if the module is already rigidly fixed to the carrier, rotate the module and carrier together as a whole;
  2. Cover as many attitude directions as possible; for 3D calibration it is recommended to rotate each axis at least 360° (2 to 3 turns recommended), at a uniform speed, with a recommended 20 to 100 deg/s (about 4 to 18 seconds per turn), avoiding staying in the same attitude for a long time;
  3. Initially allow 30 to 60 s of rotation, checking calibration status during the process.

Recommended rotation scheme: rotate 2 turns about the X axis → 2 turns about the Y axis → 2 turns about the Z axis; or rotate randomly, ensuring every axis undergoes sufficient angular variation while keeping the position as fixed as possible.

Speed, duration and number of turns are operating guidelines only; calibration is complete when STAT=3.

NOTE

Planar mounting (2D) calibration: For mountings that stay essentially level during operation and rotate mainly about the vertical axis (such as AGVs, turntables, vehicles), planar calibration can be started via the command line CONFIG MCAL START 2D, requiring rotation only about the vertical axis. In CHCenter, the "Magnetic Calibration" window offers "3D — Handheld / Drone" and "2D — Vehicle / AGV" and shows the matching rotation guidance. 2D calibration is not detected automatically and must explicitly carry the 2D parameter; it updates only the horizontal-plane parameters and retains the existing Z-axis hard-iron compensation. If a valid 3D calibration has never been performed, the Z-axis hard-iron environment changes, or the carrier will pitch/roll noticeably, use 3D calibration.

Step 4: Query the calibration status ​

Send LOG MCAL STAT. Example response:

text
STAT=3
PROGRESS=100
OK
STATStatusRecommended action
0Currently idleA new calibration can be started
1CalibratingContinue rotating the module; if the module is already rigidly fixed to the carrier, rotate the module and carrier together as a whole
3Calibration completedVerify heading using Step 5
4Calibration failedRefer to the troubleshooting procedure and recalibrate

PROGRESS: ranges 0 to 100, indicating magnetic-sample coverage, not time progress; it shows at most 99 while running and only shows 100 after STAT=3.

After calibration succeeds, the hard-iron/soft-iron compensation parameters are immediately applied to the AHRS estimation and written to non-volatile storage; there is no need to run SAVECONFIG separately, nor is a reset required for them to take effect. It is recommended to perform another heading-rotation verification after reset or power-cycle to confirm that the parameters retained through power-down still suit the current mounting and environment.

Step 5: Verify the calibration result ​

  1. After calibration is complete, place the module level and slowly rotate it one full turn (360°);
  2. Observe the heading angle output: ideally it should vary continuously with the rotation, without unexpected jumps; if the protocol output range is ±180°, wrap-around at the ±180° boundary is allowed; if the output range is 0° to 360°, wrap-around at the 0/360° boundary is allowed;
  3. If the error relative to the reference heading or the closure error over one full turn exceeds ±5°, a non-boundary wrap-around jump appears, or the heading angle does not change with rotation, refer to the troubleshooting procedure below.

Troubleshooting Procedure ​

When calibration fails (STAT=4) or the verification result is abnormal, check item by item according to the table below, moving to the next item only after the previous one passes (total magnetic field strength B_total = √(Bx² + By² + Bz²), computed from the mag_b three axes):

OrderCheck itemPass criterionHandling when failed
1Read the total magnetic field strength B_total at rest20–60 μTBelow 20 μT (shielded / too weak) or above 60 μT (a magnet nearby / too strong) → move away from the interference source or change location, then recalibrate
2Whether attitude coverage is sufficient3D: sufficient coverage on each axis, recommended ≥ 360° per axis; 2D: more than one full turn around the vertical axis in the horizontal plane; rotation speed recommended 20–100 deg/sInsufficient coverage or staying in the same attitude for a long time → redo the rotation per the essentials, then recalibrate
3Change of B_total when changing orientation at the same locationDifference between maximum and minimum ≤ 10 μTExceeds 10 μT (spatial magnetic distortion present); do not judge by the variation of a single axis Bx/By/Bz → change location, or switch to 6-axis mode
—All three items pass but still abnormal—Perform calibration again in a clean environment

Frequently Asked Questions ​

Failure causeTypical symptomSolution
Excessive ambient magnetic interferenceSTAT=4 or heading-angle jumpsMove to an open outdoor area to calibrate
Non-standard rotation motionPROGRESS grows slowly or stallsEnsure each axis is rotated sufficiently at a uniform speed
Position moved during rotationCalibration completes but accuracy is poorKeep the position fixed during calibration and rotate the attitude only
Module-carrier position changedHeading-angle error increases after reinstallationRecalibrate the module and carrier together as a whole

Precautions ​

WARNING

Indoor magnetic field limitation: Indoor spatial magnetic interference cannot be removed by calibration, and the 9-axis heading accuracy depends on the actual degree of magnetic distortion; for the principle, see "Magnetic Interference Types and Calibration Boundaries" in this chapter.

WARNING

Fixed-mounting requirement: Sources of magnetic interference must keep a fixed relative position to the module. When the module is mounted on a magnetically permeable rigid body (robot/mechanical equipment/vehicle/ship/tripod/PCB, etc.), the entire system must be rotated and calibrated together; no relative displacement should occur during use, and recalibration is required once they are separated.

WARNING

Motor and current influence: If the magnetic field produced by motors, cables, and drivers varies with load, current, or speed, it is a time-varying disturbance and cannot be removed by a single magnetic calibration. Calibration is recommended while the motor is stopped; only when the operating state is stable and the magnetic field is fixed relative to the module may calibration be done in that operating state. If the operating state changes significantly, increase the distance or use 6-axis mode.

Calibration Frequency and Mode Selection ​

Calibration frequency recommendations:

  • Calibrate and verify heading after initial fixed installation; repeated calibration is normally unnecessary if the mounting is unchanged and verification remains normal.
  • Recalibrate after changing the module's position relative to the carrier, or magnetic components that move with the module.
  • After changing environment or observing abnormal heading, first check magnetic interference and mounting. If problems remain after removing interference, recalibrate in a suitable environment.

Mode selection recommendations:

Application scenarioRecommended modeReason
Open outdoor environment (UAVs, etc.)9-axisLow magnetic interference; an absolute heading angle can be obtained
Indoor environment (AGVs, robots, etc.)6-axisIndoor magnetic interference is large; 6-axis is more stable
Near motors / electromagnetic equipment6-axisElectromagnetic interference cannot be removed by calibration
Absolute heading angle required9-axisMust ensure a stable ambient magnetic field and a completed calibration
Only relative heading angle required6-axisThe 6-axis heading angle is 0 at power-up, suitable for relative measurement

Magnetic Interference Types and Calibration Boundaries ​

Magnetic interference can be divided into two major categories by "whether it moves together with the sensor". Only interference that moves with the sensor can be removed by user magnetic calibration; spatial magnetic distortion cannot be removed no matter how you calibrate.

Magnetic interference typeInterference moving with the sensorSpatial magnetic distortion
CharacteristicsThe interference source moves as the sensor movesThe interference source does not move with the sensor
Sub-categoriesHard-iron (rigidly attached magnets / PCB / metal enclosure), soft-iron (rigidly attached permeable metal), sensor calibration errorSpatial distortion (rebar / furniture / appliances), temporal distortion (motor / current variation)
Typical interference sourcesPCB rigidly fixed to the module, metal enclosure, UAV frame, etc.Furniture, household appliances, cables, building rebar structures, etc.
Can it be calibratedYesImpossible
Mitigation measuresCan be removed by user magnetic calibrationCalibration cannot remove it and it significantly increases heading-angle error

ASCII Command Reference ​

Module configuration uses serial ASCII string commands, each terminated by a carriage-return/line-feed \r\n (similar to AT commands). This chapter is the authoritative syntax reference for the commands; for functional background and operating procedures, see "Product Features and Configuration".

Command Format and Conventions ​

  • Case: command keywords are uppercase.
  • Separation: parameters are separated by spaces, e.g. CONFIG IMU URFR 24 (not URFR=24).
  • Effect and saving:
    • Communication commands (SERIALCONFIG, LOG ENABLE/DISABLE, LOG <MSG> ONTIME/ONMARK) usually take effect immediately;
    • Some settings are loaded only after a reset or power cycle; refer to each command's description and the appendix "Factory Default Configuration";
    • Restore-type commands (FRESET) save automatically and trigger a reset.
  • Configuration procedure: see Configuration and Saving.

NOTE

This chapter lists common public commands. Compatibility or custom commands are governed by the actual delivery documentation.

Command Overview ​

CommandFunctionEffect
REBOOTReset the moduleImmediate
SAVECONFIGSave configurationImmediate
SERIALCONFIGSet the serial baud rateImmediate
FRESETRestore factory defaultsImmediate (saves automatically and resets)
CONFIGConfigure various parameters and operating modesPer sub-command
LOGQuery information / configure data outputPer sub-command

System Commands ​

REBOOT — Reset the module. Example: REBOOT

SAVECONFIG — Save configuration. Run this command once after configuration for compatibility across firmware versions.

Example: SAVECONFIG

SERIALCONFIG — Set the serial baud rate. Format: SERIALCONFIG [<COM>] <BAUD>

  • When <COM> is omitted, the currently connected serial port is configured; when specified (e.g. COM2), the corresponding serial port is configured.
  • Supported BAUD values (9 in total): 4800 9600 19200 38400 57600 115200 230400 460800 921600

Examples: SERIALCONFIG 115200, SERIALCONFIG COM2 921600

WARNING

This command takes effect immediately; after changing the connected port, switch the host baud rate as well. See ASCII Serial Baud Rate for the full procedure and verification.

FRESET — Restore default user configuration; after execution it saves automatically and resets, so use it with caution. Example: FRESET

CONFIG Configuration Commands ​

NOTE

The effect timing of CONFIG varies. Run SAVECONFIG after configuration; for settings that require a restart, read back after restarting. Public configuration can be queried with LOG COMCONFIG, LOG USRCONFIG, and LOG MCAL STAT (see "LOG Commands").

ATT RST and MCAL act immediately; ATT MODE, IMU COORD, IMU URFR and PMUX are loaded after a reset or power cycle.

Operating Mode — CONFIG ATT MODE <VAL> ​

VALMode
0VRU (6-axis)
1AHRS (9-axis, magnetometer-aided)
4Dedicated to humanoid robots
5Low-speed ground platform (lawn mowers / agricultural machinery / construction machinery, etc.)
7Low-dynamic / inclinometer

Other delivered modes are governed by the corresponding product documentation. For background, see "Operating Mode".

Attitude Calibration — CONFIG ATT RST <VAL> ​

The device should be stationary during execution; otherwise errors are introduced.

VALActionRetained after power-off
0Zero all: set the current roll / pitch / yaw to zero; how the heading is saved is described belowYes
1Heading reset: set the current heading to zeroNo, cleared on restart
2Set relative zero: set the current pitch / roll to zero, heading unchangedYes
3Auto-leveling: only when pitch and roll are both within ±5°, level both to 0°; otherwise not executed and ERR is returnedYes
5Cancel leveling: clear the saved zero and restore the module's original attitude outputYes

Check the attitude output after execution to confirm the result. After RST 0, RST 2, a successful RST 3, or RST 5, follow Configuration and Saving. RST 2 suits a fixed mounting tilt between module and vehicle and also sets the inclinometer zero; RST 3 suits a module that is already nearly level with only a small residual offset. Modbus register 0xA5 and J1939 address 0x00A5 take the same values.

  • The zero is tied to the mounting orientation: it is recorded in the vehicle's right, front and up axes, together with the mounting orientation in force when it was saved. After URFR is changed and the module restarts, the old zero no longer applies (it applies again if the mounting orientation is changed back; clear it with RST 5 if unwanted); changing the output data axes does not affect it. In 9-axis mode RST 0 saves the heading zero in the output data axes in force at the time, so switching the output data axes afterwards changes the heading read at the same orientation: for example, zero under ROS, switch back to Right-Front-Up, and the heading reads −90°.
  • Heading with RST 0: in 9-axis mode the heading is saved together with the leveling; in 6-axis and other relative-heading modes only the leveling is saved, and the heading is zeroed for the current power cycle only; the next power-up still starts from 0.
  • Switching from 9-axis to 6-axis: after RST 0 in 9-axis mode, a switch to 6-axis carries the saved heading offset into the power-up heading, which no longer starts at 0 (for example −90° under ROS). Send CONFIG ATT RST 5 to clear the zero, then level again in 6-axis mode if needed (RST 2 or RST 3).

NOTE

Other values are reserved and are not part of the public interface.

Mounting Orientation — CONFIG IMU URFR <CODE> ​

CODE is a 2–3 digit code declaring where the printed X/Y/Z arrows point on the vehicle; it takes effect after a reset or power cycle. For the complete code table (24 legal right-handed frames), see Mounting Orientation. Example: CONFIG IMU URFR 24 (default horizontal mounting)

Output Data Axes — CONFIG IMU COORD <VAL> ​

VALOutput data axes
0Right-Front-Up (default)
4ROS (REP-103): Front-Left-Up

Takes effect after a reset or power cycle; see Output Data Axes.

Multi-function IO Multiplexing — CONFIG PMUX<n> IO<m> ​

n=1~3 is the multiplexed function, and m=1~5 is the target pin. For function definitions, see "Multi-function IO Multiplexing". Example: CONFIG PMUX2 IO1 (set IO1 as synchronous output)

Magnetic Calibration — CONFIG MCAL START [2D] ​

Start a manual magnetic calibration. Without the 2D parameter it is a 3D calibration; CONFIG MCAL START 2D is a planar (rotation about the vertical axis only) calibration. For status queries, see LOG MCAL STAT. For the complete procedure, see "Magnetic Calibration and Magnetic Environment".

User-level Gyro Calibration — CONFIG USRCAL START <ANGLE> / CONFIG USRCAL STOP ​

  • ANGLE: calibration angle, in degrees, with a valid range of 360°~3600°; out-of-range values return an error.
  • After the rotation is complete, send CONFIG USRCAL STOP; on success it returns OK, otherwise it returns ERR (usually indicating that the main rotation axis is ambiguous or that the scale factor is outside the allowed range).
  • Example: CONFIG USRCAL START 720 → rotate 2 turns → CONFIG USRCAL STOP. For the complete operating steps and failure troubleshooting, see "Attitude Calibration".

WARNING

USRCAL is a precision calibration process. If you set a rotation of 720° but actually rotate 725°, the scale factor will be mis-calibrated by about 0.7%, which instead introduces additional heading error and degrades long-term accuracy. Use it only when a reliable angle reference is available.

LOG Commands ​

Data Output Switch ​

  • LOG ENABLE — enable data frame output on the current serial port.
  • LOG DISABLE — disable data frame output on the current serial port.

Set Data Frame Output Type and Rate — LOG [<COM>] <MSG> <TYPE> <VALUE> ​

  • COM (optional): the target serial port, e.g. COM2; when omitted, the currently connected serial port is configured.
  • MSG: the data frame type, commonly HI91, HI83, etc. (governed by the product and serial port configuration).
  • TYPE: ONTIME (timed) or ONMARK (pulse / software triggered).
  • VALUE:
    • TYPE=ONTIME: output period, in s, range 0.001 (1 kHz) ~ 1 (1 Hz); 0 disables timed output;
    • TYPE=ONMARK: 1 triggers on a SYNC_IN/PPS pulse; ONCE triggers once manually.

Examples:

  • LOG HI91 ONTIME 0.01 — HI91 output at 100 Hz (current serial port)
  • LOG COM2 HI91 ONTIME 0.01 — output HI91 at 100 Hz on COM2
  • LOG HI91 ONTIME 0 — disable HI91 output
  • LOG HI91 ONMARK 1 — configure HI91 to trigger on a SYNC_IN/PPS pulse
  • LOG HI91 ONMARK ONCE — trigger one output from software; HI91 must already be configured for ONMARK mode.

ONCE may also trigger other frames configured for ONMARK on the same serial port. After a temporary change, restore the original output mode and period, then save according to the configuration procedure.

WARNING

At high frame rates (e.g. 500 Hz), the default 115200 baud rate may be insufficient; please raise the baud rate (e.g. 921600). For bandwidth estimation, see the appendix "Output Bandwidth and Baud Rate".

HI83 Field Configuration — LOG HI83 MAP <BITMAP> ​

BITMAP is hexadecimal or decimal, and each bit corresponds to one data segment (bit definitions are in "Variable-type Data Frame (HI83)"). The default is 0x000000FF.

The HI83 fields defined in this manual are bit0-bit11 (field mask: 0x00000FFF). Other bits are not defined in this manual and should not be set by the user; MRU wave compensation uses bit10/bit11.

CommandDescription
LOG HI83 MAP 0x000000FFDefault combination: acceleration / angular rate / magnetic field / Euler angles / quaternion / system time / UTC / air pressure
LOG HI83 MAP 0x0000001FIMU + attitude basics: acceleration / angular rate / magnetic field / Euler angles / quaternion

NOTE

MAP selects HI83 output fields and is shared by all serial ports; output enable and rate are set by LOG HI83 ONTIME <period>. After changing it, run SAVECONFIG, restart the device, then confirm the returned MAP with LOG COMCONFIG. The receiver must parse each frame using its data_bitmap.

Query Sub-commands ​

CommandOutput Content
LOG VERSIONPNAME, BUILD, UUID, SN, APP_VER, BL_VER
LOG COMCONFIGCurrent serial port configuration: baud rate, ONTIME / ONMARK settings of each data frame, HI83 MAP
LOG USRCONFIGUser configuration: operating mode (PROFILE), mounting orientation (URFR), output data axes (COORD)
LOG MCAL STATMagnetic calibration status: STAT, PROGRESS

ONTIME returned by LOG COMCONFIG is in ms, whereas the setting command uses s. For example, ONTIME=20 means 20 ms, corresponding to LOG HI91 ONTIME 0.02.

Command Responses and Error Codes ​

After an ASCII command executes, the result is returned through the same serial port. Success usually echoes OK (or the corresponding query content), while failure returns a message starting with ERROR / ERR. Summary of common responses:

SourceResponseMeaning
General configurationOKCommand accepted
SERIALCONFIGERROR: Unsupported baudBaud rate is not among the 9 supported values
CONFIG USRCAL STOPOK / ERRGyro calibration succeeded / verification failed (see "CONFIG Configuration Commands")
LOG MCAL STATSTAT=4Magnetic calibration failed (for troubleshooting, see "Magnetic Calibration and Magnetic Environment")

Unified Data Dictionary ​

The module supports multiple data output protocols, covering different physical interfaces and upper-layer buses:

ProtocolPhysical InterfaceCharacteristicsSee
HiPNUC binary (HI91 / HI83)RS-232 / TTL / USBFactory default; HI91 fixed-length, HI83 bitmap-configurable"Serial Binary Protocol"
Modbus RTURS-485Industrial standard, register read/write"Modbus RTU Protocol"
J1939CAN 2.0BRecommended for new CAN integrations; periodic PGN broadcast"CAN Protocol" J1939
CANFD83CAN FDManufacturer PGN 0xFF5B, MAP-selectable fieldsCANFD83 variable frame
CANopenCAN 2.0BExisting integrations only; availability depends on the delivered model and firmwareCANopen

This chapter is a cross-protocol data reference. Shared definitions are in Basic Conventions; the corresponding protocol chapter is authoritative for frame formats, fields, register addresses, units and scale factors.

Parameters can be configured through ASCII commands or the bus configuration interfaces supported by the product. See ASCII Command Reference, Modbus RTU Protocol and the J1939 Configuration Protocol for operations and scope.

The J1939 column in the following tables refers to classic CAN data PGNs, not CANFD83. CANFD83 acceleration and angular rate are floating-point values in m/s² and rad/s. See the CANFD83 field table for coverage, lengths and units; do not apply classic CAN fixed-point scale factors.

WARNING

Cross-protocol unit differences: The same physical quantity may have different data types, scale factors, and units across protocols. This is an existing fact of the firmware (not a typo). Decode strictly according to the column for the protocol you are using, and never apply a scale factor across protocols. The scale-factor convention is given in "Data Types, Byte Order, and Scale Factors": physical value = raw value × scale factor.

Decoding Pitfalls at a Glance ​

The table below lists only items that are easily confused across protocols; for precise item-by-item decoding (address / type / scale / unit), see the register/field table in the protocol chapter you are using.

Physical QuantityCross-protocol PitfallConsequence of Misapplication
Acceleration4 decodings: HI91 = G (f32), HI83 = m/s² (f32), Modbus / J1939 = i16 ×0.00048828 → G (±16 G), CANopen = mG (×0.001 G)Dimension off by 9.8× (G ↔ m/s²) or 1000× (G ↔ mG)
Heading yawDual representation in one frame: J1939 carries both u32 = CW 0–360 (compass heading, always Right-Front-Up) and i32 = ±180 in the same frame; HI91 / HI83 / Modbus / CANopen are all CCW/rawWrong field → direction and sign fully reversed
System timeHI91 time semantics change with the UTC synchronization state; time fields are not directly interchangeable between protocols — see Time and Timestamps and each protocol's field table. CANopen does not output itSubtracting after a unit conversion alone can give a wrong time difference
Inclination4 encodings: HI83 = f32 deg, Modbus = i16 ×0.011 deg, J1939 = i32 ×0.001 deg, CANopen = i32 ×0.01 deg; HI91 does not output itWrong scale / type → wrong value
Angular rateVaried units / scales: HI91 = deg/s (f32), HI83 = rad/s (f32, off by 57.3×), Modbus / J1939 = i16 ×0.061 → deg/s, CANopen = i16 ×0.1 deg/s (coarser)Dimension off by 57.3× (deg/s ↔ rad/s) or wrong scale

Output Coverage Overview ​

✓ = the protocol outputs this quantity; — = not output. For exact address / scale / unit, see the register/field table in the protocol chapter you are using.

Physical QuantityHI91HI83ModbusJ1939CANopen
Acceleration✓✓✓✓✓
Angular rate✓✓✓✓✓
Magnetic field✓✓✓✓—
Roll / Pitch✓✓✓✓✓
Heading yaw✓✓✓✓✓
Quaternion✓✓✓✓✓
Temperature✓✓✓✓—
Air pressure✓✓✓—✓
System time✓✓✓✓—
Inclination—✓✓✓✓
Heave / Surge / Sway—✓✓——

Serial Binary Protocol ​

RS-232, serial TTL, and USB (virtual COM port) are all streaming serial interfaces, and all output using HiPNUC's proprietary binary protocol. This protocol is the module's factory default output protocol. The serial parameters are 8 data bits, no parity, 1 stop bit (8N1), with a factory default baud rate of 115200 bps (see the appendix "Factory Default Configuration").

Frame Format ​

FieldValueLength (bytes)Description
SOF5A A52Start-of-frame sync word
LEN1–5122Payload length (little-endian, excluding SOF/length/CRC)
CRC—216-bit CRC over SOF, length, and payload (excluding the CRC field itself)
Payload—1–512Composed of several sub-packets; each sub-packet consists of a tag and data, where the tag determines its type and length

WARNING

Frame Length Limit: The payload is at most 512 bytes (a full frame is at most 518 bytes). The decoder rejects any payload exceeding 512 bytes outright. When all public HI83 fields defined in this manual are enabled, the payload totals 132 bytes, still within the limit.

WARNING

Byte Order: All multi-byte values are little-endian (low byte first). See "Data Types, Byte Order, and Scale Factors" for details.

Factory default output: floating-point IMU data frame (HI91).

Floating-Point IMU Data Frame (HI91) ​

The payload totals 76 bytes and contains module status, temperature, IMU measurements (acceleration, angular rate and magnetic field), air pressure and fused attitude. IMU measurements are not raw chip-register readings; measurements and attitude are expressed in the output data axes.

OffsetNameTypeSizeUnitDescription
0taguint81—Data tag: 0x91
1main_statusuint162—Status word, see "MAIN_STATUS Status Word"
3temperatureint81°CModule average temperature
4air_pressurefloat4PaAir pressure
8system_timeuint324msTimestamp, see "Time and Timestamps"
12acc_bfloat4×3GAcceleration, order XYZ; 1 G ≈ 9.8 m/s²
24gyr_bfloat4×3deg/sAngular rate, order XYZ
36mag_bfloat4×3μTMagnetic field strength, order XYZ
48rollfloat4degRoll angle
52pitchfloat4degPitch angle
56yawfloat4degHeading angle
60quatfloat4×4—Quaternion, order WXYZ

WARNING

Unit Difference: In HI91 the angular rate unit is deg/s; in HI83 the gyr_b unit is rad/s (a factor of 57.3 between them). Select the correct unit according to the frame type you are parsing.

Variable-Type Data Frame (HI83) ​

HI83 is a configurable variable-length frame that outputs different data combinations according to data_bitmap, with the frame length changing with the configuration. It suits scenarios where IMU, attitude, time, and other data need to be output simultaneously while controlling bandwidth on demand.

A fixed header (8 bytes) is immediately followed by the data segments selected by data_bitmap. The arrangement order of the data segments is given in "Data Segment Arrangement and Offset Calculation" below; the parser must accumulate offsets in that order and must not infer them from the bit value alone.

OffsetNameTypeSizeDescription
0taguint81Data tag: 0x83
1main_statusuint162Status word, see "MAIN_STATUS Status Word"
3status_extuint81Status extension byte; this manual does not define the meaning of its bits, and a generic parser may ignore it
4data_bitmapuint324Data bitmap; each bit corresponds to one data segment
8…—VariableData segments arranged in the line order below

data_bitmap bit definitions (for configuration, see the HI83 field configuration in "LOG Commands"). The table below is the public IMU/AHRS/MRU field dictionary; when a product does not enable the corresponding feature, a field may be 0 or have no valid physical meaning:

BitNameTypeSizeUnitDescription
0acc_bfloat4×3m/s²Body-frame acceleration, order XYZ
1gyr_bfloat4×3rad/sBody-frame angular rate, order XYZ
2mag_bfloat4×3μTBody-frame magnetic field, order XYZ
3rpyfloat4×3degEuler angles: roll −180~180, pitch −90~90, heading −180~180 (counterclockwise positive)
4quatfloat4×4—Quaternion, order WXYZ
5system_time_usuint648μsLocal high-resolution timestamp (microseconds accumulated since power-on, unaffected by time synchronization)
6utc—8—UTC time: year offset (1, year-2000, e.g. 24=2024), month (1), day (1), hour (1), minute (1), second (2, unit ms, e.g. 12 s = 12000), reserved (1)
7air_pressurefloat4PaAir pressure
8temperaturefloat4°CModule average temperature
9inclinationfloat4×3degInclinometer output, order inclination_x / inclination_y / yaw; the third float is the Right-Front-Up yaw (counter-clockwise, ±180°), neither the Z-axis inclination nor the compass heading; none of the three follows the output data axes
10heave_surge_swayfloat4×3mMRU displacement: heave, surge, sway
11heave_surge_sway_frqfloat4×3HzMRU frequency: heave, surge, sway
12–31Extension———Delivery-specific extension fields, not defined in this manual; generic users should not set these bits

NOTE

Data Segment Arrangement and Offset Calculation: The public HI83 fields defined in this manual are concatenated in the order bit0–bit11, with the public field mask being 0x00000FFF. Bit12 and above may enable undocumented extension fields, which generic users should not set; do not use an all-enabled configuration such as 0xFFFFFFFF, otherwise the frame length and field semantics cannot be parsed from this manual alone. Unset fields do not appear, and the whole frame shortens accordingly; when parsing, accumulate the offset item by item according to the field sizes in the table.

CRC Check ​

CRC-16/XMODEM is used (also labeled CRC-16/CCITT in some tools): polynomial 0x1021, initial value 0x0000, no input/output reflection, no final XOR. The check covers SOF (2) + length (2) + payload, excluding the CRC field itself.

c
/*
    currentCrc: previous crc value, set 0 if it's the first section
    src: source stream data
    lengthInBytes: length
*/
static void crc16_update(uint16_t *currentCrc, const uint8_t *src, uint32_t lengthInBytes)
{
    uint32_t crc = *currentCrc;
    for (uint32_t j = 0; j < lengthInBytes; ++j)
    {
        crc ^= (uint32_t)src[j] << 8;
        for (uint32_t i = 0; i < 8; ++i)
        {
            uint32_t temp = crc << 1;
            if (crc & 0x8000)
                temp ^= 0x1021;
            crc = temp;
        }
    }
    *currentCrc = crc;
}

Frame Parsing Example (HI91) ​

A HI91 frame is 82 bytes in total: the first 6 bytes are SOF/length/CRC, followed by 76 bytes of payload. The example was captured with the default output data axes (COORD 0). Example frame (received into array buf):

text
5A A5 4C 00 14 BB 91 08 15 23 09 A2 C4 47 08 15 1C 00 CC E8 61 BE 9A 35 56 3E 65 EA 72 3F 31 D0 7C BD 75 DD C5 BB 6B D7 24 BC 89 88 FC 40 01 00 6A 41 AB 2A 70 C2 96 D4 50 41 ED 03 43 41 41 F4 F4 C2 CC CA F8 BE 73 6A 19 BE F0 00 1C 3D 8D 37 5C 3F
FieldTypeRaw ValueParsed ValueDescription
SOF—5A A5—Start-of-frame
Payload length—4C 000x004C = 7676 bytes
CRC—14 BB0xBB14Check value
tag—910x91payload start
main_statusuint1608 150x1508Status word
temperatureint82335°C
air_pressurefloat09 A2 C4 47100676Pa
system_timeuint3208 15 1C 001840392ms
acc_b x/y/zfloat…−0.2206 / 0.2092 / 0.9489G
gyr_b x/y/zfloat…−0.0617 / −0.0060 / −0.0101deg/s
mag_b x/y/zfloat…7.892 / 14.625 / −60.042μT
roll / pitch / yawfloat…13.052 / 12.189 / −122.477deg
quat w/x/y/zfloat…−0.4859 / −0.1498 / 0.0381 / 0.8602—

C Parsing Example (HI91) ​

The example below parses one complete HI91 frame. When processing a continuous serial byte stream, first perform frame synchronization and buffering, then pass the complete frame into this function. The example depends on the crc16_update() above; the protocol byte order is little-endian, floating-point numbers are encoded as IEEE-754 single precision, and casting the payload directly into a C struct is not recommended.

c
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <string.h>

#define HIPNUC_SOF0          0x5Au
#define HIPNUC_SOF1          0xA5u
#define HIPNUC_MAX_PAYLOAD   512u
#define HI91_TAG             0x91u
#define HI91_PAYLOAD_LEN     76u

typedef struct {
    uint8_t  tag;          /* 0x91 */
    uint16_t main_status;  /* status word */
    int8_t   temperature;  /* deg C */
    float    pressure;     /* Pa */
    uint32_t timestamp;    /* ms */
    float    acc[3];       /* G        */
    float    gyr[3];       /* deg/s    */
    float    mag[3];       /* uT       */
    float    eul[3];       /* deg      */
    float    quat[4];      /* WXYZ     */
} imu_data_t;

static uint8_t U1(const uint8_t *src)
{
    return src[0];
}

static int8_t I1(const uint8_t *src)
{
    return (int8_t)src[0];
}

static uint16_t U2(const uint8_t *src)
{
    return (uint16_t)src[0] | ((uint16_t)src[1] << 8);
}

static uint32_t U4(const uint8_t *src)
{
    return (uint32_t)src[0] |
           ((uint32_t)src[1] << 8) |
           ((uint32_t)src[2] << 16) |
           ((uint32_t)src[3] << 24);
}

static float R4(const uint8_t *src)
{
    uint32_t raw = U4(src);
    float value;
    memcpy(&value, &raw, sizeof(value));
    return value;
}

bool parse_hi91_frame(const uint8_t *buf, size_t len, imu_data_t *out)
{
    if (buf == NULL || out == NULL) {
        return false;
    }
    if (len < 6u) {
        return false;
    }
    if (buf[0] != HIPNUC_SOF0 || buf[1] != HIPNUC_SOF1) {
        return false;
    }

    uint16_t payload_size = U2(buf + 2);
    if (payload_size > HIPNUC_MAX_PAYLOAD || payload_size != HI91_PAYLOAD_LEN) {
        return false;
    }
    if (len != (size_t)payload_size + 6u) {
        return false;
    }

    uint16_t crc = 0;
    crc16_update(&crc, buf, 4);                  /* SOF + LEN */
    crc16_update(&crc, buf + 6, payload_size);   /* payload */
    if (crc != U2(buf + 4)) {
        return false;
    }

    const uint8_t *data = buf + 6;
    if (U1(data) != HI91_TAG) {
        return false;
    }

    imu_data_t decoded = {0};
    decoded.tag         = U1(data + 0);
    decoded.main_status = U2(data + 1);
    decoded.temperature = I1(data + 3);
    decoded.pressure    = R4(data + 4);
    decoded.timestamp   = U4(data + 8);

    for (int i = 0; i < 3; i++) {
        decoded.acc[i] = R4(data + 12 + (size_t)i * 4u);
        decoded.gyr[i] = R4(data + 24 + (size_t)i * 4u);
        decoded.mag[i] = R4(data + 36 + (size_t)i * 4u);
        decoded.eul[i] = R4(data + 48 + (size_t)i * 4u);
    }
    for (int i = 0; i < 4; i++) {
        decoded.quat[i] = R4(data + 60 + (size_t)i * 4u);
    }

    *out = decoded;
    return true;
}

Modbus RTU Protocol ​

Modbus RTU availability depends on the model and delivered configuration. The default slave interface is RS-485 on COM1.

It follows the Modbus RTU specification: data is sent and received in units of registers, with each register being 2 bytes, using big-endian (high byte first), and standard Modbus CRC checking.

Supported function codes:

  • 0x03 (Read Holding Registers): read one or more registers
  • 0x06 (Write Single Register): write a single register
  • 0x10 (Write Multiple Registers): write up to 123 registers in one request

Factory default node ID: 80 (0x50).

Frame Format ​

Read registers (0x03) — host request:

FieldValueDescription
ID1–247Node ID
FUN0x03Function code
ADDR_H / ADDR_L—Starting register address (high/low 8 bits)
LEN_H / LEN_L—Number of registers to read (high/low 8 bits)
CRC_L / CRC_H—CRC (low/high 8 bits)

Read registers (0x03) — slave response: ID, 0x03, LEN(byte count), DATA_H, DATA_L, …, CRC_L, CRC_H

Write register (0x06) — host request / slave response (echoes the same): ID, 0x06, ADDR_H, ADDR_L, DATA_H, DATA_L, CRC_L, CRC_H. A rejected write may instead return the 5-byte exception response ID, 0x86, 0x04, CRC_L, CRC_H.

Write multiple registers (0x10) — host request: ID, 0x10, ADDR_H, ADDR_L, QTY_H, QTY_L, N, DATA…, CRC_L, CRC_H (QTY is the register count, N = 2 × QTY). Slave response: ID, 0x10, ADDR_H, ADDR_L, QTY_H, QTY_L, CRC_L, CRC_H; a rejected write returns ID, 0x90, 0x04, CRC_L, CRC_H. Use it to write a 32-bit quantity or an array parameter in one request.

NOTE

Tell the response type by its function code rather than waiting for a fixed 8 bytes. A normal echo does not guarantee that the setting took effect; read critical parameters back. Reading an undefined address returns 0.

Register List ​

The following table lists the public Modbus read and configuration registers.

AddressNameTypeR/WUnit / ScaleDescription
0x00CTRLu16W—Control register, see below
0x04UART1_BAUDu16R/W—Serial port baud rate level
0x05MD_IDu16R/W—Modbus ID, valid range 1–247 (factory default 80)
0x06HEADING_MODEu16R/W—Operating mode: 0=6-axis (relative heading, 0 at power-on), 1=9-axis (magnetometer fusion, absolute heading); other dedicated modes (4/5/7, etc.) see "CONFIG ATT MODE"
0x07COORDu16R/W—Output data axes: 0 = Right-Front-Up, 4 = ROS (see Output Data Axes); takes effect after reset
0x08MCAL_STARTu16W—Start magnetic calibration: 1=3D, 2=2D; executes immediately, other values invalid
0x09MAIN_STATUSu16R—Main status word; see "MAIN_STATUS Status Word"
0x0AMCAL_STATUSu16R—Calibration status: 0=idle, 1=calibrating, 3=success, 4=failure; other values reserved
0x0BMCAL_PROGRESSu16R%Calibration progress: 0–99 while calibrating, 100 on success; may be 0 when idle or failed
0x34–0x36ACC X/Y/Zi16RG, ×0.00048828Acceleration (1 G ≈ 9.8 m/s²)
0x37–0x39GYR X/Y/Zi16Rdeg/s, ×0.061035Angular velocity
0x3A–0x3CMAG X/Y/Zi16RμT, ×0.030517Magnetic field strength
0x3D–0x3EROLL (H/L)i32Rdeg, ×0.001Roll angle (big-endian 32-bit)
0x3F–0x40PITCH (H/L)i32Rdeg, ×0.001Pitch angle
0x41–0x42YAW (H/L)i32Rdeg, ×0.001Heading angle
0x43TEMPi16R°C, ×0.01Temperature
0x44–0x45PRS (H/L)i32RPa, ×0.01Air pressure
0x46–0x49Q0–Q3i16R×0.0001Quaternion W/X/Y/Z
0x4AINCLI_Xi16Rdeg, ×0.011Inclinometer X: dual-axis ±180°; single-axis 0–360°
0x4BINCLI_Yi16Rdeg, ×0.011Inclinometer Y: dual-axis ±90°; reserved on single-axis products
0x4C–0x4DCPUTIME (H/L)i32RmsSystem uptime (cumulative milliseconds since power-on, big-endian 32-bit); always local uptime, never switched to UTC by synchronization. Decoded as i32, it becomes negative after about 24.8 days of continuous operation; the full 32-bit counter wraps after about 49.7 days. For current-day UTC milliseconds, use the data frame system_time (see "Time and Timestamps")
0x4E–0x50HEAVE/SURGE/SWAYi16×3Rm, ×0.01MRU heave/surge/sway displacement
0x51–0x53HEAVE/SURGE/SWAY_FRQi16×3RHz, ×0.01MRU heave/surge/sway frequency
0x70–0x77PNAMEu16R—Device name (ASCII, 8 registers)
0x78SW_VERSIONu16R—Software version
0x79BL_VERSIONu16R—Bootloader version
0x7F–0x82SNu16R—Product unique serial number (4 registers)
0xA5ATT_RSTu16W—Attitude control: 0 zero all / 1 heading reset / 2 relative zero / 3 auto-leveling / 5 cancel leveling (see below)
0xA6URFRu16R/W—Mounting orientation code, see Mounting Orientation; takes effect after reset, and a saved attitude zero stops applying after a change

Magnetic calibration register operations:

Follow the complete Calibration Steps; the table below supplies the corresponding Modbus operations.

StepRegister operation
Step 1: Switch operating modeSet HEADING_MODE (0x06) to 1, write 0x0000 to control register 0x00 to save, then 0x00FF to reset; after restarting, confirm MAIN_STATUS.MAG_AIDING=1
Step 3: Perform calibrationWrite 1 to MCAL_START (0x08) for 3D or 2 for 2D; then read MCAL_STATUS (0x0A) and confirm it becomes 1
Step 4: Query statusPeriodically read MCAL_STATUS (0x0A) and MCAL_PROGRESS (0x0B), corresponding to STAT and PROGRESS; calibration takes up to about 120 s

Successful calibration does not by itself establish reliable heading. Complete Step 5 and assess the runtime status.

NOTE

MCAL_START accepts only 1/2; read the relevant status registers after writing to verify execution.

Control register (0x00) write values: 0x0000 save configuration; 0x0001 restore factory defaults; 0x00FF reset.

ATT_RST (0xA5): 0 zero all (sets the current roll / pitch / yaw to zero); 1 heading reset (sets the current heading angle to zero); 2 set relative zero (sets the current pitch / roll to zero); 3 auto-leveling — levels pitch / roll to 0° only when both are within ±5°, otherwise it is not executed; 5 cancel leveling (clears the saved zero).

See attitude reset persistence for saving differences and output verification.

NOTE

Other ATT_RST values are reserved or for compatibility purposes and are not used as a public interface.

Common Configuration Examples ​

NOTE

The following examples all use the factory default ID 0x50 as an example; if you have modified the Modbus ID, you must also modify the ID field of the message and recompute the CRC.

OperationMessage (Hex)
Save configuration50 06 00 00 00 00 84 4B
Restore factory defaults50 06 00 00 00 01 45 8B
Reset50 06 00 00 00 FF C4 0B
Set to 6-axis mode (VAL=0)50 06 00 06 00 00 64 4A
Set to 9-axis mode (VAL=1)50 06 00 06 00 01 A5 8A
Set to low-dynamic/inclinometer mode (VAL=7)50 06 00 06 00 07 25 88
Set output data axes to ROS50 06 00 07 00 04 34 49
Set output data axes to Right-Front-Up (default)50 06 00 07 00 00 35 8A
Zero all50 06 00 A5 00 00 94 68
Heading reset (sets the current heading angle to zero)50 06 00 A5 00 01 55 A8
Set relative zero (sets Pitch/Roll to zero)50 06 00 A5 00 02 15 A9
Start auto-leveling50 06 00 A5 00 03 D4 69
Cancel auto-leveling50 06 00 A5 00 05 54 6B

NOTE

For the operating mode (0x06), DATA = the VAL of "CONFIG ATT MODE" (public values 0/1/4/5/7); for attitude control (0xA5), DATA = the ATT_RST mode code (0/1/2/3/5, see "ATT_RST (0xA5)" above). After changing DATA, recompute the CRC.

Configure baud rate (0x04):

Save and reset after writing the rate index to complete the change. See Modbus Baud Rate for when to switch the host and how to verify communication.

Target baud rateMessage (ID=0x50)
480050 06 00 04 00 00 C5 8A
960050 06 00 04 00 01 04 4A
1920050 06 00 04 00 02 44 4B
3840050 06 00 04 00 03 85 8B
5760050 06 00 04 00 04 C4 49
11520050 06 00 04 00 05 05 89
23040050 06 00 04 00 06 45 88
46080050 06 00 04 00 07 84 48
92160050 06 00 04 00 08 C4 4C

Configure node ID (0x05): format [CURRENT_ID] 06 00 05 00 [NEW_ID] CRC(2B).

  • Set NEW_ID=0x51: 50 06 00 05 00 51 55 B6

WARNING

The node ID takes effect immediately; subsequent messages must use the new ID and a recomputed CRC. See Modbus Node ID for the readback and save sequence.

Set mounting orientation (0xA6):

Mounting orientation (X, Y, Z arrow directions)CodeMessage (ID=0x50)
Right, Front, Up (default horizontal mounting)2450 06 00 A6 00 18 64 62
Right, Down, Front (side mount, Y down)4350 06 00 A6 00 2B 24 77
Right, Up, Back (side mount, Y up)5250 06 00 A6 00 34 65 BF
Up, Front, Left (vertical, X up)52050 06 00 A6 02 08 64 CE
Down, Front, Right (vertical, X down)42150 06 00 A6 01 A5 A5 83

NOTE

The message DATA (bytes 5–6) = the decimal value of the URFR mounting orientation code converted to hexadecimal (high byte first), e.g. 24→00 18, 520→02 08, 421→01 A5; for the complete 24 valid mounting orientations, see "Mounting Orientation". After changing the code, recompute the CRC.

Reading Version Information (0x70–0x82) ​

Request: 50 03 00 70 00 13 08 5D (read 19 registers from 0x70).

Response structure (bracketed text is a placeholder):

text
50 03 26 [38 bytes of register data] [CRC_L] [CRC_H]

The complete response is 43 bytes. Decode register data using the table below; byte offsets are relative to the first data byte.

Register addressByte offsetContent
0x70–0x770–15Product name, ASCII
0x7816–17Software version
0x7918–19Bootloader version
0x7A–0x7E20–29Skip
0x7F–0x8230–37Product serial number

Each register is transmitted high byte first.

Reading IMU/AHRS Data (0x34–0x4B) ​

Request: 50 03 00 34 00 18 09 8F (read 24 registers from 0x34).

Response (example):

text
50 03 30 FF 01 03 B0 06 50 FC C9 FF 7C 00 91 01 D5 FD DB FD 27 00 00 21 FF 00 00 7F F6 FF FD 73 E7 ...

The data length 0x30=48 bytes (24 registers). Each physical quantity is converted by its scale factor:

Acceleration (G, ×0.00048828):

AxisRegister valueRaw valuePhysical value
XFF 01−255−0.1245
Y03 B09440.4609
Z06 5016160.7891

Angular velocity (deg/s, ×0.061035):

AxisRegister valueRaw valuePhysical value
XFC C9−823−50.232
YFF 7C−132−8.057
Z00 911458.850

Magnetic field (μT, ×0.030517):

AxisRegister valueRaw valuePhysical value
X01 D546914.312
YFD DB−549−16.754
ZFD 27−729−22.247

Euler angles (deg, ×0.001; i32 big-endian, each axis occupies 2 registers H/L):

AxisRegister value (H L)Raw value (i32)Physical value
Roll00 00 21 FF0x000021FF = 87038.703
Pitch00 00 7F F60x00007FF6 = 3275832.758
YawFF FD 73 E70xFFFD73E7 = −166937−166.937

WARNING

Euler angle byte order: Euler angles are 32-bit big-endian, spanning 2 registers (high word first), which is the most error-prone point — you must first assemble the complete i32 with the high word first, then multiply by the scale factor (see the Yaw row in the table above: FF FD 73 E7 → 0xFFFD73E7 = −166937 → −166.937°).

Reading MRU Data (0x4E–0x53) ​

Request: 50 03 00 4E 00 06 A8 5E (read 6 registers from 0x4E).

The response data is, in order, HEAVE, SURGE, SWAY, HEAVE_FRQ, SURGE_FRQ, SWAY_FRQ, all signed 16-bit integers. The displacement scale factor is ×0.01 m, and the frequency scale factor is ×0.01 Hz.

CAN Protocol ​

This section covers J1939 data and configuration, plus the CANFD83 variable frame on supported CAN FD products. CANopen users should refer to its dedicated section.

Pre-integration checklist:

Check itemJ1939 / CANFD83
Protocol supportConfirm that the device supports the required protocol
CAN baud rateClassic CAN typically defaults to 500 kbit/s; see the CANFD83 dual-rate settings and use the device's current configuration
Node ID / addressDefault 8, recommended 1–126
Frame typeClassic CAN extended frame; CANFD83 uses FD+BRS extended frames
Default output stateClassic data PGNs broadcast periodically; CANFD83 period defaults to 0 (off)
Hardware wiringSee the hardware manual for termination resistor, shielding, pinout and transceiver levels

J1939 (CAN) ​

Classic CAN data output uses J1939 by default, with the 29-bit extended identifier defined by SAE J1939. CANFD83 reuses this identifier layout with the separately defined manufacturer CAN FD payload below.

CAN Extended Frame Format ​

J1939 uses a 29-bit extended identifier:

text
CAN_ID = (P<<26)|(R<<25)|(DP<<24)|(PF<<16)|(PS<<8)|SA

See the figure above for the P/R/DP/PF/PS/SA bit fields. All data PGNs of this product use a manufacturer-specific format (PF=0xFF); for each data PGN, see "PGN Message List".

WARNING

Byte order: The J1939 data field is little-endian (low byte first). For example, the 32-bit value 0x12345678 appears in the frame as 78 56 34 12.

Protocol Parameters ​

ParameterDefaultOptions / Notes
CAN nominal baud rateTypically 500 kbit/s for classic CAN; 1 Mbit/s for CANFD83Use the current device configuration; CANFD83 typically uses a 4 Mbit/s data phase
Frame formatExtended frame (29-bit)Classic PGNs use CAN 2.0B; CANFD83 uses CAN FD, FD=1, BRS=1
Data length8 bytes for classic PGNsCANFD83 uses 12–64 bytes, determined by MAP and a valid DLC
Frame priority30–7, 0 highest
Node address8Publicly recommended to use 1–126; 127 is reserved on some models. Data PGNs are sent to broadcast address 255; do not set the device to 255
Data formatLittle-endianMulti-byte, low byte first

PGN Message List ​

The following table lists the public data PGNs. With priority 3, the CAN ID is 0x0CFF[PS][SA].

PGN (hex)PGN (decimal)PSNameApplicability
0xFF2F653270x2FTime information (UTC or local run time)All
0xFF34653320x34Three-axis accelerationAll
0xFF37653350x37Three-axis angular rateAll
0xFF3A653380x3AThree-axis magnetic field strength9-axis products
0xFF3D653410x3DPitch/roll angleAll
0xFF41653450x41Heading angleAll
0xFF46653500x46QuaternionAll
0xFF4A653540x4AInclinometer outputInclinometer products
0xFF43653470x43TemperatureAll
0xFF5B653710x5BCANFD83 variable frameCAN FD supported and CANFD83 enabled in firmware

Classic CAN PGN data fields follow (unlisted bytes are reserved, fixed 0); CANFD83 is defined separately below.

0xFF2F Time information

ByteFieldTypeUnitNotes
0–5Year/Month/Day/Hour/Minute/Seconduint8×6—Year, e.g. 24=2024
6–7Millisecondsuint16msLittle-endian

Example: CAN ID 0x0CFF2F08, data 18 06 12 0E 1E 2D 58 02 → 2024-06-18 14:30:45.600 UTC.

After UTC time synchronization is complete, 0xFF2F outputs valid UTC year/month/day/hour/minute/second; when UTC synchronization is not complete, the year/month/day fields are 0, and the hour/minute/second/millisecond come from the local 24 h wrap-around time and must not be treated as absolute UTC. The synchronization state is judged by MAIN_STATUS.UTC_UNSYNC.

0xFF34 Acceleration / 0xFF37 Angular rate / 0xFF3A Magnetic field (same structure, different scale factors; full scale: acceleration ±16 G, angular rate ±2000°/s, magnetic field ±1000 μT)

ByteFieldTypeScale factorUnit
0–1Xint16acceleration 0.00048828 / angular rate 0.061035 / magnetic field 0.030517G / deg/s / μT
2–3Yint16same as abovesame as above
4–5Zint16same as abovesame as above

0xFF3D Pitch/roll

ByteFieldTypeScale factorUnit
0–3Rollint320.001deg
4–7Pitchint320.001deg

0xFF41 Heading (two representations in one frame, see "Heading (yaw) Convention")

ByteFieldTypeScale factorUnit
0–3Compass heading (0–360°, clockwise positive; always Right-Front-Up)uint320.001deg
4–7Heading (±180°, counter-clockwise positive; follows the output data axes)int320.001deg

Under ROS in 9-axis mode, bytes 4–7 read 90° more than under Right-Front-Up; bytes 0–3 do not change.

0xFF46 Quaternion

ByteFieldTypeScale factor
0–1 / 2–3 / 4–5 / 6–7qw / qx / qy / qzint160.0001

0xFF4A Inclinometer (inclinometer products)

ByteFieldTypeScale factorUnit
0–3X-axis inclination (configurable 0–360° or ±180°)int320.001deg
4–7Y-axis inclination (±90°)int320.001deg

0xFF43 Temperature

ByteFieldTypeScale factorUnit
0–1Temperatureint160.01°C
2–3Reserved——Fixed 0
4–7Reserveduint32—Fixed placeholder value 999; not pressure, do not parse as pressure

CANFD83 Variable Frame ​

For products with CAN FD support and CANFD83 enabled in firmware. Typical nominal and data-phase rates are 1 Mbit/s and 4 Mbit/s; use the device's current settings. Bus devices must support CAN FD.

PGN=0xFF5B, priority 3, extended ID=0x0CFF5B00 | node_id, FD=1, BRS=1.

Frame Format ​

The 8-byte header is followed by selected fields in ascending MAP bit order. Multi-byte integers and IEEE 754 float32 values are little-endian.

OffsetBytesFieldTypeNotes
04MAPuint32Field bitmap
42main_statusuint16See MAIN_STATUS; bit12=0
61ins_statusuint8Navigation status
71sequenceuint8Encoding sequence, wrapping at 0–255
bitFieldTypeBytesUnitOrder / Meaning
0ACC_Bfloat32×312m/s²X, Y, Z
1GYR_Bfloat32×312rad/sX, Y, Z
2MAG_Bfloat32×312μTX, Y, Z; requires a magnetometer
3RPYfloat32×312degroll, pitch, yaw; yaw is ±180°
4QUATfloat32×416—w, x, y, z
5SYSTEM_TIMEuint648μsMonotonic IMU sample time
6UTCpacked8—See below
8TEMPERATUREfloat324°CTemperature

UTC layout: year-2000:u8, month:u8, day:u8, hour:u8, minute:u8, second*1000+ms:u16le, reserved:u8=0. Without a valid date, year=0; synchronization status is MAIN_STATUS bit11.

The supported-bit mask is 0x0000017F. MAP must be nonzero, contain no reserved bits, and satisfy logical length 8 + sum of selected field sizes ≤ 64. Selecting 0x17F requires 92 bytes and is rejected, leaving the previous MAP unchanged.

Default MAP=0x0000012B has a logical length of 56 bytes and a bus length of 64 bytes (DLC=15), padded with zeros. Other configurations also round up to the next valid length; exclude padding from decoded fields.

CAN FD data bytes12162024324864
DLC code9101112131415
J1939 Configuration ​

Use the configuration protocol: classic CAN, 8 bytes, FD=0, BRS=0.

ParameterAddressDefaultApplication
CANFD83 MAP0x01800x12BNext frame
CANFD83 period0x015B0 (off)Immediate, in ms
Periodic master switch0x009D1 (on)Immediate, 0/1
Data-phase rate index0x009B11Saved; reboot required

Periodic output requires the master switch to be 1. 0x8000 selects SYNC_IN triggering where supported; other nonzero 16-bit values specify the period in ms. Data-phase rate indices: 0=1 Mbit/s, 10=2 Mbit/s, 11=4 Mbit/s. The nominal-rate address is 0x009A.

For node 8 and host 0x55, request ID=0x0CEF0855 and response ID=0x0CEF5508. Successful writes echo the request; reads return the current value. Invalid MAP/address requests receive no response.

OperationRequest data (8 bytes)
MAP = 0x12B80 01 06 00 2B 01 00 00
Read MAP80 01 03 00 00 00 00 00
Period = 10 ms5B 01 06 00 0A 00 00 00
Frame Example ​

Constructed test data, not a hardware capture: ID=0x0CFF5B08, FD=1, BRS=1, DLC=15.

text
2B 01 00 00 00 00 00 7E
00 00 80 3F 00 00 00 C0
00 00 18 41 00 00 80 3E
00 00 00 BF 00 00 80 3F
00 00 20 41 00 00 A0 C1
00 00 F0 41 40 42 0F 00
00 00 00 00 00 00 CC 41
00 00 00 00 00 00 00 00

Decoded: ACC_B=[1, -2, 9.5] m/s², GYR_B=[0.25, -0.5, 1] rad/s, RPY=[10, -20, 30] deg, SYSTEM_TIME=1000000 μs, TEMPERATURE=25.5 °C. The last 8 bytes are padding.

Configuration Protocol ​

The host reads and writes device parameters through a dedicated configuration PGN.

Configuration frame format: CAN ID = 0x0CEF[DA][SA] (DA = product node ID or broadcast 255, SA = host address). Data payload:

ByteFieldTypeNotes
0–1ADDRuint16Parameter address (little-endian); for values, see the configuration examples below
2CMDuint80x06=write, 0x03=read
3Reserveduint8Echoed back verbatim by the device (does not carry a status code); host writes 0
4–7VALuint32Data value (little-endian)

Configuration response rules:

Request typeResponds?Response CAN IDHost handling
Point-to-point write (DA = specific node ID)Yes0x0CEF55[node ID]On successful write, returns a request echo
Point-to-point read (DA = specific node ID)Yes0x0CEF55[node ID]On successful read, returns ADDR + CMD + VAL
Broadcast write (DA = 255)No—Does not wait for a response; read back to confirm if necessary
Illegal address, value out of range, or unsupported accessNo—Judged as failure by timeout

The response has destination address 0x55 and source address equal to the device node ID; e.g. the response CAN ID for node 8 is 0x0CEF5508. To simplify receive filtering, the host is recommended to use SA=0x55 when sending configuration requests.

The PGN transmit period is set by writing the period parameter via a configuration frame. Only the period parameters listed in the table below are public configuration items; unlisted parameters are not a general user interface.

Common configuration examples (default node ID=8):

[VAL] is always a 4-byte uint32 little-endian. A 100 ms period is written as 64 00 00 00; SYNC_IN trigger mode is written as 00 80 00 00.

Data payloadNotes
2F 01 06 00 [VAL]PGN 0xFF2F (time information) transmit period
34 01 06 00 [VAL]PGN 0xFF34 (acceleration) transmit period
37 01 06 00 [VAL]PGN 0xFF37 (angular rate) transmit period
3A 01 06 00 [VAL]PGN 0xFF3A (magnetic field) transmit period
3D 01 06 00 [VAL]PGN 0xFF3D (pitch/roll) transmit period
41 01 06 00 [VAL]PGN 0xFF41 (heading) transmit period
46 01 06 00 [VAL]PGN 0xFF46 (quaternion) transmit period
4A 01 06 00 [VAL]PGN 0xFF4A (inclinometer) transmit period
43 01 06 00 [VAL]PGN 0xFF43 (temperature) transmit period
5B 01 06 00 [VAL]PGN 0xFF5B (CANFD83) period, off by default; see CANFD83
80 01 06 00 [VAL]CANFD83 MAP, subject to the supported-bit and 64-byte length limits
9B 00 06 00 [VAL]CAN FD data-phase rate index; saved, reboot required; see CANFD83
06 00 06 00 [VAL]Operating mode, values as in "CONFIG ATT MODE"; save, then reset to apply
07 00 06 00 [VAL]Output data axes: 0 = Right-Front-Up, 4 = ROS, see Output Data Axes; save, then reset to apply
A6 00 06 00 [VAL]Mounting orientation code, see Mounting Orientation; save, then reset to apply; a saved attitude zero stops applying
A5 00 06 00 [VAL]Attitude control: VAL=0 zero all / 1 heading reset / 2 set relative zero / 3 auto-level / 5 cancel leveling; see attitude reset persistence for saving and verification
9D 00 06 00 01 00 00 00Globally enable node data output (default)
9D 00 06 00 00 00 00 00Globally disable node data output
9A 00 06 00 [VAL]CAN baud rate: 0=1000K, 1=800K, 2=500K, 3=250K, 4=125K; save using the shared procedure, then reset or power-cycle to apply
9C 00 06 00 [VAL]J1939 node ID: recommended 1–126; 127 is reserved on some models; save using the shared procedure, then reset or power-cycle to apply
9E 00 06 00 [VAL]Inclinometer X-axis direction: 0=default, 1=reversed
9F 00 06 00 [VAL]Inclinometer Y-axis direction: 0=default, 1=reversed
00 00 06 00 00 00 00 00Save configuration
00 00 06 00 01 00 00 00Restore factory defaults (auto-save and reset)
00 00 06 00 FF 00 00 00Reset

Period VAL notes: 0 = off; 5/10/20/50/100/200/500/1000 ms are recommended periods; 0x8000 is SYNC_IN trigger mode.

WARNING

special period value 0x8000 (SYNC_IN trigger mode): After writing a PGN's transmit period as 0x8000, that PGN is no longer sent periodically and instead outputs one frame on the external SYNC_IN rising edge. For example, setting the VAL of 34 01 06 00 to 00 80 00 00 puts the acceleration PGN into SYNC_IN trigger mode. The standard firmware has this trigger path wired in; whether custom firmware supports it is subject to the delivery notes.

NOTE

Example: ID=0x0CEF0855, data 37 01 06 00 64 00 00 00 → sets PGN 0xFF37 (angular rate) to a 100 ms period (10 Hz). In this example DA=0x08, SA=0x55; SA can be any host address. If the host filters reception by the response destination address, fix SA=0x55.

Time Synchronization ​

J1939 PGN 0xFF2F is used only to output the module's current time information, not as a time-sync input. If you need to synchronize the module's internal clock to UTC, use the PPS + serial time message scheme in "Synchronization Function".

CANopen (CAN) ​

J1939 is recommended for new CAN integrations. CANopen support is being gradually phased out across product models. This section remains available for existing integrations; support depends on the delivered model and firmware, and this does not mean all existing devices have lost CANopen support.

Some products or delivery configurations support CANopen slave communication (whether enabled is subject to the actual model). CANopen uses standard data frames, with common data transmitted via TPDO1/2/3/4/6/7; remote frames and extended frames are not used. TPDOs are triggered asynchronously on a timer; for synchronous mode, see "TPDO Rate and Synchronization Configuration".

Default Settings ​

ItemValue
CAN nominal baud rateTypically 500 kbit/s for classic CAN; CANFD83 devices use their current nominal rate (typically 1 Mbit/s)
Node ID8
Initialization stateOperational
TPDO output periodDefault 0 = no active output; transmission starts only after each TPDO period is written via SDO (see "TPDO Rate and Synchronization Configuration")

WARNING

By factory default, all TPDO periods are 0 (no output). After power-on, CANopen does not actively send data; you must first configure the output period of the required TPDOs per "TPDO Rate and Synchronization Configuration".

TPDO Mapping ​

ChannelFrame IDDLCDataType / Scale / Unit
TPDO10x180+ID6Acceleration X/Y/Zint16, mG (0.001 G)
TPDO20x280+ID6Angular rate X/Y/Zint16, 0.1 deg/s
TPDO30x380+ID6Euler angles Roll/Pitch/Yawint16, 0.01 deg
TPDO40x480+ID8Quaternion W/X/Y/Zint16, raw × 0.0001; raw=10000 → 1.0000
TPDO60x680+ID4Pressureint32, Pa
TPDO70x780+ID8Inclinometer X/Yint32, 0.01 deg

All multi-byte fields are low byte first.

WARNING

scale factors differ from other protocols: CANopen acceleration is in mG, angular rate 0.1 deg/s, Euler angles 0.01 deg; do not apply the Modbus/J1939 scale factors (see "Unified Data Dictionary").

Data Parsing Examples ​

The following examples assume the corresponding TPDO period has been opened per "TPDO Rate and Synchronization Configuration".

Acceleration frame: ID=0x188 (node 8), data 4A 00 1F 00 C8 03

  • X = 0x004A = 74 → 74 mG; Y = 0x001F = 31 → 31 mG; Z = 0x03C8 = 968 → 968 mG

Angular rate frame: ID=0x288, data 15 00 14 01 34 00

  • X = 0x0015 = 21 → 2.1 deg/s; Y = 0x0114 = 276 → 27.6 deg/s; Z = 0x0034 = 52 → 5.2 deg/s

The host can use PCAN-View with a PCAN adapter to view in the receive window:

Configuration Commands (SDO) ​

CANopen expedited SDO is used. The host sends CAN_ID=0x600+ID, and the slave responds with CAN_ID=0x580+ID. The SDO data area is a fixed 8 bytes:

text
CS | Index_L | Index_H | SubIndex | Data0 | Data1 | Data2 | Data3

Both Index and Data are little-endian. Common CS values are as follows:

CSDirectionMeaningData bytes
0x23Host→SlaveWrite 4 bytes4
0x2BHost→SlaveWrite 2 bytes2
0x2FHost→SlaveWrite 1 byte1
0x40Host→SlaveRead request0
0x60Slave→HostWrite success response0
0x43Slave→HostRead 4-byte response4
0x4BSlave→HostRead 2-byte response2
0x4FSlave→HostRead 1-byte response1
0x80Slave→HostSDO abort4-byte abort code

This product configures common public parameters through manufacturer object indices. The table below lists only the public objects defined in this manual; unlisted objects are not a general user interface—do not derive or access them via manufacturer object indices that are not listed. Multi-byte values are arranged in little-endian when written or read. If the device denies access, it returns a 0x80 abort response; common abort codes are 0x06090030 (value out of range) and 0x06010000 (access not supported).

Common commands (using node ID=8, CAN_ID=0x608 as an example):

OperationData
Modify node ID (0x209C, recommended 1–126; 127 is reserved on some models)23 9C 20 00 [ID] 00 00 00
Save configuration (0x2000)23 00 20 00 00 00 00 00
Reset (0x2000)23 00 20 00 FF 00 00 00
Restore factory defaults (0x2000)23 00 20 00 01 00 00 00
CAN baud rate 1000K (0x209A)23 9A 20 00 00 00 00 00
CAN baud rate 800K23 9A 20 00 01 00 00 00
CAN baud rate 500K23 9A 20 00 02 00 00 00
CAN baud rate 250K23 9A 20 00 03 00 00 00
CAN baud rate 125K23 9A 20 00 04 00 00 00
Attitude relative zero (0x20A5)23 A5 20 00 02 00 00 00
Auto-level23 A5 20 00 03 00 00 00
Cancel leveling / restore absolute angles23 A5 20 00 05 00 00 00
Read node ID (0x209C)40 9C 20 00 00 00 00 00

NOTE

CANopen parameter persistence: The TPDO period (0x180x.5) and heartbeat (0x1017) take effect immediately after being written; the CAN baud rate (0x209A) and node ID (0x209C) take effect only after a reset (write 0xFF to 0x2000), and after reset the host must also switch to the new baud rate / new node ID. For compatibility across firmware versions, after configuration it is recommended to write 0x00 to 0x2000 to save configuration.

WARNING

After restoring factory defaults, the module automatically saves and resets; use with caution.

TPDO Rate and Synchronization Configuration ​

TPDO channels map to parameter indices:

ChannelParameter indexData
TPDO10x1800Acceleration
TPDO20x1801Angular rate
TPDO30x1802Euler angles
TPDO40x1803Quaternion
TPDO60x1804Pressure
TPDO70x1805Inclinometer

TPDO5 is unused; to remain compatible with existing product definitions, pressure uses TPDO6 and the inclinometer uses TPDO7.

Modify output rate (write sub-index 5, unit ms; 0=off), using acceleration (0x1800) as an example:

  • 2B 00 18 05 00 00 00 00 — off (period=0)
  • 2B 00 18 05 05 00 00 00 — 200 Hz (period=5 ms)
  • 2B 00 18 05 0A 00 00 00 — 100 Hz (period=10 ms)
  • 2B 00 18 05 14 00 00 00 — 50 Hz (period=20 ms)
  • 2B 00 18 05 32 00 00 00 — 20 Hz (period=50 ms)
  • 2B 00 18 05 64 00 00 00 — 10 Hz (period=100 ms)

For the other channels, change the low byte of the index (the 2nd byte of the frame) to 01 (angular rate) / 02 (Euler angles) / 03 (quaternion) / 04 (pressure) / 05 (inclinometer); for example, angular rate at 100 Hz: 2B 01 18 05 0A 00 00 00. This item (rate, sub-index 5) takes effect immediately after being written and is automatically persisted (retained across power loss), with no extra save needed.

Synchronous mode: Writing a TPDO's transmission type [0x180x.2] as 0x01 switches it to synchronous mode (stops asynchronous timing and waits for the sync frame). Using TPDO1 as an example:

  • 2F 00 18 02 01 00 00 00 — set TPDO1 to synchronous mode
  • 2F 00 18 02 FF 00 00 00 — restore TPDO1 to asynchronous mode (default)

Send a CANopen sync frame: CAN_ID=0x80, empty data. All TPDOs in synchronous mode each send one frame, achieving synchronization.

NOTE

The transmission type (synchronous / asynchronous) is a runtime-only setting and reverts to the asynchronous default (0xFF) after reset or power cycle; it is not retained across power loss. The TPDO rate (sub-index 5) and heartbeat period, however, are retained across power loss.

Heartbeat: Write [0x1017.0] to set the period (ms, 0 disables). Example 2B 17 10 00 64 00 00 00 → 100 ms.

Fault Diagnosis ​

Start with the symptom, then consult the corresponding reference. For communication problems, check wiring and current configuration first; do not make factory reset or firmware upgrade the first step.

SymptomCheck firstNext step
No serial or Modbus responsePower, wiring, port and baud rate; ASCII \r\n termination, Modbus node ID and request CRCRepeat read-only verification in Quick Start Procedure; for ASCII errors, check error codes
Communication lost after configurationHost baud rate / node ID matches the device's effective settings; save, reset and switching sequenceReview Changing Communication Parameters
Expected CAN data missingDelivered protocol, wiring, termination, current bit rate, standard / extended frame selection, and FD/BRS settings for CANFD83Check CAN integration, then the protocol's output configuration
Frames received but decoded values incorrectFrame length, CRC, offsets, types, byte order and scale factors; parse HI83 using each frame's bitmapCheck Decoding Pitfalls, protocol tables and the Unified Data Dictionary
Unexpected attitude direction or headingMounting orientation, output data axes and 6-axis / 9-axis mode; do not treat relative heading as magnetic heading; Right-Front-Up and ROS have opposite pitch signs and 9-axis headings 90° apart; a saved zero stops applying after the mounting orientation changesCheck Coordinate Systems, Mounting Orientation, Output Data Axes and attitude zeros; for 9-axis issues, continue with Magnetic Calibration
Calibration fails or heading remains abnormalCalibration status, fixed mounting, magnetic environment and rotation coverageFollow the calibration troubleshooting procedure

If unresolved, provide the product model, firmware version, interface and current communication settings, operation sequence, and raw transmitted/received messages. For attitude or heading issues, also describe the mounting orientation and environment.

Appendix A — Quaternion / Euler Angles / Rotation Matrix Conversions ​

This appendix presents the attitude representations adopted by HiPNUC products and the formulas for converting between them. The quaternion order is WXYZ (q0 is the scalar part), and Qb2n denotes the rotation from the body frame (b frame) to the world frame (n frame). Right-Front-Up (COORD 0) uses the 312 formulas and ROS (COORD 4) the 321 formulas; see Coordinate Systems and Direction Conventions for their axes. The two have different body axes: to convert between them, extract the Euler angles from the quaternion with the matching formulas; do not add 90° to one of the angles.

Quaternion to Rotation Matrix ​

Given the quaternion Qb2n=[q0,q1,q2,q3]T, the direction cosine matrix is:

Cb2n=[q02+q12−q22−q322(q1q2−q0q3)2(q1q3+q0q2)2(q1q2+q0q3)q02−q12+q22−q322(q2q3−q0q1)2(q1q3−q0q2)2(q2q3+q0q1)q02−q12−q22+q32]

East-North-Up (ENU) — 312 rotation order (Z first, then X, then Y) ​

Euler angle definitions under the ENU convention:

  • pitch (θ): rotation angle about the X axis, range [−π2,π2]
  • roll (φ): rotation angle about the Y axis, range [−π,π]
  • yaw (ψ): rotation angle about the Z axis, range [−π,π]

Quaternion to Euler angles:

pitch=arcsin⁡(2(q0q1+q2q3))roll=−atan2(2(q1q3−q0q2), q02−q12−q22+q32)yaw=−atan2(2(q1q2−q0q3), q02−q12+q22−q32)

Euler angles to quaternion (let cp=cos⁡(pitch2), sp=sin⁡(pitch2), with cr/sr and cy/sy defined analogously):

q0=cpcrcy−spsrsyq1=spcrcy−cpsrsyq2=cpsrcy+spcrsyq3=cpcrsy+spsrcy

ROS (REP-103) — 321 rotation order (Z first, then Y, then X) ​

Under ROS the body frame is Front-Left-Up (FLU) and the world frame is East-North-Up (ENU); the 9-axis heading is 0 with the nose pointing east, and relative-heading modes such as 6-axis start at 0 at power-on:

  • roll (φ): rotation angle about the X axis, range [−π,π]
  • pitch (θ): rotation angle about the Y axis, range [−π2,π2]
  • yaw (ψ): rotation angle about the Z axis, range [−π,π]

Quaternion to Euler angles:

roll=atan2(2(q0q1+q2q3), 1−2(q12+q22))pitch=arcsin⁡(2(q0q2−q1q3))yaw=atan2(2(q0q3+q1q2), 1−2(q22+q32))

Euler angles to quaternion (let cr=cos⁡(roll2), sr=sin⁡(roll2), with cp/sp and cy/sy defined analogously):

q0=crcpcy+srspsyq1=srcpcy−crspsyq2=crspcy+srcpsyq3=crcpsy−srspcy

These 321 formulas are the same as the Euler extraction commonly used with North-East-Down (NED) in aviation; only the axis directions differ. This manual defines no NED output configuration.

Appendix B — Firmware Upgrade ​

This product supports firmware upgrade. Contact technical support with the product model and the LOG VERSION output so that the applicable firmware file (.hex) can be confirmed; do not use firmware for another model. Then use CHCenter and follow the steps shown below.

NOTE

Before upgrading, confirm that the firmware version matches the product model (see the version cross-reference table in "About This Manual"). Do not power off during the upgrade.

Appendix C — Output Bandwidth and Baud Rate ​

Whether a data frame can be output stably depends on whether frame length × frame rate stays within the serial bandwidth. Estimating with 8N1 (10 bit per byte):

max frame rate (Hz)≈baud rate/10bytes per frame

In practice, it is recommended to reserve an additional 10–20% margin on top of the formula above. An HI91 frame is 82 bytes total (6 bytes of header/length/CRC + 76-byte payload); the recommended maximum output frame rate at each baud rate:

ProtocolBytes per frame9600115200230400460800921600
HI918210 Hz100 Hz250 Hz500 Hz1000 Hz

NOTE

HI83 uses variable-length frames: its bytes per frame vary with the data_bitmap configuration. Sum the frame length according to the selected fields and substitute it into the formula above for estimation. For example, with the default 0x000000FF (bit0–7), a frame is about 98 bytes (payload 92 + 6 bytes of header/length/CRC); 100 Hz requires about 98 kbit/s, for which 115200 leaves a tight margin and 230400 or higher is recommended. When a high frame rate conflicts with the default 115200 bandwidth, raise the baud rate (e.g. 921600).

Appendix D — Factory Default Configuration ​

The table below lists typical factory defaults; the actual delivered configuration prevails. The "Effective Timing" column explains when a change takes effect. For saving, see SAVECONFIG in "System Commands".

Configuration ItemTypical DefaultAvailable RangeEffective Timing
Serial baud rate (COM1–4)1152004800…921600 (9 steps, see "System Commands")Immediately (SERIALCONFIG)
Default output frameHI91 @ 100 Hz (COM1, COM2)—Immediately (LOG)
Other frames (HI83, etc.)Off—Immediately
Operating modeSee product delivery (6-axis / 9-axis)CONFIG ATT MODELoaded after reset / power cycle
Output data axes COORDRight-Front-Up (0)Right-Front-Up / ROSLoaded after reset / power cycle
Mounting orientation URFR24 (horizontal, Z up)See "Mounting Orientation"Loaded after reset / power cycle
HI83 data_bitmap0x000000FFSee "Variable-Type Data Frame (HI83)"Restart after changing, then read back to verify
Modbus node ID801–247Immediately
CAN node ID8Recommended 1–126; 127 reserved on some modelsReset / power cycle
CAN nominal baud rateTypically 500 kbit/s for classic CAN; 1 Mbit/s for CANFD83Use the device's current configurationReset / power cycle
CANFD83 MAP / period / data-phase rate0x12B / 0 (off) / 4 Mbit/sSee CANFD83Next frame / immediate / reboot
J1939 periodic output master switchOn0 / 1J1939 write: immediate
J1939 default output PGNAcceleration / angular rate / pitch-roll / heading @ 100 HzSee "J1939 Configuration Protocol"Immediately
CANopen TPDO periodAll 0 (no output)See "TPDO Rate and Synchronization Configuration"Immediately
CANopen heartbeatOff (0)0–65535 msImmediately

WARNING

Factory reset: Restores the default user configuration, including baud rates, outputs, operating mode, mounting orientation, output data axes and attitude zeros, and restarts. Record communication parameters and key configuration beforehand, then verify communication and output afterward.

Appendix E — Acronyms and Glossary ​

The abbreviations and technical terms used in this manual are summarized below (for command keywords such as LOG, CONFIG, SAVECONFIG, and FRESET, see "ASCII Command Reference").

Abbreviation / TermFull name / Meaning
IMUInertial Measurement Unit (accelerometer + gyroscope, optionally with magnetometer)
AHRSAttitude and Heading Reference System (9-axis, absolute heading)
VRUVertical Reference Unit (6-axis, relative heading)
ENUEast-North-Up world frame (see "Coordinate Systems and Direction Conventions")
RFU / FLURight-Front-Up / Front-Left-Up body axes; FLU is the ROS body-axis convention
ROS / REP-103Robot Operating System and its coordinate convention: body Front-Left-Up, world East-North-Up (see "Output Data Axes")
URFRMounting orientation code: where the printed arrows point on the vehicle (see "Mounting Orientation")
COORDOutput data axes configuration (Right-Front-Up / ROS, see "Output Data Axes")
MAIN_STATUSMain status word, 16-bit (see "MAIN_STATUS Status Word")
MCALMagnetometer Calibration (see "Magnetic Calibration and Magnetic Environment")
USRCALUser-level gyroscope calibration, calibrates the gyroscope Z-axis scale factor (see "Attitude Calibration")
PMUXPin Multiplexing, multi-function IO multiplexing (see "Multi-function IO Multiplexing")
SOUTSync Output, pre-frame sync output pulse (see "SOUT Synchronous Output")
SYNC_IN / PPSSync pulse input / standard pulse-per-second, used for triggering and time synchronization (see "Synchronization Function")
HI91 / HI83HiPNUC binary data frame types: fixed-length floating-point / variable-length bitmap
SOFStart of Frame, start-of-frame sync word (5A A5)
CRCCyclic Redundancy Check
PGNParameter Group Number (J1939)
SA / DASource / Destination Address (J1939)
TPDOTransmit PDO, Transmit Process Data Object (CANopen cyclic output)
SDOService Data Object (CANopen configuration read/write)
DBCCAN database file, describing CAN signal definitions, for import into CANoe / BusMaster, etc. (see Appendix "Development Resources and Technical Support")
EDSElectronic Data Sheet, CANopen Electronic Data Sheet (object dictionary description file, see Appendix "Development Resources and Technical Support")
Heave / Surge / SwayHeave / surge / sway, the three-axis periodic motion of a vessel (see "Wave Compensation / MRU Output")

Appendix F — Development Resources and Technical Support ​

The following tools and resources are available for secondary development:

ResourcePurposeWhere to Get It
CHCenter host softwareDevice connection, parameter configuration, data plotting / attitude visualization, data recording and playback, firmware upgradewww.hipnuc.com
Binary parsing exampleC-language frame parsing: frame reception, CRC check, field-table decodingSee "C Parsing Example (HI91)"
Firmware upgradeContact technical support to confirm the applicable firmware; upgrade via CHCenterSee Appendix B
DBC / EDS (CAN)J1939 DBC and CANopen EDS machine-readable files for import into CANoe / BusMaster / PLCContact technical support

Information about new products and resources is available on the official website and WeChat official account.

Website: www.hipnuc.com

WeChat official account:

Telegram:

Last updated:

IMU · AHRS · INS · RTK Support Center