Phaser

Names

Description

MLPhaInit

Initializes a phaser Pipe Block.

MLPhaReadActPhase

Gets the actual phase value of a phaser block.

MLPhaReadPhase

Gets the phase value of a phaser block.

MLPhaReadSlope

Gets the phase slope value of a phaser block.

MLPhaWritePhase

Sets the phase value of a phaser block.

MLPhaWriteSlope

Sets the phase slope value of a phaser block.


  • There is a delay when using an external encoder.
    The delay is five cycles:
         2 cycles to read the encoder from the AKD via EtherCAT,
         1 cycle for computing,
         2 cycles for sending the new position set point to the AKD).
    This lag error is speed proportional (5 cycles * speed).
    A Phaser block can be used to compensate for this lag.

When executing, the phaser block is in one of these states:

State

Description

Applying Phase

  • Entered when the programmed Phase value is reached.
  • Exits to the Changing phase state whenever a new value is programmed via the MLPhaWritePhase function changes the Phase Offset target.

Changing Phase

  • Entered when a new value is programmed.
  • Exits to the Applying Phase state when the programmed phase offset is reached.
  • The current Phase offset value is slewed to the new phase offset by the amount of the slew value.

Standby

  • Entered when the Block is initialized.
  • Exits to the Changing Phase state when the Phase value is changed via the MLPhaWritePhase command.

Phaser Function Examples

  • Call MLPhaWritePhase function to modify the Phase value..
  • Call MLPhaWriteSlope to modify the rate of change of phase, or slope, applied when the Phase value is changed.

 

Figure 1: Phaser Functions Usage


  • % MODULO_POSITION is in the equation to take into account the modulo (periodicity) of the value.