I got an error, as you predicted. Just wanted to see if this looks correct. I assume Accumulator is a Condition. It currently has a value of null.
[code]Humidifier Logic
Device ID: 952014-02-03 09:17:34.021 PLC Version: 5.7
Triggers
Name Description State Last True Last False
tHumidifierOff Virtual Humidifier is turned off false 2014-02-03 09:06:41.910 2014-02-03 09:06:45.527
tHumidifierOn Virtual Humidifier is turned on true 2014-02-03 09:06:45.527 2014-02-03 09:06:41.910
Device Properties
Name Device Name Device Variable Value Last Change Previous Change
pTodayLow Today’s Low Temperature CurrentTemperature 28 2014-02-03 08:42:37.100 2014-02-02 21:14:47.912
pInteriorHumidity Interior Humidity CurrentLevel 37 2014-02-03 04:36:35.759 2014-02-03 04:20:34.756
pFanOn Foyer Thermostat FanStatus On 2014-02-01 11:42:48.832 2014-02-01 11:32:47.747
Conditions
Name Expression State Last True Last False
cHumidityWanted pInteriorHumidity < 15 OR (pTodayLow > -10 AND pInteriorHumidity < 20) OR (pTodayLow > 0 AND pInteriorHumidity < 25) OR (pTodayLow > 10 AND pInteriorHumidity < 30) OR (pTodayLow > 20 AND pInteriorHumidity < 35) OR (pTodayLow > 30 AND pInteriorHumidity < 40) OR (pTodayLow > 40 AND pInteriorHumidity < 45) false 2014-01-31 11:04:00.914 2014-02-03 00:14:48.137
cFanAvailable pFanOn eq “On” true 2014-02-01 11:42:48.861 2014-02-01 11:32:47.773
cHumidifierOn cFanAvailable AND cHumidityWanted AND !cAccumulator > 14400 false 2014-02-01 11:42:48.864 2014-02-03 00:14:48.175
cHumidifierOff !cHumidityWanted OR !cFanAvailable false 2014-02-01 11:32:47.775 2014-02-01 11:42:48.906
cForceFanOn cHumidifierOff; cHumidityWanted; NOW > 15:00 false 0 2014-01-31 11:18:58.354
cAccumulator cTankEmpty ? 0 : !tHumidifierOn ? cAccumulator + #!tHumidifierOn - #tHumidifierOn : cAccumulator null 2014-02-03 08:31:37.856 2014-02-03 08:31:41.634
cTankEmpty cAccumulator > 14400 false 2014-02-03 08:22:20.517 2014-02-03 08:22:23.927
Actions
Actions for Condition: cHumidifierOn
Immediate
Device Action Arguments
Virtual Humidifier SetTarget newTargetValue=1
Actions for Condition: cHumidifierOff
Immediate
Device Action Arguments
Virtual Humidifier SetTarget newTargetValue=0
Actions for Condition: cForceFanOn
Immediate
Device Action Arguments
Foyer Thermostat SetMode NewMode=ContinuousOn
Delay 15:00
Device Action Arguments
Foyer Thermostat SetMode NewMode=Auto
Actions for Condition: cTankEmpty
Immediate
Device Action Arguments
Virtual Humidifier SetTarget newTargetValue=0[/code]
(Edit: Made more use of ! to reduce number of conditions)
Edit 2: For those trying to use this as an example, I had to change cAccumulator to “cTankEmpty ? 0 : !tHumidifierOn ? 0 + #!tHumidifierOn - #tHumidifierOn : cAccumulator”, then manually start/stop the humidifier. That changed cAccumulator to something other than null. After that, I switched it back to “cTankEmpty ? 0 : !tHumidifierOn ? cAccumulator + #!tHumidifierOn - #tHumidifierOn : cAccumulator”. So just had to let it initialize the variable, and the error went away. So far so good.
Thanks again Richard!