Tstat10 Heat Pump 2-stage Heat-Cool w/ Reversing Valve & Buffer Tank

Hello,

I have spent the last 2 full days trying to come up with a program to run my Heat Pump by looking at all the examples and can’t quite get to the point that it’s working. There are issues when I switch the system from COOL to HEAT or the opposite and adjust the SETPOINT up or down to trigger heating and cooling, then I get the an output relay cycling quickly, I think until it times out for a minute or so.

1/4 of my time got spent trying to figure out the issues when reading in one example program and then another. It seems the BAUD RATE between the different examples is not consistent and changes when ever a new program is read in. I finally figured out that holding the 2 outside buttons (outward arrows) will get you into a mode to adjust the basic thermostat settings and can adjust the baud rate with one. (The button sequences are not intuitive at all for a US based person)

I almost got the STATUS ICONS working, but think the logic is not there to properly light up the correct one based on if it is COOL or HEAT, they seem backward. Also the 1 fan for stage-1 and 2 fan for stage-2 don’t seem to work.

I am not hearing any relay click with COOL mode and the buffer tank input is at 80 and should be set to 55 in the program and if more than 4 deg F higher than the setpoint, then stage-2 should come on. I may also need to add an additional logic that if more than 10 deg above setpoint, then go straight to stage-2 (if stage-2 is on, then stage-1 should always be on and not sure I captured that requirement)

I would also like to output on the scrolling display the following parameters, but have not found a way to do that.

Also, I was trying to use the DEWPOINT for keeping the buffer tank at 5 deg F above that value and think that using VAR7 = REG746 (Dew Point in ºF) and setting this in the program, that I can then add VAR7 to the minimum BUFF_SETPT, is this correct?

The other thing I would like to do is to turn on the display for 5 minutes when the occupancy sensor is triggered, are there any examples out there for that function? I haven’t found any.
Tstat10_BasicHeatCool 4.prog (65.6 KB)

I’ll post the logic in the next post and attach the current program here.

System Architecture Configuration Summary
The configuration below details Control BASIC code maps to the physical terminals, internal variables, register arrays, and field wiring of the Temco Controls Tstat10 thermostat.

:electric_plug: Physical Terminal Wiring Map
Terminal Block Variable Label Connected Device / Field Hardware Wiring Instructions
IN1 ROOM_TEMP Onboard Space Thermistor Internal connection; no field wiring required.
IN2 BUFF_TEMP Buffer Tank Immersion Sensor Land one leg on IN2, loop opposite leg to nearest GND terminal.
IN3 ZONE1_TEMP Zone 1 Space Thermistor Land one leg on IN3, loop opposite leg to nearest GND terminal.
IN4 ZONE2_TEMP Zone 2 Space Thermistor Land one leg on IN4, loop opposite leg to nearest GND terminal.
IN5 CLG_RAD_TEMP Radiant Ceiling Surface Thermistor Land one leg on IN5, loop opposite leg to nearest GND terminal.
OUT1 (Relay) COMP_Y1 Heat Pump Compressor Stage 1 Wire to Contact or Terminal Y1 on the Heat Pump.
OUT2 (Relay) COMP_Y2 Heat Pump Compressor Stage 2 Wire to Contact or Terminal Y2 on the Heat Pump.
OUT3 (Relay) REV_VALVE_O Reversing Valve Changeover Wire to Terminal O (Energizes for active cooling mode).
OUT4 (Relay) RAD_ZONE1 Hydronic Valve Actuator Zone 1 Wire to 24VAC Radiant Actuator or Manifold Zone 1 Valve loop.
OUT5 (Relay) RAD_ZONE2 Hydronic Valve Actuator Zone 2 Wire to 24VAC Radiant Actuator or Manifold Zone 2 Valve loop.
24V Power Input 24VAC Transformer Hot leg Supplies power to the Tstat10 device core.
24C Power Common 24VAC Transformer Common leg Connects back to system common transformer bus.
GND Sensor Ground Shared NTC Sensor Common Bus Central termination ground path for all thermistor legs.
Note: All thermistors wired to IN2, IN3, IN4, and IN5 must be 10K Ohm Type 2 NTC Thermistors (non-polarized). Ensure they are explicitly designated as 10K Type 2 in the T3000 software input properties window.
Physical Outputs & Operational Descriptions
• OUT1 (COMP_Y1) — Heat Pump Compressor Stage 1
• Description: This physical relay handles the primary stage of your heat pump compressor. In heating mode (VAR3 = 1), it fires if the buffer tank temperature (VAR2) falls below 83°F to replenish stored thermal energy. In cooling mode (VAR3 = 2), it fires if the room temperature breaches its 1.5°F deadband AND the tank rises above 58°F.
• Safety Interlocks: Strictly governed by a 5-minute (300 seconds) anti-short cycle delay (VAR5) at the bottom of the program loop to protect the mechanical compressor scroll from head pressure locks.
• OUT2 (COMP_Y2) — Heat Pump Compressor Stage 2
• Description: This physical relay activates the secondary, high-capacity stage of your compressor. It acts as an auxiliary booster when Stage 1 alone cannot fulfill systemic thermal demands. It is programmed with an automatic 15-minute (900 seconds) runtime delay; if Stage 1 runs continuously for 15 minutes without satisfying the space temperature, or if room conditions drop/rise drastically beyond 3.0°F of target, Stage 2 kicks in to assist.
• Safety Interlocks: This output is structurally interlocked to Stage 1. It can never turn on unless OUT1 is already actively running. It is instantly stripped of power if the buffer tank triggers an absolute safety ceiling (105°F in heating mode).
• OUT3 (REV_VALVE_O) — Reversing Valve Changeover (O-Style)
• Description: This physical relay commands the heat pump’s internal refrigerant flow direction changer. Following the industry standard “O” changeover pattern, this output energizes and holds continuously active for the duration of the cooling season (VAR3 = 2). Uncoupling this output from the room thermostat calls prevents unnecessary valve shifting and eliminates structural noise/wear during local cycling events.
• Safety Interlocks: It drops out instantly if the master system mode (VAR3) is flipped to Heating (1) or manual Emergency Off (0).
• OUT4 (RAD_ZONE1) — Hydronic Radiant Actuator Zone 1
• Description: This physical relay drives the 24VAC thermal or motorized valve actuator governing your first zone of radiant floor/ceiling piping. It automatically opens during heating if Zone 1 space temperature (IN3) drops below 69°F. During cooling, it permits chilled water circulation if the space exceeds 75°F.
• Safety Interlocks: Monitored by a dynamic bottom-layer condensation defense check. If the buffer tank temperature drops within 5°F of the onboard calculated room dew point (REG746), this relay is forced open immediately to prevent structural sweating. It is also locked out if the buffer tank drops below 60°F during heating mode.
• OUT5 (RAD_ZONE2) — Hydronic Radiant Actuator Zone 2
• Description: This physical relay operates completely independently from Zone 1 to drive the 24VAC actuator loop for your second hydronic zone. It monitors its own dedicated space sensor (IN4), opening the circuit when heating or cooling thresholds are crossed relative to the primary setpoint.
• Safety Interlocks: Governed by the exact same strict dew point defense constraints and low-temperature tank limits as Zone 1 to ensure system safety without relying on external dry-contact switches.

:bar_chart: Internal Variable Allocation Matrix
These registers operate entirely behind the scenes to track deadlines, display properties, and trigger the safety loops configured in your logic code.
• VAR1 (MAIN_SETPT): Active Space Temperature Target Setpoint (LCD Line 1 target display value; SET FROM THE THERMOSTAT).
• VAR2 (BUFF_TEMP_DIS): Live Buffer Tank Temperature Tracker (LCD Line 2 real-time display variable; mirrors IN2).
• VAR3 (SYS_MODE): Master Operational State Controller (User or automated register input: 0 = System Off, 1 = System Heat, 2 = System Cool, SET FROM THERMOSTAT).
• VAR4 (DEW_PT_DIS): Conditional Dew Point Readout (LCD Line 3 real-time variable; displays live psychrometric calculated values from REG746 during cooling operations, or blanks out to 0 when heating).
• VAR5 (AS_TIMER): Compressor Anti-Short Cycle Delay Guard (Counts up continuously in seconds whenever Stage 1 stops; forces an un-overrideable lock if it reads < 300 seconds / 5 minutes).
• VAR6 (STG1_TIMER): Stage 1 Continuous Run Accumulator (Tracks operational duration in seconds; steps up compressor engagement to Stage 2 if Stage 1 stays active for longer than 900 seconds / 15 minutes).
• VAR7 = REG746 (ROOM_DEW): Onboard Hardware Psychrometric Register (Pre-calculated value on the Tstat10 board tracking room dew point; continuously monitored by your condensation defense checks).

:television: LCD Screen Display & Status Icon Array (AY1)
The program utilizes the specialized Tstat10 AY1 system array block to update the on-screen physical layout indicator icons every cycle:
┌───────────────────────────────┐
│ [DAY/NIGHT] [OCC/UNOCC] │ ◄── Managed by AY1[0] & AY1[1]
│ [HEAT/COOL] [FAN STAGE] │ ◄── Managed by AY1[2] & AY1[3]
│ ───────────────────────────── │
│ 70.0°F (MAIN_SETPT / VAR1) │ ◄── LCD LINE 1
│ 87.0°F (BUFF_TEMP / VAR2) │ ◄── LCD LINE 2
│ HEAT (HEAT / COOL / VAR3) │ ◄── LCD LINE 3 (Cooling only)
└───────────────────────────────┘

Array Element Parameters Mapping
• AY1[0] → Day / Night Status
• 1: Locked to DAY Icon visible.
• AY1[1] → Occupancy Status
• 1: Display comes on and shows the OCC (Occupied) Icon visible when active.
• AY1[2] → Operating Mode Status
• 0: Displays COOL Icon (Active when VAR3 = 2).
• 1: Displays HEAT Icon (Active when VAR3 = 1).
• 3: Clears Blank Icon from screen (Active when VAR3 = 0 / Off).
• AY1[3] → Compressor Stage / Fan Windup
• 0: Displays FAN-OFF Status (Both compressor stages idle).
• 1: Displays FAN1 Status (Stage 1 compressor OUT1 is active).
• 2: Displays FAN2 Status (Stage 2 compressor OUT2 is active).

Array Parameters
AY1[0] → DAY or NIGHT 0:NIGHT 1:DAY 3: blank ICON
AY1[1] → OCC or UNOCC 0:UNOCC 1:OCC 3: blank ICON
AY1[2] → HEAT or COOL 0:COOL 1:HEAT 3: blank ICON
AY1[3] → FAN 0: FAN-OFF 1: FAN1 2:FAN2 3:FAN3

Program code example to display specific icons based on program state
10 AY1[0] = 1 'DISPLAYS ARRAY ELEMENT “0” FOR CONDITION 1, “DAY”
10 AY1[1] = 3 'DISPLAYS ARRAY ELEMENT “1” FOR CONDITION 3, “blank ICON”
10 AY1[2] = 1 'DISPLAYS ARRAY ELEMENT “0” FOR CONDITION 1, “HEAT”
10 AY1[3] = 2 'DISPLAYS ARRAY ELEMENT “0” FOR CONDITION 1, “FAN2”

Would you like to review the T3000 register configuration values needed to map the physical buttons on the faceplate so they modify VAR3 or change your default setpoints? Alternatively, we can construct an automatic fallback curve using your inputs. Let me know your preference!

OUT3 locks in and hold continuously as long as the system is switched to Cooling Mode (VAR3 = 2), completely eliminating unnecessary cycling of the heat pump’s changeover valve.

10 REM ==============================================================================
20 REM SYSTEM: TSTAT10 ADVANCED HP + 2-STAGE BUFFER TANK & 2-ZONE RADIANT ENGINE
30 REM STRATEGY: CONTINUOUS REVERSING VALVE HOLD (O-STYLE) & LOOP PROTECTION
40 REM ==============================================================================
50 REM — HARDWARE INPUTS MAPPING (FOR REFERENCE) —
60 REM IN1 = SETPTRM ROOM_TEMP (Onboard Space Temperature Thermistor)
70 REM IN2 = BUFTEMP BUFF_TEMP (Buffer Tank Temperature Sensor)
80 REM IN3 = PANTEMP ZONE1_TEMP (10K Type 2 Thermistor measuring Zone 1 Space Temp)
90 REM IN4 = MCHTEMP ZONE2_TEMP (10K Type 2 Thermistor measuring Zone 2 Space Temp)
100 REM IN5 = CLGTEMP CLG_RAD_TEMP (10K Type 2 Thermistor measuring Ceiling Surface/Fluid Temp)
110 REM REG746 = RMDEWPT ROOM_DEW (Onboard Psychrometric Property Register in °F)
120 REM — VARIABLE ALLOCATION MATRIX —
130 REM VAR1 = SETPT MAIN_SETPT (LCD LINE 1: Active Temperature Target Setpoint)
140 REM VAR2 = BFRTEMP BUFF_TEMP_DIS (LCD LINE 2: Live Buffer Tank Temp Parameter)
150 REM VAR3 = SYSMODE SYS_MODE (LCD LINE 3: Master System State: 0=OFF, 1=HEAT, 2=COOL)
160 REM VAR4 = DEWPT DEW_PT_DIS (Conditional Dew Point Line Variable)
170 REM VAR5 = ASTIME AS_TIMER (Anti-Short Cycle Guard Timer in seconds)
180 REM VAR6 = STG1TMR STG1_TIMER (Accumulated continuous runtime for Stage 1 in seconds)
190 REM VAR7 = REG746 ROOM_DEW (Onboard Psychrometric Property Register in °F)
200 REM ------------------------------------------------------------------------------
210 REM SECTION 1: SETPOINT MANAGEMENT & FIXED OCCUPIED CONFIGURATIONS
220 REM ------------------------------------------------------------------------------
230 REM Baseline Occupied Heating Setpoint Target
240 rem IF VAR3 = 1 THEN VAR1 = 70.0
250 REM Baseline Occupied Cooling Setpoint Target
260 rem IF VAR3 = 2 THEN VAR1 = 74.0
270 REM ------------------------------------------------------------------------------
280 REM SECTION 2: CONDITIONAL DEW POINT DISPLAY & SENSOR LOOKUP
290 REM ------------------------------------------------------------------------------
300 VAR2 = IN2
310 IF VAR3 = 2 THEN VAR4 = VAR7 ELSE VAR4 = 0.0
320 REM ------------------------------------------------------------------------------
330 REM SECTION 3: REVERSING VALVE “O” LOGIC (CONTINUOUS SEASONSAL MODE HOLD)
340 REM ------------------------------------------------------------------------------
350 REM Reversing valve holds continuously active for cooling mode, avoiding short-cycles
360 IF VAR3 = 2 THEN START OUT3 ELSE STOP OUT3
370 REM ------------------------------------------------------------------------------
380 REM SECTION 4: 2-STAGE COMPRESSOR STAGING VIA BUFFER TANK LOGIC
390 REM ------------------------------------------------------------------------------
400 REM — ACTIVE COOLING MODE UPSTREAM EVALUATION —
410 IF VAR3 = 2 AND IN1 > ( VAR1 + 1.5 ) AND VAR2 > 58.0 THEN START OUT1
420 IF VAR3 = 2 AND OUT1 = 1 AND ( IN1 > ( VAR1 + 3.0 ) OR VAR6 > 900 ) THEN START OUT2
430 IF VAR3 = 2 AND ( IN1 <= VAR1 OR VAR2 <= 55.0 ) THEN STOP OUT2 , STOP OUT1
440 REM — ACTIVE HEATING MODE UPSTREAM EVALUATION —
450 IF VAR3 = 1 AND IN1 < ( VAR1 - 1.0 ) AND VAR2 < 83.0 THEN START OUT1
460 IF VAR3 = 1 AND OUT1 = 1 AND ( IN1 < ( VAR1 - 3.0 ) OR VAR6 > 900 ) THEN START OUT2
470 IF VAR3 = 1 AND ( IN1 >= VAR1 OR VAR2 >= 87.0 ) THEN STOP OUT2 , STOP OUT1
480 REM ------------------------------------------------------------------------------
490 REM SECTION 5: PHYSICAL 2-ZONE RADIANT ACTUATOR DEMAND CONTROL
500 REM ------------------------------------------------------------------------------
510 REM — ZONE 1 ACTUATOR (OUT4) UPSTREAM CALLS —
520 IF VAR3 = 1 AND IN3 < ( VAR1 - 1.0 ) THEN START OUT4
530 IF VAR3 = 2 AND IN3 > ( VAR1 + 1.0 ) AND VAR2 >= ( VAR7 + 7.0 ) AND VAR2 > 55.0 THEN START OUT4
540 IF IN3 >= VAR1 AND VAR3 = 1 THEN STOP OUT4
550 IF IN3 <= VAR1 AND VAR3 = 2 THEN STOP OUT4
560 REM — ZONE 2 ACTUATOR (OUT5) UPSTREAM CALLS —
570 IF VAR3 = 1 AND IN4 < ( VAR1 - 1.0 ) THEN START OUT5
580 IF VAR3 = 2 AND IN4 > ( VAR1 + 1.0 ) AND VAR2 >= ( VAR7 + 7.0 ) AND VAR2 > 55.0 THEN START OUT5
590 IF IN4 >= VAR1 AND VAR3 = 1 THEN STOP OUT5
600 IF IN4 <= VAR1 AND VAR3 = 2 THEN STOP OUT5
610 REM ------------------------------------------------------------------------------
620 REM SECTION 6: LCD HARDWARE STATUS ICON REFRESH ENGINE
630 REM ------------------------------------------------------------------------------
640 REM Displays DAY icon
650 AY1[0] = 1
660 REM Displays OCC (Occupied) icon
670 IF IN12 = 1 THEN AY1[1] = 1 ELSE AY1[1] = 0
680 REM Line-by-line evaluation sets the final state of the icons sequentially without jumps
690 REM Master off condition blanks the status icon
700 IF VAR3 = 0 THEN AY1[2] = 3
710 REM Active heating mode establishes heat status icon
720 IF VAR3 = 1 THEN AY1[2] = 1
730 REM Active cooling mode establishes cool status icon
740 IF VAR3 = 2 THEN AY1[2] = 0
750 REM Base state: Compressors are entirely off
760 IF OUT1 = 1 THEN AY1[3] = 0
770 REM Evaluated next: Stage 1 active elevates display to FAN1
780 IF OUT1 = 0 THEN AY1[3] = 2
790 REM Evaluated last: Stage 2 active forces display to FAN2
800 IF OUT2 = 1 THEN AY1[3] = 1
810 REM ------------------------------------------------------------------------------
820 REM SECTION 7: CRITICAL LAST-STAGE SYSTEM SAFETY PROTECTION AND INTERLOCKS
830 REM ------------------------------------------------------------------------------
840 REM Accumulate continuous runtime of Stage 1 (in seconds)
850 IF OUT1 = 1 THEN VAR6 = VAR6 + 1 ELSE VAR6 = 0
860 REM Anti-Short Cycle Protection Engine: Increment delay timer when compressor stops
870 IF OUT1 = 0 THEN VAR5 = VAR5 + 1
880 IF OUT1 = 1 THEN VAR5 = 0
890 REM HARDWARE ENFORCEMENT 1: If anti-short cycle is active (< 5 min), block compressor turn-on
900 IF VAR5 < 300 THEN STOP OUT2 , STOP OUT1
910 REM HARDWARE ENFORCEMENT 2: Dynamic Dew Point Condensation Interlock
920 IF VAR3 = 2 AND VAR2 < ( VAR7 + 5.0 ) THEN STOP OUT4 , STOP OUT5
930 REM HARDWARE ENFORCEMENT 3: Dynamic Cold Tank Heating Lockout (Aligned to new 60°F limit)
940 IF VAR2 < 60.0 AND VAR3 = 1 THEN STOP OUT4 , STOP OUT5
950 REM HARDWARE ENFORCEMENT 4: Absolute Buffer Tank High-Limit Safety Cutoff
960 IF VAR2 >= 105.0 AND VAR3 = 1 THEN STOP OUT2 , STOP OUT1
970 REM HARDWARE ENFORCEMENT 5: Master Interlock Shutdown Override
980 IF VAR3 = 0 THEN STOP OUT1 , STOP OUT2 , STOP OUT3 , STOP OUT4 , STOP OUT5

Send on the prog file, I can load it here rather than cutting & pasting, etc.

Couple quick comments:

I see there are a few intems with user names, continue with the rest of them, It’ll be a lot easier to debug with HEATMODE, COOLMODE, DELAY1, FAN1 and so on.

There is a parameter for LCD timeout, check around in the UI for that.

Keypad: Send on your suggestions on the menu buttons, I am the first to admit we can do better. I think the right button as next/enter depending on the state. And the left arrow always as back. I beleive that’s what we have operating in the upcoming Tstat11.

Be sure to update both the firmware and T3000 if you havent already done that.

For run time type accumulators: Configure the var5 with the units of time, not hours, minutes, seconds. Then the program changes from :

870 IF OUT1 = 0 THEN VAR5 = VAR5 + 1
880 IF OUT1 = 1 THEN VAR5 = 0

To this:

870 VAR5 = TIME-ON( OUT1 )

You dont need the 880 line in fact, it will automatically evaulate to zero when the output is off.

Builld a trend log with all your IO and VARS in one log.

Also build a graphic display and add the points, its easier to debug when you can see the big picture.

Not sure if you are using this but any of our devices which have a humidity sensor on board will also have the enthalpy as a PVAR, a private variable which you can use in your programs. Its not documented yet but I beleive the keyword is PVAR( N )