Index

pshifter receivers, half|full, position

Switch off, or move one or more of the receiver phase-shifter motors.

Arguments:
Receivers ant
The set of receivers whose motors are to be controlled.
PhaseStep step
The step size, from:
  • full - Full steps of the stepper motor.
  • half - Half steps of the stepper motor.
PhaseShift position
The target motor encoder position (0..1023), or the word: off. The motor moves a full revolution between 0 and 1024. This corresponds to a phase change of 4.PI.

Example:
The following example moves the phase-shifter motor of receiver 3 to encoder position 420, using full steps of the motor. It then waits for the motor to reach the desired position, or timeout. Then it turns the phase-shifter motor off.
 pshifter rx3, full, 420
 until $acquired(phase)
 pshifter rx3, full, off

Context:
If the specified phase-shifter motors are turned off when this command is invoked, they are automatically switched on before attempting the move. Then starting with full steps of the stepper motors, the phase shifters are moved as close as possible to the desired position. Then, if half-step mode has been requested, and the requested position is closer to a neighboring half step, then the two coils of the bracketing steps are energized to hold the motor half way between them.

Note that half-step mode requires that the motor coils be continuously energized, whereas full-step mode doesn't. This means that after reaching a target using full steps, the motor can be switched off. If you switch it off when in half step mode, the motor may slip by half a step.


Martin Shepherd (9-Oct-1997)