MATLAB Answers

Bus assignment block automatically converts input data type

2 views (last 30 days)
Suraj Lal Putta Mothilal
Suraj Lal Putta Mothilal on 28 Nov 2019
Answered: Mark McBroom on 2 Dec 2019
I am using bus assignment block to replace one of the signal in a bus. The input port of the bus assignment block is connected to switch block where the data type of the switch block output is set to uint8. But the bus assignement block converts it automatically to double. This causes a problem because later in the model a uint8 signal is expected. I don't know how to prevent this.
Best Regards


Sign in to comment.

Answers (1)

Mark McBroom
Mark McBroom on 2 Dec 2019
What is the data type of RX_Error in the bus when the bus is created? It is probably double. You will need to make the signal used for RX_Error when you create the bus to be uint8.


Sign in to comment.

Sign in to answer this question.




Translated by