Simulink : Define signal label of output ports = outport names ?

7 views (last 30 days)
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

Answers (1)

hosein Javan
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
LOIC FRADIN
LOIC FRADIN on 10 Aug 2020
Thanks for your quick answer, but I am afraid it doesn't correspond to my problem.
On the scheme below, I am looking for a tip that will define the signal names of Subsystem B automaticaly from the outport names (else, I will have B.signal1 by default in the bus); for Subsystem A I used ground sources + define manually signal names... not efficient...
hosein Javan
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.

Sign in to comment.

Products


Release

R2019a

Community Treasure Hunt

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

Start Hunting!