필터 지우기
필터 지우기

Obtaining signal units post compilation

조회 수: 1 (최근 30일)
sst
sst 2018년 11월 20일
댓글: sst 2018년 11월 20일
Hello, is it possible to obtain the signal units associated with a port, post compilation? I am trying to find a property similar to CompiledPortDataType, but for units. What would be the correct way to programmatically obtain the units associated with an arbitrary line once the model has been compiled?

채택된 답변

Fangjun Jiang
Fangjun Jiang 2018년 11월 20일
CompiledPortUnits
But according to R2018b document,
Simulink passes units through the following blocks that do not change data, known as noncomputation blocks
Simulink does not propagate units through blocks that produce new data as output.
So it is possible to specify the unit of a root level Inport block as "N", pass it through several levels of sub-system Inport (all specified as inherit) and then check the compiledportunits of the inner Inport block and it will return "N".
You can not expect the CompiledPortUnits of a Product block to be "N*m" by specifying the two inputs of the Product block to be "N" and "m".
  댓글 수: 1
sst
sst 2018년 11월 20일
Thanks, that actually is exactly what I was looking for. Somehow this property didn't show up via tab completion for port handles, but it worked regardless.

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

추가 답변 (0개)

카테고리

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

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by