Beispiel #1
0
        void ShowResults_InMoveP()
        {
            //先清空原有的文本
            TextBoxPointResult.Text = "";

            TextBoxPointResult.AppendText("def movep_test(): \r\n");

            check_Parameters();

            for (int i = 0; i < Global_Tick; i++)
            {
                string Str = "movep(";

                //如果勾选了与Base合成,则用Pose_add合成上去
                if (Add_What == 1)
                {
                    Str += "pose_add(AddVector, ";
                }
                if (Add_What == 2)
                {
                    Str += "pose_trans(AddVector, ";
                }

                Str += Total_PointRecordString[i];

                if (Add_What == 1 || Add_What == 2)
                {
                    Str += ")";
                }

                if (Include_Accleration)
                {
                    Str += ",a = " + txtAccleration.Text.ToString();
                }
                if (Include_Speed)
                {
                    Str += ",v = " + txtSpeed.Text.ToString();
                }
                if (Include_Radius)
                {
                    Str += ",r = " + txtRadius.Text.ToString();
                }

                //如果三个都不包含,则
                Str += ") \r\n";

                TextBoxPointResult.AppendText(Str);
            }

            TextBoxPointResult.AppendText("end \r\n");
            TextBoxPointResult.AppendText("movep_test()  \r\n");
        }
Beispiel #2
0
        //貌似用MoveJ记录六个关节值还不能,因为关节值无法合成新的向量
        void ShowResults_InMoveJ()
        {
            //先清空原有的文本
            TextBoxPointResult.Text = "";

            TextBoxPointResult.AppendText("def movej_test(): \r\n");

            check_Parameters();
            #region 以下是获取六个关节数值的方式生成movej的脚本

            /*
             * for (int i = 0; i < Global_Tick; i++)
             * {
             *  string Str = "";
             *
             *  Str += "movej(" + Total_AngleRecordString[i];
             *
             *  if (Include_Accleration)
             *  {
             *      Str += ", a = " + txtAccleration.Text.ToString();
             *  }
             *  if (Include_Speed)
             *  {
             *      Str += ", v = " + txtSpeed.Text.ToString();
             *  }
             *  if (Include_Radius)
             *  {
             *      Str += ", r = " + txtRadius.Text.ToString();
             *  }
             *
             *  //如果三个都不包含,则
             *  Str += ") \r\n";
             *
             *  //TextBoxPointResult.AppendText("movel(" + Total_PointRecordString[i] + ",a = " + txtAccleration.Text.ToString() + ",v = " + txtSpeed.Text.ToString() + ",r = " + txtRadius.Text.ToString() + ") \r\n");
             *  TextBoxPointResult.AppendText(Str);
             * }
             */
            #endregion

            #region 以下是切换成点位的方式生成movej的脚本
            for (int i = 0; i < Global_Tick; i++)
            {
                string Str = "movej(";

                //如果勾选了与Base合成,则用Pose_add合成上去
                if (Add_What == 1)
                {
                    Str += "pose_add(AddVector, ";
                }
                if (Add_What == 2)
                {
                    Str += "pose_trans(AddVector, ";
                }

                Str += Total_PointRecordString[i];

                if (Add_What == 1 || Add_What == 2)
                {
                    Str += ")";
                }

                if (Include_Accleration)
                {
                    Str += ",a = " + txtAccleration.Text.ToString();
                }
                if (Include_Speed)
                {
                    Str += ",v = " + txtSpeed.Text.ToString();
                }
                if (Include_Radius)
                {
                    Str += ",r = " + txtRadius.Text.ToString();
                }

                //如果三个都不包含,则
                Str += ") \r\n";

                TextBoxPointResult.AppendText(Str);
            }

            #endregion

            TextBoxPointResult.AppendText("end \r\n");
            TextBoxPointResult.AppendText("movej_test()  \r\n");
        }