コード例 #1
0
        /// <summary>
        /// 初始化运行时变量
        /// </summary>
        /// <param name="multiInfo"></param>
        public void Restet(MultiPasteInfo multiInfo)
        {
            RUN_CamMarkIsDone    = false;
            RUN_CamBadmarkIsDone = false;
            RUN_CamPanelIsDone   = false;
            RUN_CamCodeIsDone    = false;

            RUN_NzData  = new ConcurrentDictionary <Nozzle, NZ_RunData>();
            RUN_PCBData = new List <Board_RunData>();

            for (Nozzle nz = Nozzle.Nz1; nz <= Nozzle.Nz4; ++nz)
            {
                RUN_NzData.TryAdd(nz, new NZ_RunData());
            }

            for (int i = 0; i < multiInfo.PasteInfos.Count; ++i)
            {
                RUN_PCBData.Add(new Board_RunData());
                RUN_PCBData[i].MarkData = new Mark_RunData();
                RUN_PCBData[i].PcsData  = new Pcs_RunData[multiInfo.PasteInfos[i].PasteList.Count];

                for (int j = 0; j < multiInfo.PasteInfos[i].PasteList.Count; ++j)
                {
                    RUN_PCBData[i].PcsData[j] = new Pcs_RunData();
                    if (!multiInfo.PasteInfos[i].PasteList[j].CanPaste)
                    {
                        RUN_PCBData[i].PcsData[j].iPasteState = 3;
                    }
                    RUN_PCBData[i][j].UpPastePt = multiInfo.PasteInfos[i].PasteList[j].Pos;
                }
            }

            ChangePasteRegion?.Invoke(this.module);
            UpdateChart?.Invoke(this.module);
        }
コード例 #2
0
        /// <summary>
        /// 贴附信息标志
        /// -2: 已吸标需要贴标
        /// -1: 已抛料需要补料
        /// 0: 需要贴附
        /// 2: 已贴附
        /// 3: BadmarkFail
        /// 4: MarkFail
        /// </summary>
        //public ConcurrentDictionary<int, int[]> iPasteState = new ConcurrentDictionary<int, int[]>();

        /// <summary>
        /// 设置状态
        /// </summary>
        /// <param name="pcbIndex"></param>
        /// <param name="pcsIndex"></param>
        /// <param name="flag"></param>
        public void SetPasteState(int pcbIndex, int pcsIndex, int flag)
        {
            this.RUN_PCBData[pcbIndex].PcsData[pcsIndex].iPasteState = flag;

            UpdateChart?.Invoke(this.module);
        }