satwar Posted November 24, 2012 Posted November 24, 2012 I really don't understand how ISY programs run, and I have a problem with the execution of a gutter heating program. The program executes when the folder flag is set to "1". The program simply checks whether a temperature alarm is "on", and if so, turns the heating cable on. My problem is that my ISY program doesn't see that the temperature alarm is "on" if the temperature alarm occurs before the program starts running (i.e. before the folder flag is set to "1"). All subsequent alarm status changes are read successfully What kind of statement should I use to force the ISY program to read the temperature alarm status when program first starts running ? Hope this makes some sense.
LeeG Posted November 24, 2012 Posted November 24, 2012 Post the Folder and Program. Some IF conditions trigger only when it changes. For example, If Status xxxx is On triggers a Program only when Status changes. Once On Status occurs the program is not triggered again. Same with State variables. They trigger a Program only when the State variable changes value.
satwar Posted November 24, 2012 Author Posted November 24, 2012 Yes, that is exactly what my problem is. I seem to need a trick to toggle the 'Outdoor Temp Alarm' status, which is a contact input picked up from a EZIO module. If Status 'Outdoor Temp Alarm' is On And $Snow.On.Roof is 1 Then Set 'Gutter Heater' On Else Set 'gutter Heater' Off
LeeG Posted November 24, 2012 Posted November 24, 2012 Is the Variable $Snow.On.Roof an Integer or State variable?. The result would suggest it is an Integer Variable. If either condition changes, $Snow.On.Roof or Status 'Outdoor Temp Alarm', and either triggers the Program it does not matter which one comes first so long as both are On together. If $Snow.On.Roof were a State Variable the Program would get triggered when it is set to 1 and run the Then clause because the temp Input is already On.
oberkc Posted November 24, 2012 Posted November 24, 2012 is your variable defined as an "integer" or "state"? I believe this program would work as you expect if the variable is a "state" type.
satwar Posted November 24, 2012 Author Posted November 24, 2012 Yes $Snow.On.Roof is a state variable which I toggle between 0 and 1. The problem is ISY does not recognize the true status of 'Outdoor Temp Alarm' until it changes. Could it be that I'm running 3.6.2 firmwae on ISY ?
TJF1960 Posted November 24, 2012 Posted November 24, 2012 Any change in status of either of your If conditions will force the program to be re-evaluated, unless the second condition is not a state variable. I would agree with the others that the program should run as is, as long as the second condition is a state variable. Please double check that a state variable is being used. What is Outdoor Temp Alarm? Is it a thermostat or weatherbug or what?
LeeG Posted November 24, 2012 Posted November 24, 2012 Can you clarify the point about the temp sensor true status not being recognized. The EZIOxx Input changing state should trigger the Program. Is the Input state correctly displayed by the Admin Console? If the temp alert triggers the Program before the Snow State variable is set to one the If will be False turning Off the heater. If the Snow State variable triggers the Program before temp alert turns On the If will be False turning Off the heater. Whichever comes first, Snow State variable or EZIOxx Input, when the second condition triggers the Program the first condition will still exist making the If True, turning On the heater.
satwar Posted November 24, 2012 Author Posted November 24, 2012 Can you clarify the point about the temp sensor true status not being recognized. The EZIOxx Input changing state should trigger the Program. Is the Input state correctly displayed by the Admin Console. Yes the input state display for 'Outdoor Temp Alarm' on the EZIO shows correctly on ISY Admin Console, but the ISY program doesn't see the current state. The state is only picked up correctly after a change in alarm state occurs. I do this now, by manually changing alarm limits on the temperature monitoring device, which toggles the alarm state off and then on again. My problem occurs when the temperature alarm is on before the ISY program is started. I start the ISY program by setting it's folder flag =1. For some reason ISY program doesn't see alarm state correctly until I toggle the alarm state.
satwar Posted November 24, 2012 Author Posted November 24, 2012 What is Outdoor Temp Alarm? Is it a thermostat or weatherbug or what? I monitor trmperature with a Winland Enviroalert 400, whiich provides a contact output, which is read by EZIO2x4
LeeG Posted November 24, 2012 Posted November 24, 2012 If the Folder is False when the EZIOxx Input turns On the Program is not triggered. Once the Folder is True the Input does have to change state before it will trigger the Program. That is the way If Status works. What is controlling the Folder Condition? Is it the same State Variable that is the second condition in the Program If section? I’m not sure that will work as the Folder is technically False when the State variable changes value. Perhaps seeing the Folder posted will help.
LeeG Posted November 24, 2012 Posted November 24, 2012 If the Folder condition is the same State variable as the Program have you tried and Folder xxxx is True as the second trigger condition in the Program. That way when the Folder turns True the Program is triggered. If the temp sensor is already On the Then clause will run. Or bumping the State variable twice, setting the value to 1, Wait 1 second, set the value to 2 with the Program and Folder checking for the State variable value greater than 0.
satwar Posted November 25, 2012 Author Posted November 25, 2012 Okay Guys, thanks for the help. It seems that I'm barking up the wrong tree. Since temperature alarm state status only updates in the gutter heating program while the program is running, I'll just have to leave it running. The only time the program is stopped (folder flag set to 0), is when a pure manual operation of gutter heaters is desired. The user then only has to specify whether or not Snow is On Roof. Eventually I'd like to replace the manually set Snow On Roof status, direct detection of free-water in gutter. Thanks for getting me to think outside the box.
LeeG Posted November 25, 2012 Posted November 25, 2012 I think the point that is being missed is that a Program is not “running†until it is triggered by an event identified in the IF section. Since the If Status event changes state before the Folder condition is True that did not trigger the Program and will not trigger the Program when the Folder condition is True until the Status changes state again. The If State variable will trigger the Program when the State Variable value is changed assuming the Folder condition is True. Once the Program is triggered by a change in the State Variable value the If Status xxxx is On check will participate in the If evaluation. The question is why a State variable change is not triggering the Program. Either the Folder condition is not True when the State variable value is changed or it is not a State Variable.
satwar Posted November 25, 2012 Author Posted November 25, 2012 Yes I have been slow to learn this. I guess the wording of the folder condition "allows the programs in this folder to run" was not fully understood. I think that's where I got the notion that the program was running once the folder flag was set.
LeeG Posted November 25, 2012 Posted November 25, 2012 The Folder provides a set of Conditions that are generally applicable to the group of Programs in the Folder. Makes it easier to define the Conditions once in the Folder rather than replicating the same Conditions into many Programs. The Folder Conditions inhibit the ability for Programs to be triggered (execute/run) or allow Programs to be triggered (execute/run) but do not cause Programs to be triggered. It is the specific Conditions in the Program that determine the Events that will trigger a Program (cause it to execute/run). There is still an open question why the State variable change Anded with the If Status of the EZIO2X4 Input does not trigger the Program. If you can post the Folder those Conditions can be checked against the Program Conditions to see why changing the State variable does not result in the Program being triggered.
satwar Posted November 25, 2012 Author Posted November 25, 2012 I don't know how to copy code from ISY. The folder condition is: If $Automatic.Gutter.Deicing is 1 where $Automatic.Gutter.Deicing is a state variable
LeeG Posted November 25, 2012 Posted November 25, 2012 Either Folder or Program, right click on name - select Copy to Clipboard (last option) - paste to forum post. The Folder Variable $Automatic.Gutter.Deicing and Program Variable $Snow.On.Roof, how and when are these State Variables being set?
satwar Posted November 26, 2012 Author Posted November 26, 2012 The Folder Variable $Automatic.Gutter.Deicing and Program Variable $Snow.On.Roof, how and when are these State Variables being set? I set the values of these variables by running simple macros in mControl, which write to ISY with REST commands. I simply push a button in mControl labelled "Automatic Gutter Deicing" and $Automatic.Gutter.Deicing is set to 1 in ISY. I push a button in mControl labelled "Manual Gutter Deicing" and $Automatic.Gutter.Deicing is set to 0 in ISY. Similarly I have buttons in mControl labelled "Snow On Roof" and "No Snow on Roof" which change the value of $Snow.On.Roof in ISY to 0 and 1
satwar Posted November 26, 2012 Author Posted November 26, 2012 Either Folder or Program, right click on name - select Copy to Clipboard (last option) - paste to forum post. Folder Conditions for 'House Deicer Control' Add conditions to limit when programs in this folder are allowed to run. If $Automatic.Gutter.Deicing is 1 Then Allow the programs in this folder to run. Program Content for "Driveway Gutter Heater Logic" If Status 'Driveway / Outdoor Temp Alarm - 9' is On And $Snow.On.Roof is 1 Then Set 'Driveway / Gutter Driveway' On Else Set 'Driveway / Gutter Driveway' Off Program Content for "Porch Gutter Heater Logic" If Status 'Driveway / Outdoor Temp Alarm - A' is On And $Snow.On.Roof is 1 Then Set 'Driveway / Gutter Porch' On Else Set 'Driveway / Gutter Porch' Off
LeeG Posted November 26, 2012 Posted November 26, 2012 This means that both MControl buttons have to be On, "Automatic Gutter Deicing" and "Snow On Roof", for deicing to work. Either button being Off defeats deicing. Also means that "Automatic Gutter Deicing" must be turned On first followed by "Snow On Roof"
Recommended Posts