Example #1
0
        /// <summary>
        /// A button click event to unload given station
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void UnloadBTN_Click(object sender, EventArgs e)
        {
            string lp = LoadPortCB.Text;

            this.TerminalRTB.Invoke(new MethodInvoker(delegate() { TerminalRTB.AppendText(Environment.NewLine + Environment.NewLine + "Client>>Server:Unload"); }));
            /*Check selected load port connection is online before sending the command*/
            if (String.IsNullOrEmpty(lp))
            {
                MessageBox.Show("Please select a Load Port");
            }
            else if (lp == "Load Port1" && LP1.Connection == ModuleConnection.Online)
            {
                ULTMServices.sendCommand(LP1.Unload());
            }
            else if (lp == "Load Port1" && LP1.Connection == ModuleConnection.Offline)
            {
                this.TerminalRTB.Invoke(new MethodInvoker(delegate() { TerminalRTB.AppendText(Environment.NewLine + Environment.NewLine + "LoadPort 1 Offline"); }));
            }
            else if (lp == "Load Port2" && LP2.Connection == ModuleConnection.Online)
            {
                ULTMServices.sendCommand(LP2.Unload());
            }
            else if (lp == "Load Port1" && LP2.Connection == ModuleConnection.Offline)
            {
                this.TerminalRTB.Invoke(new MethodInvoker(delegate() { TerminalRTB.AppendText(Environment.NewLine + Environment.NewLine + "LoadPort 2 Offline"); }));
            }
        }
Example #2
0
        /// <summary>
        /// A button click event to get the status of robot and get robot current possition
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void GetStatusBtn_Click(object sender, EventArgs e)
        {
            string rbt  = RobotCB.Text;
            string hand = RbtHandCB.Text;
            string lp   = LoadPortCB.Text;
            string slot = LPSlotCB.Text;

            if (String.IsNullOrEmpty(rbt))
            {
                MessageBox.Show("Please select Robot");
            }

            if (String.IsNullOrEmpty(lp))
            {
                MessageBox.Show("Please select a Load Port");
            }
            if (String.IsNullOrEmpty(hand))
            {
                MessageBox.Show("Please select a Load Port");
            }

            string[] statusCmd = R1.GetStatus();
            ULTMServices.sendCommand(statusCmd[0]);
            ULTMServices.sendCommand(statusCmd[1]);

            this.TerminalRTB.Invoke(new MethodInvoker(delegate() { TerminalRTB.AppendText(Environment.NewLine + Environment.NewLine + "Client>>Server:Ishome,QRYPOS"); }));
        }
Example #3
0
        /// <summary>
        /// A button click event to serv off the robot
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ServOffBTN_Click(object sender, EventArgs e)
        {
            string rbt = RobotCB.Text;

            ULTMServices.sendCommand(R1.RobotServOFF());
            this.TerminalRTB.Invoke(new MethodInvoker(delegate() { TerminalRTB.AppendText(Environment.NewLine + Environment.NewLine + "Client>>Server:ServoOFF"); }));
        }
Example #4
0
        /// <summary>
        /// A button click event to perform Robot map for a selected station
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void MapBTN_Click(object sender, EventArgs e)
        {
            if (connection.isConnected())
            {
                string lp  = LoadPortCB.Text;
                string cmd = "";


                /*Construct and send the command to server accordingly */
                if (String.IsNullOrEmpty(lp))
                {
                    MessageBox.Show("Please select a Load Port");
                }

                else if (lp == "Load Port1")
                {
                    cmd = R1.Map("P1");
                    ULTMServices.sendCommand(cmd);
                    commandLogger.Log(cmd);
                }
                else if (lp == "Load Port2")
                {
                    cmd = R1.Map("P2");
                    ULTMServices.sendCommand(cmd);
                    commandLogger.Log(cmd);
                }


                this.TerminalRTB.Invoke(new MethodInvoker(delegate() { TerminalRTB.AppendText(Environment.NewLine + Environment.NewLine + "Client>>Server:Map"); }));
            }
            else
            {
                errorLogger.Log("Robot is not connected");
            }
        }
Example #5
0
        /// <summary>
        /// A button click event to get know the connection of configured devices
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void InitBTN_Click(object sender, EventArgs e)
        {
            this.TerminalRTB.Invoke(new MethodInvoker(delegate() { TerminalRTB.AppendText(Environment.NewLine + Environment.NewLine + "Tool Initialize"); }));
            string cmd = ToolConfiguration.ToolInitialize();

            ULTMServices.sendCommand(cmd);
        }
Example #6
0
        /// <summary>
        /// A button click event to perform Get Wafer from a location (station+slot)
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void GetBTN_Click(object sender, EventArgs e)
        {
            if (connection.isConnected())
            {
                string rbt  = RobotCB.Text;
                string hand = RbtHandCB.Text;
                string lp   = LoadPortCB.Text;
                string slot = LPSlotCB.Text;
                if (String.IsNullOrEmpty(rbt))
                {
                    MessageBox.Show("Please select Robot");
                }

                if (String.IsNullOrEmpty(lp))
                {
                    MessageBox.Show("Please select a Load Port");
                }
                if (String.IsNullOrEmpty(hand))
                {
                    MessageBox.Show("Please select a Load Port");
                }

                /*Get selected robot hand in type of RobotArm enum */
                RobotArm Hand = new RobotArm();
                switch (hand)
                {
                case "H1":
                    Hand = RobotArm.ARM_1;
                    break;

                case "H2":
                    Hand = RobotArm.ARM_2;
                    break;
                }

                /*Construct and send the command to server accordingly */
                switch (lp)
                {
                case "Load Port1":
                    string cmd1 = R1.GetWafer(Hand, LP1, (LoadPortSlot)Convert.ToInt32(slot));
                    ULTMServices.sendCommand(cmd1);
                    commandLogger.Log($"{cmd1}");
                    break;

                case "Load Port2":
                    string cmd2 = R1.GetWafer(Hand, LP2, (LoadPortSlot)Convert.ToInt32(slot));
                    ULTMServices.sendCommand(cmd2);
                    commandLogger.Log($"{cmd2}");
                    break;
                }
                ;

                this.TerminalRTB.Invoke(new MethodInvoker(delegate() { TerminalRTB.AppendText(Environment.NewLine + Environment.NewLine + "Client>>Server:Get"); }));
            }
            else
            {
                errorLogger.Log("Robot is not connected");
            }
        }
Example #7
0
        /// <summary>
        /// A button click event to perform robot move to a selected location code of selected slot of selected station
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void MoveBTN_Click(object sender, EventArgs e)
        {
            if (connection.isConnected())
            {
                string rbt          = RobotCB.Text;
                string hand         = RbtHandCB.Text;
                string lp           = LoadPortCB.Text;
                string slot         = LPSlotCB.Text;
                string locationCode = locationCodeCB.Text;

                if (String.IsNullOrEmpty(locationCode))
                {
                    MessageBox.Show("Please select Location Code");
                }

                if (String.IsNullOrEmpty(rbt))
                {
                    MessageBox.Show("Please select Robot");
                }

                if (String.IsNullOrEmpty(lp))
                {
                    MessageBox.Show("Please select a Load Port");
                }
                if (String.IsNullOrEmpty(hand))
                {
                    MessageBox.Show("Please select a Load Port");
                }
                /*Get selected robot hand in type of RobotArm enum */
                RobotArm Hand = new RobotArm();
                switch (hand)
                {
                case "H1":
                    Hand = RobotArm.ARM_1;
                    break;

                case "H2":
                    Hand = RobotArm.ARM_2;
                    break;
                }
                /*Get selected location code in type of LocationCode enum */
                LocationCode LC = new LocationCode();
                switch (locationCode)
                {
                case "pbx":
                    LC = LocationCode.pbx;
                    break;

                case "gbx":
                    LC = LocationCode.gbx;
                    break;
                }
                /*Construct and send the command to server accordingly */
                string cmd = "";
                switch (lp)
                {
                case "Load Port1":
                    ULTMServices.sendCommand(R1.Move(Hand, LP1, (LoadPortSlot)Convert.ToInt32(slot), LC));

                    break;

                case "Load Port2":
                    ULTMServices.sendCommand(R1.Move(Hand, LP1, (LoadPortSlot)Convert.ToInt32(slot), LC));
                    break;
                }

                this.TerminalRTB.Invoke(new MethodInvoker(delegate() { TerminalRTB.AppendText(Environment.NewLine + Environment.NewLine + "Client>>Server:Move"); }));
            }
            else
            {
                errorLogger.Log("Robot is not connected");
            }
        }
Example #8
0
        /// <summary>
        ///  A button click event to perform Transfer a wafer from a location(station+slot) to an another location(station+slot)
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void TransferBTN_Click(object sender, EventArgs e)
        {
            if (connection.isConnected())
            {
                string rbt  = RobotCB.Text;
                string hand = RbtHandCB.Text;

                string source      = SourceCB.Text;
                string sourSlot    = SrcSlotCB.Text;
                string destination = DestinationCB.Text;
                string destSlot    = DstSlotCB.Text;
                if (String.IsNullOrEmpty(rbt))
                {
                    MessageBox.Show("Please select Robot");
                }



                if (String.IsNullOrEmpty(hand))
                {
                    MessageBox.Show("Please select a Load Port");
                }

                /*Get selected robot hand in type of RobotArm enum */
                RobotArm Hand = new RobotArm();
                switch (hand)
                {
                case "H1":
                    Hand = RobotArm.ARM_1;
                    break;

                case "H2":
                    Hand = RobotArm.ARM_2;
                    break;
                }
                /*Construct and send the command to server accordingly */
                string cmd = "";
                switch (source)
                {
                case "Load Port1":
                    switch (destination)
                    {
                    case "Load Port1":
                        cmd = R1.Tranfer(Hand, LP1, (LoadPortSlot)Convert.ToInt32(sourSlot), LP1, (LoadPortSlot)Convert.ToInt32(destSlot));
                        ULTMServices.sendCommand(cmd);
                        commandLogger.Log(cmd);
                        break;

                    case "Load Port2":
                        cmd = R1.Tranfer(Hand, LP1, (LoadPortSlot)Convert.ToInt32(sourSlot), LP2, (LoadPortSlot)Convert.ToInt32(destSlot));
                        ULTMServices.sendCommand(cmd);
                        commandLogger.Log(cmd);
                        break;
                    }
                    break;

                case "Load Port2":
                    switch (destination)
                    {
                    case "Load Port1":
                        cmd = R1.Tranfer(Hand, LP2, (LoadPortSlot)Convert.ToInt32(sourSlot), LP1, (LoadPortSlot)Convert.ToInt32(destSlot));
                        ULTMServices.sendCommand(cmd);
                        commandLogger.Log(cmd);
                        break;

                    case "Load Port2":
                        cmd = R1.Tranfer(Hand, LP2, (LoadPortSlot)Convert.ToInt32(sourSlot), LP2, (LoadPortSlot)Convert.ToInt32(destSlot));
                        ULTMServices.sendCommand(cmd);
                        commandLogger.Log(cmd);
                        break;
                    }
                    break;
                }



                this.TerminalRTB.Invoke(new MethodInvoker(delegate() { TerminalRTB.AppendText(Environment.NewLine + Environment.NewLine + "Client>>Server:Transfer"); }));
            }
            else
            {
                errorLogger.Log("Robot is not connected");
            }
        }