PCAN-Basic TPCANMessageType 0x06: Decoding the Bitmask Value

Daniel Price1 min read
Industrial NetworkingOther ManufacturerTroubleshooting
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Why 0x06 Is Not in the PCAN-Basic Documentation

The TPCANMessageType field in PCAN-Basic is a bitmask, not an enumerated single value. The documentation lists individual message-type flags and explicitly notes that several message types can be combined. A received value of 0x06 therefore does not correspond to one named constant, which is why searching the help file for 0x06 returns nothing.

Decoding 0x06: FD Frame with Extended ID

Breaking the byte into its documented flag bits identifies the frame:

Bit Value Flag Meaning
PCAN_MESSAGE_FD CAN FD frame (data field beyond classic CAN capabilities)
29-bit extended CAN identifier
0x06 Combination CAN FD message using an extended (29-bit) ID

A received TPCANMessageType == 0x06 means the bus traffic contains CAN FD frames with 29-bit identifiers. Decode the type with bitwise tests rather than equality comparisons:


API Constraint: FD Frames Require the FD Functions

Messages of type PCAN_MESSAGE_FD, PCAN_MESSAGE_BRS, PCAN_MESSAGE_ESI, or any combination of them can only be sent and received with the FD-specific functions. Call CAN_ReadFD / CAN_WriteFD in the native API, or the ReadFD / WriteFD class methods in the object-oriented wrappers. Attempting to handle a 0x06 frame through the classic CAN_Read / CAN_Write path is the integration error to avoid.

Verification

  1. Confirm the channel was initialized for CAN FD operation; otherwise FD frames will not be received at all.
  2. Read the message with CAN_ReadFD / ReadFD and check TPCANMessageType with the bitwise test above.
  3. Confirm the identifier is interpreted as a 29-bit extended ID when the bit is set, and that payload handling uses the FD data length rather than the classic 8-byte limit.

FAQ

What does TPCANMessageType 0x06 mean in PCAN-Basic?

The documentation lists individual flags only because the values are designed to be ORed together.

Why is 0x06 not listed in the PCAN-Basic message type documentation?

Because TPCANMessageType is a bitmask. The help file documents the single-bit flags and states that several message types can be combined; combined values like 0x06 are derived, not enumerated.

Which PCAN-Basic function reads a message with type 0x06?

Use CAN_ReadFD (native API) or the ReadFD class method. Messages with PCAN_MESSAGE_FD, PCAN_MESSAGE_BRS, PCAN_MESSAGE_ESI, or any combination of them can only be sent and received through the FD functions (WriteFD/CAN_WriteFD for transmission).

Back to blog