Results 1 to 6 of 6

Thread: Problem with heater code

  1. #1
    Regular Vistor
    Join Date
    Dec 2013
    Location
    Peoria, AZ
    Posts
    25

    Problem with heater code

    I have some heater code based on the code from the Multiple Heater Programming thread. But I'm having a really odd problem with it.

    The backup heater keeps turning on, running for the maximum time, and then shutting off. What I cannot understand is why. The other two heaters don't turn on in this instance, and they should have if the trigger was correct.. so something odd is happening here... the other two heaters appear to be behaving normally. Just the backup is turning on all the time..

    As a side note, is it possible to find out what RT currently is, or do I have to calculate it?

    Code:
    [Heater1Left]
    Fallback OFF
    If Tmp < RT+0.0 Then ON
    Defer 001:15 Then ON
    If Tmp > RT+0.1 Then OFF
    If Time 16:00 to 03:59 Then OFF
    If Tmp < RT+-0.1 Then ON
    If Output Heater2On030 = ON Then ON
    If Tmp > 80.0 Then OFF
    If Tmp < 70.1 Then OFF
    If Output LeftReturn = OFF Then OFF
    If Output LeakDetected = ON Then OFF
    When On > 060:00 Then OFF
    
    [Heater2Right]
    Fallback OFF
    If Tmp < RT+0.0 Then ON
    Defer 001:20 Then ON
    If Tmp > RT+0.1 Then OFF
    If Time 04:00 to 15:59 Then OFF
    If Tmp < RT+-0.1 Then ON
    If Output Heater1On030 = ON Then ON
    If Tmp > 80.0 Then OFF
    If Tmp < 70.1 Then OFF
    If Output RightReturn = OFF Then OFF
    If Output LeakDetected = ON Then OFF
    When On > 060:00 Then OFF
    
    [BkupHeaterR]
    Fallback OFF
    If Tmp < RT+-0.2 Then ON
    Defer 000:30 Then ON
    If Output RightReturn = OFF Then OFF
    If Output LeakDetected = ON Then OFF
    If Tmp > 80.0 Then OFF
    If Tmp < 70.1 Then OFF
    If Tmp > RT+0.1 Then OFF
    When On > 045:00 Then OFF

  2. #2
    NSI Member
    Join Date
    Jan 2013
    Location
    MN
    Posts
    345
    What is this line for? Is it a virtual Outlet?

    If Output Heater1On030 = ON Then ON

    The When command is probably causing your issue. If I recall correctly it will change your slider to OFF and it will stay that way until you manually change it back to Auto. It is used as an emergency shutoff.

    The RT value can be found in the seasonal table. It will be somewhere between the previous and next value on the table.

  3. #3
    Regular Vistor
    Join Date
    Dec 2013
    Location
    Peoria, AZ
    Posts
    25
    Yes, those are virtual outlets that basically tag the heater as having run too long on one side, and brings in the opposite heater for help.

    My problem is not the fact that it shuts off, my problem is that the backup heater turns on all by itself without either of the other two turning on. Take a look at the following log as an example. All heaters were off at the beginning of this timespan:

    12 2018-11-23 03:22:32 -0700 BkupHeaterR ON
    13 2018-11-23 04:07:22 -0700 BkupHeaterR OFF
    14 2018-11-23 06:53:19 -0700 Heater1Left ON
    15 2018-11-23 07:23:18 -0700 Heater1On030 ON
    16 2018-11-23 07:24:38 -0700 Heater2Right ON
    17 2018-11-23 07:48:16 -0700 Heater1Left OFF
    18 2018-11-23 07:48:16 -0700 Heater1On030 OFF
    19 2018-11-23 07:48:16 -0700 Heater2Right OFF


    Unless I've screwed up the time statements maybe, there is no reason for the backup to have turned on all by itself there. It should have been accompanied by one of the other two..

    Or maybe it's my defer's being different?

  4. #4
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    11,602
    It's probably the defer. You might have had a short temp drop that lasted for 30 seconds and the backup brought it back up before the longer defer time.

    Sent from my SM-G965U using Tapatalk

  5. #5
    NSI Member
    Join Date
    Jan 2013
    Location
    MN
    Posts
    345
    These two lines are redundant then.

    If Tmp < RT+-0.1 Then ON
    If Output Heater1On030 = ON Then ON

    They both are to turn the heater on if the other is not keeping up. Delete the second one. The first will turn on the heater if the temp falls below 0.1 of your desired temp.

    The backup heater should turn on is your temp falls below 0.2 of your desired temp. Is the temp dropping to that point?

  6. #6
    New User
    Join Date
    Oct 2018
    Location
    CA
    Posts
    7
    BTW, I use this code and it works. Below is an explanation from the author of the code, wihch is pasted from another thread.
    https://forum.neptunesystems.com/sho...665#post153665



    10-25-2018
    rkpetersen

    NSI MemberJoin DateJun 2017LocationSeattlePosts640

    Fallback ON
    If Tmp < RT+-0.2 Then ON <-- This would turn on the heater when Temp is at 77.3 if seasonal temp in local chart is set at 77.5 Not quite. It would turn on at 77.2.
    Defer 001:20 Then ON <-- defer for a minute and 20 seconds before turning on. Yes
    If Tmp > RT+0.3 Then OFF <-- this would turn it off if temp is at 77.8 77.9.
    If Time 04:00 to 15:59 Then OFF <--- this would mean the heater is off from 4am to 4pm. Yes, but only if one of the next commands isn't true.

    If Tmp < RT+-0.2 Then ON <--- WHY did you repeat this command here??? I don't understand the need

    It's not a repeated command in mine. It is 0.1 degree lower. And it is positioned after the If Time command on purpose. What this does is turn on the heater if the temp drops too low during it's 'off' or 'secondary function' time. So if the other heater is already going, but not quite keeping up, this heater will kick in. And then the same thing happens with the other heater during the other half of the day.

    If Output Heater1On030 = ON Then ON <-- this would turn on heater 2 when heater 1 is on for 30 mins If heater 1 is still running after 30 minutes (obviously struggling), heater 2 will kick in.

    If Output HeatersOn045 = ON Then OFF <-- this would turn off both heaters if they run for 45 mins Safeguard; should never happen under normal use. If so, my house is too cold! (or one of them has failed.)

    If Tmp > 78.7 Then OFF <-- is this for backup or emergency if the heater is stuck on??? Yes

    If Tmp < 70.1 Then OFF <--- why this???

    When a temperature probe fails, if often gives an impossibly low number. Depending on whether your heaters have internal thermostats and if so, what they're set to, you can cook a tank if the feedback loop has failed.

    If Output RetPump_2_3 = OFF Then OFF <--- if return pump is off then off. Yes
    If LD_SMP CLOSED Then OFF <-- if leak turn off Yes I like to combine all my leak detectors into one VO.
    If LD_STN CLOSED Then OFF <--- if leak turn off Yes
    If Power Apex Off 001 Then OFF <---- I put this in so I don't overload my UPS. Good idea.




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
  •