stateflow 내에 생성한 simulink function의 경우 코드 생성

조회 수: 8 (최근 30일)
영진
영진 2024년 10월 8일
댓글: 영진 2024년 10월 10일
stateflow 내에 생성한 simulink function의 경우 코드 생성할때
automic으로 모델 생성하고 함수를 따로 빼서 코드 생성할수는 없을까요?
void untitled_step(void)
{
/* Chart: '<Root>/Chart' incorporates:
* SubSystem: '<S1>/add'
*/
/* Sum: '<S2>/Add' incorporates:
* Inport: '<Root>/Input'
* Inport: '<Root>/Input1'
*/
if (untitled_U.Input + untitled_U.Input1 > 10.0) {
/* Outport: '<Root>/Out1' */
untitled_Y.Out1 = 10.0;
} else {
/* Outport: '<Root>/Out1' */
untitled_Y.Out1 = 0.0;
}
/* End of Sum: '<S2>/Add' */
}

채택된 답변

Angelo Yeo
Angelo Yeo 2024년 10월 8일
Simulink function block 우클릭 -> 속성 -> 코드 생성 -> 함수 패키징을 재사용 가능 함수로 변경해보시기 바랍니다.
  댓글 수: 1
영진
영진 2024년 10월 10일
답변 너무 감사드립니다.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Deployment, Integration, and Supported Hardware에 대해 자세히 알아보기

제품


릴리스

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by