\***************************************************************** \ BEAM BREAK DEFINED - 20ms BREAK, 20ms RELEASE \***************************************************************** S.S.2, \ Beam Break Defined - 20ms Break, 20ms Release. S1, \ Inputs in Level Mode generate an input "count" on each \ interrupt. With a 10 ms system resolution 2 counts \ will be reached in 20 ms. The Z3 pulse is used to \ signal a completed Beam Break. The second statement resets \ the counter every 20 ms so that a partial Beam Break of \ less than 20 ms will not constitute a Response. #R1: ADD Y; IF Y >= 2 [@BeamBreak, @NoBeamBreak] @Break: Z3; SET Y = 0 ---> S2 @NoBreak: ---> SX 0.02": SET Y = 0 ---> S1 S2, \ As long as the Beam is broken the second statement \ causes a re-entry to this State. This resets the \ the internal 20 ms timer so it never times out. When \ the Beam is released for 20 ms the timer times out \ and a Z4 pulse signals the release. 0.02": Z4 ---> S1 #R1: ---> S2