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

8 views (last 30 days)
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 :)
will on 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 :)

Sign in to comment.

Accepted Answer

Josh Kahn
Josh Kahn on 30 Mar 2023
Edited: Josh Kahn on 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.
Josh Kahn
Josh Kahn on 31 Mar 2023
Edited: Josh Kahn on 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!

Sign in to comment.

More Answers (1)

Jack on 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.
will on 30 Mar 2023
Thanks @Jack, even if it's for broader Simulink and not System Composer it's still useful to know.

Sign in to comment.


Find more on System Composer in Help Center and File Exchange




Community Treasure Hunt

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

Start Hunting!