...
- Signal state change to 70 (Homing init)
- Load homing/alignment speeds (CL V9)
- Execute home-to-index (HI) with option 3 (slew at VM in + direction, creep in - direction)
- Hold until movement complete
- Relative move (MR) by Mo to positive closed position
- Hold until movement complete
- Set C1 to P1 - tell the motor where it is
- Set C2 to N1 - tell the encoder where it is
- Set Cs to C2 - copy the encoder count to shadow register
- Set Df to 1 (positive closed position, known)
- Reset limit violation counters Ld and Ud to 0
- Signal state change to 79 (Homing complete)
- Goto mode select
Subroutines
...
Blocking move to nearest closed position (
...
LB X5)
This routine updates the open-loop position based on the encoder reading. The target position of any subsequent move will be better aligned.
- Declare local variables L1, L2
- Compute the new open-loop position: C2 * <encoder counts per rev> / <microsteps per rev> = (C2 * EL * 8) / (MS * 200)
- Write the new open-loop position to C1. (C1=L1/L2)
- Set Df=98 (Realigned)
- Return
Drift Check at Positive Closed Position (X8)
- If Df==1 (position is positive closed position), then
- Let Dr=N1-Cs, such that Dr is positive if the motor is slipping (missing steps while traveling in the positive direction)
- If Dr >= Dl (drift limit), then
- Ld=Ld+1, Increment Ld drift violation counter
- EndIf
- EndIf
- Return
Drift Check at Negative Closed Position (X9)
closes the pulse picker to the positive closed position P1 if it is not already closed.
- If not already in the positive or negative closed position (Df<>1 AND Df<>-1)
- Move to positive closed position (P1)
- Hold until movement is complete
- Copy current encoder count to Cs for future drift checks
- Signal at positive closed position (Df=1)
- EndIf
Realign by computing new open-loop position (X7)
This routine updates the open-loop position based on the encoder reading. The target position of any subsequent move will be better aligned.
- Declare local variables L1, L2
- Compute the new open-loop position: C2 * <encoder counts per rev> / <microsteps per rev> = (C2 * EL * 8) / (MS * 200)
- Write the new open-loop position to C1. (C1=L1/L2)
- Set Df=98 (Realigned)
- If Df==-1 (position is negative closed position), then
- Let Dr=Cs-N2, such that Dr is positive if the motor is slipping (missing steps while traveling in the negative direction)
- If Df >= Dl (drift limit), then
- Ud=Ud+1, Increment Ud drift violation counter
- EndIf
- EndIf
- Return
Mode/State Tables
Se - Mode Select
...
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="669066710b9f468a-f8115c1c-44f8402f-ac3ba50a-333f0ad5aa6720c4b49e0f09"><ac:plain-text-body><![CDATA[ | Var | Value [step/s(^2)] | [deg/s(^2)]
| [rev/s(^2)]
| ]]></ac:plain-text-body></ac:structured-macro> |
---|
VI | 5300 | 1192.5 | 3.3125 |
VM | 10000 | 2250 | 6.25 |
A | 1875000 | 421880 | 1171.9 |
D | 1875000 | 421880 | 1171.9 |
...
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="5550e22196abf799-2d131949-4de54045-87b5a227-6f2afbda91a85da003cbe8ee"><ac:plain-text-body><![CDATA[ | Var | Value [step/s(^2)] | [deg/s(^2)]
| [rev/s(^2)]
| ]]></ac:plain-text-body></ac:structured-macro> |
---|
VI | 7500 | 1687.5 | 3.3125 |
VM | 10000 | 2250 | 4.6875 |
A | 1875000 | 421880 | 1171.9 |
D | 1875000 | 421880 | 1171.9 |
...
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="b6643d157ebca472-f305c8e6-457d4d2f-9d20b59c-cf7c40fa27867c1c0f4baca3"><ac:plain-text-body><![CDATA[ | Var | Value [step/s(^2)] | [deg/s(^2)]
| [rev/s(^2)]
| ]]></ac:plain-text-body></ac:structured-macro> |
---|
VI | 7500 | 1687.5 | 3.3125 |
VM | 10000 | 2250 | 4.6875 |
A | 1875000 | 421880 | 1171.9 |
D | 1875000 | 421880 | 1171.9 |
...
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="51d16d2ed1eab6ab-e2480031-4a624abc-937fbfdb-443d6dd429d148926d90dc30"><ac:plain-text-body><![CDATA[ | Var | Value [step/s(^2)] | [deg/s(^2)]
| [rev/s(^2)]
| ]]></ac:plain-text-body></ac:structured-macro> |
---|
VI | 640 | 144 | 0.4 |
VM | 2560 | 576 | 1.6 |
A | 640 | 144 | 0.4 |
D | 640 | 144 | 0.4 |
...