Simulink RTW IO handling
조회 수: 4 (최근 30일)
이전 댓글 표시
Hello,
I am building a model in Simulink, with two levels of IO. In the root level I have input pins (right now specified as ports) that are meant to be written to by a model every step. Think of it as the valve position. Under the root level I have different subsystems, and I have constants that I want to be read from a database. Like 'K_Bias'. These will be held somewhere and written in.
In simulation I could fool Simulink into running by writing a m-file, but in this application I want to leave in handles to that my model calling the .exe can fill in the constants and input my signal. When I try to compile, I get the Block Error "error evaluating parameter" saying its an undefined function/variable. How do I work around this error? I was trying to understand placing variables as globally tunable and inline signals...but the documentation is a bit over my head.
Final note, running 2010b, have all the needed licenses/toolboxes.
Thanks in advance, Becky
댓글 수: 6
Kaustubha Govind
2011년 4월 27일
One option for you is to use the Environment Controller block (http://www.mathworks.com/help/toolbox/simulink/slref/environmentcontroller.html). You connect the Constant block to the "Sim" input and the Inport block to the "Coder" input.
답변 (1개)
B. J.
2011년 6월 17일
댓글 수: 1
Kaustubha Govind
2011년 6월 17일
Becky: You could also consider using Model Reference for your main algorithm, and then reference that from two harness models. That way, you have only one copy of your algorithm.
참고 항목
카테고리
Help Center 및 File Exchange에서 Sources에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!