필터 지우기
필터 지우기

How to access SM variable in Asynchronous Machine SI Units Block?

조회 수: 25 (최근 30일)
Isabel Collins
Isabel Collins 2024년 6월 19일
댓글: Isabel Collins 2024년 7월 3일 12:14
I am looking inside the saturation subsystem of the mask of the Asynchronous Machine State-space model. This subsystem is inside the asychronous machine state-space model subsystem which is inside the electrical model subsystem. I would love to know the values of SM.Phisat and SM.Lsat that are used in this lookup table. How can I access these values? The "open" button shown on the right is greyed out and I cannot click on it.

답변 (1개)

Divyanshu
Divyanshu 2024년 7월 3일 11:11
Hi Isabel,
You can refer the following code to get the list of all the parameters of a mask of the current block->
m = Simulink.Mask.get(gcb);
listParams = m.Parameters;
%This listParams now contains the list of all parameters specified in the
%mask of the current block of the model
%Now based on the use-case you can utilize this list of parameters.
% For e.g. ->
listParam(1).Name
listParam(1).Value
%This two will give the Name and Value of the first parameter of the Mask.
Hope it helps!
  댓글 수: 1
Isabel Collins
Isabel Collins 2024년 7월 3일 12:14
Hi Divyanshu, thank you so much for this response! Unfortunately, this code only allows me to see the block parameters, which I already know as I input them. Is it possible to modify this code so that it will allow me to see the values of SM.PHisat and SM.Lsat, as shown in the photo? Thanks again.

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by