Skip to content

Commands

The user can use either the RS-422 or the CAN-FD interface, depending on the variant, to transmit commands to the IMU in ASCII format. This command set is identical across the whole MK2 family. Below is an exhaustive and descriptive list of the available commands.

Remember that, for the RS422 variant, commands must be COBS-encoded and terminated with a 0x00 byte before transmission. Refer to RS422 Frame Decoding & Encoding — COBS if needed.

Enter Configuration State

Command IMU State IMU Response
CONFIG\r\n Operating State IMU switches to Configuration State.

Exit to Operating State

Command IMU State IMU Response
EXIT\r\n Configuration State IMU switches to Operating State.

Soft-Reset

Command IMU State IMU Response
RESET\r\n All IMU resets (switches to Startup State, from software).

Get a Startup Frame

Command IMU State IMU Response
SUF\r\n Configuration State IMU sends a SUF with its current configuration.

Get an Operating Frame

Command IMU State IMU Response
OF<Frame Type*>\r\n Configuration State IMU performs and transmits an OF.

Details

Frame Type parameter must be encoded with: R, E, Q, M, G, or D only. For example, to receive a Quaternions Operating Frame from the IMU, send OFQ\r\n.

Change Operating Mode

Command IMU State IMU Response
OM<Operating Mode*>\r\n Configuration State IMU changes its OM.

Details

Operating Mode parameter must be encoded with: I, L, or M only. For example, to configure the IMU to Medium Speed, send OMM\r\n.

Change Operating Frame Types

Command IMU State IMU Response
EOFT<Frame Type*>\r\n Configuration State IMU enables selected OF type.
DOFT<Frame Type*>\r\n Configuration State IMU disables selected OF type.

Details

Frame Type parameter must be encoded using one of the following characters: R, E, Q, M, or G. For example, to enable the Euler Angles frame, send EOFTE\r\n. If the Rotation Matrix frame is no longer needed, send DOFTM\r\n.

Change Dynamic Range of Gyroscopes

Command IMU State IMU Response
DRG<Range*>\r\n Configuration State Updates gyroscopes DR.

Details

Range parameter must be encoded with: 0125, 0250, 0500, 1000, 2000 or 4000 only. For example, to configure gyroscopes with a DR of 250°/sec, send DRG0250\r\n. This command targets the MEMS gyroscopes; on the MK2E2, the optical gyroscope's fixed range is unaffected.

Change Dynamic Range of Accelerometers

Command IMU State IMU Response
DRA<Range*>\r\n Configuration State Updates accelerometers DR.

Details

Range parameter must be encoded with: 02, 04, 08 or 16 only. For example, to configure accelerometers with a DR of 4g, send DRA04\r\n.

Change Dynamic Range of Inclinometers

Command IMU State IMU Response
DRI<Range*>\r\n Configuration State Updates inclinometer DR.

Details

Range parameter must be encoded with: 0.5, 1.0, 2.0 or 3.0 only. For example, to configure inclinometer with a DR of 1g, send DRI1.0\r\n.

Change Misalignment Correction Status

Command IMU State IMU Response
EMCORR\r\n Configuration State IMU enables the misalignment correction.
DMCORR\r\n Configuration State IMU disables the misalignment correction.

Write User Calibration Register, AHRS & Filters Configurations

Command IMU State IMU Response
WR<Reg*><Value*>\r\n Configuration State Updates specified register.

Details

Reg parameter must be encoded using one of the following three-character codes: GXB, GYB, GZB, AXB, AYB, AZB, IXB, IYB, MXB, MYB, MZB, MXX, MYX, MZX, MXY, MYY, MZY, MXZ, MYZ, MZZ, FCO, FHS, FRT, FGA, FAR, FMR, GFI, GLP, GHP, AFI, ALP, or AHP — plus GOB on the MK2E2 only, for the Optical Gyroscope Z Bias.

Details

Value parameter must be encoded as exactly 8 hexadecimal characters following the type of the register such as 32-bit floating-point value (float32) for calibration registers and FGA, FAR, FMR, or unsigned 32-bit for the rest. For example, to configure the user gyroscope x-axis bias with an offset of 1.0, send WRGXB3F800000\r\n. Another example, to configure the fusion heading source with the internal magnetometer which is 1, send WRFHS00000001\r\n.

Save Current Configuration to Flash Memory

Command IMU State IMU Response
SAVE\r\n Configuration State IMU saves its current configuration.

Restore to Factory Settings

Command IMU State IMU Response
REFS\r\n Configuration State IMU is reset to factory settings.

Response to a Recognized Command

When a recognized command is executed while the IMU is in Configuration State, the following commands indicate successful or failed execution by sending a human-readable ASCII message terminated by \r\n: CONFIG, OM, EOFT, DEOFT, EMCORR, DMCORR, WR, DRG, DRA, DRI, SAVE, and REFS (only if failed for the latter).

Undefined Command

When a command is not recognized or incorrectly formatted in Configuration State, the IMU responds with a human-readable ASCII error message terminated by \r\n. A message not recognized in Operating State will simply be ignored without any response.