reduce canFD frame size

The free CAN Software API (Application Programming Interface) for Windows®
Post Reply
elpimous12
Posts: 43
Joined: Tue 3. Aug 2021, 23:34

reduce canFD frame size

Post by elpimous12 » Fri 17. Sep 2021, 22:53

Hello,
Trying to send a canFD message, to query my controller :
msg.DLC = 5
needed msg.DATA is 14 4 0 13 d
but actual message is : 14 4 0 13 d 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50
(i need to pad all the un needed 00 to 50, for NOOP)
So I send the full message, with a DLC of 5, and I don't receive any feedback (The receive queue is empty)

a piece of code :

Code: Select all

Status=CAN_ReadFD(targetPort, &msg, &timestamp); 
targetPort is PCAN_PCIBUS1,
msg is the full 64 bytes,
and timestamp is just defined as TPCANTimestampFD timestamp;

Do you have any solution to reduce frame size ? Working on ubuntu 20, and coding Cpp

M.Heidemann
Sales & Support
Sales & Support
Posts: 673
Joined: Fri 20. Sep 2019, 13:31

Re: reduce canFD frame size

Post by M.Heidemann » Mon 20. Sep 2021, 08:14

Hello,

If your controller expects a DLC of 64 regardless of the actual
content of the message, i don't think there is much in terms
of your code what you can do about it.

We do not know your controller and the protocol used here,
so we would suggest to stick with the protocol on your software
side and make sure basic communication with your controller works as intended.

Best Regards

Marvin

Post Reply