Skip to main content

How to Decode IO398 Bitmap Parameter

This article explains how the IO398 CAN door status bitmap parameter works, how individual door status values are encoded, and how to decode them step by step.

Updated today

Introduction

IO398 CAN door status is a bitmap parameter that combines IO368 through IO397 into a single value. This saves IO slots and operates according to SPN 3412–3441.

This article explains the bit structure of IO398, how each 2-bit pair maps to a specific door status parameter, and how to decode the combined value step by step.

πŸ’‘ Tip: IO398 uses a Little-endian byte order, meaning the lower bits come first (bits 0 to 63, counted from 0).


1 Overview

1.1 Parameter Structure

IO398 is a 64-bit (8-byte) bitmap value. Every 2 consecutive bits represent the status of one door parameter (IO368–IO397). The mapping follows the Little-endian structure, where the lowest bits correspond to the first door parameters.

⚠️ Warning: Bits 59–63 are not used and will always be 0.

1.2 Bit-to-Parameter Mapping

Each 2-bit pair maps to a specific CAN door parameter. The table below shows the first set of mappings for Door 1:

Bits

IO ID

Parameter Name

0–1

IO368

CAN lock status door 1

2–3

IO369

CAN open status door 1

4–5

IO370

CAN enable status door 1

6–7

IO371

CAN lock status door 2

8–9

IO372

CAN open status door 2

10–11

IO373

CAN enable status door 2

This pattern repeats for each subsequent door (Door 3 through Door 10), with each door using 6 consecutive bits (3 parameters Γ— 2 bits each).


2 Status Values

2.1 2-Bit Value Reference

Each 2-bit pair produces a decimal value from 0 to 3. The meaning depends on the parameter type:

Binary

Decimal

Lock Status

Open Status

Enable Status

00

0

Unlocked

Closed

Disabled

01

1

Locked

Open

Enabled

10

2

Error

Error

Error

11

3

Not available

Not available

Not available

2.2 Visual Examples

Below are visual representations of each value for the lock status (bits 0–1):

Value 0 - Unlocked:

Value 1 - Locked:

Value 2 - Error:

Value 3 - Not available:


3 How to Decode IO398

3.1 Recommended Tool

The recommended tool for decoding is Windows Calculator in Programmer mode. It provides a bit-toggle keypad that allows you to visually inspect and manipulate binary values.

πŸ’‘ Tip: Since IO398 is a 64-bit value, make sure the calculator is set to QWORD mode to display all 64 bits.

3.2 Decoding Steps

Follow these steps to decode an IO398 value:

  1. Take the IO398 value from your device (it will be in hexadecimal or decimal format).

  2. Convert the value to binary using the Windows Calculator in Programmer mode.

  3. Ensure the binary representation is 64 bits long. Prepend 0 if the calculator does not display leading zeros.

  4. Starting from bit 0 (rightmost), read each 2-bit pair and match it against the bit-to-parameter mapping (section 1.2).

  5. For each 2-bit pair, look up the status value in the reference table (section 2.1).

⚠️ Warning: Remember that bits 59–63 are always 0 (unused). If you see non-zero values in these positions, the data may be corrupted.


4 Example

4.1 Door 3 and Door 7 Active

In this example, only Door 3 and Door 7 are in use. All other doors report error values because they are not connected.

Door

Lock Status

Open Status

Enable Status

Door 3

Unlocked (0)

Error (2)

Enabled (1)

Door 7

Error (2)

Error (2)

Enabled (1)

All other doors

Error (2)

Error (2)

Error (2)

4.2 HEX Representation

The calculator may not display leading zeros. Since bits 59–63 are always 0, the full HEX value should be padded accordingly:

Calculator shows:  FFF FDAF FFFD 8FFF
Full HEX value:    0x0FFF FDAF FFFD 8FFF

πŸ’‘ Tip: Always prepend 0 to ensure the full 16-character HEX representation (64 bits = 16 HEX characters).

Did this answer your question?