Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

CAN object data length always 8

Maybe I'm missing something.  Using a NI-CAN PXI-8461/2 2-port HS CAN card, I configure a CAN object to 'receive unsolicited' CAN frames for a specific message ID.  In the config cluster, I set the Data Length to 5 bytes.  However, when starting and running the application, I always receive 8 CAN frames from the ncReadObjMult vi function.

 

Any ideas?

 

Thanks

Jason

0 Kudos
Message 1 of 5
(6,705 Views)

Hi Jason,

 

Would you please try wiring a constant with number 5 to RequestedDataBufSize terminal of the ncReadObjMult vi?

 

Regards,

Sammy Z.

0 Kudos
Message 2 of 5
(6,687 Views)

Yes, but then I will only receive 5 CAN frames; RequestedDataBuSize determines the # of frames to attempt to read.  They still have 8 bytes of data in each frame.

 

Jason

0 Kudos
Message 3 of 5
(6,672 Views)

Hi,

The received frames have 8 bytes because that is how much information the CAN device transmitted.   Why do you not want to receive the last 3 bytes?
Matt
Applications Engineer
National Instruments
0 Kudos
Message 4 of 5
(6,659 Views)

When I use the CAN 'Bus Monitor' in MAX, I only receive 5 bytes of data, with the DLC of 5.  The device I am connected to transmits 5 data bytes.  But when using the ncCAN object, I always receive 8 data bytes from the VI call.

Jason

0 Kudos
Message 5 of 5
(6,657 Views)