...
- Signal state change to 50 (Fast close init)
- Load fast close speeds (CL V5)
- If neither at Df=1 (positive closed) nor at Df=-1 (negative closed), then
- Move (MA) to the positive closed position (P1)
- Hold until movement complete
- Copy current encoder count to Cs for future drift checks
- Set Df=1 to indicate that slits are in positive closed position
- EndIf
- Signal state change to 51 (Fast close complete)
- Goto mode select
Mode 6: Follower (LB Z6)
- Signal state change to 60 (Follower Mode Init)
- Load Follower speeds (V6)
- Move the shutter to the nearest closed position (CL X5)
- Set hi-speed trip input to trigger on HIGH-going edge
- Specify Follower Open ISR (J7) to run on Input Trip
- Arm Input Trip (TE=4)
- Signal state change to 61 (Follower Loop)
- Burst Loop START (forever):
- Increment heartbeat
- Hold for 100ms
- If user sets the soft reset (Se=0)
- Branch to Mode Select (Mode 0)
- EndIf
- If user requests fast close (Se=5)
- Branch to Fast Close (Mode 5)
- EndIf
- Burst Loop END
NOTE: Once you enter follower mode, you should cycle the EVR line (high-low-high or low-high-low) at least once to synchronize the shutter and the input. This limitation will be fixed in a later picker hardware revision.
NOTE: Once in the follower loop, you must set Se=0 to get back to Mode Select. Follower mode is continuous, that is, each subsequent trigger pulse will open and close the shutter.
Follower Open ISR (LB J7)
- Move (MA) to open position (P0)
- If error checking is enabled (Ec=1) AND last position was P1 (Df==1)
- Calculate drift at previous position P1: Dr=N1-Cs
- If calculated drift is out of spec (Dr>=Dl)
- Increment lower drift violation counter Ld
- EndIf
- EndIf
- Specify Follower Close ISR (J8) to run on Input Trip
- Hold until movement complete
- Copy current encoder count (C2) to shadow register Cs
- Set Df=0 to indicate slits are at open position
- Set high-speed trip input to trigger on LOW-going edge
- Re-arm input trip (TE=4)
- Return
Follower Close ISR (LB J8)
- Move (MA) to positive closed position (P1)
- If error checking is enabled (Ec=1)
- Calculate drift at previous position P0: Dr=Cs-N0
- If calculated drift is out of spec (Dr>=Dl)
- Increment upper drift violation counter Ud
- EndIf
- EndIf
- Specify Follower Open ISR (J7) to run on Input Trip
- Hold until movement complete
- Copy current encoder count (C2) to shadow register Cs
- Set Df=1 to indicate slits are at positive closed position
- Set high-speed trip input to trigger on HIGH-going edge
- Re-arm input trip (TE=4)
- Return
Mode 7: Home to Index Mark (LB Z7)
...