Hot to get Signal path and block port number from Simulink model

조회 수: 4 (최근 30일)
TeraWatt
TeraWatt 2023년 8월 24일
답변: Fangjun Jiang 2023년 8월 25일
How can I get a signal path and Block port number from a Simulink model porgrammatically using only a SIGNAL NAME?.
is it posible to search for a signal name within my Simulink model and get the path/route of the block where it is connected including the block port number?
this is a block within my model:
I want to get : PATH = sldemo_suspn_3dof/Body Dynamics
and PORT NUMBER =1
using SINAL NAME : " Body_out1"

답변 (1개)

Fangjun Jiang
Fangjun Jiang 2023년 8월 25일
open_system('f14');
lines=find_system('f14','FindALl','On','type','line','name','w');
get(lines(1),'SourcePort')

카테고리

Help CenterFile Exchange에서 Modeling에 대해 자세히 알아보기

태그

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by