S function Output port ConstBlockIO to BlockIO

조회 수: 5 (최근 30일)
Anand Rangaramu
Anand Rangaramu 2013년 6월 6일
Team,
I have an s function with 3 inputs and 2 outputs.
When all the 3 inputs are fed with constant inputs the output data type assumes constant and declares as a part of ConstBlockIO in rtw code generation. This is undesired behavior for me as I have to modify the output.
How to make the outputs as a part of BlockIO instead of ConstBlockIO ?
Thanks
  댓글 수: 1
Kaustubha Govind
Kaustubha Govind 2013년 6월 6일
Are you using the Constant block to create the inputs? Does it do what you need if you changed the Sample Time of the Constant block to something like 0.1 (or whatever the base rate of your model is)?

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

채택된 답변

Anand Rangaramu
Anand Rangaramu 2013년 6월 6일
Kaustubha's suggestion is perfect solution
I changed the Constant Block sample time from Inf to -1. Problem solved.
Thanks a lot Kaustubha

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by