As your finding out Elses can be a little tricky to get running the way you want! ;)
...so X10 If you are listening.... 15 FLAGS IS NOT ENOUGH!!!! :D
That's my wish list for the next update...
You can use a combination of flags...
I'll post my results in the area I'm going to start. No one reads my stuff anyway
so it will take less space up there...)
I then made sure ALL macros are loaded in CM15.
The last "Else" calls a new macro via A15 On to check the flag status of Flag 16.
Running AHP 3.206 with ALL plug-ins installed (I Think? - Smart Macros, Iwitness, My house Online and OnALert)
...I don't believe that AHP alters the firmware of the CM15.
Trip the macro with an external command (A on or whatever) and ALL the else
macros light up at the same time.
I'm wondering. Didn't I mention that this is observable right on the AHP screen, in two places. The actual Macro edit screen says that the Else clauses are another macro "With the same Trigger". Technically, that would mean they are defined as individual macros and not a decision chain.
...I don't believe that AHP alters the firmware of the CM15.Since the CM15A has 8K of EPROM inside it's RISC micro-controller, and an external 8K EEPROM, I suspect the firmware gets loaded along with the macros & timers. If so, that would make the firmware "AHP Version" specific. I don't know this for sure, but how else would they be able to add security module recognition without firmware control?
The TRUE trigger would be the FAILURE of the first IF clause, NOT THE MACRO ITSELF.
Without the Source code, Processor Type, etc.
Little request.... I'm not sure what some of the common acryonms are, Like PM. Is there a place to pick that up or am I just
so new that my basic ignorance is showing. Any pointers would be a BIG help.
IF you could verify this...
X-10 Testing Information - Series 5 - 10-29-2006 - 03:49AM
Notes: Next series of tests as recomended by other users.
All items and Documents to be included.
(This Doc should be saved with Glossary, if Suggested)
Test Prerequisites:
1) All Macros to be run from CM15. NO PC macros allowed during test. (Eliminates certain conflicts.)
2) All Macro outputs MUST BE Delayed at different intervals to prevent 2 PLC commands at the same time.
(There are already documented problems with commands interferring and overlapping. Seperate Prob.)
3) All Macro Delays must be moved around between macros so that delay can be ignored.
(This eliminates the possibility that the amount of delay has an effect on outcome.)
4) All Macros Must be "Captured" from screen and documented. (User request for Replication!!)
5) All Tests and results must be repeated a minimum of 3 times (Three) to ensure accuracy.
6) All macro start (Trigger) commands must be sent the same way and from a direct PLC Controller.
(This is to eliminate RF problem possibilities or changes in what I am doing. Art Screw-up factor)
7) All Modules and CM15 on same circuit and isolated from all other circuits. No Interference allowed.
8) ALL UNUSED controllers, modules, repeaters, transeivers, etc. MUST BE REMOVED.
9) Every test to be Documented, including typo's, failures, and undesired results. (No Hiding Boo Boo's)
10) Basic Notes should be files as much as possible. (I want a dictionary when done....)
11) All Results having to do with AHP can only be Verified with Version 3.206. (I'm not re-loading.)
(If other version test need to be done, Allow other users to do it. Wider range of testing that way.)
Test 2 Basics:
Verify operation of "Else" clauses without Using Conditions. (Strange Case but Necessary first Test)
Test 2 Setup:
Create 1 Macro with Many Else Clauses, A9 on , A10 On, A11 On A12 On and A13 On (Macro Trigger = A6 On)
Use Both Lamp and Appliance Modules to Ensure no difference (Gotta Eliminate possible Junk Test.)
Verify Delay before Outputting Command from Macro (Proven in Test One - Needed to eliminate OVERRUN)
Preset by Manually Turning of ALL Modules Manually (Visually Check Preset Condition)
Create Screen Shot and Save - Be Sure Each Macro Clause recorded Seperately
Execute Test by Manually with PLC Controller - Push A6 button then On Button
Watch and Verifiy result, record.
Reverse Delays to ensure no effect on else results
Re-test, Watch and Verify Result, Record.
Test 2 Results:
1) Created Macro. Delays are 2,4,6,8,10 Seconds for A9 - A13 Respectivly.
2) Quick Test - Press A6 then On - All Test Units Come On. (Make Screen Shots Now.)
3) Preset and Re-run Test Multiple Time and Check ACtivity Monitor and Display. All Good.
4) Reverse Delay Order and Re-test. All Good (Do not bother with Screen Shots - Only Delay Altered)
Test 2 Final conclusions:
All ELse Clauses Execute. Neither Delay nor Module type has any effect here. All defined
Modules Turn On. Else Clauses are No Elses, but Concurrantly running Tasks.
Tasks are started at the SAME TIME. If they were not, the delay would be additive. I.E.
the final 10 second delay IS being counted from the initial command, not the end of execution
of the previous clause. Once started, these seperately running macros have NO interaction.
True Results: With NO conditions, ALL else clauses run. Technically, they are just Multiple
Macros that happen to have the same trigger. Here the word "ELSE" does not apply.
(Note to self: if others noticed this, why didn't other notice the rest???)
(Re-read forum posts to see specific details when i Finish..)
Test 2 Completion:
Note: This test was to verify the "ELSE" clause behaves wrong, without an else ccondition. Of course
if this test were repeated without delays, the outputs and the activity MOnitor display
would be USELESS. A Non-delayed Item would fail due to the OverRun of the Interface, not
because of the "ELSE" clause. It seems to be VERY possible that the OverRun is being used
to FORCE the else to not execute. That could cause users to get the correct else results
even though the logic is wrong. Now This Must Be Tested to be sure of that premise. If
the overrun Problem causes "ELSE" to work "correctly", then X-10 Programmers, in the Lab,
could easily have missed this, even in beta testing. Note: I prefer it this way, as long
as I am aware of it and the timing between set and check, it allows more program options.
The problem would be to normal users who have macros that work intermittantly and cannot
figure out why. First imaginable case, an RF transmission, repeated. The signal could
last long enough to jam the first outputted signal of the macro. Oppps, it didn't work!
Test 2a Basics:
Verify true Operation of Empty Condition Clauses with NO DELAYS. (Proving OverRun Effects)
Test 2a Setup:
1) Use exact Macros as Test 2 but With All Delays Removed.
2) Don't Bother with Screen Save - Just Deleting Delays
3) Verify Preset (ALl Modules Off) and Hit A6 On (Macro Trigger) - Watch and Verify Results.
4) Double Chheck Activity Monitor to See what was recorded versus What Happened (In Case...)
Test 2a Results:
1) Modified Macros. Delays Removed.
2) Quick Test - Press A6 then On - Strange but Expected result - No Modules Respond - All Display
Activity Monitor shows the A6 Command - No A On, but Shows an A9 and A9 On - Doesn't Happen
(Note to Self: CM15 coded basicly, no presend check for clear line? - No Presend Pause either!)
3) Multiple REpeat of Test accurate. Macro Command will not work. (Note: Nobody has seen this??)
Re-set - Add SAME delay to all macros of 2 Seconds - Should allow First Clause to execute, but then
What will happen is Unknown. (I think rest will fail....)
4) Modified Macros. 2 Second Delay Inserted BEfore Command to Module in ALL Clauses.
5) Unexpected Results. The Macros ALL executed perfectly. ALL modules turned on.
(They turned on in the Else order as well. The CM15 MUST wait for previous commands in
this specific case. I'm Wrong in my guess again. Darn. Multiple Tests Verify Results.)
6) COntinuing This Test with New Conditions. Will Remove Delay From LAST else clause and test
Then Will work Back, removing the next to last, etc. Once Complete, put back to current
configuration and start from first to last. (Note: I'm getting too detailed, but Must Finish.)
7) Modified Last Macro. Removed Delay on A13 ON Command. Test and then remove A12, etc.
8) ANY Command without Delay is NOT executed. The Activity still loses the ON command sent manually.
The First Command in the chain without delay shows up on the activity Monitor, but isn't Sent.
All Commands with Delay work Fine.
9) Modified Again. Put 2 Sec Delay in ALL. Removed first in chain. Test. Remove Next, etc.
10) Again, Unexpected Results. If First Clause has no delay, ALL clauses fail to execute.
Activity monitor (as usual) Misses the On Command to trigger, but shows the A9 and ON which
are not sent. The rest of the commands don't show up nor work. No Modifications to the
Macros further down the chain have any effect. Must now test the Middle of the Chain First.
11) Modified Again. 2 Sec Delay in ALL. Removed Delay in Middle of Chain (A11 On). Test.
12) VERY INTERESTING RESULTS. - Final in test. Activity Monitor Still Misses On of A6 Trigger.
Next on Monitor is the Non-working A11 On. This doesn't actually work, as it shouldn't.
Next comes a surprise. The First two Clauses DO Execute. A9 ON and A10 On execute as well
as show up corectly on the monitor. A12 and A13 have no response.
Test 2a Final Conclusions:
1) First and foremost, with NO delay in front of a Macro command, the operation must be
checked VERY carefully. If a delay is needed, or any other process will do the same, I won't
test here. This testing is for ELSE Clauses, not system analysis. The end rule is, for
unambigous operation, precede all macro commands with a delay. I hope and assume that
only one is needed at the start. The CM15 seemed to stack commands from multiple macros
without any trouble. I may return to that test later....
2) If no delay is used, the ELse clauses stop at that point. No further clauses will execute
nor will they show up in the activity monitor. Only the first without a delay shows in
the activity monitor, and this command is not really sent. (Neither One. By This I mean:
The Monitor Shows A9 and Then Shows A On. Neither of these is really sent.) Even though
this is (In Effect) the correct operation of an else clause, it is produced by an error in
processing as shown. It is not really using an else. (Bad for normal Users...)
(Note to self: Probable that this is how this was missed in testing. Look how long it
took me to find this, and I was looking for it specifically.....)
3) All of these test only apply to this setup. NO verification has been done to see if RF
transmissions, etc. will be affected the same way as far as delay are concerned. The ONLY
commands verified are ON and Off of Modules. Module Type makes no difference and Command
type SHOULD not, but This can not be confirmed with this simple test setup.
(Note to Self: I'm sounding like an alpha tester again. Notes only, remember, not opinion.)
Test 2a Completion:
Note: This test was to prove the effects of OverRunning the interface. There are some OverRun
prevention buffers working, but only in the certain cases noted. The complexity of knowing
When they will work is simple as long as the first thing a Macro does is delay. It seems
that a running Macro is buffered, once it is really running. The FIrst thing a mocro does
Usually won't work unless it is not a command. If it can be other than a delay is not yet
known from these tests, but the "ELSE" clauses ARE terminated from running as soon as the
first overrun is encountered. A simple Macro check is now available!!! If the activity
monitor shows a command that did not execute, That macro and all elses further down the
chain have terminated. Again, weather the Failing macro continues execution has not been
tested here. This was ONLY for else clauses.
OK, Now what to do? I feel, at this point, that this little display problem is a defined and confirmed "Bug".Others have reported bugs that are of a lesser concern!
I guess you could call it that, though X-10 could have some internal reason for this operation. My question is: Should this be posted in the "Bugs" area or is just a little thing like this worth making a post for. It might be easier to just answer it if someone else questions why such a display comes up?
X-10 Testing Information - Series 5 (Continued.) - 10-30-2006 - 08:18PM
Notes: Basic Initial Check of Else WITH Condidtions. Test Configuration Limited.
All Configurations should be Screen Shot for Other Users. (ALso Save .ahx Files for Each....)
Remember Art, This document will be exposed to external users, watch the language!!!
Save this Doc in Site as well as test data drive.
Test Prerequisites: (These are Copied and Continued from Previous Tests...)
1) All Macros to be run from CM15. NO PC macros allowed during test. (Eliminates MANY conflicts.)
2) All Macro outputs MUST BE Delayed at different intervals to prevent 2 PLC commands at the same time.
(There are already documented problems with commands interferring and overlapping. Seperate Prob.)
(There will be a seperate Test documenting this. For Now I'm Avoiding possible extra Problems..)
3) All Macro Delays must be moved around between macros so that delay can be ignored.
(This eliminates the possibility that the amount of delay has an effect on outcome. Min Delay 2 Sec.)
4) All Macros Must be "Captured" from screen and documented. (User request for Replication!!)
5) All Tests and results must be repeated a minimum of 3 times (Three) to ensure accuracy.
6) All macro start (Trigger) commands must be sent the same way and from a direct PLC Controller.
(This is to eliminate RF irregularities noted from other tests. RF interaction tests will be later.)
7) All Modules and CM15 on same circuit and isolated from all other circuits. No Interference allowed.
8) ALL UNUSED controllers, modules, repeaters, transeivers, etc. MUST BE REMOVED for My sake.
9) Every test to be Documented, including typo's, failures, and undesired results. (No Hiding Boo Boo's)
10) Basic Notes should be files as much as possible. (I want a dictionary when done....)
11) All Results having to do with AHP can only be Verified with Version 3.206. (I'm not re-loading.)
(If other version test needs to be done, Allow other users to do it. Wider range of testing that way.)
(Note to Self: If request comes up for earlier version test, consider setting up 3rd PC....)
Test 3 Basics:
Verify operation of "Else" clauses WITH Conditions.
(This will require 4 Sets. 1) if X 2) If X or Y 3) If X and Y 4) If X or Y and Z)
Each Set will require several sub sets for verification, however the True set should be the only
set that alters operation. WHAT makes the set false should not make a difference (??)
Important: Use of only 2 of the Three possible "OR"'s or "AND"'s shouldn't change outcome (??)
(Verify this during testing by running Quick series filling conditions all the way!!!)
Test 3 Setup: (Special Note: Follow Test 2 Setup as close as possible to reduce change interactions.)
Create 1 Macro with Many Else Clauses, A9 on , A10 On, A11 On A12 On and A13 On (Macro Trigger = A6 On)
Create Test Preset Macros to Set / Clear Condidtions. These must be MANUALLY TRIGGERED.
(The manual trigger prerequisite I'm self-imposing is to prevent Set / Clear problems from
changing the test outcome. Want to test "ELSE" options only....)
This Setup shall use "Flags" for conditions ONLY. Module Status depends on monitored House Code.
(There are other considerations, but for this test, Flags should be a dependable condition source.)
(Note to Self: Run Quick Subtest to verify other conditions being used does not affect outcome...)
Use Both Lamp and Appliance Modules to Ensure no difference (Gotta Eliminate possible Junk Test.)
Verify Delay before Outputting Command from Macro (Proven in Test One - Verified in Test Two.)
Preset by Manually Turning off ALL Modules Manually (for a Visual Check of Preset Condition)
Create Screen Shot and Save - Be Sure Each Macro Clause recorded Seperately. Preset Macro Too!!
Execute Test by Manually trippin with PLC Controller - Push A6 button then On Button to Execute Test.
Preset Macro for Flags Shall use House Code "A7" for simplicity. All Manually Run anyway.
Watch and Verify result, record. No Special Delay changes needed. Test Two provides guidelines.
Re-test, Watch and Verify Result, Record.
Test 3 Results:
1) Created "ELSE" Macro. Delays are 2,4,6,8,10 Seconds for A9 - A13 Respectivly. (Same as Test 2.)
Conditions for Each else is Same Number Flag (Flag 9 for A9, Flag 10 for A10, etc.)
2) Created "Preset" Macro. Will Need to change preset MANY Times. First Set A9 - A13 (ALL!).
3) Quick Test - A7 then ON on PLC Controller. Wait 10 Seconds to be sure. Press A6 then ON.
(Guess: I Think All will Come On....)
4) Guess WOrked!! - ALL Macros Executed. This means ALL ELSE Clauses ran. Make Screen Shots.
5) Now Reset and Re-run Test. ALL Else running Verified. Now for Options.
6) Modified Preset Macro to This: 2 Sec Delay, Clear ALL Flags used, 2 Sec Delay, Set 9,10,12,13
7) Ran Test with Flag 11 Cleared. VERY strange Results. 9, 10, 12, 13 Ran. (All Elses Run.)
******************** Ignore 8 - 9 Made Human Error *** Retained for Completeness *************
Strange Part. Time Delays were incorrectly executed. Pulling Flag 10 to Double Check This.
8) Ran Test with Flag 10 and 11 Cleared. Problem Verified. Delays ARE Affected!!!!
***** To Detail Failure: Normal is a sequence with 2 Second Delay between each MOdule ON *****
***** The Non-activated Modules SHOULDN'T affect other timers, but they DO. Each is STILL 2 Sec.
***** To Make Clear - The Output in Words:
All Flags Set - Trigger Macro, 2 Sec delay, A9 ON, 2 Sec Dly, A10 ON, 2 Sec Dly, A11 On, 2 Sec Dly, Etc.
The Actual Timmimg is 2 Sec for A9, 4 SEc for A10, 6 Sec for A11, 8 Sec for a12 and 10 Sec for A13
Drop A10 and A11 Flags and the Result changes to:
Trigger Macro, 2 Sec Delay, A9 ON, 2 SEC DELAY, A12 ON, 2 SEC DELAY, A13 ON !!!!!
There Should be an 8 Second Delay for A12. It Changes to 4 Seconds in this process. This IS a Bug.
The most likely cause is internal to the CM15, the counter used for timing is not multi-tasked right?
Take Screen Shot of Preset Timer for reference.
9) Ignoring this Initial Bug, the Operation is OK, but different Timings Must be Tried Next
All Timings will be Set to 2 Seconds. POssible that Else down chain could be Killed?
(Guess: I will shoot in the dark - Maybe Elses won't execute!!!
Start with ALL Flags set to verify Correct ALL ELSE operation. ALL Should Trip OK. (Test 2)
During Verification, My personal error discovered. IGNORE ABOVE STATEMENTS.
ALL Macros WERE Set to 2 Seconds. (I was WAY ahead of testing versus conditions.)
If this were not a lab note sheet, I would delete all my comments above. Please Ignore Them!!
******************************************************************************************************
10) Previous Error forces me to set the timers to 2,4,6,8 and 10 seconds and check results.
Quick Test: All Flags On - All Modules ON at Correct Delay Interval.
11) Flags 10 and 11 off - A9, 12 & 13 On at correct Intervals. (CM15 is Right on, I messed up!)
Test 3 Conclusions:
1) Errors in test procedure force me to list what is proven so far, so as not to confuse
myself as to what I am checking. This is embaressing. (To Err is Human?)
2) With Single Flag set condition, All Else Macros do Run if Condition is Met. Previous clauses
DO NOT prevent the running of Else clauses.
3) WIth Delay, to ensure correct start of macros, commands stack up in the CM15 correctly.
4) Removing Macros from execution in a chain DOES NOT affect timing of other chains. (Good Operation)
Test 3a Basics:
Verify Operation of Condition Clauses with Multiple Conditions. (May be severe OverKill.)
Test 3a Setup:
1) Use exact Macros as Test 3 but With More Conditions Added.
2) Ensure Screen Save. (I already messed up once, Prevents unrecorded Human Error.)
3) Verify Preset (ALl Modules Off), Hit A7 ON (Preset), Wait 10 Sec. and Hit A6 On (Macro Trigger)
4) Double Check AM to See what was recorded versus What Happened (In Case... Missed this in 3)
Test 3a Results:
1) Modified Macros. Added "OR" Flag 14. Set Flag 14 in Preset Macro. Take Screen Shots.
During Modification, Realized I meant "AND" not "OR" (Top row of Conditions.)
No "OR" added yet. Preset Clears ALL, Sets 9-14. Run Quick Test: (Here Goes Nothing)
All Macros Executed. (SHould Have - All Flags Set.)
2) Changing Start Delays to 2 Sec FOR ALL MACROS to check Command Stacking. (2 Sec Req'd to Run?)
Quick Test (Means Three Executions, by the Way...): Preset and Ran:
All Macro Executed Great. CM15 Stacked them and ran the next clauses at approx 1 Sec intervals.
(This is all working too Well, I had better find something, although ELse clauses running is...)
3) Modified Preset - Clear Flag 14. (This should Kill ALL Macro Outputs!!)
Quick Test: Excellent - NO macros fired. "AND" clauses seem totally predictable.
4) Modified PReset - Set 14 again but drop 10 and 11 - Should Light 9,12,13
Quick Test: Excellent - 9, 12 and 13 Came On Like They Should. 10 & 11 Flag stopped Macro.
5) Modified Macros. Added "OR" Flag 15. (Really put in "OR" line this time!!!!)
Modified Preset to Clear flag 15, not set it. No Change should be seen.
Quick Test: Excellent again. Still working as it Should. 9,12,13 function.
6) Modified Preset: Leave 10 and 11 Cleared but turn on 15. Should force ALL to execute.
Quick Test: Perfect. All Condition clauses are completly predictable. As long as one
Takes into account they ALL fire, no matter what the previous clause did, all works right.
7) Weird Test for Me: Removed Delay to see if Flag Condition tests use enough time to remove
the need to delay macro execution of module control. (Could cause strange effects..)
MOdified Macros: Removed ALL Delays.
Quick Test: Unfortunately, (Or Fortunately, depending on what you want.) the removal of
the Macro initial delay has the same effect as in test two. Macros fail to execute.
AM shows the A6 but not the A ON, Shows the first macro A9 and A ON but actually sends
neither command.
Test 3a Final Conclusions:
1) ELse Clauses ALWAYS TRY to execute. They Start in correct order, but all start immeadiately.
2) There Must be a delay before ANY Module control command to be sent. (From Test 2 and Verified.)
Note: The Internal effects are not tested. It's possible that a Dummy module on the
monitored house code might receive these commands. This would need seperate testing.....
3) Else Conditions, as far as Flags go, all verify perfectly if in the CM15. Macros from the
PC have not been tested, although forum postings and undocumented tests show trouble here.
4) The CM15 DOES NOT OVERRUN if the Macros start correctly. I.E. As long as the needed delay
is at the start of a macro, the next steps don't mess up other macro commands. If Five
outputs (the max tested) trip at the same time, they execute sequentially without error.
(Note: Extremely Long Concurrant Macros might alter the execution order. Not tested yet...)
(Note 2: Not tested at all. Macro a does CMD1 and CMD2 while Macro B does 3. If both are
started with the same delay, the ending order is untested. (1,2,3 or 1,3,2 ???) Logic says
the first is correct, but the second would be more likely. This is a future test...)
Test 3a Completion:
Note: This Test was to Prove that ALL else clauses execute at the same time, without regard to
execution status of any other macro. This is now Tested enough to say "YES" !!!
The Only way to prevent ELSE clauses to NOT execute is with conditions (Using Flags..)
or throwing an Overrun (Test 2). The Overrun error terminates ALL remaining else clauses
while the flag conditions handle just the else clause you are in.
I am assuming that other conditions that may be tested would operate the same as flags, but
this is not a proven fact, seeing I only tested using flags. I am confident enough in this
that, other that a quick check, I will not be running a full spec test to verify. If any
data or errors that show up that say other conditions (Module status, etc.) act differently, I
will setup and execute a complete test cycle.
(Note to Self: If testing Module Status, recheck Delay requirement re: Execution time in CM15)