Esempio n. 1
0
        private void 设置最大功率_Click(object sender, EventArgs e)
        {
            int power = int.Parse(功率.Text);

            DateSave.Instance().Production.WeldPower = power;
            DateSave.Instance().SaveDoc();
        }
Esempio n. 2
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            double sd = 0.0;

            TableManage.TableDriver("运动平台")._GetAdc(2, out sd);
            if (sd > 0.6)
            {
                Thread.Sleep(10);
                time = time + (float)4;


                DateSave.Instance().Production.WeldDate.Add((DateSave.Instance().Production.WeldPower / 8) * (float)sd);
                // curveGraph1.
            }
            if (sd < 0.6 && sd > 0.1)
            {
                // curveGraph1.ShowCurve(0, 0);
            }
            else
            {
                //for (int i=0;i< DateSave.Instance().Production.WeldDate.Count;i++)
                //{
                //    curveGraph1.ShowCurve(DateSave.Instance().Production.WeldDate[i],i/ DateSave.Instance().Production.WeldDate.Count);

                //}
            }
        }
Esempio n. 3
0
 private void StartForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     DateSave.Instance().SaveDoc();
     IOManage.OUTPUT("三色灯红").SetOutBit(false);
     IOManage.OUTPUT("三色灯黄").SetOutBit(false);
     IOManage.OUTPUT("三色灯绿").SetOutBit(false);
 }
Esempio n. 4
0
        public void RunHome(object HubNum)
        {
            MainModule.FormMain.bHomeReady = false;
            TableManage.TableDriver("运动平台").Home(TableAxisName.Z);
            Thread.Sleep(200);
            while (true)
            {
                if (DateSave.Instance().Production.EStop == true)
                {
                    threadList[0].Abort();
                }
                if (TableManage.TableDriver("运动平台").HomeDone(TableAxisName.Z))
                {
                    Weld_Log.Instance().Enqueue(LOG_LEVEL.LEVEL_3, "[运动平台],Z轴回原完成");
                    break;
                }
            }
            if (DateSave.Instance().Production.WeldOther == 1)
            {
                TableManage.TableDriver("运动平台").Home(TableAxisName.X);
                TableManage.TableDriver("运动平台").Home(TableAxisName.Y);
                Thread.Sleep(200);
                //  TableManage.TableDriver("运动平台").Home(TableAxisName.Z);
                while (true)
                {
                    if (DateSave.Instance().Production.EStop == true)
                    {
                        threadList[0].Abort();
                    }
                    if (TableManage.TableDriver("运动平台").HomeDone(TableAxisName.X) && TableManage.TableDriver("运动平台").HomeDone(TableAxisName.Y) /*&& TableManage.TableDriver("运动平台").HomeDone(TableAxisName.Z)*/)
                    {
                        Weld_Log.Instance().Enqueue(LOG_LEVEL.LEVEL_3, "[运动平台],XY轴回原完成");
                        break;
                    }
                }
                MainModule.FormMain.bHomeReady = true;
                threadList[0].Abort();
            }
            else
            {
                TableManage.TableDriver("运动平台").Home(TableAxisName.X);
                TableManage.TableDriver("运动平台").Home(TableAxisName.Y);

                TableManage.TableDriver("运动平台").Home(TableAxisName.U);
                while (true)
                {
                    if (DateSave.Instance().Production.EStop == true)
                    {
                        threadList[0].Abort();
                    }
                    if (TableManage.TableDriver("运动平台").HomeDone(TableAxisName.X) && TableManage.TableDriver("运动平台").HomeDone(TableAxisName.Y) && TableManage.TableDriver("运动平台").HomeDone(TableAxisName.U))
                    {
                        Weld_Log.Instance().Enqueue(LOG_LEVEL.LEVEL_3, "[运动平台],XY轴回原完成");
                        break;
                    }
                }
                MainModule.FormMain.bHomeReady = true;
                threadList[0].Abort();
            }
        }
Esempio n. 5
0
        private void btn_ClearLeftYield_Click(object sender, EventArgs e)
        {
            DateSave.Instance().Production.Date_Clear(0);

            DateSave.Instance().SaveDoc();
            //m_WeldingTask.AddRunMessage("打标任务0,任务开始。");
        }
Esempio n. 6
0
 public static DateSave Instance()
 {
     if (DateSav == null)
     {
         DateSav = new DateSave();
     }
     return(DateSav);
 }
Esempio n. 7
0
 private void 机种保存_Click(object sender, EventArgs e)
 {
     if (机种选择.Text != "")
     {
         DateSave.Instance().SaveDoc();
         DateSave.Instance().Production.ModelNo = 机种选择.Text;
         DateSave.Instance().SaveDoc_Other(机种选择.Text);
         // TableManage.tablesDoc.SaveDoc();
         //pointdatacom.Items.Add(fileNameExt);
         TableManage.tablesDoc.SaveDocOtherForder(stfPath + "\\" + 机种选择.Text + "\\TablesDoc" + ".xml");
         MessageBox.Show("机种数据更新完成");
     }
     else
     {
         MessageBox.Show("机种数据更新失败");
     }
 }
Esempio n. 8
0
        private void ResetUp()
        {
            DateSave.Instance().Production.EStop = false;//急停标志
            MainModule.FormMain.bResetPress = false;
            if (MainModule.FormMain.bAuto)
            {
                return;
            }
            if (startHoming)
            {
                return;
            }
            // resetTimer.Start();
            if (resetTimer.TimeUp(2))
            {
                DateSave.Instance().Production.IsStop = false;
                bJetTestStart  = false;
                jetTestStep    = -1;
                bMarkTestStart = false;
                markTestStep   = -1;
                //  Program.ccdStationA.Clear();
                Program.num = 0;
                MainModule.FormMain.bEstop = false;
                //if (IOManage.INPUT("ESTOP").On)
                //{
                DateSave.Instance().Production.EStop = false;           //急停标志
                DateSave.Instance().Production.StationMaterial = false; //工位有无料标志
                // }
                //  MainControls.StationMaterial = false;//工位有无料标志


                //   m_FeederTask.taskInfo.iTaskStep = 0;
                //    m_FeederTask.taskInfo.bTaskOnGoing = false;
                //m_MarkTask.taskInfo.iTaskStep = 0;
                //  m_MarkTask.taskInfo.bTaskOnGoing = false;
                //   m_TransferTask.taskInfo.iTaskStep = 0;
                //   m_TransferTask.taskInfo.bTaskOnGoing = false;
                //  m_JetTask.taskInfo.iTaskStep = 0;
                //  m_JetTask.taskInfo.bTaskOnGoing = false;
                MainControls.taskInfo.iTaskStep    = 0;
                MainControls.taskInfo.bTaskOnGoing = false;
                MessageBox.Show("初始化成功");
                //  ControlPlatformLib.Global.logger.Info("长按复位:" + DateTime.Now.ToString("yyyy/MM/dd/ HH : mm : ss"));
            }
        }
Esempio n. 9
0
        private void StopClick()
        {
            //ComeOut.parse = false;
            isRunFinish = false;
            count       = 0;
            IOManage.OUTPUT("焊接机允许入料").SetOutBit(false);
            TableManage.TableDriver("运动平台").Stop(TableAxisName.X);
            TableManage.TableDriver("运动平台").Stop(TableAxisName.Y);
            TableManage.TableDriver("运动平台").Stop(TableAxisName.Z);
            // RunClass.Instance().Stop = true;
            RunClass.Instance().RunClass_IsFinish = false;
            RunClass.Instance().StartRun = false;
            DateSave.Instance().Production.IsStop = true;
            MainControls.taskInfo.iTaskStep = (int)MainControl.flowCharNew.接进料流程;



            MainControl.Weld_Sta = "空闲中";
        }
Esempio n. 10
0
        private void StartClick()
        {
            if (!MainModule.FormMain.bHomeReady)
            {
                MainModule.FormMain.m_formAlarm.InsertAlarmMessage("请先回原点!");
                return;
            }

            if (DateSave.Instance().Production.EStop == true)
            {
                MainModule.FormMain.m_formAlarm.InsertAlarmMessage("急停标志位未复位!");
                return;
            }
            DateSave.Instance().Production.IsStop = false;
            //if (DateSave.Instance().Production.StationMaterial == true)
            //{
            //    MainModule.FormMain.m_formAlarm.InsertAlarmMessage("工位有料请先排料,并清除工位记忆!");
            //    return;
            //}
            MainModule.FormMain.bStartPress = true;
            // RunClass.Instance().Stop = false;
            //   RunClass.Instance().AxisR.Stop = false;
            //  RunClass.Instance().ClinderR.Stop= false;
            //  RunClass.Instance().Meth.Stop = false;
            DateSave.Instance().Production.IsStop = false;
            if (!MainModule.FormMain.bAuto)
            {
                if (RunClass.Instance().Run_OneCase != null && RunClass.Instance().Run_OneCase.IsAlive == true)
                {
                    RunClass.Instance().Run_OneCase.Abort();
                }

                RunClass.Instance().parse    = false;
                RunClass.Instance().GoOnRun  = false;//继续运行标志位
                RunClass.Instance().StartRun = false;
                MainControls.taskInfo.iTaskStep = 18;
                MainModule.FormMain.bAuto       = true;
                //   ControlPlatformLib.Global.logger.Info("自动运行开始:" + DateTime.Now.ToString("yyyy/MM/dd/ HH : mm : ss"));
            }
        }
Esempio n. 11
0
        private void Home()
        {
            if (MainModule.FormMain.bAuto)
            {
                Weld_Log.Instance().Enqueue(LOG_LEVEL.LEVEL_3, "请先停止设运行");
                MessageBox.Show("请先停止设运行");
                richTextBox1.AppendText("请先停止自动运行");
                return;
            }
            MainModule.FormMain.bHomeReady = false;
            if (threadList[0] == null)
            {
                //   threadList[0].Abort();
                ParameterizedThreadStart paramLoopFunc1 = new ParameterizedThreadStart(RunHome);
                threadList[0] = new Thread(paramLoopFunc1);
                threadList[0].IsBackground = true;
                threadList[0].Start(0);
            }
            else if (threadList[0] != null && threadList[0].IsAlive == false)
            {
                threadList[0].Abort();
                ParameterizedThreadStart paramLoopFunc1 = new ParameterizedThreadStart(RunHome);
                threadList[0] = new Thread(paramLoopFunc1);
                threadList[0].IsBackground = true;
                threadList[0].Start(0);
            }

            if (DateSave.Instance().Production.EStop == true)
            {
                DateSave.Instance().Production.EStop = false;
            }


            //else
            //{

            //    DateSave.Instance().Production.EStop = false;
            //}
            // DateSave.Instance().Production.EStop = true;
        }
Esempio n. 12
0
        public DateSave LoadObj()
        {
            DateSave      pDoc;
            XmlSerializer xmlSerializer = new XmlSerializer(typeof(DateSave));
            FileStream    fsReader      = null;

            try
            {
                fsReader = File.OpenRead(@".//Parameter/ProductionData" + ".xml");
                pDoc     = (DateSave)xmlSerializer.Deserialize(fsReader);
                fsReader.Close();
            }
            catch (Exception eMy)
            {
                if (fsReader != null)
                {
                    fsReader.Close();
                }

                pDoc = new DateSave();
            }
            return(pDoc);
        }
Esempio n. 13
0
        private void 运行流程_Click(object sender, EventArgs e)
        {
            if (!MainModule.FormMain.bHomeReady)
            {
                MainModule.FormMain.m_formAlarm.InsertAlarmMessage("请先回原点!");
                return;
            }
            if (MainModule.FormMain.bAuto)
            {
                MainModule.FormMain.m_formAlarm.InsertAlarmMessage("请先停止自动运行!");
                return;
            }

            if (RunClass.Instance().Run_OneCase == null)
            {
                if (机种选择.Text != "" && 运行流程选择.Text != "")
                {
                    DateSave.Instance().Production.IsStop = false;
                    RunClass.Instance().RunClass_IsFinish = false;
                    RunClass.Instance().runTask(ReadstfPath + "\\" + 机种选择.Text + "\\" + 运行流程选择.Text);
                }
            }
            else
            {
                if (RunClass.Instance().Run_OneCase.IsAlive == true)
                {
                    MainModule.FormMain.m_formAlarm.InsertAlarmMessage("请先停止运行!");
                    return;
                }
                if (机种选择.Text != "" && 运行流程选择.Text != "")
                {
                    DateSave.Instance().Production.IsStop = false;
                    RunClass.Instance().RunClass_IsFinish = false;
                    RunClass.Instance().runTask(ReadstfPath + "\\" + 机种选择.Text + "\\" + 运行流程选择.Text);
                }
            }
        }
Esempio n. 14
0
 private void 波形展示_Load(object sender, EventArgs e)
 {
     功率.Text = DateSave.Instance().Production.WeldPower.ToString();
 }
Esempio n. 15
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            int j = 0;

            if (click == 1)
            {
                for (int i = 0; i < IOManage.IODoc.m_OutputDataList.Count; i++)
                {
                    if (IOManage.IODoc.m_OutputDataList[i].OutputCardName == "Googol")
                    {
                        bool bOn = IOManage.OutputDrivers.drivers[IOManage.IODoc.m_OutputDataList[i].strIOName].GetOn();
                        dataGridViewOutput.Rows[i].Cells[2].Style.BackColor = bOn ? Color.Green : Color.FromKnownColor(KnownColor.Control);
                    }
                }
                for (int i = 0; i < IOManage.IODoc.m_InputDataList.Count; i++)
                {
                    if (IOManage.IODoc.m_InputDataList[i].InputCardName == "Googol")
                    {
                        bool bOn = IOManage.InputDrivers.drivers[IOManage.IODoc.m_InputDataList[i].strIOName].GetOn();
                        dataGridViewInput.Rows[i].Cells[2].Style.BackColor = bOn ? Color.Green : Color.FromKnownColor(KnownColor.Control);
                    }
                }
            }
            if (click == 2)
            {
                j = 0;
                j = 0;
                for (int i = 0; i < IOManage.IODoc.m_InputDataList.Count; i++)
                {
                    if (IOManage.IODoc.m_InputDataList[i].InputCardName == "Googlo0")
                    {
                        bool bOn = IOManage.InputDrivers.drivers[IOManage.IODoc.m_InputDataList[i].strIOName].GetOn();
                        dataGridViewInput.Rows[j].Cells[2].Style.BackColor = bOn ? Color.Green : Color.FromKnownColor(KnownColor.Control);
                        j++;
                    }
                }
                j = 0;
                for (int k = 0; k < IOManage.IODoc.m_OutputDataList.Count; k++)
                {
                    if (IOManage.IODoc.m_OutputDataList[k].OutputCardName == "Googlo0")
                    {
                        bool bOn = IOManage.OutputDrivers.drivers[IOManage.IODoc.m_OutputDataList[k].strIOName].GetOn();
                        dataGridViewOutput.Rows[j].Cells[2].Style.BackColor = bOn ? Color.Green : Color.FromKnownColor(KnownColor.Control);
                        j++;
                    }
                }
            }
            if (click == 3)
            {
                j = 0;
                for (int i = 0; i < IOManage.IODoc.m_InputDataList.Count; i++)
                {
                    if (IOManage.IODoc.m_InputDataList[i].InputCardName == "Googlo1")
                    {
                        bool bOn = IOManage.InputDrivers.drivers[IOManage.IODoc.m_InputDataList[i].strIOName].GetOn();

                        dataGridViewInput.Rows[j].Cells[2].Style.BackColor = bOn ? Color.Green : Color.FromKnownColor(KnownColor.Control);

                        j++;
                    }
                }

                j = 0;
                for (int i = 0; i < IOManage.IODoc.m_OutputDataList.Count; i++)
                {
                    if (IOManage.IODoc.m_OutputDataList[i].OutputCardName == "Googlo1")
                    {
                        bool bOn = IOManage.OutputDrivers.drivers[IOManage.IODoc.m_OutputDataList[i].strIOName].GetOn();
                        dataGridViewOutput.Rows[j].Cells[2].Style.BackColor = bOn ? Color.Green : Color.FromKnownColor(KnownColor.Control);
                        j++;
                    }
                }
            }
            if (click == 4)
            {
                j = 0;
                for (int i = 0; i < IOManage.IODoc.m_InputDataList.Count; i++)
                {
                    if (IOManage.IODoc.m_InputDataList[i].InputCardName == "Googlo2")
                    {
                        bool bOn = IOManage.InputDrivers.drivers[IOManage.IODoc.m_InputDataList[i].strIOName].GetOn();
                        dataGridViewInput.Rows[j].Cells[2].Style.BackColor = bOn ? Color.Green : Color.FromKnownColor(KnownColor.Control);
                        j++;
                    }
                }

                j = 0;
                for (int i = 0; i < IOManage.IODoc.m_OutputDataList.Count; i++)
                {
                    if (IOManage.IODoc.m_OutputDataList[i].OutputCardName == "Googlo2")
                    {
                        bool bOn = IOManage.OutputDrivers.drivers[IOManage.IODoc.m_OutputDataList[i].strIOName].GetOn();
                        dataGridViewOutput.Rows[j].Cells[2].Style.BackColor = bOn ? Color.Green : Color.FromKnownColor(KnownColor.Control);
                        j++;
                    }
                }
            }
            if (click == 5)
            {
                j = 0;
                for (int i = 0; i < IOManage.IODoc.m_InputDataList.Count; i++)
                {
                    if (IOManage.IODoc.m_InputDataList[i].InputCardName == "Googlo3")
                    {
                        bool bOn = IOManage.InputDrivers.drivers[IOManage.IODoc.m_InputDataList[i].strIOName].GetOn();
                        dataGridViewInput.Rows[j].Cells[2].Style.BackColor = bOn ? Color.Green : Color.FromKnownColor(KnownColor.Control);
                        j++;
                    }
                }

                j = 0;
                for (int i = 0; i < IOManage.IODoc.m_OutputDataList.Count; i++)
                {
                    if (IOManage.IODoc.m_OutputDataList[i].OutputCardName == "Googlo3")
                    {
                        bool bOn = IOManage.OutputDrivers.drivers[IOManage.IODoc.m_OutputDataList[i].strIOName].GetOn();
                        dataGridViewOutput.Rows[j].Cells[2].Style.BackColor = bOn ? Color.Green : Color.FromKnownColor(KnownColor.Control);
                        j++;
                    }
                }
            }
            if (click == 6)
            {
                j = 0;
                for (int i = 0; i < IOManage.IODoc.m_InputDataList.Count; i++)
                {
                    if (IOManage.IODoc.m_InputDataList[i].InputCardName == "Googlo4")
                    {
                        bool bOn = IOManage.InputDrivers.drivers[IOManage.IODoc.m_InputDataList[i].strIOName].GetOn();
                        dataGridViewInput.Rows[j].Cells[2].Style.BackColor = bOn ? Color.Green : Color.FromKnownColor(KnownColor.Control);
                        j++;
                    }
                }
                j = 0;

                for (int i = 0; i < IOManage.IODoc.m_OutputDataList.Count; i++)
                {
                    if (IOManage.IODoc.m_OutputDataList[i].OutputCardName == "Googlo4")
                    {
                        bool bOn = IOManage.OutputDrivers.drivers[IOManage.IODoc.m_OutputDataList[i].strIOName].GetOn();
                        dataGridViewOutput.Rows[j].Cells[2].Style.BackColor = bOn ? Color.Green : Color.FromKnownColor(KnownColor.Control);
                        j++;
                    }
                }
            }

            if (DateSave.Instance().Production.ModelNo != "" && 机种选择.Text == "")
            {
                机种选择.Text = DateSave.Instance().Production.ModelNo;

                if (机种选择.Text != "")
                {
                    var files = Directory.GetFiles(stfPath + "\\" + 机种选择.Text, "*.csv");
                    if (运行流程选择.Items.Count > 0)
                    {
                        运行流程选择.Items.Clear();
                    }
                    foreach (var file in files)
                    {
                        string fileNameExt = file.Substring(file.LastIndexOf("\\") + 1); //获取文件名,不带路径
                        string filePath    = file.Substring(0, file.LastIndexOf("\\"));  //获取文件路径,不带文件名
                        运行流程选择.Items.Add(fileNameExt);
                    }
                    运行流程选择.SelectedIndex = 0;
                }
            }
        }
Esempio n. 16
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            if (MainControl.Weld_Sta != "")
            {
                lb_LeftStation.Text = MainControl.Weld_Sta;
            }
            //if (DateSave.Instance().Production.Door_Enable == true)
            //{
            //    DoorShow.Text = "门屏蔽";
            //}
            //else
            //{
            //    DoorShow.Text = "门未屏蔽";
            //}
            //if ()
            //{
            //    WeldSta = true;

            //}
            if (IOManage.INPUT("锁光出光").On)
            {
                锁光.Text      = "可出光";
                锁光.BackColor = Color.Green;
                IOManage.OUTPUT("外部锁光").SetOutBit(true);
            }
            else
            {
                锁光.Text      = "已锁光";
                锁光.BackColor = Color.Red;
                IOManage.OUTPUT("外部锁光").SetOutBit(false);
            }
            if (DateSave.Instance().Production.StationMaterial == true)
            {
                btn_LeftPosWelding.Text = "工位有料";
            }
            else
            {
                btn_LeftPosWelding.Text = "工位无料";
            }
            if ((mes.Instance().DataReceivedstrSN != "" && LeftSnshow.Text == "") || (LeftSnshow.Text != mes.Instance().DataReceivedstrSN))
            {
                LeftSnshow.Text = mes.Instance().DataReceivedstrSN;
            }
            try
            {
                if ((DateSave.Instance().Production.WeldDate.Average() != 0 && lb_LeftMarkPower.Text == "") || (lb_LeftMarkPower.Text != DateSave.Instance().Production.WeldDate.Average().ToString()))
                {
                    lb_LeftMarkPower.Text = Math.Round(DateSave.Instance().Production.WeldDate.Average(), 1).ToString();
                }
            }
            catch { }



            if ((DateSave.Instance().Production.OK_date != 0 && lb_LeftYield.Text == "") || (lb_LeftYield.Text != DateSave.Instance().Production.OK_date.ToString()))
            {
                lb_LeftYield.Text = DateSave.Instance().Production.OK_date.ToString();
            }
            if ((DateSave.Instance().Production.Weld_Speed != 0 && lb_LeftMarkSpeed.Text == "") || (lb_LeftMarkSpeed.Text != DateSave.Instance().Production.Weld_Speed.ToString()))
            {
                lb_LeftMarkSpeed.Text = DateSave.Instance().Production.Weld_Speed.ToString();
            }
            if (lb_LeftPos.Text != DateSave.Instance().Production.TheCurrentpoint.ToString())
            {
                lb_LeftPos.Text = DateSave.Instance().Production.TheCurrentpoint.ToString();
            }

            if ((DateSave.Instance().Production.CTtime != "" && lb_LeftCT.Text == "") || (lb_LeftCT.Text != DateSave.Instance().Production.CTtime))
            {
                lb_LeftCT.Text = DateSave.Instance().Production.CTtime;
            }
            if (DateSave.Instance().Production.ModelNo != "" && 当前机种号.Text == "NUM" || 当前机种号.Text != DateSave.Instance().Production.ModelNo)
            {
                当前机种号_.Text = DateSave.Instance().Production.ModelNo;
                当前机种号.Text  = DateSave.Instance().Production.ModelNo;
            }
            if (Socket_server.Instance().recvDate != "")
            {
                lb_RightMarkSpeed.Text = Socket_server.Instance().recvDate;
            }

            if ((DateSave.Instance().Production.Current_TIME != 0 && 清理铜嘴次数.Text == "") || (清理铜嘴次数.Text != DateSave.Instance().Production.Current_TIME.ToString()))
            {
                清理铜嘴次数.Text = DateSave.Instance().Production.Current_TIME.ToString();
            }
            if (DateSave.Instance().Production.Clear_TIME == DateSave.Instance().Production.Current_TIME)
            {
                MainControl.BIZZ("请清理铜嘴", "请清理铜嘴");
                DateSave.Instance().Production.Current_TIME++;
            }


            if (frist == 0 && LoginForm.landingFinish == true)
            {
                frist++;
                asc.AddControl(panel2);
            }
            if (frist == 1)
            {
                this.Top = 0;

                this.Left = 0;



                frist++;
                delay(1000);
                int Width  = Screen.PrimaryScreen.WorkingArea.Width;
                int Height = Screen.PrimaryScreen.WorkingArea.Height;
                int wih    = MainModule.FormMain.Width;
                int aq1e   = panel2.Width;
                int aqe    = panel2.Height;

                panel2.SetBounds(asc.oldCtrl[0].Top, asc.oldCtrl[0].Left, Width, aqe);
                Thread.Sleep(100);
                if (asc.oldCtrl.Count > 0)
                {
                    asc.controlAutoSize(panel2);
                }
            }
            double sd = 0.0;

            TableManage.TableDriver("运动平台")._GetAdc(1, out sd);
            if (startHoming || MainModule.FormMain.bAuto)
            {
            }
            else if (IOManage.INPUT("手轮X").On || IOManage.INPUT("手轮Y").On || IOManage.INPUT("手轮Z").On || IOManage.INPUT("手轮U").On)
            {
                if (IOManage.INPUT("手轮X").On&& setOk == false)
                {
                    if (IOManage.INPUT("手轮1").On)
                    {
                        setOk = true;
                        TableManage.TableDriver("运动平台").StartManualPulser(1, 1);
                    }
                    else if (IOManage.INPUT("手轮10").On)
                    {
                        setOk = true;
                        TableManage.TableDriver("运动平台").StartManualPulser(1, 10);
                    }
                    else if (IOManage.INPUT("手轮100").On)
                    {
                        setOk = true;
                        TableManage.TableDriver("运动平台").StartManualPulser(1, 50);
                    }
                }
                if (IOManage.INPUT("手轮Y").On&& setOk == false)
                {
                    if (IOManage.INPUT("手轮1").On)
                    {
                        setOk = true;
                        TableManage.TableDriver("运动平台").StartManualPulser(2, 1);
                    }
                    else if (IOManage.INPUT("手轮10").On)
                    {
                        setOk = true;
                        TableManage.TableDriver("运动平台").StartManualPulser(2, 10);
                    }
                    else if (IOManage.INPUT("手轮100").On)
                    {
                        setOk = true;
                        TableManage.TableDriver("运动平台").StartManualPulser(2, 50);
                    }
                }
                if (IOManage.INPUT("手轮Z").On&& setOk == false)
                {
                    if (IOManage.INPUT("手轮1").On)
                    {
                        setOk = true;
                        TableManage.TableDriver("运动平台").StartManualPulser(3, 1);
                    }
                    else if (IOManage.INPUT("手轮10").On)
                    {
                        setOk = true;
                        TableManage.TableDriver("运动平台").StartManualPulser(3, 10);
                    }
                    else if (IOManage.INPUT("手轮100").On)
                    {
                        setOk = true;
                        TableManage.TableDriver("运动平台").StartManualPulser(3, 50);
                    }
                }

                if (IOManage.INPUT("手轮U").On&& setOk == false)
                {
                    if (IOManage.INPUT("手轮1").On)
                    {
                        setOk = true;
                        TableManage.TableDriver("运动平台").StartManualPulser(4, 1);
                    }
                    else if (IOManage.INPUT("手轮10").On)
                    {
                        setOk = true;
                        TableManage.TableDriver("运动平台").StartManualPulser(4, 10);
                    }
                    else if (IOManage.INPUT("手轮100").On)
                    {
                        setOk = true;
                        TableManage.TableDriver("运动平台").StartManualPulser(4, 50);
                    }
                }
            }
            else if (IOManage.INPUT("手轮X").Off&& IOManage.INPUT("手轮Y").Off&& IOManage.INPUT("手轮Z").Off&& setOk == true)
            {
                setOk = false;
                TableManage.TableDriver("运动平台").StopManualPulser(0);
                TableManage.TableDriver("运动平台").StopManualPulser(1);
                TableManage.TableDriver("运动平台").StopManualPulser(2);
                TableManage.TableDriver("运动平台").StopManualPulser(3);
                TableManage.TableDriver("运动平台").StopManualPulser(4);
                TableManage.TableDriver("运动平台").StopManualPulser(5);
                TableManage.TableDriver("运动平台").StopManualPulser(6);
                TableManage.TableDriver("运动平台").StopManualPulser(7);
            }
            if (MainModule.FormMain.Parse == false && RunClass.Instance().parse == true)
            {
                RunClass.Instance().parse   = false;
                RunClass.Instance().GoOnRun = true;
            }

            // if (IOManage.INPUT("文档状态").On)
            //{
            //    RunClass.Instance(). WeldFinishSta = "StartWeld";

            //}
            //    if (IOManage.INPUT("文档状态").Off)
            //    {

            //    RunClass.Instance().WeldFinishSta = "WeldFinish";

            //    }


            //if (StartHome==true)
            //{
            //    MainModule.FormMain.bHomeReady = false;
            //    StartHome = false;
            //    MainModule.FormMain.bHomeReady = false;
            //    StartHome = false; HomeDoneZ = false;
            //    TableManage.TableDriver("运动平台").Home(TableAxisName.Z);


            //}

            //if (TableManage.TableDriver("运动平台").HomeDone(TableAxisName.Z) && HomeDoneZ == false)
            //{
            //    HomeDoneZ = true;
            //    HomeDoneXY = false;
            //}

            //if (HomeDoneXY == false)
            //{
            //    HomeDoneXY = true;
            //    TableManage.TableDriver("运动平台").Home(TableAxisName.X);
            //    TableManage.TableDriver("运动平台").Home(TableAxisName.Y);
            //}
            //if (TableManage.TableDriver("运动平台").HomeDone(TableAxisName.X) && TableManage.TableDriver("运动平台").HomeDone(TableAxisName.Y)&& HomeDoneXY == false)
            //{
            //    HomeDoneXY = true;
            //    MainModule.FormMain.bHomeReady = true;
            //}
            //string en = "";
            //string sendd = "";
            //sendd = Weld_Log.Instance().Dequeue(en);
            //if (sendd != "")
            //{
            //    Weld_Log.Instance().WriteLog(LOG_LEVEL.LEVEL_3, sendd, LOG_TYPE.INFO);

            //}
            //else
            //{

            //    // Thread.Sleep(200);
            //}
            if (MainModule.FormMain.bEstop == true)
            {
                DateSave.Instance().Production.EStop = true;
            }
            //else
            //{

            //    DateSave.Instance().Production.EStop = false;
            //}
        }