Archived:Not Receiving Input CAN Frame Data with J1939 Transport Protocol Reference Example

Updated Dec 12, 2023

NI does not actively maintain this document.

This content provides support for older products and technology, so you may notice outdated links or obsolete information about operating systems or other relevant products.

Reported In


  • NI-CAN

Issue Details

I am trying to read J1939 CAN data with the J1939 NI CAN Frame in the J1939 Transport Protocol Reference Example provided under Example Code on the NI Community site, but I am not seeing any data on the Input CAN Frame. I can monitor the bus and see that frames are being transmitted/received, but cannot see any frames in the example. I have verified that I have configured the example appropriately for my application hardware and specifications


NOTE: NI-XNET has native support for J1939 as of version 15.0. The content below is only applicable for NI-CAN and NI-XNET prior to 15.0 using J1939 Transport Protocol Reference Example. It is not officially supported by NI.

The error you are seeing could be caused by the lack of a case for parsing unrecognized arbitration IDs in the "Process Incoming Messages" loop. If an unrecognized arbitration ID is received, a default, empty frame will be output by the program.
To add a case for handling unrecognized arbitration IDs, you will need to go into the J1939 Process Incoming Messages by PDU and modify the "Proprietary B" case for the unrecognized arbitration IDs depending on the functionality you want for the messages you're receiving. Once these cases are defined, you should be able to correctly see your CAN Input Frames. Screenshots are attached below showing the progression of subVIs to get to the case you need to modify.

J1939 NI CAN Frame Block Diagram

J1939 Process Incoming Block Diagram

J1939 Process Incoming Messages by PDU Block Diagram