Simulink : Define signal label of output ports = outport names ?
11 views (last 30 days)
Show older comments
Hello,
Context : I am using simulink to build a complexe system architecture, with a lot of subsystems, each with 10~20 I/O; for the moment empty box, only names given to I/O (no type : will be defined later). I'm using bus creator / bus selector to structure data model and propagate produced signals to all consumers.
Question : to define signal names, I used to make "ground" inside each subsystem, connected to each output port, and then copy-past the outport name on the "line" connecting the ground bloc to the output port. But it takes time and it is not a high-value task. Is there a way to automaticaly affect an outport name to the corresponding signal name, for all output port of a subsystem ?
Thanks
0 Comments
Answers (1)
hosein Javan
on 10 Aug 2020
just use "goto" and "from" blocks and then connect them to a bus creator. double click the line connecting "from" block to "bus creator" to define its label. then you can combine all outputs to one signal.
2 Comments
hosein Javan
on 10 Aug 2020
as far as I know "outport" and "inport" block names are used only to define subsystem labels. If you are managing to use bus creator, the only way is to define each line label manually.
if your outports are too many to handle, why not having them saved to workspace and then write an .m file to define the signal names? this way is very efficient and time-saving. many simulink users use m files together with simulink .slx files.
See Also
Categories
Find more on Subsystems 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!