コード例 #1
0
        /// <summary>
        /// 测试工位UI
        /// </summary>
        /// <param name="e"></param>
        private void ShowStatTest(CUIUserArgs <CStat> e)
        {
            if (this.InvokeRequired)
            {
                this.Invoke(new Action <CUIUserArgs <CStat> >(ShowStatTest), e);
            }
            else
            {
                if (e.lPara == 0)
                {
                    switch (e.model.test.Para.DoRun)
                    {
                    case ERUN.空闲:
                        uiPreTest.SetFree();
                        break;

                    case ERUN.读卡报警:
                        uiPreTest.SetIdAlarm();
                        break;

                    case ERUN.异常报警:
                        uiPreTest.SetStatus(e.model.test.Para.AlarmInfo, true);
                        break;

                    case ERUN.正常治具过站:
                        uiPreTest.SetEnd(e.model.test.Fixture.Result, e.model.test.Para.TestTime);
                        break;

                    case ERUN.到位:
                        uiPreTest.SetReady(e.model.test.Fixture.IdCard, e.model.test.Fixture.SerialNo);
                        break;

                    case ERUN.等待:
                        uiPreTest.SetStatus(e.model.test.Para.AlarmInfo, false);
                        break;

                    case ERUN.就绪:
                        uiPreTest.SetStatus(e.model.test.Para.AlarmInfo, false);
                        break;

                    case ERUN.测试:
                        break;

                    default:
                        break;
                    }
                }
                else if (e.lPara == 1)
                {
                    uiPreTest.SetEnd(e.model.test.Fixture.Result, e.model.test.Para.TestTime);
                }
            }
        }
コード例 #2
0
        /// <summary>
        /// 界面消息
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void OnMain(object sender, CUIUserArgs <CUIMainArgs> e)
        {
            switch (e.model.DoRun)
            {
            case EUIStatus.空闲:
                uiATE.SetFree();
                break;

            case EUIStatus.TCP状态:
                uiATE.SetTCPStatus(e.model.AlarmInfo, e.model.bAlarm);
                break;

            case EUIStatus.治具到位:
                uiATE.SetReady(e.model.AlarmInfo);
                uiStat.SetReady(e.model.IdCard, e.model.SerialNo);
                break;

            case EUIStatus.测试状态:
                uiATE.SetTimes(e.model.WaitTime);
                uiATE.SetStatus(e.model.AlarmInfo, e.model.bAlarm);
                break;

            case EUIStatus.测试结束:
                uiStat.SetEnd(e.model.Result, e.model.WaitTime);
                uiATE.SetStatus(e.model.AlarmInfo, e.model.bAlarm);
                break;

            case EUIStatus.产能计数:
                uiYield.SetYield(e.model.TTNum, e.model.FailNum, e.model.SlotTTNum, e.model.SlotFailNum);
                break;

            case EUIStatus.ATE状态:
                uiATE.SetATEStatus(e.model.AlarmInfo, e.model.bAlarm);
                break;

            case EUIStatus.ATE信息:
                uiATE.SetATEInfo(e.model.ProName, e.model.ModeName, e.model.ElapsedTime);
                break;

            case EUIStatus.调试模式:
                uiStat.SetDebugMode(e.model.DebugMode);
                break;

            default:
                break;
            }
        }
コード例 #3
0
        /// <summary>
        /// 测试工位UI显示
        /// </summary>
        /// <param name="e"></param>
        private void ShowATEUI(CUIUserArgs <CUIMainArgs> e)
        {
            if (this.InvokeRequired)
            {
                this.Invoke(new Action <CUIUserArgs <CUIMainArgs> >(ShowATEUI), e);
            }
            else
            {
                switch (e.model.StatATE[e.idNo].UIDoRun)
                {
                case EUIStatus.空闲:
                    //uiATE.SetFree();
                    break;

                case EUIStatus.状态信息:
                    uiATE.SetInfo(e.model.StatATE[e.idNo].Info);
                    break;

                case EUIStatus.读卡报警:
                    break;

                case EUIStatus.异常报警:
                    uiATE.SetAlarm(e.model.StatATE[e.idNo].Info);
                    break;

                case EUIStatus.治具到位:
                    uiATE.SetReady(e.model.StatATE[e.idNo].IdCard, e.model.StatATE[e.idNo].SerialNo);
                    break;

                case EUIStatus.空治具过站:
                    uiATE.SetNull(e.model.StatATE[e.idNo].IdCard);
                    break;

                case EUIStatus.测试中:
                    if (e.model.StatATE[e.idNo].SideIndex == -1)
                    {
                        uiATE.SetTesting();
                    }
                    else
                    {
                        uiATE.SetTesting(e.model.StatATE[e.idNo].SideIndex);
                    }
                    break;

                case EUIStatus.测试结束:
                    if (e.model.StatATE[e.idNo].SideIndex == -1)
                    {
                        uiATE.SetEnd(e.model.StatATE[e.idNo].Result);
                    }
                    else
                    {
                        uiATE.SetEnd(e.model.StatATE[e.idNo].Result, e.model.StatATE[e.idNo].SideIndex);
                    }
                    break;

                case EUIStatus.良确认:
                    uiATE.SetFailCfg();
                    break;

                default:
                    break;
                }
            }
        }