Пример #1
0
        public void UpdateDevInfo(bool bToTable)
        {
            if (bToTable)
            {
                CConfig.ValToCon(tbLODR_BarCntY, ref OM.DevInfo.iLODR_BarCnt);
                CConfig.ValToCon(tbULDR_BarCntY, ref OM.DevInfo.iULDR_BarCnt);
                CConfig.ValToCon(tbLODR_BarPitchY, ref OM.DevInfo.dLODR_BarPitch);
                CConfig.ValToCon(tbULDR_BarPitchY, ref OM.DevInfo.dULDR_BarPitch);
                CConfig.ValToCon(tbWorkEndCnt, ref OM.DevInfo.iWorkEndCnt);
                CConfig.ValToCon(tbPickDelay, ref OM.DevInfo.iPickDelay);
                CConfig.ValToCon(tbPickMissCnt, ref OM.DevInfo.iPickMissCnt);
                CConfig.ValToCon(nrLSR_ProgramNo, ref OM.DevInfo.iProgramNo);
            }
            else
            {
                OM.CDevInfo DevInfo = OM.DevInfo;
                CConfig.ConToVal(tbLODR_BarCntY, ref OM.DevInfo.iLODR_BarCnt);
                CConfig.ConToVal(tbULDR_BarCntY, ref OM.DevInfo.iULDR_BarCnt);
                CConfig.ConToVal(tbLODR_BarPitchY, ref OM.DevInfo.dLODR_BarPitch);
                CConfig.ConToVal(tbULDR_BarPitchY, ref OM.DevInfo.dULDR_BarPitch);
                CConfig.ConToVal(tbWorkEndCnt, ref OM.DevInfo.iWorkEndCnt);
                CConfig.ConToVal(tbPickDelay, ref OM.DevInfo.iPickDelay);
                CConfig.ConToVal(tbPickMissCnt, ref OM.DevInfo.iPickMissCnt);
                CConfig.ConToVal(nrLSR_ProgramNo, ref OM.DevInfo.iProgramNo);

                //Auto Log
                Type        type = DevInfo.GetType();
                FieldInfo[] f    = type.GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
                for (int i = 0; i < f.Length; i++)
                {
                    Trace(f[i].Name, f[i].GetValue(DevInfo).ToString(), f[i].GetValue(OM.DevInfo).ToString());
                }

                UpdateDevInfo(true);
            }
        }
Пример #2
0
        public void UpdateDevInfo(bool bToTable)
        {
            if (bToTable)
            {
                CConfig.ValToCon(dColPitch, ref OM.DevInfo.dColPitch);
                CConfig.ValToCon(dRowPitch, ref OM.DevInfo.dRowPitch);
                CConfig.ValToCon(iColGrCnt, ref OM.DevInfo.iColGrCnt);
                CConfig.ValToCon(iRowGrCnt, ref OM.DevInfo.iRowGrCnt);
                CConfig.ValToCon(dColGrGap, ref OM.DevInfo.dColGrGap);
                CConfig.ValToCon(dRowGrGap, ref OM.DevInfo.dRowGrGap);
                CConfig.ValToCon(iColCnt, ref OM.DevInfo.iColCnt);
                CConfig.ValToCon(iRowCnt, ref OM.DevInfo.iRowCnt);

                CConfig.ValToCon(iColSbGrCnt, ref OM.DevInfo.iColSbGrCnt);
                CConfig.ValToCon(dColSbGrGap, ref OM.DevInfo.dColSbGrGap);
                CConfig.ValToCon(iRowSbGrCnt, ref OM.DevInfo.iRowSbGrCnt);
                CConfig.ValToCon(dRowSbGrGap, ref OM.DevInfo.dRowSbGrGap);

                CConfig.ValToCon(sVisnIndexId, ref OM.DevInfo.sVisnIndexId);
                CConfig.ValToCon(iColInspCnt, ref OM.DevInfo.iColInspCnt);
                CConfig.ValToCon(iRowInspCnt, ref OM.DevInfo.iRowInspCnt);

                CConfig.ValToCon(iMgzCntPerLot, ref OM.DevInfo.iMgzCntPerLot);
                CConfig.ValToCon(dMgzPitch, ref OM.DevInfo.dMgzPitch);
                CConfig.ValToCon(iMgzSlotCnt, ref OM.DevInfo.iMgzSlotCnt);
                CConfig.ValToCon(iLdrOutDelay, ref OM.DevInfo.iLdrOutDelay);
                CConfig.ValToCon(iUdrOutDelay, ref OM.DevInfo.iUdrOutDelay);
                CConfig.ValToCon(bVs1_Skip, ref OM.DevInfo.bVs1_Skip);
                CConfig.ValToCon(bVs2_Skip, ref OM.DevInfo.bVs2_Skip);
                CConfig.ValToCon(bVs3_Skip, ref OM.DevInfo.bVs3_Skip);
                CConfig.ValToCon(bVsL_NotUse, ref OM.DevInfo.bVsL_NotUse);
                CConfig.ValToCon(bVsR_NotUse, ref OM.DevInfo.bVsR_NotUse);

                CConfig.ValToCon(iStprDnDelay, ref OM.DevInfo.iStprDnDelay);
            }
            else
            {
                OM.CDevInfo DevInfo = OM.DevInfo;

                CConfig.ConToVal(dColPitch, ref OM.DevInfo.dColPitch, 0.1, 300);
                CConfig.ConToVal(dRowPitch, ref OM.DevInfo.dRowPitch, 0.1, 300);
                CConfig.ConToVal(iColGrCnt, ref OM.DevInfo.iColGrCnt, 1, 99);
                CConfig.ConToVal(iRowGrCnt, ref OM.DevInfo.iRowGrCnt, 1, 99);
                CConfig.ConToVal(dColGrGap, ref OM.DevInfo.dColGrGap, 0, 300);
                CConfig.ConToVal(dRowGrGap, ref OM.DevInfo.dRowGrGap, 0, 300);
                CConfig.ConToVal(iColCnt, ref OM.DevInfo.iColCnt, 1, 99);
                CConfig.ConToVal(iRowCnt, ref OM.DevInfo.iRowCnt, 1, 99);

                CConfig.ConToVal(iColSbGrCnt, ref OM.DevInfo.iColSbGrCnt, 0, 99);
                CConfig.ConToVal(dColSbGrGap, ref OM.DevInfo.dColSbGrGap, 0.0, 300);
                CConfig.ConToVal(iRowSbGrCnt, ref OM.DevInfo.iRowSbGrCnt, 0, 99);
                CConfig.ConToVal(dRowSbGrGap, ref OM.DevInfo.dRowSbGrGap, 0.0, 300);

                CConfig.ConToVal(sVisnIndexId, ref OM.DevInfo.sVisnIndexId);
                CConfig.ConToVal(iColInspCnt, ref OM.DevInfo.iColInspCnt, 1, 99);
                CConfig.ConToVal(iRowInspCnt, ref OM.DevInfo.iRowInspCnt, 1, 99);

                CConfig.ConToVal(iMgzCntPerLot, ref OM.DevInfo.iMgzCntPerLot, 1, 99);
                CConfig.ConToVal(dMgzPitch, ref OM.DevInfo.dMgzPitch, 0.1, 300);
                CConfig.ConToVal(iMgzSlotCnt, ref OM.DevInfo.iMgzSlotCnt, 1, 99);
                CConfig.ConToVal(iLdrOutDelay, ref OM.DevInfo.iLdrOutDelay, 0, 5500);
                CConfig.ConToVal(iUdrOutDelay, ref OM.DevInfo.iUdrOutDelay, 0, 5500);

                CConfig.ConToVal(bVs1_Skip, ref OM.DevInfo.bVs1_Skip);
                CConfig.ConToVal(bVs2_Skip, ref OM.DevInfo.bVs2_Skip);
                CConfig.ConToVal(bVs3_Skip, ref OM.DevInfo.bVs3_Skip);
                CConfig.ConToVal(bVsL_NotUse, ref OM.DevInfo.bVsL_NotUse);
                CConfig.ConToVal(bVsR_NotUse, ref OM.DevInfo.bVsR_NotUse);

                CConfig.ConToVal(iStprDnDelay, ref OM.DevInfo.iStprDnDelay);

                //Auto Log
                Type        type = DevInfo.GetType();
                FieldInfo[] f    = type.GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
                for (int i = 0; i < f.Length; i++)
                {
                    Trace(f[i].Name, f[i].GetValue(DevInfo).ToString(), f[i].GetValue(OM.DevInfo).ToString());
                }

                UpdateDevInfo(true);
            }
        }