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

11 次查看(过去 30 天)
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

回答(1 个)

hosein Javan
hosein Javan 2020-8-10
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 个评论
LOIC FRADIN
LOIC FRADIN 2020-8-10
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 2020-8-10
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.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Sources 的更多信息

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by