| Maintainer
| none
| Current version
| 0.1 View the changelog
|
| Original Author |
Gary Bamberger |
Date last modified |
Mar-7-2005 |
| License |
BSD |
MED-PC version |
4 |
| This example code is used to detect breaks in photobeams, such as the detectors in the magazine or the 5-choice nosepoke wall package. |
| No references given. Click to e-mail a reference to the maintainer. |
| How to use this code
| Download the code
| Download an example macro
| Download the profile
|
\*****************************************************************
\ 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
|
| No training programs submitted/required
|
No older versions available
No experimental versions available
|