How to move a component in the system composer model hierarchy?

11 vues (au cours des 30 derniers jours)
will
will le 29 Mar 2023
Modifié(e) : Josh Kahn le 31 Mar 2023
Hi everyone,
I'm making a model of the physical architecture of a control system. Controllers are in enclosures and as I work through the model I've realised that I need to move a controller from one enclosure to another. The enclosures and the controllers are all modelled as components, the enclosures are the parents of the controllers.
Unfortuntately I can't find a way to move a controller between enclosures. Is there a way to do this? Please explain how.
Thanks :)
  3 commentaires
Josh Kahn
Josh Kahn le 30 Mar 2023
Modifié(e) : Josh Kahn le 30 Mar 2023
I just checked and the unique ID is not preserved (which may affect allocations or other tools that rely on unique IDs). If this is an issue for you, I would recommend one of the alternative methods suggested in my answer. I also submitted a bug report for this.
will
will le 30 Mar 2023
Hi Josh,
Thanks for that clarification, very important to know. I can understand why the UID wouldn't be maintained if it was a copy and paste, but a cut and paste should maintain the UID, so thanks for filing the bug report.
Cheers :)

Connectez-vous pour commenter.

Réponse acceptée

Josh Kahn
Josh Kahn le 30 Mar 2023
Modifié(e) : Josh Kahn le 30 Mar 2023
Hi @will,
Cut-and-paste is an acceptable way of moving components in System Composer and should preserve ports, interfaces, stereotypes, and requirements links. If you run into any issues, please let us know.
Other alternatives if you plan to move things around throughout your architecture design process:
  1. You could create a separate architecture of the physical space (i.e. buildings, enclosures, etc) and use allocations to allocate your controllers from your logical/physical architecture to your building physical architecture. By separating your two layers of abstraction, you can decouple the architectures.
  2. You could right-click and save your controller as an architecture (reference architecture) and then just use a reference component in the other enclosure instead. If you intend the controller to be modular (and reusable) then this is also a great option.
  3. If the enclosures are inconsequential to the actual design and purely for visual clarity, you can represent them as groups in a view of the architecture instead. Then you can move components to different groups by deleting and readding them to the view without affecting the actual functionality or connectivity of your architecture model.
Regards,
Josh
  2 commentaires
will
will le 30 Mar 2023
Thank you for the additional suggestions.
  1. As we previously discussed on another question, I need to be able to see enclosures and controllers in the same model, so if I can work out a way to do that and model the buildings and enclosures separately then this might work, but without that then unfortunately not.
  2. That could work, however at this stage I'm still thrashing around and don't have things that are ready to be modular unfortunately
  3. The enclosures aren't completely inconsequential, as I ultimately want to be able to pproduce reports of the contents of enclosures which lead to costed manufacturing bills of materials. If I can do this with groups then that could work too.
Thanks for all the options.
Cheers :)
Josh Kahn
Josh Kahn le 31 Mar 2023
Modifié(e) : Josh Kahn le 31 Mar 2023
I think I have a more elegant solution for you.
  1. Create a profile with stereotype called "Location" and add two enumeration properties: Building and Enclosure
  2. Assign the stereotypes to your components and choose enclosures/buildings for them.
  3. Create a filter view with the filter set to Select All Components
  4. Switch to the Grouping tab and group by Building first and Enclosure second.
You will now have a dynamic view that will reflect the physical locations based on your stereotype properties.
To move something, then you just have to change the property value.
This will also give you something to filter on when you want to create reports.
Please don't hesitate to reach out to application engineering through your sales or technical account managers, we would love to hear more feedback from you and learn more details about your use case!
Regards,
Josh

Connectez-vous pour commenter.

Plus de réponses (1)

Jack
Jack le 29 Mar 2023
Cutting and pasting a component in the Simulink model hierarchy will move the component to the new location while preserving all the connections to it. However, there are a few things to keep in mind when using this method:
  1. If there are any signals connected to the controller that is being moved, the signal connections will be lost and need to be reconnected manually.
  2. If the controller has any custom block parameters or mask settings, they may need to be updated after moving the controller to a new enclosure.
  3. If the controller is referenced in any subsystems or model references, it may need to be updated there as well.
Overall, cutting and pasting a component can be a quick and easy way to move it to a new location in the model hierarchy, but it's important to double-check and update any connections, parameters, and references as needed after the move.
  2 commentaires
Josh Kahn
Josh Kahn le 30 Mar 2023
Hey @Jack,
Thank you for the quick answer! Just to note, the original question is in regard to System Composer, not Simulink.
Josh
will
will le 30 Mar 2023
Thanks @Jack, even if it's for broader Simulink and not System Composer it's still useful to know.

Connectez-vous pour commenter.

Catégories

En savoir plus sur System Composer dans Help Center et File Exchange

Produits


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by