Exten Posted September 7, 2012 Posted September 7, 2012 I see constructs like below in many many programs. Almost all I think. What is the strategy - why test to see if something is both on and off at the same time? Evidently, things can happen that present both conditions near simultaneously? Program X-10 D4 Status If X10 'D4/On (3)' is Received And X10 'D4/Off (11)' is not Received
LeeG Posted September 7, 2012 Posted September 7, 2012 The Then clause is driven by the X10 D4/On The Else clause is driven by the X10 D4/Off
Exten Posted September 7, 2012 Author Posted September 7, 2012 Wouldn't the else clause run anyways if no D4/on were received? Why have to explicitly test for it? Please pardon my denseness.... Enjoy your weekend Lee, Thanks.
oberkc Posted September 7, 2012 Posted September 7, 2012 Wouldn't the else clause run anyways if no D4/on were received? No. "If X10 'D4/On (3)' is Received" would be triggered only by reciept of an "on" command. Bright, Dim, and Off would not trigger an evaluation of the condition and no "false" evaluation would ensue.
Exten Posted September 8, 2012 Author Posted September 8, 2012 Thanks...that clears it up...I'll go put that into my programs.
Recommended Posts