Jump to content

Creating hysteresis in a program


Recommended Posts

I've got a fireplace with a fan with thermostat, so that the fan automatically turns on when the fire heats up and off when the fire turns off. I've installed a In-LineLinc Relay With Sense inside the fan so I can tell when the fan turns on and off, and have a program that turns on other fans in the room to get the air moving. The problem is that when the thermostat turns off it "jitters" — that is, it turns off-on-off-on-off in a period of about ten seconds. I want my program to block for a short period after the first "off" so it ignores this jitter.


However, this is proving harder than I expected. Since the condition is evaluated even if the program is currently running (and apparently restarts), a simple 20 second wait doesn't work. I tried disabling the program at the start and re-enabling it at the end, but somehow the program still gets interrupted, so it doesn't get re-enabled.


Is there some trick to make this work?



Link to comment

Suggest posting the Program. Right click Program name, select Copy to Clipboard and paste to forum post. The Program If will be reevaluated only while in a Wait or Repeat. A simple Wait 20 seconds to allow the Status to settle down before doing anything functional should have been enough (without Enable/Disable) unless the InLineLinc cycling On/Off is occurring over a period longer than 20 seconds.

Link to comment



Try this:


     Status  FireFanSense is On
    Status OtherFans is Off

   Set Other Fans On



  Status FireFanSense is Off

  Wait 20 seconds
  Set OtherFans Off


Sense has to remain off for 20 seconds before reacting.



Link to comment

Xathros, thanks for the tip. That worked fine (and is really obvious; I'm somewhat embarrassed). I was able to reduce this to one program by using the "on" part in the Then clause and the "off" part in the Else clause, but other than that it's the same thing. Thanks again.

Link to comment


This topic is now archived and is closed to further replies.

  • Create New...