M1M3 Support System
Loading...
Searching...
No Matches
Public Member Functions | List of all members
LSST::M1M3::SS::PositionController Class Reference

Controls M1M3 position. More...

#include <PositionController.h>

Public Member Functions

int getRaiseTimeout ()
 Returns raise and lower timeout.
 
int getLowerTimeout ()
 
bool enableChaseAll ()
 
void disableChaseAll ()
 
void startRaise ()
 
void startLower ()
 
bool hpRaiseLowerForcesInTolerance (bool raise)
 Checks that hardpoint forces are in tolerance for mirror raising and lowering.
 
bool motionComplete ()
 
bool moveHardpoint (int32_t steps, int hpIndex)
 Move single hardpoint specified number of steps.
 
bool move (int32_t *steps)
 Move HPs by given steps.
 
bool moveToEncoder (int32_t *encoderValues)
 
bool moveToAbsolute (double x, double y, double z, double rX, double rY, double rZ)
 Commands mirror to move to new position.
 
bool moveToReferencePosition ()
 
bool moveToLowerPosition ()
 Moves mirror to position ideal for lowering.
 
bool translate (double x, double y, double z, double rX, double rY, double rZ)
 
void stopMotion (int hardpointIndex=-1)
 Stops HP motion.
 
void updateSteps ()
 Called in any enabled state (raised, parked, ..).
 
void checkLimits (int hp)
 Check the hardpoint doesn't try to move past limits.
 

Detailed Description

Controls M1M3 position.

This controller is used in active state to command M1M3 hardpoints, which in turn moves M1M3 platform position and tip/tilt.

Hardpoints are (for this application) linear actuators forming hexapod. They are driven by a stepper motor. The position of the actuator is sensed by SSI encoder. Force (=weight) applied on actuator is sensed by a load cell, similar to the force actuator load cells. Loop between encoder and stepper motor is closed by M1M3 CsC (=this application).

Steppers are commanded via ILC code 66 in small increments. Encoders are read back, and according to difference between commanded and target position, HP is either in Standby (not moving), Chasing (moving with the mirror so measured actuator force is close to 0), Quick and Fine positioning (moving to target position).

Small increments send to the ILC are stored in SAL/DDS MTM1M3_hardpointActuatorDataC stepsCommanded. Target steps are stored in stepsQueued.

Member Function Documentation

◆ getRaiseTimeout()

int LSST::M1M3::SS::PositionController::getRaiseTimeout ( )
inline

Returns raise and lower timeout.

Returns
timeout for raise in seconds
Here is the caller graph for this function:

◆ hpRaiseLowerForcesInTolerance()

bool PositionController::hpRaiseLowerForcesInTolerance ( bool raise)

Checks that hardpoint forces are in tolerance for mirror raising and lowering.

Records raise/lowering forces status in RaisingLoweringInfo.waitHardpoint field.

Parameters
raisetrue if mirror is being raised - raising limits are then used
Returns
true if all hardpoint forces are within tolerance
Here is the call graph for this function:

◆ move()

bool PositionController::move ( int32_t * steps)

Move HPs by given steps.

Switch HP that needs to move into Stepping state. updateSteps then moves HP as needed.

Parameters
stepsarray of 6 HP steps offsets
Returns
false if move cannot be perfomed, as not all actuators are in Standby state

◆ moveHardpoint()

bool PositionController::moveHardpoint ( int32_t steps,
int hpIndex )

Move single hardpoint specified number of steps.

Parameters
stepsstep offset
hpIndexindex of the hardpoint to move
Returns

◆ moveToAbsolute()

bool PositionController::moveToAbsolute ( double x,
double y,
double z,
double rX,
double rY,
double rZ )

Commands mirror to move to new position.

Parameters
xtarget x position (m)
ytarget y position (m)
ztarget z position (m)
rXtarget x rotation (deg)
rYtarget y rotation (deg)
rZtarget z rotation (deg)
Returns
false when move cannot be performed
Here is the caller graph for this function:

◆ moveToLowerPosition()

bool PositionController::moveToLowerPosition ( )

Moves mirror to position ideal for lowering.

This position depends on telescope elevation. It is position defined in PositionControllerSettings/Lower/PositionOffset, multiplied by sin(elevation) for Z and cos(elevation) for Y. The multiplication tries to position mirror opposite to its gravity vectory. It is exactly what LBTO uses for off-zenith mirror lowering.

Returns
false when move cannot be performed
Here is the call graph for this function:

◆ stopMotion()

void PositionController::stopMotion ( int hardpointIndex = -1)

Stops HP motion.

If index is negative, all hardpoints are stopped.

Parameters
hardpointIndexindex of the hardpoint to stop, or negative value to stop all hardpoints, Defaults to -1.
Here is the caller graph for this function:

◆ updateSteps()

void PositionController::updateSteps ( )

Called in any enabled state (raised, parked, ..).

Sets stepsCommanded and stepsQueued. What is happening with the actuators is governed by its state.

  • Standby: both stepsCommanded and stepsQueued are set to 0.
  • Chasing: MTM1M3_hardpointActuatorDataC measuredForce is multiplied by PositionControllerSettings::ForceToStepsCoefficient and coerced into ±PositionControllerSettings::MaxStepsPerLoop.
  • Stepping: executes steps so stepsQueued are decreased, ultimately equal to 0. MTM1M3_hardpointActuatorDataC stepsQueued are coerced into ±_scaledMaxStepsPerLoop[HP] and send to HP. stepsQueued are decreased by stepsCommanded. If coerced value == 0, HP is transitioned into Standby state.
  • QuickPositioning: same as Stepping, but transition into FinePositioning state when finished.
  • FinePositioning: finish movement by removing any residual between HP encoder (measured) value and _targetEncoderValues. Difference between _targetEncoderValues and encoder values > 2 are commanded. Transition to Standby state if the difference remains <= ±2 for two loop runs.

This loop also monitors if encoder is following expected trajectory. If relative following error is outside prescribed range for configured loop, HardpointActuatorFollowingError is triggered.

See also
PositionControllerSettings
Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: