J1939 Data Length less than 8 bytes

Omer Gagne 4 years ago in IQANdesign updated by Gustav Widén (System support) 3 years ago 8

I have a question about the length of J1939 when the data is less than 8 bytes.

IQAN seems to set automatically the data length to 8 bytes, no matter what the DBC files contains.  

But, for example, when a PGN is set to 4 bytes by a manufacturer, the communication fails.

Is there a way to set the proper value of the DLC in IQAN when the data length is less than 8 bytes on J1939 CAN bus?

Satisfaction mark by Omer Gagne 3 years ago

For generic CAN, the GFIN/GFOUT channels have DLC as a property. 

JFIN/JFOUT is always 8 bytes. 

I am only aware of one SAE defined Parameter Group that has the DLC set to a value other than 8, the RQST (PGN 59904) which has DLC3. 

In IQANdesign, you send RQST with the JFIN "poll trigger" and respond to it by having the JFOUT "on request".

Do you have some more details on the PG you are implementing? 

We use proprietary PGNs. This is why we need to be able to set the DLC according to the manufacturer's DBC.

Do you have a version of IQAN that allows us to manually set the DLC for the J1939 frame output?


Hi Omer,

Try using a generic frame with the identifier set to 29 bit.

You will then need the hex for the whole J1939 identifier including the PGN.

Generic frames support DLC.


I tried using generic frames instead of J1939 with the full id (Prio, PGN, SourceAddress).

But when I tried to assign it to a J1939 module, I was unable to do so.  IQAN doesn't allow it.

I then created a generic module that I tried to connect to my J1939 Bus ... IQAN doesn't allow this neither.

So, is there a way to integrate a J1939 module on a J1939 bus using J1939 frames which have DLC less than 8 bytes?

Under review

The method for using the generic CAN workaround would have to be to wire two physical CAN ports from the IQAN master to the bus, one configured as J1939 and one configured as generic CAN. Not very elegant but might work if you are making a prototype build and happen to have one that is unused.. 

A better solution would be if the firmware in device you are connecting to could be modified to accept any DLC. 

I think the best solution would be if we just add a DLC property to the JFOUT in IQANdesign. 

For proprietary PGN:s, the standard does allow for DLC <8 so I think it should be supported. 

Under review

Changed topic from question to feature request

Hi, Gustav

Thanks for the workaround. We have tried this and it works.
But we will have to put the device back on the J1939 bus in the future.

So, could you keep us in touch regarding the release of IQANdesign with this DLC property added to JFOUT.

Thank you so much.


Implemented in 6.05:

Added property for data length on JFOUT channel to support sending J1939 CAN frames shorter than 8 bytes.