Unable to generate C code for Serial Receive Block

1 visualización (últimos 30 días)
Fauzan
Fauzan el 16 de Ag. de 2023
Editada: Pratyush Swain el 29 de Ag. de 2023
Hi,
I'm trying to generate a C Code from a Serial Receive in Simulink. I'm receiving the following error instead:
Error:Inputs must be numeric, logical, or char. The error occurred for MATLAB System block 'untitled/Serial Receive1'. See line 432, column 39 in file 'C:\Program Files\MATLAB\R2023a\toolbox\shared\seriallib\serialblks\+system\SerialReceive.m'.
I attached the simulink file as well. Please help

Respuestas (1)

Pratyush Swain
Pratyush Swain el 29 de Ag. de 2023
Editada: Pratyush Swain el 29 de Ag. de 2023
Hello Fauzan,
From my understanding, you are facing problem in generating c code from your simulink model.
The model file shared contains only serial receiver block, but as per the note mentioned in the serial receiver documentation , you must also configure your serial port parameters using the Serial Configuration block before you specify the Serial Receive block parameters.
Hope this helps.
Thanks & Regards,
Pratyush Swain

Categorías

Más información sobre Simulink Coder en Help Center y File Exchange.

Productos


Versión

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by