Why do I get "CAN_Message" data type from "CAN Pack" not compatible with STM32 "CAN Tx" block

3 visualizaciones (últimos 30 días)
Hello,
I am using an STM32F767ZI for a project where I require the use of the "CAN Tx" blocks, from the Simulink Coder Support Package for STMicroelectronics Nucleo Boards, to send messages to some other devices. I am using the "CAN Pack" block from the embedded coder toolbox to create the messages for some given signals. According to the documentation of the "CAN Tx" block it is supposed to be compatible with the "CAN_Message" format from the "CAN Pack" block however when I to transmit a message in that format I receive the following errors:
The data type of input port 1 is 'CAN_MESSAGE'. MATLAB System block 'untitled/Subsystem2/CAN Transmit2' only supports built-in, binary point scaling [Slope=1.0, Bias=0.0], Simulink enumeration, and bus data types.
An error occurred while propagating data type 'CAN_MESSAGE' from 'untitled/Subsystem2/CAN Pack1', output port 1.
I am able to send raw data into the transmit block which then packs the data into a can message for a given CAN ID which is defined in the block, however this would require me to have a separate transmit block for all of my CAN messages, which is far from optimal for my project and requires lot's of workarounds. Ideally I would like to be able to queue the messages and send them individually to the "CAN Tx" block.
Is there a way to send a pre-packed CAN message into the "CAN Tx" block?
Thanks in advance

Respuestas (0)

Productos


Versión

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by