Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

Input case triggered (I/O) output delay

1 vue (au cours des 30 derniers jours)
Gareth Evans
Gareth Evans le 16 Mai 2014
Clôturé : MATLAB Answer Bot le 20 Août 2021
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.

Réponses (0)

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by