2020-11-10 02:33 AM
Hi everyone,
I'm having compatibility problems with the CAN_Read block from STM32 library and the CAN Unpack from Embedded Coder Simulink library. I need to use CAN_MESSAGE MATLAB type for working with .dbc format.
The IDE field on the rxHeader is set at 4 by the CAN_Read block, while the CAN Extended flag from the CAN Unpack expects 1U when it evaluates the condition for unpacking the received message.
This code is generated by these blocks:
I came up with a solution by selecting raw data output from CAN_Read, packing the message and unpacking again with the desired .dbc as in the following example.
This solves the problem because the unpack resolves conditions according to the packed message with the raw data.
However I assume that the CAN_Read plus direct CAN Unpack generated code isn't meant to be like that. Is there any solution which not imply to use redundant block as the CAN Pack?
Best regards,
Ruben