# Investigate the rotator behaviour at its movement limits

XMLWordPrintable

#### Details

• Type: Improvement
• Status: Done
• Resolution: Done
• Fix Version/s: None
• Component/s:
• Labels:
• Story Points:
0
• Sprint:
TSSW Sprint - Aug 30 - Sep 13
• Team:
Telescope and Site

#### Description

There is a software end-stop limit for the rotator that stops it if the rotator tries to go beyond 90 degrees.

Please look into the implementation of the software end-stop and see if you can apply it to how we stop the rotator when the CCW falls behind.

#### Attachments

1. EnabledState.png
206 kB
2. Limit_check_Bias_Calc.png
86 kB
3. Mode Control state machine and transition logic.png
174 kB

#### Activity

Hide
Te-Wei Tsai added a comment -

After the discussion with Holger, this ticket is to find the software behavior when the rotator arrives the end-stop software limit (90/-90 degree).

Show
Te-Wei Tsai added a comment - After the discussion with Holger, this ticket is to find the software behavior when the rotator arrives the end-stop software limit (90/-90 degree).
Hide
Te-Wei Tsai added a comment - - edited

For the track command, if the demanded position value is out of range (end-stop software limit), the command will be illegal:
https://github.com/lsst-ts/ts_rotator_controller/blob/develop/src/commanding.c#L261-L281

  // tracking and slewing mode command  case TRACK_VEL_CMD:  if (!(isEnabled(state1))) {  // printf("Rejected: must be enabled state\n"); //  // 11OCT  gLastCommandIllegal = 1;  break;  }  // check for the target position being beyond allowed  // position.  if ((cmdMsg.param2 >  rotatorCommands_signal.Parameters_upperPosLimit_deg) ||  (cmdMsg.param2 <  rotatorCommands_signal.Parameters_lowerPosLimit_deg)) {  syslog(LOG_ERR, "TRACK_VEL target position exceeds range");  rotatorCommands_signal.Parameters_trackVel_rate_degPerSec =  0.0;  LsstCmdSet[2] = 0.0;  gLastCommandIllegal = 1;  break;  } 

This is the similar case of POSITIONSET command.

Show
Te-Wei Tsai added a comment - - edited For the track  command, if the demanded position value is out of range (end-stop software limit), the command will be illegal: https://github.com/lsst-ts/ts_rotator_controller/blob/develop/src/commanding.c#L261-L281 // tracking and slewing mode command case TRACK_VEL_CMD: if (!(isEnabled(state1))) { // printf("Rejected: must be enabled state\n"); // // 11OCT gLastCommandIllegal = 1; break ; } // check for the target position being beyond allowed // position. if ((cmdMsg.param2 > rotatorCommands_signal.Parameters_upperPosLimit_deg) || (cmdMsg.param2 < rotatorCommands_signal.Parameters_lowerPosLimit_deg)) { syslog(LOG_ERR, "TRACK_VEL target position exceeds range" ); rotatorCommands_signal.Parameters_trackVel_rate_degPerSec = 0.0; LsstCmdSet[2] = 0.0; gLastCommandIllegal = 1; break ; } This is the similar case of POSITIONSET command.
Hide
Te-Wei Tsai added a comment - - edited

In the simulink model, there is a subsystem: Limit_check_Bias_Calc. The positionFault will be 1 if the rotator angle is out of range.

This will write into rotatorTelemetry_signal.Flags_positionFeedbackFault. This will trigger the errorIsTrue in the state machine:

If the system is in the Enabled state and errorIsTrue is 1, the system will transition to the ControlledStopping state and stop the rotator's movement.

Show
Te-Wei Tsai added a comment - - edited In the simulink model, there is a subsystem: Limit_check_Bias_Calc . The positionFault  will be 1 if the rotator angle is out of range. This will write into rotatorTelemetry_signal.Flags_positionFeedbackFault . This will trigger the errorIsTrue in the state machine: If the system is in the Enabled  state and errorIsTrue is 1, the system will transition to the ControlledStopping state and stop the rotator's movement.
Hide
Te-Wei Tsai added a comment - - edited

Based on the implementation, the rotator CSC is using the same mechanism of end-stop limit when the CCW falls behind. Both of them make use of the trigger of errorIsTrue = 1.0 and put the system into the ControlledStopping sub-state. Thanks!

Show
Te-Wei Tsai added a comment - - edited Based on the implementation, the rotator CSC is using the same mechanism of end-stop limit when the CCW falls behind. Both of them make use of the trigger of errorIsTrue = 1.0 and put the system into the ControlledStopping  sub-state. Thanks!
Hide
Holger Drass added a comment -

Thanks, Te-Wei. This answers the question.

Show
Holger Drass added a comment - Thanks, Te-Wei. This answers the question.

#### People

Assignee:
Te-Wei Tsai
Reporter:
Holger Drass
Reviewers:
Holger Drass
Watchers:
Austin Roberts, Doug Neill, Holger Drass, Te-Wei Tsai, Tiago Ribeiro