Versions Compared

Key

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

...

  • 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)
    • L1=C2*EL*8
    • L2=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)
    • L1=C2*EL*8
    • L2=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="cac6b4dcd16999a3-9aab7130-4d714e8a-822cb892-229e16fa74c150759023bab7"><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="7fcbc65d55708adc-1f0f573c-4bbd4106-b1398944-3b091cee7336509ef674ec5e"><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="872a38e73960d03b-fc69ade9-4c0c497e-b5a58b18-abcfe908a7121b58efedef00"><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="5b7ba2b960d07c5b-a4252b82-4f3b42c8-857a9622-2deb5023cbf6eb67c0f9a9ed"><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

...