Пример #1
0
        private void button_Add_Click(object sender, EventArgs e)
        {
            double x;
            double y;
            double theta;

            if (double.TryParse(tB_CycleRunX.Text, out x) && double.TryParse(tB_CycleRunY.Text, out y) && double.TryParse(tB_CycleRunTheta.Text, out theta))
            {
                MapAGVPosition temp = new MapAGVPosition();
                temp.Angle    = theta;
                temp.Position = new MapPosition(x, y);
                cycleRunMovingAGVPosition.Add(temp);
                listBox_MovingPoint.Items.Add(computeFunction.GetMapAGVPositionStringWithAngle(temp));
            }
        }
Пример #2
0
        private void UpdateMoveControlJogPitch()
        {
            if (localData.MoveControlData.MotionControlData.JoystickMode)
            {
                label_JogPitch_JoystickValue.Text      = "開啟中";
                label_JogPitch_JoystickValue.ForeColor = Color.Green;
            }
            else
            {
                label_JogPitch_JoystickValue.Text      = "關閉中";
                label_JogPitch_JoystickValue.ForeColor = Color.Red;
            }

            pB_JogPitch_AllServoOn.BackColor  = (mainFlow.MoveControl.MotionControl.AllServoOn ? Color.Green : Color.Transparent);
            pB_JogPitch_AllServoOff.BackColor = (mainFlow.MoveControl.MotionControl.AllServoOff ? Color.Red : Color.Transparent);

            label_JogPitch_LineVelocityValue.Text = localData.MoveControlData.MotionControlData.JoystickLineAxisData.Velocity.ToString("0");
            label_JogPitch_LineAccValue.Text      = localData.MoveControlData.MotionControlData.JoystickLineAxisData.Acceleration.ToString("0");
            label_JogPitch_LineDecValue.Text      = localData.MoveControlData.MotionControlData.JoystickLineAxisData.Deceleration.ToString("0");

            label_JogPitch_ThetaVelocityValue.Text = localData.MoveControlData.MotionControlData.JoystickThetaAxisData.Velocity.ToString("0");
            label_JogPitch_ThetaAccValue.Text      = localData.MoveControlData.MotionControlData.JoystickThetaAxisData.Acceleration.ToString("0");
            label_JogPitch_ThetaDecValue.Text      = localData.MoveControlData.MotionControlData.JoystickThetaAxisData.Deceleration.ToString("0");

            ThetaSectionDeviation temp = localData.MoveControlData.ThetaSectionDeviation;

            if (temp != null)
            {
                label_JogPitch_SectionDeviationValue.Text = temp.SectionDeviation.ToString("0.0");
                label_JogPitch_SectionThetaValue.Text     = temp.Theta.ToString("0.0");

                if (Math.Abs(temp.SectionDeviation) <= localData.MoveControlData.MoveControlConfig.Safety[EnumMoveControlSafetyType.OntimeReviseSectionDeviationLine].Range / 2)
                {
                    label_JogPitch_SectionDeviationValue.ForeColor = Color.Green;
                }
                else
                {
                    label_JogPitch_SectionDeviationValue.ForeColor = Color.Red;
                }

                if (Math.Abs(temp.Theta) <= localData.MoveControlData.MoveControlConfig.Safety[EnumMoveControlSafetyType.OntimeReviseTheta].Range / 2)
                {
                    label_JogPitch_SectionThetaValue.ForeColor = Color.Green;
                }
                else
                {
                    label_JogPitch_SectionThetaValue.ForeColor = Color.Red;
                }
            }
            else
            {
                label_JogPitch_SectionDeviationValue.Text      = "---";
                label_JogPitch_SectionDeviationValue.ForeColor = Color.Red;
                label_JogPitch_SectionThetaValue.Text          = "---";
                label_JogPitch_SectionThetaValue.ForeColor     = Color.Red;
            }

            if (localData.MoveControlData.MoveControlCanAuto)
            {
                label_JogPitch_CanAuto.Text        = "可以Auto";
                label_JogPitch_CanAuto.ForeColor   = Color.Green;
                label_JogPitch_CantAutoReason.Text = "";
            }
            else
            {
                label_JogPitch_CanAuto.Text        = "不能Auto";
                label_JogPitch_CanAuto.ForeColor   = Color.Red;
                label_JogPitch_CantAutoReason.Text = localData.MoveControlData.MoveControlCantAutoReason;
            }

            label_JogPitch_RealPositionValue.Text = computeFunction.GetMapAGVPositionStringWithAngle(localData.Real);
        }