Ejemplo n.º 1
0
        //public static List<double> lstTime ;
        //static FileStream   fs;
        //static StreamWriter sw;
        //static bool bFst ;
        //static double dPreTime2;
        //static public void SaveCsv(ref List<double> _lst,string _sPath = "")
        //{
        //    string sPath1 = @"D:\" + _sPath + ".csv";
        //    string sPath2 = @"D:\TimeCheck.csv" ;

        //    if(!bFst)
        //    {
        //        fs = new FileStream(sPath1, FileMode.Append, FileAccess.Write);
        //        sw = new StreamWriter(fs, Encoding.UTF8);
        //        bFst = true;
        //    }
        //    string line = "";

        //    for(int i=0; i<_lst.Count; i++) {
        //        line += string.Format("{0:0.0000}",_lst[i]) + ",";
        //    }
        //    sw.WriteLine(line);
        //}
        //public static double GetTime()
        //{
        //    double dCrntTime = CTimer.GetTime_us();
        //    double dTime = (dCrntTime - dPreTime2) / 1000.0;
        //    dPreTime2 = dCrntTime;
        //    return dTime;
        //}
        //SaveCsv(ref lstTime,sPath);
        public static void Update()
        {
            //lstTime = new List<double>();
            //string sPath = DateTime.Now.ToString("HHmmss");
            double dPreTime = CTimer.GetTime_us();
            double dCrntTime;

            while (true)
            {
                dCrntTime = CTimer.GetTime_us();
                m_dMainThreadCycleTime = (dCrntTime - dPreTime) / 1000.0;
                dPreTime = dCrntTime;
                Thread.Sleep(0);

                //Motion Dll Update
                SM.Update(m_iSeqStat);

                //Part
                for (int i = 0; i < (int)pi.MAX_PART; i++)
                {
                    m_Part[i].Update();
                }

                //Inspection
                InspectMainAir();
                InspectEmergency();
                InspectActuator();
                InspectMotor();
                InspectCrash();
                InspectTemp();

                //Update ErrorProc.
                UpdateButton();

                //Check Button.
                UpdateSeqState();

                //Update Motor State (Input)
                MM.Update();

                //SPC
                SPC.Update(LOT.CrntLotData.sLotNo, OM.GetCrntDev(), m_iSeqStat, OM.EqpStat.bMaint);

                //Vision Communication
                VC.Update();

                //SEQ.BarcordPrnt.Update();
            }
        }
Ejemplo n.º 2
0
        public static void Update()
        {
            double dPreTime = CTimer.GetTime_us();
            double dCrntTime;

            while (true)
            {
                dCrntTime = CTimer.GetTime_us();
                m_dMainThreadCycleTime = (dCrntTime - dPreTime) / 1000.0;
                if (m_dMainThreadCycleTime > 2)
                {
                    Log.Trace(m_dMainThreadCycleTime.ToString());
                }
                dPreTime = dCrntTime;
                Thread.Sleep(1);

                //Motion Dll Update
                SM.Update(m_iSeqStat);

                //Part
                for (int i = 0; i < (int)pi.MAX_PART; i++)
                {
                    m_Part[i].Update();
                }

                //Inspection
                InspectMainAir();
                InspectEmergency();
                InspectActuator();
                InspectMotor();
                InspectCrash();
                InspectTemp();
                InspectLightGrid();

                //Update ErrorProc.
                UpdateButton();

                //Check Button.
                UpdateSeqState();

                //Update Motor State (Input)
                MM.Update();

                //SPC
                SPC.Update(LOT.GetLotNo(), OM.GetCrntDev(), m_iSeqStat, OM.EqpStat.bMaint);
            }
        }
Ejemplo n.º 3
0
        public static void Update()
        {
            double dPreTime = CTimer.GetTime_us();
            double dCrntTime;

            while (true)
            {
                dCrntTime = CTimer.GetTime_us();
                m_dMainThreadCycleTime = (dCrntTime - dPreTime) / 1000.0;
                dPreTime = dCrntTime;
                Thread.Sleep(0);
                SM.Update(m_iSeqStat);

                //Part
                for (int i = 0; i < (int)pi.MAX_PART; i++)
                {
                    m_Part[i].Update();
                }

                //Inspection
                InspectMainAir();
                InspectEmergency();
                InspectActuator();
                InspectMotor();
                InspectCrash();
                InspectTemp();
                InspectFlowMeter();
                InspectMainServo();
                InspectDoor();


                //Update ErrorProc.
                UpdateButton();

                //Check Button.
                UpdateSeqState();

                //Update Motor State (Input)
                MM.Update();

                //SPC
                SPC.Update(LOT.CrntLotData.sEmployeeID, LOT.CrntLotData.sLotNo, OM.GetCrntDev(), m_iSeqStat, OM.EqpStat.bMaint);
            }
        }