Get port name along with number

11 vues (au cours des 30 derniers jours)
Hariom Singh
Hariom Singh le 19 Sep 2018
Commenté : Hariom Singh le 19 Sep 2018
0 down vote favorite I am using the below script which lets me find all output port name
simBlockH = get_param('LaneA_ICD_Fccroot', 'Handle'); handles = find_system(simBlockH, 'LookUnderMasks', 'on', 'FollowLinks', 'on', 'SearchDepth', 1, 'BlockType', 'Inport'); portNames = cellstr(get_param(handles, 'Name')) Output portNames =
144×1 cell array
{'g_ECU_1_1_1_Activation' }
{'g_ECU_1_1_2_Activation' }
{'g_ECU_1_1_3_Activation' }
{'g_SCU_1_1_Activation' }
{'g_SRV_1_1_Activation' }
What changes should I do to also get the port number.

Réponse acceptée

Christopher Wallace
Christopher Wallace le 19 Sep 2018
simBlockH = get_param('LaneA_ICD_Fccroot', 'Handle')
handles = find_system(simBlockH, 'LookUnderMasks', 'on', 'FollowLinks', 'on', 'SearchDepth', 1, 'BlockType', 'Inport');
portInfo = [get_param(handles, 'Name'), get_param(handles, 'Port')]
  1 commentaire
Hariom Singh
Hariom Singh le 19 Sep 2018
Thank you

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Programmatic Model Editing dans Help Center et File Exchange

Produits


Version

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by