public FAModule()
        {
            ProductInfo = new FAProductInfo();
            PropertyChanged +=
                delegate(object sender, PropertyChangedEventArgs e)
                {
                    Attribute[] attr = Attribute.GetCustomAttributes(this.GetType().GetProperty(e.PropertyName));
                    bool typeOption = false;
                    foreach (Attribute at in attr)
                    {
                        if (at is FAAttribute)
                        {
                            if ((at as FAAttribute).GroupName == "Option")
                            {
                                typeOption = true;
                                break;
                            }
                        }
                    }

                    if (typeOption == false) return;

                    object obj = this.GetType().GetProperty(e.PropertyName).GetValue(this, null);

                    if (obj is bool)
                    {
                        if ((bool)obj == true)
                            Manager.LogManager.Instance.WriteTraceLog("ENABLE " + e.PropertyName);
                        else
                            Manager.LogManager.Instance.WriteTraceLog("DISABLE " + e.PropertyName);
                    }
                };
        }
 public virtual void CopyTo(FAProductInfo obj)
 {
     obj.UniqueSerialNo = UniqueSerialNo;
     ECInfo.CopyTo(obj.ECInfo);
     VT5080ProductInfo.CopyTo(obj.VT5080ProductInfo);
     obj.ExistProduct = ExistProduct;
 }
Exemple #3
0
        public FAModule()
        {
            Manager.MachineManager.Instance.AddModule(this);

            LotProductInfo = new ObservableCollection<Utility.FAProductInfo>();
            for (int i = 0; i < ConfigClasses.GlobalConst.LOT_COUNT; i++)
                LotProductInfo.Add(new Utility.FAProductInfo());

            ProductInfo = new FAProductInfo();
            PropertyChanged +=
                delegate(object sender, PropertyChangedEventArgs e)
                {
                    Attribute[] attr = Attribute.GetCustomAttributes(this.GetType().GetProperty(e.PropertyName));
                    bool saveLog = false;
                    foreach (Attribute at in attr)
                    {
                        if (at is EnablePropertyChangeLog)
                        {
                            saveLog = true;
                            break;
                        }
                        else if (at is FAAttribute)
                        {
                            if ((at as FAAttribute).GroupName == "Option")
                            {
                                saveLog = true;
                                break;
                            }
                        }
                    }

                    if (saveLog == false) return;

                    object obj = this.GetType().GetProperty(e.PropertyName).GetValue(this, null);

                    if (obj is bool)
                    {
                        if ((bool)obj == true)
                            Manager.LogManager.Instance.WriteTraceLog("ENABLE " + e.PropertyName);
                        else
                            Manager.LogManager.Instance.WriteTraceLog("DISABLE " + e.PropertyName);
                    }
                    else
                    {
                        Manager.LogManager.Instance.WriteTraceLog("CHANGED " + e.PropertyName + " : " + obj.ToString());
                    }
                };
        }
        public FAModule()
        {
            ProductInfo = new FAProductInfo();

            Manager.MachineManager.Instance.AddModule(this);

            PropertyChanged +=
                delegate(object sender, PropertyChangedEventArgs e)
                {
                    Attribute[] attr = Attribute.GetCustomAttributes(this.GetType().GetProperty(e.PropertyName));
                    bool saveLog = false;
                    foreach (Attribute at in attr)
                    {
                        if (at is EnablePropertyChangeLog)
                        {
                            saveLog = true;
                            break;
                        }
                        else if (at is FAAttribute)
                        {
                            if ((at as FAAttribute).GroupName == "Option")
                            {
                                saveLog = true;
                                break;
                            }
                        }
                    }

                    if (saveLog == false) return;

                    object obj = this.GetType().GetProperty(e.PropertyName).GetValue(this, null);

                    if (obj is bool)
                    {
                        if ((bool)obj == true)
                            WriteTraceLog("ENABLE " + e.PropertyName);
                        else
                            WriteTraceLog("DISABLE " + e.PropertyName);
                    }
                    else
                    {
                        Manager.LogManager.Instance.WriteTraceLog(Equipment, "CHANGED " + e.PropertyName + " : " + obj.ToString());
                    }
                };
        }
        public void AddWork(FAProductInfo productInfo)
        {
            RobotWork robotWork = new RobotWork();
            productInfo.CopyTo(robotWork.ProductInfo);
            var masterInfo = productInfo.ECInfo.PackingMasterInfo;
            robotWork.LargeBoxCount = masterInfo.LOT_QTY / (masterInfo.S_BOX_MOQ * masterInfo.L_BOX_MOQ);
            if (masterInfo.LOT_QTY % (masterInfo.S_BOX_MOQ * masterInfo.L_BOX_MOQ) > 0)
                robotWork.LargeBoxCount += 1;

            WorkQueue.Add(robotWork);
        }
 public virtual void CopyTo(FAProductInfo obj)
 {
     ECInfo.CopyTo(obj.ECInfo);
     VT5081ProductInfo.CopyTo(obj.VT5081ProductInfo);
     obj.ExistProduct = ExistProduct;
 }
 public void Copy(FAProductInfo info)
 {
     ECInfo.CopyTo(info.ECInfo);
     //SimaxInfo.CopyTo(info.SimaxInfo);
     info.SamsungBarcode = this.SamsungBarcode;
     info.SpecialBarcode = this.SpecialBarcode;
     info.IsEmptyBox = this.IsEmptyBox;
     info.SpecialBarcodeReadSkip = this.SpecialBarcodeReadSkip;
     info.IntervalLoadingTime = IntervalLoadingTime;
     info.SmallBoxBypassMode = SmallBoxBypassMode;
     info.MergeStackerMode = MergeStackerMode;
     info.BoxIndex = this.BoxIndex;
     info.ProductStatus = this.ProductStatus;
     info.FailMessage = this.FailMessage;
 }
 public void Copy(FAProductInfo info)
 {
     ECInfo.CopyTo(info.ECInfo);
     info.Exist = this.Exist;
     info.SamsungBarcode = this.SamsungBarcode;
     info.SpecialBarcode = this.SpecialBarcode;
     info.IsEmptyBox = this.IsEmptyBox;
     info.SpecialBarcodeReadSkip = this.SpecialBarcodeReadSkip;
     info.IntervalLoadingTime = IntervalLoadingTime;
 }
 public virtual void CopyTo(FAProductInfo obj)
 {
     obj.ExistProduct = ExistProduct;
     obj.UniqueSerialNo = UniqueSerialNo;
 }
        public void AddWork(FAECInfo.PACKING_MASTER_INFO_RPY packingMasterInfo, FAProductInfo allProductInfo)
        {
            RobotWork robotWork = new RobotWork();
            allProductInfo.CopyTo(robotWork.AllProductInfo);

            packingMasterInfo.CopyTo(robotWork.ProductInfo);
            robotWork.SmallBoxCount = packingMasterInfo.LOT_QTY / packingMasterInfo.S_BOX_MOQ;
            if (packingMasterInfo.LOT_QTY % packingMasterInfo.S_BOX_MOQ > 0)
                robotWork.SmallBoxCount += 1;

            int largeBoxCount = robotWork.SmallBoxCount / robotWork.ProductInfo.L_BOX_MOQ;
            if (robotWork.SmallBoxCount % robotWork.ProductInfo.L_BOX_MOQ > 0)
                largeBoxCount += 1;

            int smallBoxCountIncludeEmptyBox = robotWork.ProductInfo.L_BOX_MOQ * largeBoxCount;
            robotWork.TotalSmallBoxCount = smallBoxCountIncludeEmptyBox;

            WorkQueue.Enqueue(robotWork);
        }
 public void Copy(FAProductInfo info)
 {
     ECInfo.CopyTo(info.ECInfo);
     info.SamsungBarcode = this.SamsungBarcode;
     info.SpecialBarcode = this.SpecialBarcode;
 }
        private void AddAction(object obj)
        {
            bool isRFTray, isFirstTray, isLastTray, isHaveAEmptyPocket;
            int needEmptyTrayCount;
            string errMsg;

            var result = UtilityClass.SetTrayProcessFlag(ProductInfo, out isRFTray, out isFirstTray, out isLastTray, out needEmptyTrayCount, out isHaveAEmptyPocket, out errMsg);

            if (result == false)
            {
                RaiseAlarm(this, AlarmLotInfoNotCorrect);
            }
            else
            {
                if (isRFTray)
                {
                    AddRFTrayRemoveAction();
                }
                else if (needEmptyTrayCount > 0)
                {
                    FAProductInfo productInfo = new FAProductInfo();
                    ProductInfo.CopyTo(productInfo);

                    if (isFirstTray)
                    {
                        AddEmptyTrayStackAction(needEmptyTrayCount);
                        AddEmptyTraySupplyAction(needEmptyTrayCount, productInfo);
                        AddEmptyTraySupplyAction(COVER_TRAY_COUNT, productInfo);

                        WriteTraceLog(string.Format("AddEmptyTrayStackAction({0})", needEmptyTrayCount));
                        WriteTraceLog(string.Format("AddEmptyTraySupplyAction({0}, {1})", needEmptyTrayCount, productInfo.ToString()));
                        WriteTraceLog(string.Format("AddEmptyTraySupplyAction({0}, {1})", COVER_TRAY_COUNT, productInfo.ToString()));
                    }

                    AddTrayStackAction(ProductInfo);

                    if (isLastTray)
                    {
                        AddCoverTrayStackAction(COVER_TRAY_COUNT);
                    }
                }
                else if (isHaveAEmptyPocket)
                {
                    FAProductInfo productInfo = new FAProductInfo();
                    ProductInfo.CopyTo(productInfo);

                    if (isFirstTray)
                    {
                        AddEmptyTraySupplyAction(COVER_TRAY_COUNT, productInfo);
                        WriteTraceLog(string.Format("AddEmptyTraySupplyAction({0}, {1})", COVER_TRAY_COUNT, productInfo.ToString()));
                    }

                    AddTrayStackAction(ProductInfo);

                    if (isLastTray)
                    {
                        AddCoverTrayStackAction(COVER_TRAY_COUNT);
                    }
                }
                else
                {
                    FAProductInfo productInfo = new FAProductInfo();
                    ProductInfo.CopyTo(productInfo);

                    if (isFirstTray)
                    {
                        AddEmptyTraySupplyAction(COVER_TRAY_COUNT, productInfo);
                        AddCoverTrayStackAction(COVER_TRAY_COUNT);
                    }
                }
            }
        }
 public void Copy(FAProductInfo info)
 {
     ECInfo.CopyTo(info.ECInfo);
     info.SamsungBarcode = this.SamsungBarcode;
     info.SpecialBarcode = this.SpecialBarcode;
     info.IsEmptyBox = this.IsEmptyBox;
     info.SpecialBarcodeReadSkip = this.SpecialBarcodeReadSkip;
     NotifyPropertyChanged("ECInfo");
 }
 public void AddWork(FAProductInfo productInfo)
 {
     RobotWork robotWork = new RobotWork();
     productInfo.CopyTo(robotWork.ProductInfo);
     WorkQueue.Add(robotWork);
 }
        private JobInfo.EBottomFoamPadType GetFoamPadTypeFromProductInfo(FAProductInfo productInfo)
        {
            var count = UtilityClass.PackingTrayCount(productInfo);

            if (count == 6)
                return VT5081.JobInfo.EBottomFoamPadType.High;
            else
                return VT5081.JobInfo.EBottomFoamPadType.Low;
        }
 public void Copy(FAProductInfo info)
 {
     ECInfo.CopyTo(info.ECInfo);
     info.IsEmptyBox = this.IsEmptyBox;
     SerialBarcodeInfo.CopyTo(info.SerialBarcodeInfo);
     PPIDBarcodeInfo.CopyTo(info.PPIDBarcodeInfo);
     WWNBarcodeInfo.CopyTo(info.WWNBarcodeInfo);
     CSerialBarcodeInfo.CopyTo(info.CSerialBarcodeInfo);
     PSIDBarcodeInfo.CopyTo(info.PSIDBarcodeInfo);
 }
 public void Copy(FAProductInfo info)
 {
     ECInfo.CopyTo(info.ECInfo);
     info.SamsungBarcode = this.SamsungBarcode;
     info.SpecialBarcode = this.SpecialBarcode;
     info.IsEmptyBox = this.IsEmptyBox;
     info.SpecialBarcodeReadSkip = this.SpecialBarcodeReadSkip;
 }
 public void AddWork(FAProductInfo productInfo)
 {
     var newProductInfo = new FAProductInfo();
     productInfo.CopyTo(newProductInfo);
     WorkQueue.Add(newProductInfo);
 }