You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
Version 1
Next »
Global Variable Declarations
Legacy MCode Variables
Kept for compatibility. These are:
- Ve - MCode version. if Ve != DVER, MCode gets uploaded by IOC.
- Pu - Power-up status flag
Pulse Picker Variables
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.
Sw - [Sw]eep distance. Number of steps/encoder counts to equal 11.25 degrees of motion.
Dr - Motor-encoder [Dr]ift, or the difference between the encoder count and the motor count. Equals C2-P.
- P0 - Center (open) position.
- P1 - Positive closed position, nominally P0+Sw. (Repurposed from standard MCode program.)
- P2 - Negative closed position, nominally P0-Sw.
- 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.
Program 1
Initialization
Declare local variables:
- Po - Position counter shadow register (=P or =C1)
- Cs - Encoder counter shadow register
If Sd=99, we are experiencing a hard reset (either first MCode load, or triggered from EPICS interface).