Creating extended message with non-defined DLC

Programmable 6-channel router and data logger for CAN and CAN FD with I/O and optional Ethernet interface
Post Reply
Foxtrott
Posts: 6
Joined: Mon 28. Sep 2015, 05:24

Creating extended message with non-defined DLC

Post by Foxtrott » Thu 23. Feb 2023, 07:29

Hi,

I need to generate a CAN Extended frame in the CAN Router Pro-FD which has a DLC = 40 bytes and with an extended message ID. The message is currently setup with the following values TxMsg values:

TxMsg.id = 0x18FEE300;
TxMsg.dlc = CAN_LEN48_DLC;
TxMsg.msgtype = CAN_MSGTYPE_EXTENDED;
TxMsg.bufftype = CAN_BUFFER_TX_MSG;

When observing the message in CANalyzer I see DLC = 14, but only 8 bytes of data in the trace.

Is there some limitations to non-standard extended CAN messages which can be created? If it matters the message is in J1939 format with a cyclical transmission rate.

M.Maidhof
Support
Support
Posts: 1751
Joined: Wed 22. Sep 2010, 14:00

Re: Creating extended message with non-defined DLC

Post by M.Maidhof » Thu 23. Feb 2023, 09:49

Hi,

if you want to send an extended FD frame with the PCAN-Router Pro FD, you have to bitwise "OR" the message type to have an extended FD BRS message:

example:

TxMsg.msgtype = CAN_MSGTYPE_EXTENDED |CAN_MSGTYPE_FDF | CAN_MSGTYPE_BRS;

But please note: if you want to send a J1939 multipacket message, there is still CAN2.0b format used and not CAN FD, so the message length will still be 8 bytes and you have to send several 8 bytes message as a 40 byte J1939 multipacket message. Here an example with PCAN-Explorer 6 when sending a 18FEE300:
J1939_1.JPG
J1939_1.JPG (94.97 KiB) Viewed 3411 times
Raw_CAN_Trace.JPG
Raw_CAN_Trace.JPG (52.17 KiB) Viewed 3411 times
regards

Michael

Post Reply