Method of cycling a compressor on and off


mkelly

Recommended Posts

I have a compressor that chills some refrigerant. I want it to fluctuate around the setpoint.

So say my setpoint is -10C. I'll set my offset to 2.5C

This means that when the temperature of my coolant is above -7.5C the compressor will kick on and stay on until it's at -12.5C

I don't want the compressor to turn back on again until the coolant is above -7.5 again.

I thought I could do this with two If statements nested together but it's not working properly.

//initilize relay to 0
Chiller = 0
Chiller_Offset = 2.5

//if/then to open valve for 1/2 second if liquid dP is too low

if(Mean(Coolant_In[0,3])>(V.Coolant_Setpoint + Chiller_Offset))
   Chiller = 5

if(Mean(Coolant_In[0,3])<(V.Coolant_Setpoint - Chiller_Offset))
   Chiller = 0

   Endif
Endif

Advice on this will be greatly appreciated

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.