How to move a component in the system composer model hierarchy?
11 views (last 30 days)
Show older comments
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 :)
2 Comments
Josh Kahn
on 25 Jun 2024
Prior to R2024a, the UUID is not preserved during a cut-paste operation within the same model. R2024a and later does now preserve the UUID.
Accepted Answer
Josh Kahn
on 30 Mar 2023
Edited: Josh Kahn
on 30 Mar 2023
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:
- 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.
- 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.
- 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 Comments
Josh Kahn
on 31 Mar 2023
Edited: Josh Kahn
on 31 Mar 2023
I think I have a more elegant solution for you.
- Create a profile with stereotype called "Location" and add two enumeration properties: Building and Enclosure
- Assign the stereotypes to your components and choose enclosures/buildings for them.
- Create a filter view with the filter set to Select All Components
- 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
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:
- 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.
- 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.
- 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 Comments
See Also
Categories
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!