As of yet, the outputs aren't bits in 1 word so we can't use a simple mask to manipulate all at once.The bit masks remark was more directed at CAI as a nudge to see if it was possible to do this. It would be beneficial in a case like yours. Maybe 3.2.18 will have this?
What Ross was saying is that you can store even numbers in an output, all numbers if the output isn't used as an output. for example if output 1 is on, it would look like ......0001 in binary. All but the right most and leftmost bit is a freebie. If you ORB the number 8 (ORB OP1 8 OP1) with the output it would now look like .....1001. To cancel you need to flip the bits and ANDB. To cancel 8 and not change the output or 2's or 4's place .....0111 (ANDB OP1 7 OP1). Ross can do the binary conversions in his head while sleeping. I can't so I made a spreadsheet to help me.
http://cocoontech.com/forums/topic/22429-spreadsheet-to-help-calc-bitwise-operations/#entry183242.
Ross and Lou are the Guru's on programming these boards.
It might be easier for you if you draw up a flow chart first. Ross has posted some examples of his flow charts that might give you a direction if you need one.
As far as an example of setting the outputs... For your start I would simply place a 0 in a var and then in a subroutine or step I would simply ANDB var1 to all the outputs. To turn on the outputs 1,3,5,7,8 after 5 seconds you could take the cts and add 5 to it. test it to see if it = CTS. repeat test until it does then place the mask in var1.
Below isn't exactly how to do it but may give you some ideas to work with.
Start
set var1 0 initialize all outputs to off
gosub outputs
Do whatever
tstgt cts var2 if cts is greater than var2 then the timer expired.
Goto timer
Timer:
set var2 cts sets var2 to the current total seconds
add var3 cts var2 add var3 to current total seconds and place the new value in var2- var 3 will be the value determined along with the output mask
tsteq var2 cts when var2 is equal to cts your timer is done.
tsteq var8 16
goto mask16
tsteq var8 5
goto mask5
Mask5:
set var1 1 op1 on
gosub outputs
set var3 1
run timer
set var1 61 this will be op1,3,4,5,6 on and op2,7,8 off
gosub outputs
...
...
...
Mask16:
set var1 3 op1 2 on
gosub outputs
set var3 1 use 1 for seconds timer
run timer
set var1 61 this will be op1,3,4,5,6 on and op2,7,8 off
gosub outputs
1 minute timer
set var 1 3 set all but op1 2 to off
gosub outputs
1 second timer
set var1 0 set all op to off
gosub outputs
outputs:
ANDB 1 var1 op1
ANDB 2 var1 op2
ANDB 4 var1 op3
ANDB 8 var1 op4
ANDB 16 var1 op5
ANDB 32 var1 op6
ANDB 64 var1 op7
ANDB 128 var1 op8
ret