Without fully understanding your setup, all inputs to a switch must have the same size. For example, if you have a mux with 2 elements and one with 3 elements, they can't both be passed into the switch.
Can a Switch block handle signals of Mux?
3 次查看(过去 30 天)
显示 更早的评论
Hallo,
I'm having some weird results using the Simulink and DSpice. The model is not new and I use it and development it for more then a year. To tidy up the model, I made some changes and added some new busses on the model. That results on some very strange effects.
The model has 3 differents inputs interfaces. I use a Mux to craete a data vector for each interface and use a "multiport switch" to select the input to be used. After this "multiport switch" the vector is demuxed and a bus is created with the bus creator. I can't use a swicht to switch directly between the 3 busses, because the signals's name don't go through the switch.
One signal of this bus go through some blocks and embedded matlab functions and ended in the input a Switch with the "Criteria for passing first input: U2~=0". the other two inputs of this swith are direct from this bus. All three inputs are bigger then 0, what means, the output should be equal the third input. But the output is always 0 (also not equal the first one). If I delete this switch and connect the signal directly, the model works normaly.
I had also other strange problem. The outputs of one of the busses I added are always 0, and the inputs are constants different from 0. On the DSpice I see, that this bus ist empty.
I have now idea where is the problem, I suppose it have something with the bussen I added. There are some limitation on the usage of busses? Where should I look for the problem?
Thanks, matheus
0 个评论
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Model Verification 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!