# Cooling and Heating

• Hi All,

I’m trying to put together some control logic to both cool and heat using a dead band. Currently I’m using a CMP block for cooling, this works really well. Now need to add heating to this. I was think about using two relay blocks but I’m sure there is a better way.

Thoughts?

Cheers

Mike

• Hi Mike,
how about using the PWM block?

If u=-1, then UP will be ON and you can use it for heating. If u=0 then both outputs are off. And if u=-1 then DN will be ON and you can use it for cooling.

The PWM:offtime parameter defines the minimum delay between heating and cooling phases.

Let me know.

Kind regards
Jaroslav

• Hi Jaroslav,

What would work but wouldn't I then have to use a PIDU block (or similar) for the main process control? I don't need the accuracy of a PID controller.

This is my current cooling solution.

I'm guessing keeping it simple now I require heating isn't so easy Other people need use this after myself so I trying to not over complicate it. But if I need to then I will, no problem.

Cheers

Mike

• Hi Mike,
I see. In that case the simplest approach is to use the TSE block (three state element), which moreorless combines two comparators with hysteresis.

Kind regards
Jaroslav

• This post is deleted!