Beispiel #1
0
        public static void UpdateRIO(string device, string msg)
        {
            RobotState   robot   = null;
            AlignerState aligner = null;

            switch (device)
            {
            case "ROBOT01":
                robot = robot1;
                break;

            case "ROBOT02":
                robot = robot2;
                break;

            case "ALIGNER01":
                aligner = aligner1;
                break;

            case "ALIGNER02":
                aligner = aligner2;
                break;

            default:
                return;
            }
            if (msg == null || msg.IndexOf(",") < 0)
            {
                return;
            }
            string[] result = msg.Split(',');
            switch (result[0])
            {
            case "004":
            case "027":
                if (robot != null)
                {
                    robot.Present_R = result[1];
                }
                if (aligner != null)
                {
                    aligner.Present = result[1];
                }
                break;

            case "005":
                if (robot != null)
                {
                    robot.Present_L = result[1];
                }
                break;
            }
        }
Beispiel #2
0
        public static void UpdateCombineStatus(string device, string combineStatus)
        {
            RobotState   robot   = null;
            AlignerState aligner = null;

            switch (device)
            {
            case "ROBOT01":
                robot = robot1;
                break;

            case "ROBOT02":
                robot = robot2;
                break;

            case "ALIGNER01":
                aligner = aligner1;
                break;

            case "ALIGNER02":
                aligner = aligner2;
                break;

            default:
                return;
            }
            if (robot == null && aligner == null)
            {
                return;
            }
            if (combineStatus == null || combineStatus.IndexOf(",") < 0)
            {
                return;
            }
            string[] result = combineStatus.Split(',');

            if (robot != null)
            {
                //robot status
                switch (result[3])//<001,Success,R1,[Rdy],H1,REL,U,H2,REL,U>
                {
                case "Rdy":
                    robot.Status = "Ready";
                    robot.Servo  = "ON";
                    break;

                case "Bsy":
                    robot.Status = "Busy";
                    robot.Servo  = "ON";
                    break;

                case "Off":
                    robot.Status = "Servo OFF";
                    robot.Servo  = "OFF";
                    break;

                case "Err":
                    robot.Status = "Error";
                    robot.Servo  = "N/A";
                    break;

                case "Tch":
                    robot.Status = "Teach";
                    robot.Servo  = "N/A";
                    break;
                }
                //H1 ChuckCode
                switch (result[5]) //<001,Success,R1,Rdy,H1,[REL],U,H2,REL,U>
                {
                case "HLD":        //Vacuum ON
                    robot.Vacuum_L = "1";
                    break;

                case "REL":    //Vacuum OFF
                    robot.Vacuum_L = "0";
                    break;

                case "UKN":    //Unknown
                    robot.Vacuum_L = "N/A";
                    break;
                }
                //H1 SenseCode
                switch (result[6]) //<001,Success,R1,Rdy,H1,REL,[U],H2,REL,U>
                {
                case "0":          //Wafer absence
                    robot.Present_L = result[6];
                    break;

                case "1":    //Wafer presence
                    robot.Present_L = result[6];
                    break;

                case "U":    //Wafer unknown
                    robot.Present_L = result[6];
                    break;

                case "E":    //sensor failure
                    robot.Present_L = result[6];
                    break;
                }//H2 ChuckCode
                switch (result[8])//<001,Success,R1,Rdy,H1,REL,U,H2,[REL],U>
                {
                case "HLD":    //Vacuum ON
                    robot.Vacuum_R = "1";
                    break;

                case "REL":    //Vacuum OFF
                    robot.Vacuum_R = "0";
                    break;

                case "UKN":    //Unknown
                    robot.Vacuum_R = "N/A";
                    break;
                }
                //H2 SenseCode
                switch (result[9]) //<001,Success,R1,Rdy,H1,REL,U,H2,REL,[U]>
                {
                case "0":          //Wafer absence
                    robot.Present_R = result[6];
                    break;

                case "1":    //Wafer presence
                    robot.Present_R = result[6];
                    break;

                case "U":    //Wafer unknown
                    robot.Present_R = result[6];
                    break;

                case "E":    //sensor failure
                    robot.Present_R = result[6];
                    break;
                }
            }
            if (aligner != null)
            {
                //Aligner status
                switch (result[3])//<049,Success,A1,[Rdy],AL,REL,U>
                {
                case "Rdy":
                    aligner.Status = "Ready";
                    aligner.Servo  = "ON";
                    break;

                case "Bsy":
                    aligner.Status = "Busy";
                    aligner.Servo  = "ON";
                    break;

                case "Off":
                    aligner.Status = "Servo OFF";
                    aligner.Servo  = "OFF";
                    break;

                case "Err":
                    aligner.Status = "Error";
                    aligner.Servo  = "N/A";
                    break;

                case "Tch":
                    aligner.Status = "Teach";
                    aligner.Servo  = "N/A";
                    break;
                }
                //AL ChuckCode
                switch (result[5]) //<049,Success,A1,Rdy,AL,[REL],U>
                {
                case "HLD":        //Vacuum ON
                    aligner.Vacuum = "1";
                    break;

                case "REL":    //Vacuum OFF
                    aligner.Vacuum = "0";
                    break;

                case "UKN":    //Unknown
                    aligner.Vacuum = "N/A";
                    break;
                }
                //AL SenseCode
                switch (result[6]) //<049,Success,A1,Rdy,AL,REL,[U]>
                {
                case "0":          //Wafer absence
                    aligner.Present = result[6];
                    break;

                case "1":    //Wafer presence
                    aligner.Present = result[6];
                    break;

                case "U":    //Wafer unknown
                    aligner.Present = result[6];
                    break;

                case "E":    //sensor failure
                    aligner.Present = result[6];
                    break;
                }
            }
        }