Simulink merge bus failure

13 visualizaciones (últimos 30 días)
chen
chen el 10 de Jul. de 2023
Editada: Ben Watson el 12 de Jul. de 2024
1, during smilulink model based developing case : there were two bus whcih need merge into one bus , with simulation ,both input of merge block was bus , error was report that the output of merge block was not a bus signal
  2 comentarios
chen
chen el 10 de Jul. de 2023
Picture as show below:
and simulation error : A possible cause of this error is the use of a bus-capable block (such as Merge or Unit Delay) that in this current situation is unable to propagate the bus downstream to the block reported in this error. Please see Simulink documentation for further information on composite (i.e. bus) signals and their proper usage.
Ben Watson
Ben Watson el 12 de Jul. de 2024
Editada: Ben Watson el 12 de Jul. de 2024
Hi,
It would be an issue with the order of signals in the two buses. The order of signals in those buses should be exactly same for the merge block to function properly.

Iniciar sesión para comentar.

Respuesta aceptada

Manan Jain
Manan Jain el 10 de Jul. de 2023
Hi
You can use a bus creator block to merge the two bus signals into one as the bus creator block allows you to combine multiple input signals, either scalar or bus signals, into a single bus output.
Here are some steps that you can follow to use the bus creater block:
  1. Locate the Bus Creator block from the Simulink Library Browser. You can find it under the "Signal Routing" category.
  2. Drag and drop the Bus Creator block into your model at the desired location.
  3. Double-click on the Bus Creator block to open its parameters dialog box.
  4. In the parameters dialog box, click on the "Add Element" button to add bus elements to the output bus.
  5. Specify the names, data types, and dimensions of the bus elements according to your requirements. Repeat this step for each element you want to include in the output bus.
  6. Connect the two bus input signals to the appropriate input ports of the Bus Creator block.
  7. Connect the output port of the Bus Creator block to the downstream blocks in your model.
By following these steps, you have created a Bus Creator block that takes two bus input signals and combines them into a single bus output. The output bus will have elements corresponding to the elements you defined in the Bus Creator block's parameters.
Attaching the image of a sample model, how it will look after merging using bus creator block. I hope this will work for you as well.

Más respuestas (0)

Productos


Versión

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by