필터 지우기
필터 지우기

How to get the values of signals from a bus displayed in app designer?

조회 수: 7 (최근 30일)
Luis Pantin
Luis Pantin 2020년 6월 22일
댓글: Luis Pantin 2020년 7월 7일
Hello all, I am trying to display the names and values of several signals from a bus (in simulink) in an application developed using MATALB app designer.
The signals in my model are connected to the 'Bus assignment block', and I am able to get the signal's names using "get_param('myModel/bus_assignment','InputSignals). I would like to know if there is a parameter in this block that can provide the values of such signals.
Thanks for the help.

답변 (1개)

Aman Vyas
Aman Vyas 2020년 7월 7일
Hi,
You can click on the bus assignment block and this opens a dialog box. You can choose the parameters signals in the bus and get the values of the bus through this dialog box. For more info refer to this.
getparam command can be used when you need to use any value of parameter from the block in the code because without this the value couldn’t be extracted out. For more info on getparam refer to this.
Hope this helps!
  댓글 수: 1
Luis Pantin
Luis Pantin 2020년 7월 7일
Thank you for the response Aman, but my bus assignment block contains hundreds of signals so this method might not be the best. I am trying to replicate something like this but with the bus assignment block:
When you create a constant block in Simulink, you can obtain its value using the command get_param('nameOfModel/nameOfConstantBlock','Value').
In a similar fashion, I can obtain the names of the signals of my bus assignment with the command get_param('nameOfModel/nameOfBusAssig','InputSignals).
I am looking to get the values of those signals in the bus assignment block with a similar command, using the appropiate property, if any (like the InputSignals property to get the names of the signals).
Thanks!

댓글을 달려면 로그인하십시오.

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by