|
|
@@ -540,22 +540,34 @@ namespace OHV.Module.Interactivity.PopUp
|
|
|
|
|
|
private void ExecuteMoveToCommand( )
|
|
|
{
|
|
|
- this.messageController.ShowConfirmationPopupView( $"Clamp Move To {this.SelectedPosition}" , r =>
|
|
|
- {
|
|
|
- if ( r.Result == ButtonResult.OK )
|
|
|
- {
|
|
|
- var msg = new AxisControlEventArgs();
|
|
|
- msg.Kind = AxisControlEventArgs.eAxisControlKind.Move;
|
|
|
- msg.AxisName = this.SelectAxis;
|
|
|
+ var error = string.Empty;
|
|
|
|
|
|
- if ( SelectedPosition.Equals( ConstString.TEACH_POSITION_LOCK ) )
|
|
|
- msg.PosDir = AxisControlEventArgs.ePosDir.Lock;
|
|
|
- else
|
|
|
- msg.PosDir = AxisControlEventArgs.ePosDir.UnLock;
|
|
|
+ if ( this.IsLeftServoFault || this.IsRightServoFault )
|
|
|
+ error = "Is Servo Fault";
|
|
|
+ else if ( !this.IsLeftServoOn || !this.IsRightServoOn )
|
|
|
+ error = "Is Servo OFF";
|
|
|
|
|
|
- this.PublishEvent( msg );
|
|
|
- }
|
|
|
- } );
|
|
|
+ if ( error != string.Empty )
|
|
|
+ this.messageController.ShowNotificationView( error );
|
|
|
+ else
|
|
|
+ {
|
|
|
+ this.messageController.ShowConfirmationPopupView( $"Clamp Move To {this.SelectedPosition}" , r =>
|
|
|
+ {
|
|
|
+ if ( r.Result == ButtonResult.OK )
|
|
|
+ {
|
|
|
+ var msg = new AxisControlEventArgs();
|
|
|
+ msg.Kind = AxisControlEventArgs.eAxisControlKind.Move;
|
|
|
+ msg.AxisName = this.SelectAxis;
|
|
|
+
|
|
|
+ if ( SelectedPosition.Equals( ConstString.TEACH_POSITION_LOCK ) )
|
|
|
+ msg.PosDir = AxisControlEventArgs.ePosDir.Lock;
|
|
|
+ else
|
|
|
+ msg.PosDir = AxisControlEventArgs.ePosDir.UnLock;
|
|
|
+
|
|
|
+ this.PublishEvent( msg );
|
|
|
+ }
|
|
|
+ } );
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
private void ExecuteSelectPosCommand( object obj )
|