This page currently corresponds to the Ns=96 revision of the MCode. This revision resides in release R2.5.0 of pcds_motion.

Any motors with standard PCDS MCode loaded should be purged and reset with the FD command before being loaded with pulse picker MCode. This avoids any interference between variables and code labels.

Global Variable Declarations

Legacy MCode Variables

Kept for compatibility. These are:

Pulse Picker Variables

Program 1

Initialization (LB SU)

Code:

Mode Select Loop (LB Za)

Mode 1: One-Shot (LB Z1)

NOTE: Once in the one-shot loop, you must set Se=0 to get back to Mode Select.

One-Shot ISR 1 (P1 to P2 move) (LB J1)

One-Shot ISR 2 (P2 to P1 move) (LB J2)

Mode 2: Flip-Flop (LB Z2)

NOTE: Once in the flip-flop loop, you must set Se=0 to get back to Mode Select.

Flip-Flop ISR 1 (P1 to P2 move) (LB J5)

Flip-Flop ISR 2 (P2 to P1 move) (LB J6)

Mode 3: Burst (LB Z3)

NOTE: Once in the burst loop, you must set Se=0 to get back to Mode Select. Burst mode is continuous, that is, each subsequent trigger pulse will open and close the shutter.

Burst Open ISR (LB J3)

Burst Close ISR (LB J4)

Mode 4: Fast Open (LB Z4)

Mode 5: Fast Close (LB Z5)

Mode 6: Follower (LB Z6)

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)

Follower Close ISR (LB J8)

Mode 7: Home to Index Mark (LB Z7)

Subroutines

Blocking move to nearest closed position (LB X5)

This routine closes the pulse picker to the positive closed position P1 if it is not already closed.

Realign by computing new open-loop position (LB X7)

This routine updates the open-loop position based on the encoder reading. The target position of any subsequent move will be better aligned.

Mode/State Tables

Se - Mode Select

Se

Mode Description

0

Soft Reset - interpreted at start-up to bypass hard reset initialization routine

1

One-Shot mode: one pulse on the input line results in a single sweep of the pulse picker. Does not automatically return to mode select.

2

Flip-Flop mode: will sweep the pulse picker each time a pulse is received on the input line. Does not automatically return to mode select.

3

Burst mode: will open the pulse picker on the first input pulse received, and close on the second. Does not automatically return to mode select.

4

Fast Open: moves the pulse picker to the full open position (P0). Automatically returns to mode select.

5

Fast Close: moves the pulse picker to the positive closed position (P1). Automatically returns to mode select.

7

Homing: moves the pulse picker to the home index mark, and then by magic offset to the positive closed position P1. Automatically returns to mode select.

Sd - Status Indicator

Sd

Status Description

0

Waiting for Se mode selection

10

One-Shot Initialization

11

One-Shot Loop Waiting

12

One-Shot Complete

20

Flip-Flop Initialization

21

Flip-Flop Loop Waiting

22

Flip-Flop Loop Active

30

Burst Initialization

31

Burst Armed and Waiting

32

Burst Open Pulse Received

33

Burst Close Pulse Received

39

Burst Complete

40

Fast Open Initialization

41

Fast Open Complete

50

Fast Close Initialization

51

Fast Close Complete

60Follower Mode Initialization
61Follower Mode Loop

70

Homing Initialization

79

Homing Complete

80

Hard Reset/Power-Up Initialization

81

Soft Reset/Power-Up Initialization

90

Toggle Move Complete

91

Move to Positive Closed Position Complete

92

Move to Negative Closed Position Complete

94

Move to Open Position Complete

95

Close move did not execute because pulse picker is already closed

Df - Slit Open/Closed Status

Df

Status Description

-1

Closed in the negative position

0

Open

1

Closed in the positive position

98

Realigned; slits are in known position but not necessarily open or closed

99

Slit status is unknown

Velocity Tables

Maximum Velocity/Acceleration (V0)

Var

Value [step/s(^2)]

[deg/s(^2)]

[rev/s(^2)]

VI

5300

1192.5

3.3125

VM

10000

2250

6.25

A

1875000

421880

1171.9

D

1875000

421880

1171.9

The VI is slightly lower for the V0 set of speeds for more reliable 2-shot burst operation. These speeds are used wherever there is motion from closed to open position, or vice versa.

One-Shot Velocity Defaults (V1)

Var

Value [step/s(^2)]

[deg/s(^2)]

[rev/s(^2)]

VI

7500

1687.5

4.6875

VM

10000

2250

6.25

A

1875000

421880

1171.9

D

1875000

421880

1171.9

These speeds correspond to the fastest experimentally-determined speeds for continuous 60Hz operation. These speeds are used wherever there is motion from one closed position to the other closed position.

Flip-Flop Velocity Defaults (V2)

Var

Value [step/s(^2)]

[deg/s(^2)]

[rev/s(^2)]

VI

7500

1687.5

4.6875

VM

10000

2250

6.25

A

1875000

421880

1171.9

D

1875000

421880

1171.9

These speeds correspond to the fastest experimentally-determined speeds for continuous 60Hz operation. These speeds are used wherever there is motion from one closed position to the other closed position.

Burst Velocity Defaults (V3)

V3 speeds are identical to V0 speeds.

Fast Open Velocity Defaults (V4)

V4 speeds are identical to V0 speeds.

Fast Close Velocity Defaults (V5)

V5 speeds are identical to V4 speeds.

Follower Velocity Defaults (V6)

V6 speeds are identical to V0 speeds.

Homing/Alignment Velocity Defaults (V9)

Var

Value [step/s(^2)]

[deg/s(^2)]

[rev/s(^2)]

VI

640

144

0.4

VM

2560

576

1.6

A

640

144

0.4

D

640

144

0.4

These speeds are arbitrarily selected to be slow.

Magic Offset (Mo) Table

Installation

Date

Mo

Spindle PV

Verified By

XPP

2013-10-14

-245

XPP:SB2:MMS:29

klg

MEC

2013-12-20

-240

MEC:HXM:MMS:18

alexd

XCS

2014-01-13

-246

XCS:SB2:MMS:09

klg & alexd

CXI2013-12-20-286CXI:ATC:MMS:29alexd

The magic offsets are normally stored in IMS NVRAM, but in case they are lost, refer to the table above.

Changelog

Version Ns=96 (pcds_motion R2.5.0)

Version Ns=94 (pcds_motion R2.3.14)

Version Ns=93 (pcds_motion R2.3.13)

Version Ns=92 (pcds_motion R2.3.12)

Version Ns=91 (Non-Release)