Motion Library - Phaser

Names Description Return type
MLPhaInit Initializes a phaser Pipe Block. BOOL
MLPhaReadPhase Gets the phase value of a phaser block. None
MLPhaReadSlope Gets the phase slope value of a phaser block. None
MLPhaWritePhase Sets the phase value of a phaser block. BOOL
MLPhaWriteSlope Sets the phase slope value of a phaser block. BOOL
MLPhaReadActPhase Get the actual phase value of a phaser block. LREAL

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.

Example: Phaser Functions

  • 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.

Phaser Functions Usage

Phaser Functions Usage

Figure 7-100: Phaser Functions Usage


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