Some help
Here's some ladder logic to get you started (I'm feeling generous today).
FIRST, DETERMINE WHICH PART OF THE CYCLE THE SYSTEM IS IN.
IF THE TEMP IS BELOW X-5, THEN RUN THE LOW CYCLE.
LOW_CYCLE
---| TEMP < (X - 5) |----------------( )
IF THE TEMP IS ABOVE X+5, THEN RUN THE HIGH CYCLE.
ONCE THE HIGH CYCLE IS REACHED, IT STAYED REACHED UNTIL THE TEMP DROPS DOWN TO X
HIGH_CYCLE
---| TEMP > (X - 5) |-----------+----( )
|
HIGH_CYCLE |
------| |-------| TEMP > X |----+
IF NEITHER HIGH NOR LOW, IT MUST BE NORMAL.
LOW_CYCLE HIGH_CYCLE NORMAL_CYCLE
------|/|-----------|/|---------------------( )
GET THE DUTY CYCLE FOR THE LOW CONDITION
LOW_ON_TMR +------- TMR ----+
------|/|------------| LOW_OFF_TIMER |
| 40 SEC |
+----------------+
LOW_OFF_TMR +------- TMR ----+
------| |------------| LOW_ON_TIMER |
| 20 SEC |
+----------------+
GET THE DUTY CYCLE FOR THE NORMAL CONDITION
NORM_ON_TMR +------- TMR ----+
------|/|------------| NORM_OFF_TIMER |
| 50 SEC |
+----------------+
NORM_OFF_TMR +------- TMR ----+
------| |------------| NORM_ON_TIMER |
| 10 SEC |
+----------------+
NOW THAT WE HAVE ALL THE BITS THAT WE NEED, WE CAN FINALLY DRIVE THE OUTPUT
LOW_CYCLE LOW_???_TIMER OUTPUT
-------| |------------|?|----------------------+--------( )
|
NORMAL_CYCLE NORM_???_TIMER HIGH_CYCLE |
-------| |------------|?|-----------|/|--------+
I've left a few things for you to figure out (I'm not THAT generous).
First is, you'll have to translate some of the instructions into a DL-06 language. I don't beleive you are allowed to do a comparison with a calculation in the middle of a rung. I also used tags intead of memory addresses.
Second, you'll need to watch the logic (or build a timing diagram) to determine which of the timer bits (_ON_ or _OFF_), and which state (
-| |- or
-|/|-) will give you an ON signal for the time interval you need, and substitute that for the ??? that I have. Understanding that will teach you much about how timers, and PLCs, think.
Mike's questions are worth noting. The above ladder will use the NORMAL timing when the temperature is climbing above X, but the HIGH cycle (i.e, OFF) when coming down from X+5. Between X and X-5 it will just use NORMAL. If that's not what you want, you have enough clues to figure out how to modify a rung to make what you want happen.
Other things to think about:
What should happen if the temperature changes in the middle of a duty cycle? For example, it had been running in the LOW cycle for 15 sec when the TEMP went above X. Should the output continue ON for the next 5 seconds, or should it switch to NORMAL, and thereby be off for the next 50 seconds.
How should this system be started and stopped? As it is now, it will always be active as long as the PLC is active. Is this desirable? How will you do maintenance on the output?
Is X going to be a constant, or a variable? Entered on an HMI, or just in the PLC memory? Should there be range checking?
If you need anything more, just ask.