Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Wiki Markup
    *Se* \- Pulse Picker mode \[Se\]lect. Refer to Mode List for a complete list of Se modes.
  • Sd - Status indicator register. Used for debugging. Refer to Status List for a complete list of statuses.
  • Wiki Markup
    *Sw* \- \[Sw\]eep distance. Number of motor steps to equal 11.25 degrees of motion.
  • Sr - Encoder sweep distance. Number of encoder steps to equal 11.25 degrees of motion.
  • Wiki Markup
    *Dr* \- Encoder \[Dr\]ift, or the difference between the encoder count the predicted encoder position.
  • P0 - Center (open) position, in motor steps.
  • P1 - Positive closed position, in motor steps, nominally P0+Sw. (Repurposed from standard MCode program.)
  • P2 - Negative closed position, in motor steps, nominally P0-Sw.
  • N0 - Center (open) position, in encoder counts.
  • N1 - Positive closed position, in encoder counts, nominally N0+Sr.
  • N2 - Negative closed position, in encoder counts, nominally N0-Sr.
  • Ec - Error checking flag. (0=OFF, 1=ON)
  • Ns - Pulse Picker MCode version. (Repurposed from standard MCode program.)
  • Hb - Heartbeat counter, incremented approx. every 100ms.
  • Cs - Encoder counter shadow register (=C2+)
  • Ud - Drift violation, motor drifting in + direction (0= NO ERROR, 1=VIOLATION)
  • Ld - Drift violation, motor drifting in - direction (0=NO ERROR, 1=VIOLATION)
  • Df - Motor position flag (see interpretation below)

...

  • If Se<>0, we are likely experiencing a hard reset. In that case:
    • Signal state change to 80 (Hard Reset Initialization)
    • Set EL (Encoder lines) to 4096, giving 4096 lines * 4 steps/line = 16384 steps/rev
    • Set MS (Microsteps) to 8, giving 8 uSteps/step * 200 step/rev = 1600 uSteps/rev
    • Set EE (Encoder enabled) to 0, forcing open-loop step mode. Closed-loop mode is too slow because of a 1kHz loop rate.
    • Set S3 (I/O 3 settings) to 16,0,1. This is used for encoder power - sourcing output, active low.
    • Set O3 (Output 3) to 1, turning the encoder on.
    • Set S4 (I/O 4 settings) to 16,0,0. This is used for fan power - sinking power, active low.
    • Set O4 (Output 4) to 1, turning the fan on.
    • Set S13 (I/O 13 settings) to 60,0,0. This is used for input signaling, and makes it available to the input capture trip (interrupt)
    • Set FC (Filter Capture) to 9. This sets a debounce filter on input 13 with a 12.9usec delay time.
    • Set HT (Hold Time) to 5, setting the hold current delay time to 5ms.
    • Set RC (Run Current) to 100, making 100% of current available for movement.
    • Set HC (Holding Current) to 5.
    • Set NE (Numeric Enable) to 0, to prevent errant communications as being interpreted as movement commands.
    • Set Pu (Power-Up Flag) to 0 to prevent IOC from locking itself.
    • Set Sw (Sweep Distance) to 50 steps.
    • Set Sr (Encoder Sweep Distance) to 512 counts.
    • Reset Dr (Drift) to 0.
    • Reset P0 (Open position) to 0.
    • Reset P1 (Positive closed position) to P0+Sw = 512.
    • Reset P2 (Negative closed position) to P0-Sw = -512.
    • Reset N0 (Open encoder position) to 0.
    • Reset N1 (Positive closed encoder position) to N0+Sr.
    • Reset N2 (Negative closed encoder position) to N0-Sr.
    • Pre-load shadow registers: Po=P, register Cs=C2
    • Set Ec=1 to turn error checking on.
    • Reset drift violation flags Ud and Ld to 0.
    • Reset Df to 99 (current slit position is unknown)
  • For both hard and soft resets, we do the following
    • Signal state change to 81 (Soft Reset Initialization)
    • Disable any trips (TE=0)
    • Hold for 100ms to let things stabilize.
    • Set Se (Mode Select) to 0
    • Goto Mode Select Loop

...