예제 #1
0
        virtual public bool Move(MapAGVPosition end, double lineVelocity, double lineAcc, double lineDec, double lineJerk, double thetaVelocity, double thetaAcc, double thetaDec, double thetaJerk)
        {
            if (mipcControl.AGV_Move(end, lineVelocity, lineAcc, lineDec, lineJerk, thetaVelocity, thetaAcc, thetaDec, thetaJerk))
            {
                MapAGVPosition now = localData.Real;

                double distance = 10000;

                if (now != null)
                {
                    distance = computeFunction.GetDistanceFormTwoAGVPosition(now, end) * 2;
                }

                if (lineVelocity != eq.Velocity)
                {
                    SimulateControl.SetMoveCommandSimulateData(distance, lineVelocity, lineAcc, lineDec, lineJerk);
                }
                else
                {
                    SimulateControl.SetMoveCommandSimulateData(distance, lineVelocity, lineAcc, lineDec, lineJerk, false);
                }

                localData.MoveControlData.MotionControlData.PreMoveStatus = EnumAxisMoveStatus.PreMove;
                return(true);
            }
            else
            {
                return(false);
            }
        }
예제 #2
0
 public bool Stop_EMS()
 {
     if (mipcControl.AGV_Stop(ems.Deceleration, ems.Jerk, turn_Moving.Deceleration, turn_Moving.Jerk))
     {
         SimulateControl.SetVChangeSimulateData(0, move.Acceleration, ems.Deceleration, ems.Jerk);
         return(true);
     }
     else
     {
         return(false);
     }
 }
예제 #3
0
 public bool Stop_SpinTurn()
 {
     if (mipcControl.AGV_Stop(move.Deceleration, move.Jerk, turn.Deceleration, turn.Jerk))
     {
         SimulateControl.SetVChangeSimulateData(0, move.Acceleration, move.Deceleration, move.Jerk);
         return(true);
     }
     else
     {
         return(false);
     }
 }
예제 #4
0
 public bool Move_VelocityChange(double newVelocity)
 {
     if (mipcControl.AGV_ChangeVelocity(newVelocity))
     {
         SimulateControl.SetVChangeSimulateData(newVelocity, move.Acceleration, move.Deceleration, move.Jerk);
         return(true);
     }
     else
     {
         return(false);
     }
 }
예제 #5
0
        public MotionControlHandler(MIPCControlHandler mipcControl, AlarmHandler alarmHandler, string normalLogName)
        {
            this.mipcControl  = mipcControl;
            this.alarmHandler = alarmHandler;
            move            = localData.MoveControlData.CreateMoveCommandConfig.Move;
            turn_Moving     = localData.MoveControlData.CreateMoveCommandConfig.Turn_Moving;
            ems             = localData.MoveControlData.CreateMoveCommandConfig.EMS;
            turn            = localData.MoveControlData.CreateMoveCommandConfig.Turn;
            eq              = localData.MoveControlData.CreateMoveCommandConfig.EQ;
            SimulateControl = new SimulateControl("SimulateControl");

            this.normalLogName = normalLogName;
            setPositionTimer.Restart();
            ReadTurnParameterXML();

            spinTurnStopTheta = computeFunction.GetAccDecDistance(turn.Velocity, 0, turn.Deceleration, turn.Jerk);
        }