Switch block requires all signal to be same virtuality.

1 次查看(过去 30 天)
Hi,
I had a Simulink model that is built in Matlab 2016b and now I am trying to update it to Matlab 2018b. I do run the upgrade advisor. It complained about the virtuality and now when I try to run the model it gives me an error saying that the signals to the switch are not of same virtuality. Before the switch I have a bus creator. In the bus creator the non-virtual option is not selected so I assume that it is virtual. The other signal to the switch is then non-virtual.
However, it works completely fine in Matlab 2016b. I do not know what the issue is actually. I did change the virtuality of the bus creator before the switch but the generated code gives alot of changes. It is really annoying and by company guidelines we should not non-virtual signals if these cases. How do I solve this issue?

回答(1 个)

Ishu
Ishu 2023-8-22
Hi Pebbe,
As per the information provided by you, I tried to create a dummy model to reproduce the same error. The model is working fine when I updated it to MATLAB R2018b.
You can refer to this documentation for more information:

类别

Help CenterFile Exchange 中查找有关 Event Functions 的更多信息

产品


版本

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by