フィルターのクリア

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