-
Okay here is a sample program. I made a few assumptions here. I assumed you have 2 motions 1 at the top of the stairs and 1 at the bottom of the stairs. I assumed you have 1 Lighting Load you are controlling. I assumed these motions close on motion and stay closed until there is no motion and dial timer runs out.
What I did in the sample program is use an I/O board in your scenario the Inputs are on different devices but that is irrelavant to us logic is the same.
I made 2 variables both are 2 state variables State 1 is the default state and labeled No Motion (State 1) (Default State after power up or upload) State 2 is Motion(State2) The variables I labeled "Top Of Stair Sensor" and "Bottom Of Stair Sensor"
I set up 2 Inputs as Conditional Program Type on my I/O device (QSE I/O) I named 1 Input " Top Of Stair Input" and the other Input "Bottom of Stair Input"
I made 4 actions on each input :
Top Of Stairs Input
I Made 1 Action That turned Light Load "On" Turns the actual light on
I Made 1 Action That turned Light Load "Off" Turns the actual light off
I Made 1 Action That Sets the Variable Of the Top of Stairs sensor to " Motion(State2)" This sets a variable in the system basically a virtual switch that doesn't physically exist to state "2"I Made 1 Action That Sets the Variable Of the Top of Stairs sensor to " No Motion (State 1)" This sets the variable state of the above variable to state "1 or default "
Bottom Of Stairs Input
I Made 1 Action That turned Light Load "On" Turns the actual light on
I Made 1 Action That turned Light Load "Off" Turns the actual light off
I Made 1 Action That Sets the Variable Of the Bottom of Stairs sensor to " Motion(State2)" This sets a variable in the system basically a virtual switch that doesn't physically exist to state "2"
I Made 1 Action That Sets the Variable Of the Bottom of Stairs sensor to " No Motion (State 1)" This sets the variable state of the above variable to state "1 or default "
I then tell a few things to happen when the specific input closes
When Top Of Stairs CCI is closed the following occurs
Turns Lights On
Set Top Of Stair Variable to Motion(State2)
When Bottom Of Stairs CCI is closed
Turns Lights On
Set Bottom Of Stair Variable to Motion(State2)
I then tell a few things to happen and to Check Variable State when the specific input opens
When Top Of Stairs CCI is Open the following occurs
Set Top Of Stairs Variable to No Motion (State 1)
And then says If Bottom Of Stairs Variable is at No Motion (State 1) then turn the Lights off if the Bottom Of Stairs variable is at Motion(State2) it will do nothing to the Lights
When Bottom Of Stairs CCI is Open the following occurs
Set Bottom Of Stairs Variable toNo Motion (State 1)
And then says If Top Of Stairs Variable is at No Motion (State 1)then turn the Lights off if the Top Of Stairs variable is at Motion(State2)it will do nothing to the Lights
I hope this helps explain conditional a bit for you I attached a sample file in HWQS 10.0 Unfortunately there is a problem with the uploader it won't take HWQS file exstention for me and when I zipped it was to big. So when you download this file just change the exstention from .doc to .hwqs to open it Hopefully I will get around to tech support to get my uploader working properly soon.
MotionLogic.doc
-
Post Thanks / Like - 1 Thanks, 1 Likes, 0 Dislikes
-
mcignarella, wow. I guess the next time I have this scenario I need to parallel them!
This is great, thank you very much for your time explaining this. It makes perfect sense, I will add to my programming when I next get to site.
This example shows how powerful a system Homeworks QS is, with conditional logic and variables almost anything could be possible!
Thanks again.
-
Post Thanks / Like - 0 Thanks, 1 Likes, 0 Dislikes