Versions Compared

Key

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

...

You can set the 3rd encoder port as a master even though it will not be used in following. This can be done with the FOLMAS31 command. As soon as the FOLMAS31 command is executed, the encoder pulses on the 3rd encoder port are monitored and stored in the PMAS command. Instead of reading the encoder with the PE command, you can read it with the PMAS command. Then you can adjust the PMAS counter with the command FMCNEW1. The new PMAS value with be set to the FMCP command. Here is a breif example:

FMCP0

; When the FMCNEW1 command is issued, PMAS will be 0

FOLMAS31

; 3rd encoder port reads encoder pulses to PMAS

VAR1=1PMAS

; Variable one is the value in PMAS

WAIT(1PMAS>4000)

; Wait until PMAS is greater than 4000

FMCNEW1

; Set the PMAS value back to 0.