Results 1 to 24 of 24

Thread: Dual heater program issue

  1. #1
    Regular Vistor
    Join Date
    Dec 2016
    Location
    California
    Posts
    26

    Dual heater program issue

    I have two 200w heaters. I had been running them individually with each one programmed to alternate every 4 hours. This worked great until we left for a couple days and the house was left unheated for a couple days and the heaters running individually could not keep up with the demand. I'm now trying to have them both turn on when 0.2 degrees below RT then have one turn off at 0.0 and the ther turn off at 0.2 degrees above RT. Heres my programming:

    Heater 1
    Fallback OFF
    Set OFF
    If Tmp < RT+-0.2 Then ON
    If Tmp > RT+0.2 Then OFF
    Min Time 002:00 Then OFF

    Heater 2
    Fallback OFF
    Set OFF
    If Tmp < RT+-0.2 Then ON
    If Tmp > RT+0.0 Then OFF
    Min Time 002:00 Then OFF

    My problem is that both are turning on and off together.

    Also, are there any safeguards that I should be thinking about incorporating?

  2. #2
    Frequent Contributor iamchadster's Avatar
    Join Date
    Aug 2013
    Location
    Wilsonville, Oregon
    Posts
    2,639
    The "Set Off" is the problem. If you remove it from both of the outlets the programming should work. As far as safeguard go, having 2 individual temp probes with a trigger/email set to alert you if the tank parameters go above or below your chosen safe temp range.
    Chad

  3. #3
    Regular Vistor
    Join Date
    Dec 2016
    Location
    California
    Posts
    26
    Hmm. Ok, I removed the "set off" from each and included "if tmp > 80.0 then off" to make sure I didn't cook my fish over night. Now only heater 1 is turning on.

  4. #4
    Frequent Visitor
    Join Date
    Dec 2013
    Location
    Canada
    Posts
    76
    Quote Originally Posted by Flagg37 View Post
    I have two 200w heaters. I had been running them individually with each one programmed to alternate every 4 hours. This worked great until we left for a couple days and the house was left unheated for a couple days and the heaters running individually could not keep up with the demand. I'm now trying to have them both turn on when 0.2 degrees below RT then have one turn off at 0.0 and the ther turn off at 0.2 degrees above RT. Heres my programming:

    Heater 1
    Fallback OFF
    Set OFF
    If Tmp < RT+-0.2 Then ON
    If Tmp > RT+0.2 Then OFF
    Min Time 002:00 Then OFF

    Heater 2
    Fallback OFF
    Set OFF
    If Tmp < RT+-0.2 Then ON
    If Tmp > RT+0.0 Then OFF
    Min Time 002:00 Then OFF

    My problem is that both are turning on and off together.

    Also, are there any safeguards that I should be thinking about incorporating?
    I'm not sure if this is supposed to be like this or not but you have

    If Tmp < RT+-0.2 Then ON

    To me that says if the temp is above or below by 0.2 Then turn on...should it not be

    If Tmp < RT-0.2 Then ON

    Sent from my SM-G935W8 using Tapatalk

  5. #5
    Regular Vistor
    Join Date
    Dec 2016
    Location
    California
    Posts
    26
    I tried that first but it gives an error message. It looks like you always need the + after the RT.

  6. #6
    Master Control Freak RussM's Avatar
    Join Date
    Dec 2012
    Location
    California - US Pacific
    Posts
    22,464
    Quote Originally Posted by Flagg37 View Post
    It looks like you always need the + after the RT.
    Yes, that is right.
    Please do not send me PMs with technical questions or requesting assistance - use the forums for Apex help. PM me ONLY if the matter is of a private or personal nature. Thanks.

  7. #7
    Regular Vistor
    Join Date
    Dec 2016
    Location
    California
    Posts
    26
    Does anyone know why my programming is only turning on heater 1?

  8. #8
    NSI Member
    Join Date
    Jan 2013
    Location
    MN
    Posts
    2,552
    Your code is shutting it off. To make it simpler to evaluate lets call the current RT=80. First you say to turn on heat2 if the temp is < 80.2, then you say to turn it off if temp > 80. Heater 2 would only be able to come on if the temp was below 80 in this example.


    Here's the way I handle 2 heaters so that only one runs at a time and the other kicks in in case it can't keeps up. I also alternate which heater is primary ever 12 hours so they both get some use. Used to just have one as a backup, but thought this was better since the old way I never would know until it was needed if the 2nd heater had failed. This way both heaters run each day and back each other up.
    Comments in () are not actually in code.


    Heater 1
    Fallback OFF (don't want heater running if not controled)
    If Temp < RT+1.9 Then ON (sets my heater on, set like this so the tank does not vary as much as the full RT range. Limit to 77-80.5)
    If Temp > RT+2.1 Then OFF (allow a 0.2 degree temp swing so the heater doesn't turn off and on as much)
    If Temp > 80.4 Then OFF (cap the top of my RT range)
    If Time 00:00 to 11:59 Then OFF (shut off the heater if it is not its turn)
    If Temp < RT+1.7 Then ON (turn on heater if the other one is not keeping up)
    If Temp < 70.0 Then OFF (tank should never get this low so shut off the heater the probe failed. Also alarm on this)

    Heater 2
    Fallback OFF
    If Temp < RT+1.9 Then ON
    If Temp > RT+2.1 Then OFF
    If Temp > 80.4 Then OFF
    If Time 12:00 to 23:59 Then OFF
    If Temp < RT+1.7 Then ON
    If Temp < 70.0 Then OFF

  9. #9
    Regular Vistor
    Join Date
    Dec 2016
    Location
    California
    Posts
    26
    Quote Originally Posted by nicholb View Post
    Your code is shutting it off. To make it simpler to evaluate lets call the current RT=80. First you say to turn on heat2 if the temp is < 80.2, then you say to turn it off if temp > 80. Heater 2 would only be able to come on if the temp was below 80 in this example.


    Here's the way I handle 2 heaters so that only one runs at a time and the other kicks in in case it can't keeps up. I also alternate which heater is primary ever 12 hours so they both get some use. Used to just have one as a backup, but thought this was better since the old way I never would know until it was needed if the 2nd heater had failed. This way both heaters run each day and back each other up.
    Comments in () are not actually in code.


    Heater 1
    Fallback OFF (don't want heater running if not controled)
    If Temp < RT+1.9 Then ON (sets my heater on, set like this so the tank does not vary as much as the full RT range. Limit to 77-80.5)
    If Temp > RT+2.1 Then OFF (allow a 0.2 degree temp swing so the heater doesn't turn off and on as much)
    If Temp > 80.4 Then OFF (cap the top of my RT range)
    If Time 00:00 to 11:59 Then OFF (shut off the heater if it is not its turn)
    If Temp < RT+1.7 Then ON (turn on heater if the other one is not keeping up)
    If Temp < 70.0 Then OFF (tank should never get this low so shut off the heater the probe failed. Also alarm on this)

    Heater 2
    Fallback OFF
    If Temp < RT+1.9 Then ON
    If Temp > RT+2.1 Then OFF
    If Temp > 80.4 Then OFF
    If Time 12:00 to 23:59 Then OFF
    If Temp < RT+1.7 Then ON
    If Temp < 70.0 Then OFF
    I like this but I've got a couple comments. First, maybe I've got the syntax wrong but I'm trying to turn both heaters on at .2 degrees below RT (if tmp < RT+-0.2 then on) and then turn one off at RT and then one to continue until it reaches .2 degrees above RT (if tmp > RT+0.2 then off). That way I'll make sure the tank stays at least between -.2 and 0.0. If it's super cold and my single heater never gets it to +.2 then it will just stay on until the tank gets down to -.2 again when the other heater would kick on again.

    Second, if I'm understanding the way that the programming runs top down, if your temp gets below 1.7 and the second one kicks on how does it turn off? Your if > 80.4 then off statement is above. The only code after that would turn it off is if the temp dropped to below 70.

  10. #10
    NSI Member
    Join Date
    Jan 2013
    Location
    MN
    Posts
    2,552
    Each run-through the program will evaluate the temp. So the backup turns on at rt+1.7. The program will run again and that heater will stay on until the temp>rt+2.1 turns it off. You have to remember that the entire program is run each time the outlet is evaluated. The outlet's state will be determined each time it is run by going through the entire program top to bottom, the last state wins.

  11. #11
    Regular Vistor
    Join Date
    Dec 2016
    Location
    California
    Posts
    26
    Quote Originally Posted by nicholb View Post
    Each run-through the program will evaluate the temp. So the backup turns on at rt+1.7. The program will run again and that heater will stay on until the temp>rt+2.1 turns it off. You have to remember that the entire program is run each time the outlet is evaluated. The outlet's state will be determined each time it is run by going through the entire program top to bottom, the last state wins.
    Ahh, got it. That makes sense now.

  12. #12
    Regular Vistor
    Join Date
    Nov 2013
    Location
    Lexington KY
    Posts
    40
    BOTH HEATERS NOT SHUTTING OFF

    I have been using the code by nichold for about 7 months and it has really worked great. My tank is still in the build process and without livestock. Last weekend I decided to rewire the tank completely. I ran without heaters for a week. Today I finished the job and started the APEX back. My heaters will not turn off if set to Auto! My temp has now climbed to 81.5. Per the season chart the RT Temp should be 80.3 today.

    [Heater 1]
    Fallback OFF
    If Power Apex Off 001 Then OFF
    If Tmp < RT+1.9 Then ON
    If Tmp > RT+2.1 Then OFF
    If Tmp > 80.4 Then OFF
    If Time 00:00 to 11:59 Then OFF
    If Tmp < RT+1.7 Then ON
    If Tmp < 68.0 Then OFF

    [Heater 2]
    Fallback OFF
    If Power Apex Off 001 Then OFF
    If Tmp < RT+1.9 Then ON
    If Tmp > RT+2.1 Then OFF
    If Tmp > 80.4 Then OFF
    If Time 12:00 to 23:59 Then OFF
    If Tmp < RT+1.7 Then ON
    If Tmp < 68.0 Then OFF

  13. #13
    Master Control Freak RussM's Avatar
    Join Date
    Dec 2012
    Location
    California - US Pacific
    Posts
    22,464
    Quote Originally Posted by bkpky View Post
    My temp has now climbed to 81.5. Per the season chart the RT Temp should be 80.3 today.

    [Heater 1]
    Fallback OFF
    If Power Apex Off 001 Then OFF
    If Tmp < RT+1.9 Then ON
    If Tmp > RT+2.1 Then OFF
    If Tmp > 80.4 Then OFF
    If Time 00:00 to 11:59 Then OFF
    If Tmp < RT+1.7 Then ON
    If Tmp < 68.0 Then OFF

    [Heater 2]
    Fallback OFF
    If Power Apex Off 001 Then OFF
    If Tmp < RT+1.9 Then ON
    If Tmp > RT+2.1 Then OFF
    If Tmp > 80.4 Then OFF
    If Time 12:00 to 23:59 Then OFF
    If Tmp < RT+1.7 Then ON
    If Tmp < 68.0 Then OFF
    The boldfaced lines are why the heater is ON. With the RT for today per your season table being 80.3, the heater will not shut off until the tank temp exceeds 82.0; 80.3 + 1.7 = 82.0

    The statement order is not right, because it allows what you are experiencing to happen. The If Tmp > 80.4 Then OFF statements are in the wrong position within the overall programs to do what was described in the post you followed.
    If Temp > 80.4 Then OFF (cap the top of my RT range)
    In order for that cap to actually work, that line should be after the If Tmp < RT+1.7 Then ON lines:

    Fallback OFF
    If Tmp < RT+1.9 Then ON
    If Tmp > RT+2.1 Then OFF
    If Time 00:00 to 11:59 Then OFF
    If Tmp < RT+1.7 Then ON
    If Tmp > 80.4 Then OFF
    If Tmp < 68.0 Then OFF


    Fallback OFF
    If Tmp < RT+1.9 Then ON
    If Tmp > RT+2.1 Then OFF
    If Time 12:00 to 23:59 Then OFF
    If Tmp < RT+1.7 Then ON
    If Tmp > 80.4 Then OFF
    If Tmp < 68.0 Then OFF

    Also, the The If Power Apex Off 001 Then OFF statement does absolutely nothing in its current position. I have omitted that line from the modified programs. If your system is equipped with a UPS providing backup power to that EnergyBar and you have a 12v power adapter connected to the Apex base and have Power Monitor enabled, then there is value in that statement but to get that value, it must go at the end of the programs, not at the beginning. If you do not have a UPS and the other conditions I described, simply leave that If Power lines out.
    Please do not send me PMs with technical questions or requesting assistance - use the forums for Apex help. PM me ONLY if the matter is of a private or personal nature. Thanks.

  14. #14
    Regular Vistor
    Join Date
    Nov 2013
    Location
    Lexington KY
    Posts
    40
    It did shut off at 82! I will make changes as you describe. Not sure I understand the order but will read up more on that logic part. Thanks so much for your help!


    Sent from my iPhone using Tapatalk

  15. #15
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    Also even with the changes Russ proposed, I doubt that code will do what you want exactly. I am assuming you want different temp ranges during the day than the night but similar hysteresis. If that is the case you need to use virtual outlets.

    You might be an engineer if...You have no life and can prove it mathematically.

  16. #16
    Master Control Freak RussM's Avatar
    Join Date
    Dec 2012
    Location
    California - US Pacific
    Posts
    22,464
    Quote Originally Posted by zombie View Post
    I am assuming you want different temp ranges during the day than the night but similar hysteresis.
    No, he's using two heaters and has one programmed to only to be allowed during one 12-hour period of the day and the other heater be allowed only during the other 12-hour period, in an attempt to give them roughly equal usage. The part that was not working correctly was the part where both heaters are permitted to come on if the temp gets too low.
    Please do not send me PMs with technical questions or requesting assistance - use the forums for Apex help. PM me ONLY if the matter is of a private or personal nature. Thanks.

  17. #17
    NSI Member
    Join Date
    Jan 2013
    Location
    MN
    Posts
    2,552
    I have made a few changes since originally posting my dual heater program. First off I went ahead an edited the seasonal table so it ranges from 76-80.5. That is much easier than trying to add values to the RT statements and set cut offs. The way I was doing it before lead to some rapid heater cycling. So here's my current. The program is designed to use each heater for 12 hours and have the unused heater act as backup. I also have a virtual outlet to watch for an error condition of both heaters on for too long (indicating a bad heater). Comments in [] are not actually in the program.

    Heater 1

    Fallback OFF
    If Temp < RT+-0.1 Then ON [turn on the heat if more than 0.1 below RT]
    If Temp > RT+0.1 Then OFF [turn off the heat if more than 0.1 above RT]
    If Time 00:00 to 11:59 Then OFF [turn off the heat if it is not your turn to be running]
    If Temp < RT+-0.3 Then ON [turn on the heat anyway if it is more than 0.3 below RT as the other heater is not keeping up]
    If Temp > 81.0 Then OFF [fail safe shut off heat if temp is above 81]
    If Temp < 70.0 Then OFF [fail safe, if the temp ever reads this low, the temp probe must be bad]

    Heater 2

    Fallback OFF
    If Temp < RT+-0.1 Then ON
    If Temp > RT+0.1 Then OFF
    If Time 12:00 to 23:59 Then OFF
    If Temp < RT+-0.3 Then ON
    If Temp > 81.0 Then OFF
    If Temp < 70.0 Then OFF

    Heat-Err [this will only read as on if both heaters are set to on]

    Set OFF
    If Output Heat1 = ON Then ON [turn on the error if heater 1 is running]
    If Output Heat2 = OFF Then OFF [turn back off if heat 2 is not running]
    Defer 010:00 Then ON [wait 10 minutes before alerting so i don't get an alarm for occasional times when backup heat is needed]

    And finally in my alarm programming I have these heat related statements.

    If Temp > 82.0 Then ON
    If Temp < 75.0 Then ON
    If Output Heat-Err = ON Then ON

  18. #18
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    Quote Originally Posted by nicholb View Post
    I have made a few changes since originally posting my dual heater program. First off I went ahead an edited the seasonal table so it ranges from 76-80.5. That is much easier than trying to add values to the RT statements and set cut offs. The way I was doing it before lead to some rapid heater cycling. So here's my current. The program is designed to use each heater for 12 hours and have the unused heater act as backup. I also have a virtual outlet to watch for an error condition of both heaters on for too long (indicating a bad heater). Comments in [] are not actually in the program.

    Heater 1

    Fallback OFF
    If Temp < RT+-0.1 Then ON [turn on the heat if more than 0.1 below RT]
    If Temp > RT+0.1 Then OFF [turn off the heat if more than 0.1 above RT]
    If Time 00:00 to 11:59 Then OFF [turn off the heat if it is not your turn to be running]
    If Temp < RT+-0.3 Then ON [turn on the heat anyway if it is more than 0.3 below RT as the other heater is not keeping up]
    If Temp > 81.0 Then OFF [fail safe shut off heat if temp is above 81]
    If Temp < 70.0 Then OFF [fail safe, if the temp ever reads this low, the temp probe must be bad]

    Heater 2

    Fallback OFF
    If Temp < RT+-0.1 Then ON
    If Temp > RT+0.1 Then OFF
    If Time 12:00 to 23:59 Then OFF
    If Temp < RT+-0.3 Then ON
    If Temp > 81.0 Then OFF
    If Temp < 70.0 Then OFF

    Heat-Err [this will only read as on if both heaters are set to on]

    Set OFF
    If Output Heat1 = ON Then ON [turn on the error if heater 1 is running]
    If Output Heat2 = OFF Then OFF [turn back off if heat 2 is not running]
    Defer 010:00 Then ON [wait 10 minutes before alerting so i don't get an alarm for occasional times when backup heat is needed]

    And finally in my alarm programming I have these heat related statements.

    If Temp > 82.0 Then ON
    If Temp < 75.0 Then ON
    If Output Heat-Err = ON Then ON
    One suggestion. On one of the heaters change fallback to ON and remove the 70.0 line. In the event of a fallback or temp probe issue I find it more beneficial to heat the tank based on one of the internal thermostats than lose all heating entirely (especially if you keep your house cold in the winter like I do). A second option would be to get a third heater set a couple degrees below the apex setpoint that just plugs in the wall and leave the code the way you have it.

    You might be an engineer if...You have no life and can prove it mathematically.

  19. #19
    Regular Vistor
    Join Date
    Nov 2013
    Location
    Lexington KY
    Posts
    40

    Dual heater program issue

    Quote Originally Posted by nicholb View Post
    I have made a few changes since originally posting my dual heater program. First off I went ahead an edited the seasonal table so it ranges from 76-80.5. That is much easier than trying to add values to the RT statements and set cut offs. The way I was doing it before lead to some rapid heater cycling. So here's my current. The program is designed to use each heater for 12 hours and have the unused heater act as backup. I also have a virtual outlet to watch for an error condition of both heaters on for too long (indicating a bad heater). Comments in [] are not actually in the program.

    Heater 1

    Fallback OFF
    If Temp < RT+-0.1 Then ON [turn on the heat if more than 0.1 below RT]
    If Temp > RT+0.1 Then OFF [turn off the heat if more than 0.1 above RT]
    If Time 00:00 to 11:59 Then OFF [turn off the heat if it is not your turn to be running]
    If Temp < RT+-0.3 Then ON [turn on the heat anyway if it is more than 0.3 below RT as the other heater is not keeping up]
    If Temp > 81.0 Then OFF [fail safe shut off heat if temp is above 81]
    If Temp < 70.0 Then OFF [fail safe, if the temp ever reads this low, the temp probe must be bad]

    Heater 2

    Fallback OFF
    If Temp < RT+-0.1 Then ON
    If Temp > RT+0.1 Then OFF
    If Time 12:00 to 23:59 Then OFF
    If Temp < RT+-0.3 Then ON
    If Temp > 81.0 Then OFF
    If Temp < 70.0 Then OFF

    Heat-Err [this will only read as on if both heaters are set to on]

    Set OFF
    If Output Heat1 = ON Then ON [turn on the error if heater 1 is running]
    If Output Heat2 = OFF Then OFF [turn back off if heat 2 is not running]
    Defer 010:00 Then ON [wait 10 minutes before alerting so i don't get an alarm for occasional times when backup heat is needed]

    And finally in my alarm programming I have these heat related statements.

    If Temp > 82.0 Then ON
    If Temp < 75.0 Then ON
    If Output Heat-Err = ON Then ON
    Very interesting read! I do remember back in the winter my heaters were cycling about every 20-30 minutes. Occasionally both were need. I keep my house at 72 degrees year round (geo thermal). My tank is 250 gallon. I am running two finnex 500 watt titanium heaters. What might be a safe cycle of these heaters?

    Over the last 24 hours, I also have noticed that since this programming change as Russ suggested, both heaters are coming on at the same times (together).


  20. #20
    NSI Member
    Join Date
    Jan 2013
    Location
    MN
    Posts
    2,552
    Had the same problem with my old program. The issue is the rt+1.7 is higher than your cut off temp of 80.4. That makes both heaters come on. That is part of the reason I just edited my season table to the range I wanted and changed the program to be based off straight seasonal temp.

    Sent from my SM-T820 using Tapatalk

  21. #21
    Regular Vistor
    Join Date
    Nov 2013
    Location
    Lexington KY
    Posts
    40
    Nicholb, I am following your brilliance! I really like this approach to the dual heater programming!

  22. #22
    Frequent Visitor rkpetersen's Avatar
    Join Date
    Jun 2017
    Location
    Near Seattle
    Posts
    940
    I would also like to thank nicholb, zombie, and RussM for the content in this thread. I just programmed the 2 EJ heaters I got to replace the potentially hazardous Neotherms with this code, and it's holding the temp tighter than ever, and with less wear and tear on both the energy bar relays and each individual heater's contacts.

  23. #23
    NSI Member
    Join Date
    Jan 2013
    Location
    MN
    Posts
    2,552
    Glad to help.

  24. #24
    Frequent Contributor iamchadster's Avatar
    Join Date
    Aug 2013
    Location
    Wilsonville, Oregon
    Posts
    2,639
    Quote Originally Posted by rkpetersen View Post
    I would also like to thank nicholb, zombie, and RussM for the content in this thread. I just programmed the 2 EJ heaters I got to replace the potentially hazardous Neotherms with this code, and it's holding the temp tighter than ever, and with less wear and tear on both the energy bar relays and each individual heater's contacts.
    Not a problem, happy to do it.
    Chad

Similar Threads

  1. Question: Newbie dual heater question
    By Smokepipe in forum Apex Programming for Heaters and Chillers
    Replies: 0
    Last Post: 01-11-2022, 10:17
  2. Question: Dual heater program?
    By Renogaw in forum Apex Programming for Heaters and Chillers
    Replies: 2
    Last Post: 09-06-2021, 15:17
  3. Dual Heater Code
    By jamesreich in forum Apex Programming for Heaters and Chillers
    Replies: 2
    Last Post: 08-02-2020, 21:24
  4. Help with dual heater setup.
    By H2Ocooled in forum Apex Programming for Heaters and Chillers
    Replies: 15
    Last Post: 05-31-2019, 12:48

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •