Info
此问题已关闭。 请重新打开它进行编辑或回答。
Input case triggered (I/O) output delay
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!