private void ConfirmSkipPassToNextMachine(FASequence actor, TimeSpan time)
 {
     if (SkipPassToNextMachine)
         actor.NextStep("ClearIsAvailable");
     else
         actor.NextStep();
 }
 public void ConfirmTime(FASequence actor, TimeSpan time)
 {
     if (Time.Time < time)
     {
         if (MethodOfEndTime != null)
         {
             if (MethodOfEndTime())
                 actor.NextStep();
             else
                 actor.NextStep("Retry");
         }
         else
             actor.NextStep();
     }
     else
     {
         if (MethodOfDuringTime != null)
         {
             if (MethodOfDuringTime())
                 actor.NextStep();
             else
                 actor.NextStep("Retry");
         }
     }
 }
 private void ConfirmSkipPassToNextMachine(FASequence actor, TimeSpan time)
 {
     if (SkipPassToNextMachine)
         actor.NextStep("AfterUnloading");
     else
         actor.NextStep();
 }
 private void ConfirmStackTerminated(FASequence actor, TimeSpan time)
 {
     if (IsStackTerminated() == true)
         actor.NextStep();
     else
         actor.NextStep("ClearIsAvailable");
 }
 private void ConfirmNextModuleLoadingAble(FASequence actor, TimeSpan time)
 {
     if (NextModule == null)
         actor.NextStep("ProductDataCopyToNextMachine");
     else if (NextModule.IsAvailable == true)
     {
         NextModule.IsAvailable = false;
         actor.NextStep();
     }
 }
 public void Start(FASequence actor, TimeSpan time)
 {
     if (StartCondition == null)
     {
         Start();
         actor.NextStep();
     }
     else if (StartCondition() == true)
     {
         Start();
         actor.NextStep();
     }
 }
        private void ConfirmTrayIndex(FASequence actor, TimeSpan time)
        {
            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(actor, AlarmLotInfoNotCorrect);
            }
            else
            {
                if (isRFTray || needEmptyTrayCount > 0 || isHaveAEmptyPocket) // Robot이 집어간다.
                {
                    SkipPassToNextMachine = true;
                    actor.NextStep();
                }
                else
                {
                    SkipPassToNextMachine = false;
                    actor.NextTerminate();
                }
            }
        }
        public void ConfirmTerminated(FASequence actor, TimeSpan time)
        {
            if (Sequences == null)
            {
                TerminateResult();
                actor.NextStep();
            }
            else
            {
                foreach (var seq in Sequences)
                {
                    if (seq.IsStartable() == false)
                        return;
                }

                if (TerminateResult != null)
                    TerminateResult();

                actor.NextStep();
            }
        }
        private void LoadJob(FASequence actor, TimeSpan time)
        {
            var equip = Equipment as VT5070.SubEquipment;
            var partID = CurrentWork.ProductInfo.PRODUCT_NAME;
            string msg = "";
            var job = equip.JobManagerInstance.GetJob(partID, out msg);

            if (job == null)
            {
                RaiseAlarm(actor, AlarmJobLoadFail, "Job is null\n" + msg);
            }
            else
            {
                try
                {
                    SetJobInfo(job);
                    actor.NextStep();
                }
                catch (Exception e)
                {
                    RaiseAlarm(actor, AlarmJobLoadFail, e.ToString());
                }
            }
        }
        private void ConfirmStatus(FASequence actor, TimeSpan time)
        {
            if (StatusOnlineError == false &&
                StatusBufferOverflow == false &&
                StatusHeadOpenError == false &&
                StatusPaperOutError == false &&
                StatusRibbonOut == false)
            {
                actor.NextStep();
            }
            else if (TimeStatusCheckTimeout.Time < time)
            {
                if (RetryInfoStatusCheck.IncreaseCount())
                {
                    actor.NextStep("Start");
                }
                else
                {
                    if (StatusOnlineError)
                    {
                        FAAlarmManager.Instance.RaiseAlarm(actor, AlarmLabelPrinterOnlineError);
                    }
                    else if (StatusBufferOverflow)
                    {
                        FAAlarmManager.Instance.RaiseAlarm(actor, AlarmLabelPrinterBufferOverflowError);
                    }
                    else if (StatusHeadOpenError)
                    {
                        FAAlarmManager.Instance.RaiseAlarm(actor, AlarmLabelPrinterHeadOpenError);
                    }
                    else if (StatusPaperOutError)
                    {
                        FAAlarmManager.Instance.RaiseAlarm(actor, AlarmLabelPrinterPaperOutError);
                    }
                    else if (StatusRibbonOut)
                    {
                        FAAlarmManager.Instance.RaiseAlarm(actor, AlarmLabelPrinterRibbonOutError);
                    }

                    actor.NextStep("Start");
                }
            }
        }
 private void ConfirmStackCount(FASequence actor, TimeSpan time)
 {
     var x = SmallBoxStackMatrixInfo.StackSize[JobInfo.LargeBoxJobInfo.BoxType].X;
     if ((StackCount * x) >= CurrentLotInfo.L_BOX_MOQ)
         actor.NextStep();
     else
         actor.NextStep("MovePusherToStandbyPos");
 }
 private void ConfirmSupplyTerminatedInOff(FASequence actor, TimeSpan time)
 {
     if (InterfaceLoadingTerminatedIn.IsOff)
     {
         actor.NextStep();
     }
 }
        private void ConfirmSupplyReady(FASequence actor, TimeSpan time)
        {
            InterfaceSupplyReadyOut.DoTurnOn(actor);

            if (InterfaceLoadingRunningIn.IsOn && InterfaceLoadingReadyIn.IsOn)
            {
                InterfaceSupplyTerminatedOut.DoTurnOff(actor);
                actor.NextStep();
            }
        }
 private void ConfirmCurrentStep(FASequence actor, TimeSpan time)
 {
     if (CurrentStep == "Loading")
         actor.NextStep("Loading");
     else if (CurrentStep == "SupplyTray")
         actor.NextStep("SupplyTray");
     else
         actor.NextStep();
 }
 protected void ConfirmMoveDone(FASequence actor, TimeSpan time)
 {
     if (Device.IsMotionDone(AxisNo) == true)
         actor.NextStep();
     else if (MoveToPosTimeout.Time < time)
     {
         Device.Stop(AxisNo);
         Alarm.FAAlarmManager.Instance.RaiseAlarm(actor, MovePosFail,
             "MOVE FAIL POSNAME : " + TargetPosition.Name +
             " POS : " + TargetPosition.Position +
             " Part " + Name + '\n');
         actor.NextStep("StartMove");
     }
 }
        private void ConfirmUnloadingToSuccessWay(FASequence actor, TimeSpan time)
        {
            if (TrayInSensor.IsOff && TrayStopSensor.IsOff && OutCompletedSensor.IsOn)
            {
                ConveyorMotor.StopAction.Execute(actor);
                actor.NextStep();
            }
            else if (TimeUnloadingTrayTimeout.Time < time)
            {
                if (Equipment.RunMode == FAFramework.Equipment.RunModeTypes.DRY_RUN)
                {
                    ConveyorMotor.StopAction.Execute(actor);
                    actor.NextStep();
                }
                else
                {
                    if (RetryInfoUnloadingTray.IncreaseCount() == false)
                        RaiseAlarm(actor, AlarmUnloadingTrayToSuccessWayFail,
                                    TrayInSensor.GetInputIOStatus(),
                                    TrayStopSensor.GetInputIOStatus(),
                                    OutCompletedSensor.GetInputIOStatus());

                    actor.NextStep("SetUnloadingDirection");
                }
            }
            else
                ConveyorMotor.ReverseRunAction.Execute(actor);
        }
        private void LoadJob(FASequence actor, TimeSpan time)
        {
            var equip = Equipment as VT8792.SubEquipment;
            var partID = ProductInfo.ECInfo.PACKING_MASTER_INFO.PART_ID;
            string msg = "";
            var job = equip.JobManagerInstance.GetJob(partID, out msg);

            if (job == null)
            {
                RaiseAlarm(actor, AlarmJobLoadFail, "Job is null\n" + msg);
            }
            else
            {
                if (job.SSDScanJobInfo == null)
                {
                    RaiseAlarm(actor, AlarmJobLoadFail, "SSDScanJobInfo is null\n" + msg);
                }
                else
                {
                    try
                    {
                        job.CopyTo(LotJobInfo);
                        job.CommonJobInfo.CopyTo(JobInfo);
                        actor.NextStep();
                    }
                    catch (Exception e)
                    {
                        RaiseAlarm(actor, AlarmJobLoadFail, e.ToString());
                    }
                }
            }
        }
 protected void ConfirmMoveHomeDone(FASequence actor, TimeSpan time)
 {
     if (Device.IsMotionDone(AxisNo) == true)
         actor.NextStep();
     else if (HomeTimeout.Time < time)
     {
         Device.Stop(AxisNo);
         Alarm.FAAlarmManager.Instance.RaiseAlarm(actor, HomeFail,
             "HOME FAIL Part " + Name + '\n');
         actor.NextStep("StartMove");
     }
 }
 private void ConfirmLoadingReadyOff(FASequence actor, TimeSpan time)
 {
     if (InterfaceLoadingReady.IsOff)
         actor.NextStep();
 }
 protected void ConfirmStopOk(FASequence actor, TimeSpan time)
 {
     if (Device.IsMotionDone(AxisNo) == true)
         actor.NextStep();
     else if (StopTimeout.Time < time)
     {
         Alarm.FAAlarmManager.Instance.RaiseAlarm(actor, StopFail,
             "STOP FAIL Part " + Name + '\n');
         actor.NextStep("Stop");
     }
 }
        private void ConfirmSupplyTerminated(FASequence actor, TimeSpan time)
        {
            if (InterfaceLoadingRunningIn.IsOff)
            {
                ConveyorMotor.Stop.Execute(actor);
                actor.NextStep("Start");
            }
            else if (TrayInSensor.IsOff && TrayOutSensor.IsOff)
            {
                InterfaceSupplyTerminatedOut.DoTurnOn(actor);
                ConveyorMotor.Stop.Execute(actor);
                actor.NextStep();
            }
            else if (TimeUnloadingTrayTimeout.Time < time)
            {
                if (Equipment.RunMode == FAFramework.Equipment.RunModeTypes.DRY_RUN)
                {
                    InterfaceSupplyTerminatedOut.DoTurnOn(actor);
                    ConveyorMotor.Stop.Execute(actor);
                    actor.NextStep();
                }
                else
                {
                    if (RetryInfoUnloadingTray.IncreaseCount() == false)
                        RaiseAlarm(actor, AlarmUnloadingTrayFail,
                                      TrayInSensor.GetInputIOStatus(),
                                     TrayOutSensor.GetInputIOStatus());

                    ConveyorMotor.Stop.Execute(actor);
                    actor.NextStep("Start");
                }
            }
            else
                ConveyorMotor.Run.Execute(actor);
        }
        private void ConfirmSSDArrival(FALibrary.Part.MemoryBasePart.FAPartOnOffSensor sensor, FASequence actor, TimeSpan time)
        {
            if (SSDBoxInletUnit.PreStopPositionSensor.IsOn ||
                SSDBoxInletUnit.Stacker1StopPositionSensor.IsOn ||
                SSDBoxInletUnit.Stacker2StopPositionSensor.IsOn)
            {
                SSDBoxInletUnit.PreInletStopPositionStopper.Up.Execute(actor);
            }

            if (sensor.IsOn)
            {
                actor.NextStep();
            }
            else if (TimeLoadingTimeout.Time < time)
            {
                if (RetryInfoLoading.IncreaseCount() == false)
                    RaiseAlarm(actor, AlarmLoadingFail, sensor.GetInputIOStatus());

                actor.NextStep("SelectLoadingPos");
            }
            else
                SSDBoxInletUnit.ConveyorMotor.Run.Execute(actor);
        }
 private void ConfirmSupplyTerminatedInOn(FASequence actor, TimeSpan time)
 {
     if (InterfaceLoadingTerminatedIn.IsOn)
     {
         InterfaceSupplyTerminatedOut.DoTurnOff(actor);
         actor.NextStep();
     }
 }
 private void SetUnloadingDirection(FASequence actor, TimeSpan time)
 {
     if (NextModule == null)
     {
         Equipment.RequestStop();
         string msg = Utility.UtilityClass.GetStringResource(this, "RFReaderModule.NextModuleIsNull", "Next Module of The RF Reader Module is null");
         Manager.MessageWindowManager.Instance.Show(Equipment, "RFReaderNextModuleIsNull", msg);
     }
     else if (NextModule == SuccessWayModule)
     {
         actor.NextStep("UnloadingToSuccessWay");
     }
     else if (NextModule == FailureWayModule)
     {
         actor.NextStep("UnloadingToFailureWay");
     }
 }
 private void SetCurrentBoxFormingModule(FASequence actor, TimeSpan time)
 {
     if (GlobalConfigModule.LargeBoxType == BoxFormingBufferModule1.BoxType)
     {
         CurrentFormingBufferModule = BoxFormingBufferModule1;
         actor.NextStep();
     }
     else if (GlobalConfigModule.LargeBoxType == BoxFormingBufferModule2.BoxType)
     {
         CurrentFormingBufferModule = BoxFormingBufferModule2;
         actor.NextStep();
     }
     else
     {
         RaiseAlarm(actor, AlarmDidNotFindBoxType,
             string.Format("Box type of job = {0}, Box Type of The Box Forming Machine 1 = {1}, Box Type of The Box Forming Machine 2 = {2}",
                 JobInfo.LargeBoxJobInfo.BoxType,
                 BoxFormingBufferModule1.BoxType,
                 BoxFormingBufferModule2.BoxType));
     }
 }
        private void ConfirmTrayArrival(FASequence actor, TimeSpan time)
        {
            if (TrayStopSensor.IsOn)
            {
                ConveyorMotor.StopAction.Execute(actor);
                actor.NextStep();
            }
            else if (TimeLoadingTrayTimeout.Time < time)
            {
                if (Equipment.RunMode == FAFramework.Equipment.RunModeTypes.DRY_RUN)
                {
                    ConveyorMotor.StopAction.Execute(actor);
                    actor.NextStep();
                }
                else
                {
                    if (RetryInfoLoadingTray.IncreaseCount() == false)
                        RaiseAlarm(actor, AlarmLoadingTrayFail, TrayStopSensor.GetInputIOStatus());

                    actor.NextStep("Start");
                }
            }
            else
                ConveyorMotor.RunAction.Execute(actor);
        }
        protected override void ActionAfterStop(FASequence actor, TimeSpan time)
        {
            if (XCloseInformReceived == true)
            {
                try
                {
                    if (XCloseInform != null)
                    {
                        if (XCloseInform.Result == true)
                        {
                            if (TrayScanModule.ProductInfo.ECInfo.ReceiveLotClose.LotID
                                == XCloseInform.LotID)
                            {
                                var alarm = Utility.AlarmUtility.GetAlarm(TrayScanModule.AlarmReceivedXCloseInform,
                                    "RECEIVED X CLOSE INFORM " + XCloseInform.LotID);
                                Manager.WarningMessageManager.Instance.Show(
                                    "X CLOSE INFORM", alarm.AlarmName);
                                InitializeOk = false;
                            }
                        }
                    }
                }
                catch
                {
                    actor.NextStep();
                }
            }

            XCloseInformReceived = false;
            actor.NextStep();
        }
 private void ConfirmTrayDetectSensorOnAndServoZStop(FASequence actor, TimeSpan time)
 {
     if (TrayDetectSensor.IsOn)
     {
         if (DateTime.Now - LastTrayDetectedTime > TimeTrayCountingSensorHuntingTime.Time)
         {
             LastTrayDetectedTime = DateTime.Now;
             RFScannerUpDownServo.Stop.Execute(actor);
             actor.NextStep();
         }
     }
     else if (RFScannerUpDownServo.IsMotionDone()
         && RFScannerUpDownServo.IsInPosition(RFScannerUpDownServo.BottomPos))
     {
         TrayCount += CountOffset;
         actor.NextTerminate();
     }
     else if (RFScannerUpDownServo.RunFlag == false && RFScannerUpDownServo.IsMotionDone() &&
         RFScannerUpDownServo.ErrorFlag == false)
     {
         RFScannerUpDownServo.MoveBottomPos.Execute(actor);
     }
 }
Exemple #29
0
        public void ExecuteForSequence(FASequence actor, TimeSpan time)
        {
            if (IsInterlock() == true)                            
                return;            

            ActionMethod(actor);
            actor.NextStep();
        }
        private void ConfirmTrayTopSensorOn(FASequence actor, TimeSpan time)
        {
            if (TrayDetectSensor.IsOn)
            {
                RFScannerUpDownServo.Stop.Execute(actor);
                actor.NextStep();
            }
            else if (TimeTrayTopSearchTimeout.Time < time ||
                (RFScannerUpDownServo.IsInPosition(RFScannerUpDownServo.BottomPos) &&
                RFScannerUpDownServo.IsMotionDone()))
            {
                if (Equipment.RunMode == FAFramework.Equipment.RunModeTypes.DRY_RUN)
                {
                    RFScannerUpDownServo.Stop.Execute(actor);
                    actor.NextStep();
                }
                else
                {
                    if (RetryInfoTrayTopSearch.IncreaseCount() == false)
                        RaiseAlarm(actor, AlarmTrayTopSearchFail,TrayDetectSensor.GetInputIOStatus());

                    actor.NextStep("Start");
                }
            }
            else if (RFScannerUpDownServo.RunFlag == false && RFScannerUpDownServo.IsMotionDone() &&
                RFScannerUpDownServo.ErrorFlag == false)
            {
                RFScannerUpDownServo.MoveBottomPos.Execute(actor);
            }
        }