필터 지우기
필터 지우기

Setting parameters of a certain block

조회 수: 3 (최근 30일)
Vinol Joy D'souza
Vinol Joy D'souza 2011년 8월 8일
In my model ...i have a constant block feeding a summer ...i want the same value given in the constant block to be used as the switch on and switch off point value in a relay block...
How can i do it???

채택된 답변

Desiree
Desiree 2011년 8월 8일
If you wanna change this offline you can use get_param and set_param commands to attain the value from the Constant block and set it for the Relay block. If you would like this to also update during simulation you would need to create a MATLAB S-Function for that. You can find an example for this here:

추가 답변 (1개)

Fangjun Jiang
Fangjun Jiang 2011년 8월 8일
Is this what you want?
Define a variable in workspace, MyConstant=1, use this "MyConstant" for your Constant block and Relay block.
  댓글 수: 1
Vinol Joy D'souza
Vinol Joy D'souza 2011년 8월 8일
even your solution is feasible
Thank you,,:)

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by