Can a Switch block handle signals of Mux?
조회 수: 8(최근 30일)
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?
Ryan G 2013년 12월 20일
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.