예제 #1
0
        public static DIAG_RESULT UserMessageBox2(DIAG_SEL_MODE btnMode, DIAG_ICON_MODE iconMode, string dispMessage, string where = "")
        {
            FormUserMessage2 ff = new FormUserMessage2();

            if (iconMode == DIAG_ICON_MODE.INFORMATION)
            {
                mc.log.debug.write(mc.log.CODE.INFO, where + "Info Message : " + dispMessage);
            }
            else if (iconMode == DIAG_ICON_MODE.QUESTION)
            {
                mc.log.debug.write(mc.log.CODE.INFO, where + "Sel Message : " + dispMessage);
            }
            else if (iconMode == DIAG_ICON_MODE.WARNING)
            {
                mc.log.debug.write(mc.log.CODE.WARN, where + "Warn Message : " + dispMessage);
            }
            else if (iconMode == DIAG_ICON_MODE.FAILURE)
            {
                mc.log.debug.write(mc.log.CODE.FAIL, where + "Fail Message : " + dispMessage);
            }

            ff.SetDisplayItems(btnMode, iconMode, dispMessage);
            ff.BringToFront();
            ff.ShowDialog();

            DIAG_RESULT rst = FormUserMessage2.diagResult;

            return(rst);
        }
예제 #2
0
 private void Button_Click(object sender, EventArgs e)
 {
     if (sender.Equals(BT_SELECT1))
     {
         if (dialogMode == DIAG_SEL_MODE.TmsManualPressCancel)
         {
             diagResult = DIAG_RESULT.Tms;
         }
         this.Close();
     }
     if (sender.Equals(BT_SELECT2))
     {
         if (dialogMode == DIAG_SEL_MODE.TmsManualPressCancel)
         {
             diagResult = DIAG_RESULT.Manual;
         }
         this.Close();
     }
     if (sender.Equals(BT_SELECT3))
     {
         if (dialogMode == DIAG_SEL_MODE.TmsManualPressCancel)
         {
             diagResult = DIAG_RESULT.Press;
         }
         this.Close();
     }
     if (sender.Equals(BT_SELECT4))
     {
         if (dialogMode == DIAG_SEL_MODE.TmsManualPressCancel)
         {
             diagResult = DIAG_RESULT.Cancel;
         }
         this.Close();
     }
 }
예제 #3
0
            public void moveReadyPosition()
            {
                switch (sqc)
                {
                case 0:
                    Esqc = 0;
                    sqc++;
                    break;

                case 1:
                    if (mc.ps.RUNING)
                    {
                        break;
                    }
                    if (mc.ps.ERROR)
                    {
                        Esqc = sqc; sqc = SQC.ERROR; break;
                    }

                    if (!isAreaSafe())
                    {
                        errorCheck(ERRORCODE.MG, sqc, "", ALARM_CODE.E_MAGAZINE_IO_AREA_SENSOR_DETECT);
                        break;
                    }

                    if (!isConveyorSafe())
                    {
                        errorCheck(ERRORCODE.MG, sqc, "", ALARM_CODE.E_MAGAZINE_IO_BOAT_SENSOR_DETECT);
                        break;
                    }

                    #region Check Magazine Status
                    mc.UnloaderControl.readconfig();
                    if (MagazineIsFull())
                    {
                        sqc = 20;                       // 꽉 찼을 시 down sqc로 이동
                        break;
                    }
                    else
                    {
                        workMG = 0;
                        MagazineReadyPos(out workMG, out workSlot);
                    }

                    if (workMG == (int)MG_NUM.MG2)
                    {
                        posZ = pos.MG2_READY;
                    }
                    else if (workMG == (int)MG_NUM.MG3)
                    {
                        posZ = pos.MG3_READY;
                    }
                    else
                    {
                        posZ = pos.MG1_READY;
                    }
                    posZ -= workSlot * mc.para.UD.slotPitch.value * 1000;
                    #endregion

                    Z.move(posZ, out ret.message); if (mpiCheck(Z.config.axisCode, sqc, ret.message, "", false))
                    {
                        break;
                    }
                    dwell.Reset();
                    sqc++; break;

                case 2:
                    if (!Z_AT_TARGET)
                    {
                        break;
                    }
                    dwell.Reset();
                    sqc++; break;

                case 3:
                    if (!Z_AT_DONE)
                    {
                        break;
                    }
                    dwell.Reset();
                    sqc++; break;

                case 4:
                    if (mc.para.UD.MagazineInCheck.value == 0)
                    {
                        sqc = SQC.STOP;
                    }
                    else
                    {
                        if (dwell.Elapsed < 100)
                        {
                            break;
                        }
                        mc.IN.MG.MG_IN(out ret.b, out ret.message); if (ioCheck(sqc, ret.message))
                        {
                            break;
                        }
                        if (ret.b)
                        {
                            sqc = SQC.STOP;
                        }
                        else
                        {
                            sqc++;
                        }
                    }
                    break;

                case 5:
                    FormUserMessage ff = new FormUserMessage();
                    mc.OUT.MAIN.UserBuzzerCtl(true);
                    ff.SetDisplayItems(DIAG_SEL_MODE.RetrySkipCancel, DIAG_ICON_MODE.WARNING, "MG(#" + (workMG + 1).ToString() + ") 감지 에러 발생");
                    ff.ShowDialog();
                    DIAG_RESULT fResult = FormUserMessage.diagResult;

                    mc.OUT.MAIN.UserBuzzerCtl(false);
                    if (fResult == DIAG_RESULT.Retry)
                    {
                        dwell.Reset();
                        sqc--; break;
                    }
                    else if (fResult == DIAG_RESULT.Skip)
                    {
                        for (int i = 0; i < mc.UnloaderControl.MG_SLOT_COUNT; i++)
                        {
                            mc.UnloaderControl.MG_Status[workMG, i] = (int)MG_STATUS.SKIP;
                            EVENT.refreshEditMagazine(workMG, i);
                        }
                        mc.UnloaderControl.writeconfig();

                        sqc = 1; break;
                    }
                    else
                    {
                        errorCheck(ERRORCODE.MG, sqc, "", ALARM_CODE.E_MAGAGINE_NOT_EXIST);
                        break;
                    }

                case 20:
                    posZ = mc.unloader.Elev.pos.READY;
                    mc.unloader.Elev.Z.move(posZ, out ret.message);
                    if (mpiCheck(Z.config.axisCode, sqc, ret.message, "", false))
                    {
                        break;
                    }
                    dwell.Reset();
                    sqc++; break;

                case 21:
                    if (!Z_AT_TARGET)
                    {
                        break;
                    }
                    sqc++; dwell.Reset(); break;

                case 22:
                    if (!Z_AT_DONE)
                    {
                        break;
                    }
                    sqc++; break;

                case 23:
                    //mc.OUT.MG.MG_RESET(true, out ret.message);
                    errorCheck(ERRORCODE.MG, sqc, "", ALARM_CODE.E_MAGAGINE_STATUS_FULL); break;

                case SQC.ERROR:
                    sqc = SQC.STOP; break;

                case SQC.STOP:
                    sqc = SQC.END; break;
                }
            }
예제 #4
0
 private void Button_Click(object sender, EventArgs e)
 {
     if (sender.Equals(BT_SELECT1))
     {
         if (dialogMode == DIAG_SEL_MODE.OK)
         {
             diagResult = DIAG_RESULT.INVALID;
         }
         else if (dialogMode == DIAG_SEL_MODE.OKCancel)
         {
             diagResult = DIAG_RESULT.OK;
         }
         else if (dialogMode == DIAG_SEL_MODE.YesNo)
         {
             diagResult = DIAG_RESULT.Yes;
         }
         else if (dialogMode == DIAG_SEL_MODE.YesNoCancel)
         {
             diagResult = DIAG_RESULT.Yes;
         }
         else if (dialogMode == DIAG_SEL_MODE.NextCancel)
         {
             diagResult = DIAG_RESULT.Next;
         }
         else if (dialogMode == DIAG_SEL_MODE.RetryAbortSkip)
         {
             diagResult = DIAG_RESULT.Retry;
         }
         else if (dialogMode == DIAG_SEL_MODE.RetrySkipCancel)
         {
             diagResult = DIAG_RESULT.Retry;
         }
         else if (dialogMode == DIAG_SEL_MODE.HD1HD2Cancel)
         {
             diagResult = DIAG_RESULT.HD1;
         }
         this.Close();
     }
     if (sender.Equals(BT_SELECT2))
     {
         if (dialogMode == DIAG_SEL_MODE.OK)
         {
             diagResult = DIAG_RESULT.OK;
         }
         else if (dialogMode == DIAG_SEL_MODE.OKCancel)
         {
             diagResult = DIAG_RESULT.INVALID;
         }
         else if (dialogMode == DIAG_SEL_MODE.YesNo)
         {
             diagResult = DIAG_RESULT.INVALID;
         }
         else if (dialogMode == DIAG_SEL_MODE.YesNoCancel)
         {
             diagResult = DIAG_RESULT.No;
         }
         else if (dialogMode == DIAG_SEL_MODE.NextCancel)
         {
             diagResult = DIAG_RESULT.INVALID;
         }
         else if (dialogMode == DIAG_SEL_MODE.RetryAbortSkip)
         {
             diagResult = DIAG_RESULT.Abort;
         }
         else if (dialogMode == DIAG_SEL_MODE.RetrySkipCancel)
         {
             diagResult = DIAG_RESULT.Skip;
         }
         else if (dialogMode == DIAG_SEL_MODE.HD1HD2Cancel)
         {
             diagResult = DIAG_RESULT.HD2;
         }
         this.Close();
     }
     if (sender.Equals(BT_SELECT3))
     {
         if (dialogMode == DIAG_SEL_MODE.OK)
         {
             diagResult = DIAG_RESULT.INVALID;
         }
         else if (dialogMode == DIAG_SEL_MODE.OKCancel)
         {
             diagResult = DIAG_RESULT.Cancel;
         }
         else if (dialogMode == DIAG_SEL_MODE.YesNo)
         {
             diagResult = DIAG_RESULT.No;
         }
         else if (dialogMode == DIAG_SEL_MODE.YesNoCancel)
         {
             diagResult = DIAG_RESULT.Cancel;
         }
         else if (dialogMode == DIAG_SEL_MODE.NextCancel)
         {
             diagResult = DIAG_RESULT.Cancel;
         }
         else if (dialogMode == DIAG_SEL_MODE.RetryAbortSkip)
         {
             diagResult = DIAG_RESULT.Skip;
         }
         else if (dialogMode == DIAG_SEL_MODE.RetrySkipCancel)
         {
             diagResult = DIAG_RESULT.Cancel;
         }
         else if (dialogMode == DIAG_SEL_MODE.HD1HD2Cancel)
         {
             diagResult = DIAG_RESULT.Cancel;
         }
         this.Close();
     }
 }