Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

J1939 BAM messaging -

Has anyone worked with the mutliple data packet transfer protocol for J1939 in NICAN? I am looking specifically for information about recognizing multi-packet start/stop and data decoding.

 

Thanks,

DaveT.

0 Kudos
Message 1 of 4
(8,931 Views)

Hey Dave,

 

If by "multiple data packets" you mean sending more that 8 bytes in 1 Frame, you won't be able to do this with NI-CAN.  Unfortuntely, we are limited to 8 bytes per frame for messages.  You can see a little bit more about J1939 and NI-CAN in this knowledgebase article. 

 

As for data encoding, there are two ways you can encode data in NI-CAN.  You can use the frame API and manipulate each byte individually.  You can also use the Channel API and configure a conversion so that the driver will convert your bytes to actual values automatically.

 

If this does not answer your questions, can you please expand on what you mean by start/stop and data encoding?

 

Have a great day.

O. Proulx
National Instruments
www.ni.com/support
0 Kudos
Message 2 of 4
(8,918 Views)

By sending more than 8 bytes over CAN, you automatically need to follow a standard of some sort for a higher level transport protocol such as J1939.  If you have higher level drivers that give you access to the transport protocol running over CAN, then you are set.  NI provides an add on toolkit for UDS / KWP200 / ODB transport protocols, but none that I know of J1939.  The do have an application example for J1939 somewhere though.

 

Also, the only examples provided for J1939 here are based on the frame API, which precludes you from using the channel API with a CAN database on the same port.  I do not think that BAM messaging or TP is worked into their example, so you would need to buy the SAE spec and add code to their example.

 

I assume you are trying to read something like active DTC codes, and you have more than one so the node you are communicating with wants to send you a BAM, prior to the spew of packets holding the array of DTCs.  Is that right?

 

By the way, DMC recently developed a set of J1939 protocol drivers for LabVIEW which are based on the NI-CAN channel API.  The drivers are written in LabVIEW just like the example, but provide functions at a layer above the base CAN channel API layer.  This allows the simultaneous capture of data from both J1939 packets which are simple broadcast CAN frames, or more complex transport using BAM, including extended data frames.

 

0 Kudos
Message 3 of 4
(7,965 Views)

Correct link for J1939 protocol drivers for LabVIEW which are based on the NI-CAN channel API. Smiley Happy

0 Kudos
Message 4 of 4
(7,964 Views)