示例#1
0
        public void PsiMeasureFinish()
        {
            // 织构测量没有拟合

            //// 更新拟合图像
            //string seriesName = myApi.AnglePsi[MeasureIndex_Psi].ToString();
            //string fileName = myApi.RecvDataFileName;
            //double[] x;
            //double[] y;
            //// 解析txt文件
            //myUart.Pack_Debug_out(null, "[Texture] parse txt=" + fileName);
            //CurveFitting.txt_parse(fileName, out x, out y);
            //// 更新拟合图像
            //ChartFittingUpdate(seriesName, fileName, x);


            if (MeasureIndex_Psi < myApi.AnglePsi.Length - 1)
            {
                MeasureIndex_Psi++;
                //if ((0 == myApi.MeasureMethod) || (1 == myApi.MeasureMethod))
                //{
                myApi.SendAnglePsi(myApi.AnglePsi[MeasureIndex_Psi]);
                timerUartRecv.Interval = 1000 * 10;
                timerUartRecv.Enabled  = true;
                //}
                //else
                //{
                //    // T.B.D
                //}
            }
            else
            {
                MeasureIndex_Psi = 0;
                //// 更新应力计算结果
                //StressViewUpdate(myApi.AnglePsi.Length);
                //// 生成RSC文件
                //ToolStripMenuItemRSC_Click(this, null);
                //// 生成xls文件
                //ChartFittingImageName = myApi.RecvDataFileNameArray[0].Replace("txt", "bmp");
                //ChartFittingExport(ChartFittingImageName);
                ////ToolStripMenuItemMsExcel_Click(this, null);

                //if (1 == FiveAxisInUse)
                //{
                //    if (MeasureIndex_XYZ < myApi.AngleBeta.Length - 1)
                //    {
                //        MeasureIndex_XYZ++;
                //        myApi.SendAngleABXYZ(MeasureIndex_XYZ, MeasureIndex_Psi);
                //        timerUartRecv.Interval = 1000 * 60;
                //        timerUartRecv.Enabled = true;
                //    }
                //    else
                //    {
                //        myApi.SendCloseShutter();
                //        timerUartRecv.Interval = 1000 * 5;
                //        timerUartRecv.Enabled = true;
                //    }
                //}
                //else
                //{
                //    myApi.SendCloseShutter();
                //    timerUartRecv.Interval = 1000 * 5;
                //    timerUartRecv.Enabled = true;
                //}
            }
        }