Why does this bus creator output a multiplexed signal?

19 Ansichten (letzte 30 Tage)
I have a bus creator in my model that is behaving weirdly, or at least I have never seen this before and I have no idea how to fix this (I've tried several things to no avail, first of all replacing the bus creator with a fresh one from the library browser to make sure nobody messed with the properties). I am getting the following error message(s) when trying to run the model:
Simulink cannot unify the dimensions of the multiplexed signal at output port 1 of '[...]/HMI Spec/Bus Creator' to match the input dimension of input port 1 of '[...]/HMI Spec/Out1'. Specifically, Simulink cannot unify {1,1,1,1,1,1,1} to match 1. Consequently, Simulink cannot propagate dimension information from output port 1 of '[...]/HMI Spec/Bus Creator' to input port 1 of '[...]/HMI Spec/Out1'.
Component:Simulink | Category:Modelerror
Error in port widths or dimensions. Invalid dimension has been specified for output port 1 of '[...]/HMI Spec/Bus Creator'.
Component:Simulink | Category:Modelerror
Error in port widths or dimensions. Input port 1 of '[...]/HMI Spec/Out1' is a one dimensional vector with 1 elements.
In the model it looks like this:
2019-03-07_HMI Spec.png
Inside the submodels there's a structure like this (they all look the same):
2019-03-07_InitThCM_Rq.png
As you can see, these are all 1-dimensional signals. They initially come from a dSpace RTICAN-Block, but this has never been a problem before, as they're all just doubles. I have no idea why this single bus creator is acting up like this. Any ideas or input is greatly appreciated!

Akzeptierte Antwort

Yingye Gan
Yingye Gan am 7 Mär. 2019
Hi Kristian,
I am assuming that you are using R2018a release and that the output signal of the dSpace RTICAN-Block is a virtual bus signal. In that case, this type of error occurs by design.
There are a few options you can try that may solve the problem,
Option (1): Create the Bus Object create the CAN_MESSAGE_BUS object in the base workspace by executing the canMessageBusType function, and then convert the virtual bus to a nonvirtual bus before entering the CAN Unppack using a Signal Conversion block.
Option (2): Create a Bus Object for the Bus Creator combining the CAN Msg buses and make this one also nonvirtual.
Option (3): Use Vector Concatenate/Selector instead of Bus Creator/Selector.
Option (4): Try out the model in R2018b or later releases.
Hope you find the reply helpful.
  1 Kommentar
Kristian Krajewski
Kristian Krajewski am 13 Mär. 2019
Hello Yingye,
first of all thank you for your reply.
I have tried updating to 2018b (both Matlab and dSpace), unfortunately this did not fix the issue for me, the same error still occurs.
The solution turned out to be much simpler: Somewhere downstream of this submodel I had a missing bus selector that was causing this error (the bus was effectively routed directly into a saturation block, because previously there was only a single signal instead of this bus). Sorry for the confusion.
Hopefully this helps somebody who experiences the same error in the future. It is a bit confusing that Matlab points to the bus creator instead of the actual cause of the error...

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu General Applications finden Sie in Help Center und File Exchange

Produkte


Version

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by