Versions Compared

Key

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

...

  • Signal state change to 10 (One-Shot Init)
  • Load One-Shot speeds (V1)
  • Calculate target position using drift of current position (X9)
  • Specify One-Shot ISR (J1) to run on Input Trip
  • Arm Input Trip (TE=TE|4)
  • Signal state change to 11 (One-Shot Loop)
  • One-Shot Loop START (forever):
    • Increment heartbeat
    • Hold for 100ms
    • If movement is complete (Sd=90)
      • Signal state change to 12 (One-Shot Complete)

EndIf

  • One-Shot Loop END

NOTE: Once in the one-shot loop, you must reset to get back to Mode Select.

One-Shot ISR (J1)

  • Copy current position to shadow variables
  • If currently in the positive closed position P1
    • Move (MA) to negative closed position P2
    • Calculate new drift based on stored shadow variables
    • Calculate new positive closed position P1 based on drift
  • Else (any other position but P1)
    • Move (MA) to positive closed position P1
    • Calculate new drift based on stored shadow variables
    • Calculate new negative closed position P2 based on drift
  • EndIf
  • Hold until movement complete
  • Signal state change to 90 (Toggle movement complete)
  • Return

...

  • Signal state change to 20 (Flip-Flop Init)
  • Load Flip-Flop speeds (V2)
  • Calculate target position using drift of current position (X9)
  • Specify Flip-Flop ISR (J2) to run on Input Trip
  • Arm Input Trip (TE=TE|4)
  • Signal state change to 21 (Flip-Flop Loop)
  • Flip-Flop Loop START (forever):
    • Increment heartbeat
    • Hold for 100ms
    • If at least one movement is complete (Sd=90)
      • Signal state change to 22 (Flip-Flop Loop Active)

EndIf

  • Flip-Flop Loop END

NOTE: Once in the flip-flop loop, you must reset to get back to Mode Select.

Flip-Flop ISR (J2)

This ISR is identical to the One-Shot ISR (J1), with the exception that it re-arms the Input Trip (TE=TE|4) every time it runs.

Mode 3: Burst

  • Signal state change to 30 (Burst Mode Init)
  • Load Burst speeds (V3)
  • Calculate target position using drift of current position (X9)
  • Specify Burst Open ISR (J3) to run on Input Trip
  • Arm Input Trip (TE=TE|4)
  • Signal state change to 31 (Burst Loop)
  • Burst Loop START (forever):
    • Increment heartbeat
    • Hold for 100ms
    • If the close movement is complete (Sd=92), then
      • Signal state change to 32 (Burst complete)
    • EndIf
  • Burst Loop END

NOTE: Once in the burst loop, you must reset to get back to Mode Select.