Ejemplo n.º 1
0
        private void btnReadData_Click(object sender, EventArgs e)
        {
            if (txtDataIndex.Text == "")
            {
                MessageBox.Show("請輸入數值");
                return;
            }
            int Select_Index = Convert.ToInt16(txtDataIndex.Text) + 1;
            DeliverData = new rtAGV_Control();
            dataGridView_Log.Rows.Clear();

            //更新車體資訊
            DeliverData.tAGV_Data.tCarInfo.tPosition.eX = Convert.ToDouble(CarInfo.Tables[0].Rows[Select_Index][2].ToString());
            DeliverData.tAGV_Data.tCarInfo.tPosition.eY = Convert.ToDouble(CarInfo.Tables[0].Rows[Select_Index][3].ToString());
            DeliverData.tAGV_Data.tCarInfo.eAngle = Convert.ToDouble(CarInfo.Tables[0].Rows[Select_Index][0].ToString());

            DeliverData.tAGV_Data.tCarInfo.eCarTireSpeedLeft = Convert.ToDouble(CarInfo.Tables[0].Rows[Select_Index][10].ToString());
            DeliverData.tAGV_Data.tCarInfo.eCarTireSpeedRight = Convert.ToDouble(CarInfo.Tables[0].Rows[Select_Index][11].ToString());

            DeliverData.tAGV_Data.tCarInfo.tCarTirepositionR.eX = Convert.ToDouble(CarInfo.Tables[0].Rows[Select_Index][4].ToString());
            DeliverData.tAGV_Data.tCarInfo.tCarTirepositionR.eY = Convert.ToDouble(CarInfo.Tables[0].Rows[Select_Index][5].ToString());
            DeliverData.tAGV_Data.tCarInfo.tCarTirepositionL.eX = Convert.ToDouble(CarInfo.Tables[0].Rows[Select_Index][6].ToString());
            DeliverData.tAGV_Data.tCarInfo.tCarTirepositionL.eY = Convert.ToDouble(CarInfo.Tables[0].Rows[Select_Index][7].ToString());
            DeliverData.tAGV_Data.tCarInfo.tMotorPosition.eX = Convert.ToDouble(CarInfo.Tables[0].Rows[Select_Index][8].ToString());
            DeliverData.tAGV_Data.tCarInfo.tMotorPosition.eY = Convert.ToDouble(CarInfo.Tables[0].Rows[Select_Index][9].ToString());

            //更新車Sensor資訊
            DeliverData.tAGV_Data.tCarInfo.eWheelAngle = Convert.ToDouble(CarInfo.Tables[0].Rows[Select_Index][1].ToString());
            //DeliverData.tAGV_Data.tSensorData.tForkInputData.height = (int)GlobalVar.ForkCurrentHeight;

            //取得Path資訊
            string[] DataSrc = Main_Data.Tables[0].Rows[Select_Index][9].ToString().Split('/');
            string[] DataDst = Main_Data.Tables[0].Rows[Select_Index][10].ToString().Split('/');
            DeliverData.tAGV_Data.atPathInfo = new rtPath_Info[1];
            DeliverData.tAGV_Data.atPathInfo[0].tSrc.eX = Convert.ToDouble(DataSrc[0]);
            DeliverData.tAGV_Data.atPathInfo[0].tSrc.eY = Convert.ToDouble(DataSrc[1]);
            DeliverData.tAGV_Data.atPathInfo[0].tDest.eX = Convert.ToDouble(DataDst[0]);
            DeliverData.tAGV_Data.atPathInfo[0].tDest.eY = Convert.ToDouble(DataDst[1]);
            DeliverData.tAGV_Data.atPathInfo[0].ucTurnType = 2;
            DeliverData.tAGV_Data.atPathInfo[0].ucStatus = 1;

            object[] obj = new object[12] { Select_Index,  DeliverData.tAGV_Data.tCarInfo.tPosition.eX,  DeliverData.tAGV_Data.tCarInfo.tPosition.eY,
                        DeliverData.tAGV_Data.tCarInfo.eAngle,   DeliverData.tAGV_Data.tCarInfo.tCarTirepositionR.eX,   DeliverData.tAGV_Data.tCarInfo.tCarTirepositionR.eY,
                        DeliverData.tAGV_Data.tCarInfo.tCarTirepositionL.eX,  DeliverData.tAGV_Data.tCarInfo.tCarTirepositionL.eY,  DeliverData.tAGV_Data.tCarInfo.eCarTireSpeedLeft,
             DeliverData.tAGV_Data.tCarInfo.eCarTireSpeedRight,  DeliverData.tAGV_Data.atPathInfo[0].tSrc.eX+"/"+ DeliverData.tAGV_Data.atPathInfo[0].tSrc.eY,
             DeliverData.tAGV_Data.atPathInfo[0].tDest.eX + "/" +  DeliverData.tAGV_Data.atPathInfo[0].tDest.eY};

            DataGridViewRow dgvr = new DataGridViewRow();
            dgvr.CreateCells(dataGridView_Log, obj);
            dgvr.Height = 35;
            dgvr.DefaultCellStyle.BackColor = Color.LightBlue;
            dataGridView_Log.Rows.Add(dgvr);

            DeliverData.rtAGV_MotorCtrl(ref DeliverData.tAGV_Data.atPathInfo, 0, true);

            //Console.WriteLine("Power:" + DeliverData.tAGV_Data.CMotor.tMotorData.lMotorPower.ToString());
            //Console.WriteLine("lMotorAngle:" + DeliverData.tAGV_Data.CMotor.tMotorData.lMotorAngle.ToString());

            label_LogPower.Text = "Power:" + DeliverData.tAGV_Data.CMotor.tMotorData.lMotorPower.ToString();
            label_LogMotorAngle.Text = "MotorAngle:" + DeliverData.tAGV_Data.CMotor.tMotorData.lMotorAngle.ToString();
        }
Ejemplo n.º 2
0
        private void btnReadData_Click(object sender, EventArgs e)
        {
            if (txtDataIndex.Text == "")
            {
                MessageBox.Show("請輸入數值");
                return;
            }
            int Select_Index = Convert.ToInt16(txtDataIndex.Text) + 1;

            DeliverData = new rtAGV_Control();
            dataGridView_Log.Rows.Clear();
            try
            {
                //更新車體資訊
                DeliverData.tAGV_Data.tCarInfo.tPosition.eX = Convert.ToDouble(CarInfo.Tables[0].Rows[Select_Index][2].ToString());
                DeliverData.tAGV_Data.tCarInfo.tPosition.eY = Convert.ToDouble(CarInfo.Tables[0].Rows[Select_Index][3].ToString());
                DeliverData.tAGV_Data.tCarInfo.eAngle       = Convert.ToDouble(CarInfo.Tables[0].Rows[Select_Index][0].ToString());

                DeliverData.tAGV_Data.tCarInfo.eCarTireSpeedLeft  = Convert.ToDouble(CarInfo.Tables[0].Rows[Select_Index][10].ToString());
                DeliverData.tAGV_Data.tCarInfo.eCarTireSpeedRight = Convert.ToDouble(CarInfo.Tables[0].Rows[Select_Index][11].ToString());

                DeliverData.tAGV_Data.tCarInfo.tCarTirepositionR.eX = Convert.ToDouble(CarInfo.Tables[0].Rows[Select_Index][4].ToString());
                DeliverData.tAGV_Data.tCarInfo.tCarTirepositionR.eY = Convert.ToDouble(CarInfo.Tables[0].Rows[Select_Index][5].ToString());
                DeliverData.tAGV_Data.tCarInfo.tCarTirepositionL.eX = Convert.ToDouble(CarInfo.Tables[0].Rows[Select_Index][6].ToString());
                DeliverData.tAGV_Data.tCarInfo.tCarTirepositionL.eY = Convert.ToDouble(CarInfo.Tables[0].Rows[Select_Index][7].ToString());
                DeliverData.tAGV_Data.tCarInfo.tMotorPosition.eX    = Convert.ToDouble(CarInfo.Tables[0].Rows[Select_Index][8].ToString());
                DeliverData.tAGV_Data.tCarInfo.tMotorPosition.eY    = Convert.ToDouble(CarInfo.Tables[0].Rows[Select_Index][9].ToString());

                //更新車Sensor資訊
                DeliverData.tAGV_Data.tCarInfo.eWheelAngle = Convert.ToDouble(CarInfo.Tables[0].Rows[Select_Index][1].ToString());
                //DeliverData.tAGV_Data.tSensorData.tForkInputData.height = (int)GlobalVar.ForkCurrentHeight;

                //取得Path資訊
                string[] DataSrc = Main_Data.Tables[0].Rows[Select_Index][9].ToString().Split('/');
                string[] DataDst = Main_Data.Tables[0].Rows[Select_Index][10].ToString().Split('/');
                DeliverData.tAGV_Data.atPathInfo               = new rtPath_Info[1];
                DeliverData.tAGV_Data.atPathInfo[0].tSrc.eX    = Convert.ToDouble(DataSrc[0]);
                DeliverData.tAGV_Data.atPathInfo[0].tSrc.eY    = Convert.ToDouble(DataSrc[1]);
                DeliverData.tAGV_Data.atPathInfo[0].tDest.eX   = Convert.ToDouble(DataDst[0]);
                DeliverData.tAGV_Data.atPathInfo[0].tDest.eY   = Convert.ToDouble(DataDst[1]);
                DeliverData.tAGV_Data.atPathInfo[0].ucTurnType = 2;
                DeliverData.tAGV_Data.atPathInfo[0].ucStatus   = 1;



                if (MainForm.comboBox_MachineType_Num == (byte)rtAGV_Control.Type_Self_Carriage.BigCar)
                {
                    obj = new object[12] {
                        Select_Index, DeliverData.tAGV_Data.tCarInfo.tPosition.eX, DeliverData.tAGV_Data.tCarInfo.tPosition.eY,
                        DeliverData.tAGV_Data.tCarInfo.eAngle, DeliverData.tAGV_Data.tCarInfo.tCarTirepositionR.eX, DeliverData.tAGV_Data.tCarInfo.tCarTirepositionR.eY,
                        DeliverData.tAGV_Data.tCarInfo.tCarTirepositionL.eX, DeliverData.tAGV_Data.tCarInfo.tCarTirepositionL.eY, DeliverData.tAGV_Data.tCarInfo.eCarTireSpeedLeft,
                        DeliverData.tAGV_Data.tCarInfo.eCarTireSpeedRight, DeliverData.tAGV_Data.atPathInfo[0].tSrc.eX + "/" + DeliverData.tAGV_Data.atPathInfo[0].tSrc.eY,
                        DeliverData.tAGV_Data.atPathInfo[0].tDest.eX + "/" + DeliverData.tAGV_Data.atPathInfo[0].tDest.eY
                    };
                }
                else if (MainForm.comboBox_MachineType_Num == (byte)rtAGV_Control.Type_Self_Carriage.MediumCar)
                {
                }
                else if (MainForm.comboBox_MachineType_Num == (byte)rtAGV_Control.Type_Self_Carriage.SmallCar)
                {
                    obj = new object[8] {
                        Select_Index, DeliverData.tAGV_Data.tCarInfo.tPosition.eX, DeliverData.tAGV_Data.tCarInfo.tPosition.eY,
                        DeliverData.tAGV_Data.tCarInfo.eAngle, DeliverData.tAGV_Data.tCarInfo.eCarTireSpeedLeft,
                        DeliverData.tAGV_Data.tCarInfo.eCarTireSpeedRight, DeliverData.tAGV_Data.atPathInfo[0].tSrc.eX + "/" + DeliverData.tAGV_Data.atPathInfo[0].tSrc.eY,
                        DeliverData.tAGV_Data.atPathInfo[0].tDest.eX + "/" + DeliverData.tAGV_Data.atPathInfo[0].tDest.eY
                    };
                }
                else if (MainForm.comboBox_MachineType_Num == (byte)rtAGV_Control.Type_Self_Carriage.Other)
                {
                }


                DataGridViewRow dgvr = new DataGridViewRow();
                dgvr.CreateCells(dataGridView_Log, obj);
                dgvr.Height = 35;
                dgvr.DefaultCellStyle.BackColor = Color.LightBlue;
                dataGridView_Log.Rows.Add(dgvr);


                //判斷現在車種為何
                DeliverData.rtAGV_Chang_Type_Self_Carriage(MainForm.comboBox_MachineType_Num);

                DeliverData.rtAGV_MotorCtrl(ref DeliverData.tAGV_Data.atPathInfo, 0, true);

                //Console.WriteLine("Power:" + DeliverData.tAGV_Data.CMotor.tMotorData.lMotorPower.ToString());
                //Console.WriteLine("lMotorAngle:" + DeliverData.tAGV_Data.CMotor.tMotorData.lMotorAngle.ToString());

                label_LogPower.Text      = "Power:" + DeliverData.tAGV_Data.CMotor.tMotorData.lMotorPower.ToString();
                label_LogMotorAngle.Text = "MotorAngle:" + DeliverData.tAGV_Data.CMotor.tMotorData.lMotorAngle.ToString();
            }
            catch (Exception)
            {
                MessageBox.Show("此筆數據為非導航狀態");
            }
        }
Ejemplo n.º 3
0
        private void btnCalculationResults_Click(object sender, EventArgs e)
        {
            if (textBox_PositionX.Text == "" || textBox_PositionY.Text == "" || textBox_Angle.Text == ""
             || textBox_CarTireSpeedLeft.Text == "" || textBox_CarTireSpeedRight.Text == "" || textBox_CarTirepositionR_X.Text == ""
             || textBox_CarTirepositionR_Y.Text == "" || textBox_CarTirepositionL_X.Text == "" || textBox_CarTirepositionL_Y.Text == ""
             || textBox_MotorPosition_X.Text == "" || textBox_MotorPosition_Y.Text == "" || textBox_WheelAngle.Text == ""
             || textBox_Src_X.Text == "" || textBox_Src_Y.Text == "" || textBox_Dest_X.Text == "" || textBox_Dest_Y.Text == "")
            {
                MessageBox.Show("請輸入數值");
                return;
            }
            if (textBox_PositionX.Text == "")
            {
                return;
            }

            //int Select_Index = 1;
            DeliverData = new rtAGV_Control();
            dataGridView_Text.Rows.Clear();
            //更新車體資訊
            DeliverData.tAGV_Data.tCarInfo.tPosition.eX = Convert.ToDouble(textBox_PositionX.Text);
            DeliverData.tAGV_Data.tCarInfo.tPosition.eY = Convert.ToDouble(textBox_PositionY.Text);
            DeliverData.tAGV_Data.tCarInfo.eAngle = Convert.ToDouble(textBox_Angle.Text);

            DeliverData.tAGV_Data.tCarInfo.eCarTireSpeedLeft = Convert.ToDouble(textBox_CarTireSpeedLeft.Text);
            DeliverData.tAGV_Data.tCarInfo.eCarTireSpeedRight = Convert.ToDouble(textBox_CarTireSpeedRight.Text);

            DeliverData.tAGV_Data.tCarInfo.tCarTirepositionR.eX = Convert.ToDouble(textBox_CarTirepositionR_X.Text);
            DeliverData.tAGV_Data.tCarInfo.tCarTirepositionR.eY = Convert.ToDouble(textBox_CarTirepositionR_Y.Text);
            DeliverData.tAGV_Data.tCarInfo.tCarTirepositionL.eX = Convert.ToDouble(textBox_CarTirepositionL_X.Text);
            DeliverData.tAGV_Data.tCarInfo.tCarTirepositionL.eY = Convert.ToDouble(textBox_CarTirepositionL_Y.Text);
            DeliverData.tAGV_Data.tCarInfo.tMotorPosition.eX = Convert.ToDouble(textBox_MotorPosition_X.Text);
            DeliverData.tAGV_Data.tCarInfo.tMotorPosition.eY = Convert.ToDouble(textBox_MotorPosition_Y.Text);

            //更新車Sensor資訊
            DeliverData.tAGV_Data.tCarInfo.eWheelAngle = Convert.ToDouble(textBox_WheelAngle.Text);

            //取得Path資訊
            DeliverData.tAGV_Data.atPathInfo = new rtPath_Info[1];
            DeliverData.tAGV_Data.atPathInfo[0].tSrc.eX = Convert.ToDouble(textBox_Src_X.Text);
            DeliverData.tAGV_Data.atPathInfo[0].tSrc.eY = Convert.ToDouble(textBox_Src_Y.Text);
            DeliverData.tAGV_Data.atPathInfo[0].tDest.eX = Convert.ToDouble(textBox_Dest_X.Text);
            DeliverData.tAGV_Data.atPathInfo[0].tDest.eY = Convert.ToDouble(textBox_Dest_Y.Text);
            DeliverData.tAGV_Data.atPathInfo[0].ucTurnType = Convert.ToByte(textBox_TurnType.Text);
            DeliverData.tAGV_Data.atPathInfo[0].ucStatus = 1;

            object[] obj = new object[11] { DeliverData.tAGV_Data.tCarInfo.tPosition.eX,  DeliverData.tAGV_Data.tCarInfo.tPosition.eY,
                        DeliverData.tAGV_Data.tCarInfo.eAngle,   DeliverData.tAGV_Data.tCarInfo.tCarTirepositionR.eX,   DeliverData.tAGV_Data.tCarInfo.tCarTirepositionR.eY,
                        DeliverData.tAGV_Data.tCarInfo.tCarTirepositionL.eX,  DeliverData.tAGV_Data.tCarInfo.tCarTirepositionL.eY,  DeliverData.tAGV_Data.tCarInfo.eCarTireSpeedLeft,
             DeliverData.tAGV_Data.tCarInfo.eCarTireSpeedRight,  DeliverData.tAGV_Data.atPathInfo[0].tSrc.eX+"/"+ DeliverData.tAGV_Data.atPathInfo[0].tSrc.eY,
             DeliverData.tAGV_Data.atPathInfo[0].tDest.eX + "/" +  DeliverData.tAGV_Data.atPathInfo[0].tDest.eY};

            DataGridViewRow dgvr = new DataGridViewRow();
            dgvr.CreateCells(dataGridView_Text, obj);
            dgvr.Height = 35;
            dgvr.DefaultCellStyle.BackColor = Color.LightBlue;
            dataGridView_Text.Rows.Add(dgvr);

            DeliverData.rtAGV_MotorCtrl(ref DeliverData.tAGV_Data.atPathInfo, 0, true);

            //Console.WriteLine("Power:" + DeliverData.tAGV_Data.CMotor.tMotorData.lMotorPower.ToString());
            //Console.WriteLine("lMotorAngle:" + DeliverData.tAGV_Data.CMotor.tMotorData.lMotorAngle.ToString());

            label_TextPower.Text = "Power:" + DeliverData.tAGV_Data.CMotor.tMotorData.lMotorPower.ToString();
            label_TextMotorAngle.Text = "MotorAngle:" + DeliverData.tAGV_Data.CMotor.tMotorData.lMotorAngle.ToString();
        }
Ejemplo n.º 4
0
        private void btnCalculationResults_Click(object sender, EventArgs e)
        {
            if (textBox_PositionX.Text == "" || textBox_PositionY.Text == "" || textBox_Angle.Text == "" ||
                textBox_CarTireSpeedLeft.Text == "" || textBox_CarTireSpeedRight.Text == "" || textBox_CarTirepositionR_X.Text == "" ||
                textBox_CarTirepositionR_Y.Text == "" || textBox_CarTirepositionL_X.Text == "" || textBox_CarTirepositionL_Y.Text == "" ||
                textBox_MotorPosition_X.Text == "" || textBox_MotorPosition_Y.Text == "" || textBox_WheelAngle.Text == "" ||
                textBox_Src_X.Text == "" || textBox_Src_Y.Text == "" || textBox_Dest_X.Text == "" || textBox_Dest_Y.Text == "")
            {
                MessageBox.Show("請輸入數值");
                return;
            }
            if (textBox_PositionX.Text == "")
            {
                return;
            }

            //int Select_Index = 1;
            DeliverData = new rtAGV_Control();
            dataGridView_Text.Rows.Clear();
            try
            {
                //if (MainForm.comboBox_MachineType_Num == (byte)rtAGV_Control.Type_Self_Carriage.BigCar)
                {
                    //更新車體資訊
                    DeliverData.tAGV_Data.tCarInfo.tPosition.eX = Convert.ToDouble(textBox_PositionX.Text);
                    DeliverData.tAGV_Data.tCarInfo.tPosition.eY = Convert.ToDouble(textBox_PositionY.Text);
                    DeliverData.tAGV_Data.tCarInfo.eAngle       = Convert.ToDouble(textBox_Angle.Text);

                    DeliverData.tAGV_Data.tCarInfo.eCarTireSpeedLeft  = Convert.ToDouble(textBox_CarTireSpeedLeft.Text);
                    DeliverData.tAGV_Data.tCarInfo.eCarTireSpeedRight = Convert.ToDouble(textBox_CarTireSpeedRight.Text);

                    DeliverData.tAGV_Data.tCarInfo.tCarTirepositionR.eX = Convert.ToDouble(textBox_CarTirepositionR_X.Text);
                    DeliverData.tAGV_Data.tCarInfo.tCarTirepositionR.eY = Convert.ToDouble(textBox_CarTirepositionR_Y.Text);
                    DeliverData.tAGV_Data.tCarInfo.tCarTirepositionL.eX = Convert.ToDouble(textBox_CarTirepositionL_X.Text);
                    DeliverData.tAGV_Data.tCarInfo.tCarTirepositionL.eY = Convert.ToDouble(textBox_CarTirepositionL_Y.Text);
                    DeliverData.tAGV_Data.tCarInfo.tMotorPosition.eX    = Convert.ToDouble(textBox_MotorPosition_X.Text);
                    DeliverData.tAGV_Data.tCarInfo.tMotorPosition.eY    = Convert.ToDouble(textBox_MotorPosition_Y.Text);

                    //更新車Sensor資訊
                    DeliverData.tAGV_Data.tCarInfo.eWheelAngle = Convert.ToDouble(textBox_WheelAngle.Text);

                    //取得Path資訊
                    DeliverData.tAGV_Data.atPathInfo               = new rtPath_Info[1];
                    DeliverData.tAGV_Data.atPathInfo[0].tSrc.eX    = Convert.ToDouble(textBox_Src_X.Text);
                    DeliverData.tAGV_Data.atPathInfo[0].tSrc.eY    = Convert.ToDouble(textBox_Src_Y.Text);
                    DeliverData.tAGV_Data.atPathInfo[0].tDest.eX   = Convert.ToDouble(textBox_Dest_X.Text);
                    DeliverData.tAGV_Data.atPathInfo[0].tDest.eY   = Convert.ToDouble(textBox_Dest_Y.Text);
                    DeliverData.tAGV_Data.atPathInfo[0].ucTurnType = Convert.ToByte(textBox_TurnType.Text);
                    DeliverData.tAGV_Data.atPathInfo[0].ucStatus   = 1;

                    //車種不同 顯示也會不一樣
                    if (MainForm.comboBox_MachineType_Num == (byte)rtAGV_Control.Type_Self_Carriage.BigCar)
                    {
                        obj = new object[11] {
                            DeliverData.tAGV_Data.tCarInfo.tPosition.eX, DeliverData.tAGV_Data.tCarInfo.tPosition.eY,
                            DeliverData.tAGV_Data.tCarInfo.eAngle, DeliverData.tAGV_Data.tCarInfo.tCarTirepositionR.eX, DeliverData.tAGV_Data.tCarInfo.tCarTirepositionR.eY,
                            DeliverData.tAGV_Data.tCarInfo.tCarTirepositionL.eX, DeliverData.tAGV_Data.tCarInfo.tCarTirepositionL.eY, DeliverData.tAGV_Data.tCarInfo.eCarTireSpeedLeft,
                            DeliverData.tAGV_Data.tCarInfo.eCarTireSpeedRight, DeliverData.tAGV_Data.atPathInfo[0].tSrc.eX + "/" + DeliverData.tAGV_Data.atPathInfo[0].tSrc.eY,
                            DeliverData.tAGV_Data.atPathInfo[0].tDest.eX + "/" + DeliverData.tAGV_Data.atPathInfo[0].tDest.eY
                        };
                    }
                    else if (MainForm.comboBox_MachineType_Num == (byte)rtAGV_Control.Type_Self_Carriage.MediumCar)
                    {
                    }
                    else if (MainForm.comboBox_MachineType_Num == (byte)rtAGV_Control.Type_Self_Carriage.SmallCar)
                    {
                        obj = new object[7] {
                            DeliverData.tAGV_Data.tCarInfo.tPosition.eX, DeliverData.tAGV_Data.tCarInfo.tPosition.eY,
                            DeliverData.tAGV_Data.tCarInfo.eAngle, DeliverData.tAGV_Data.tCarInfo.eCarTireSpeedLeft,
                            DeliverData.tAGV_Data.tCarInfo.eCarTireSpeedRight, DeliverData.tAGV_Data.atPathInfo[0].tSrc.eX + "/" + DeliverData.tAGV_Data.atPathInfo[0].tSrc.eY,
                            DeliverData.tAGV_Data.atPathInfo[0].tDest.eX + "/" + DeliverData.tAGV_Data.atPathInfo[0].tDest.eY
                        };
                    }
                    else if (MainForm.comboBox_MachineType_Num == (byte)rtAGV_Control.Type_Self_Carriage.Other)
                    {
                    }


                    DataGridViewRow dgvr = new DataGridViewRow();
                    dgvr.CreateCells(dataGridView_Text, obj);
                    dgvr.Height = 35;
                    dgvr.DefaultCellStyle.BackColor = Color.LightBlue;
                    dataGridView_Text.Rows.Add(dgvr);

                    //判斷現在車種為何
                    DeliverData.rtAGV_Chang_Type_Self_Carriage(MainForm.comboBox_MachineType_Num);

                    DeliverData.rtAGV_MotorCtrl(ref DeliverData.tAGV_Data.atPathInfo, 0, true);

                    //Console.WriteLine("Power:" + DeliverData.tAGV_Data.CMotor.tMotorData.lMotorPower.ToString());
                    //Console.WriteLine("lMotorAngle:" + DeliverData.tAGV_Data.CMotor.tMotorData.lMotorAngle.ToString());

                    label_TextPower.Text      = "Power:" + DeliverData.tAGV_Data.CMotor.tMotorData.lMotorPower.ToString();
                    label_TextMotorAngle.Text = "MotorAngle:" + DeliverData.tAGV_Data.CMotor.tMotorData.lMotorAngle.ToString();

                    //將數值寫回儲存資料內
                    PositionX          = textBox_PositionX.Text;
                    PositionY          = textBox_PositionY.Text;
                    Angle              = textBox_Angle.Text;
                    CarTireSpeedLeft   = textBox_CarTireSpeedLeft.Text;
                    CarTireSpeedRight  = textBox_CarTireSpeedRight.Text;
                    CarTirepositionR_X = textBox_CarTirepositionR_X.Text;
                    CarTirepositionR_Y = textBox_CarTirepositionR_Y.Text;
                    CarTirepositionL_X = textBox_CarTirepositionL_X.Text;
                    CarTirepositionL_Y = textBox_CarTirepositionL_Y.Text;
                    MotorPosition_X    = textBox_MotorPosition_X.Text;
                    MotorPosition_Y    = textBox_MotorPosition_Y.Text;
                    WheelAngle         = textBox_WheelAngle.Text;
                    TurnType           = textBox_TurnType.Text;
                    Src_X              = textBox_Src_X.Text;
                    Src_Y              = textBox_Src_Y.Text;
                    Dest_X             = textBox_Dest_X.Text;
                    Dest_Y             = textBox_Dest_Y.Text;
                }
            }
            catch (Exception)
            {
                MessageBox.Show("請正確輸入數值");
            }
        }