Exten Posted September 7, 2012 Share 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 Link to comment
LeeG Posted September 7, 2012 Share Posted September 7, 2012 The Then clause is driven by the X10 D4/On The Else clause is driven by the X10 D4/Off Link to comment
Exten Posted September 7, 2012 Author Share 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. Link to comment
oberkc Posted September 7, 2012 Share 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. Link to comment
Exten Posted September 8, 2012 Author Share Posted September 8, 2012 Thanks...that clears it up...I'll go put that into my programs. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.