필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Input case triggered (I/O) output delay

조회 수: 1 (최근 30일)
Gareth Evans
Gareth Evans 2014년 5월 16일
마감: MATLAB Answer Bot 2021년 8월 20일
Hello,
Im looking into creating an on/off signal (IO) based controller for heating water monitoring a temperature of a dynamic input 't'. When 't' falls below the value of 25 i would like the controller to output a value of 1 (Output = B) for 1600 seconds of the simulation before resetting to 0 (The controller output would raise the value of 't' above 25). The controller would then monitor (t) until the value falls below 25 and the process would repeat.
I have attempted this with a simulink function but cant get it to work.
where:
control (i/o) output = [B] t = temp;
Simulation time (from simulink clock) = time
Function [B]=logic(temp,time)
B=0;
checkit=0;
if temp<=26 && checkit==0
temp_time=time;
checkit=1;
B=1;
end
if B==1 && temptime-time >=1600;
B=0;
checkit=0;
end
%
Is my logic correct? And secondly is there a standard simulink block that can do this?
with thanks.

답변 (0개)

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by