필터 지우기
필터 지우기

How to change an input variable?

조회 수: 2 (최근 30일)
Camba
Camba 2016년 6월 10일
댓글: liu zhe 2016년 6월 11일
I have a block that represents a button (right now it is just a constant block - when it is 1 it is ON and when it is 0 it is OFF. But it will change to something dynamic when my model is complete).
I want to input that button in a stateflow chart and have a state in the stateflow chart that has two substates showing if the button is ON or OFF. Eventually I may have other states in this stateflow chart that automatically turns the system ON, so I would like to update my button input accordingly, but as far as I know there is no way to change an input variable in stateflow, so I would like some suggestions on how to implement this.
  댓글 수: 1
liu zhe
liu zhe 2016년 6월 11일
You could combine two constant blocks with Manual Switch,with one constant block input 1 and other constant block input 0,and you can switch them by switch(double -click the block).The model is just like the picture showing.

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

답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by