Effacer les filtres
Effacer les filtres

Simulink merge bus failure

22 vues (au cours des 30 derniers jours)
chen
chen le 10 Juil 2023
Modifié(e) : Ben Watson le 12 Juil 2024 à 10:00
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 commentaires
chen
chen le 10 Juil 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 le 12 Juil 2024 à 9:59
Modifié(e) : Ben Watson le 12 Juil 2024 à 10:00
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.

Connectez-vous pour commenter.

Réponse acceptée

Manan Jain
Manan Jain le 10 Juil 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.
  1 commentaire
chen
chen le 11 Juil 2023
Git it ~~

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Composite Interfaces dans Help Center et File Exchange

Produits


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by