필터 지우기
필터 지우기

Simulink - global bool variable

조회 수: 2 (최근 30일)
Robin Beene
Robin Beene 2013년 4월 3일
I manually turn off and turn on something(2 constant blocks and 1 switch), but my problem is when I am inside some subsystem(subblock), because I need to check whether it was "on(1)" or "off(0)".
So is there any way to store a value in this case 1 when it's "on" and 0 when it's "off", and to be able in my subblocks to check that variable.
Kinda something like global variable in some programming languages
  댓글 수: 1
Kaustubha Govind
Kaustubha Govind 2013년 4월 3일
Why not just use a boolean signal, where that notion is inherent, true indicates 'on' and false indicates 'off'?

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

답변 (0개)

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by