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();
                }
            }
        }
 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);
     }
 }
 private void StartSequenceList(FASequence actor, TimeSpan time)
 {
     if (CurrentSequenceQueue.Count <= 0)
         actor.NextTerminate();
     else
     {
         CurrentSequence = CurrentSequenceQueue.Dequeue();
         actor.NextStep();
     }
 }
 protected void TerminateSequence(FASequence actor, TimeSpan time)
 {
     actor.NextTerminate();
 }
        private void IncreaseTrayCount(FASequence actor, TimeSpan time)
        {
            PickingTrayCount++;

            if (SuppliedTrayCount + PickingTrayCount == TargetTrayCount)
                actor.NextTerminate();
            else
                actor.NextStep();
        }
 private void ConfirmXYPosition(FASequence actor, TimeSpan time)
 {
     if (TransferServoX.IsInPosition(TargetPosition.PositionX) &&
         TransferServoY.IsInPosition(TargetPosition.PositionY))
         actor.NextTerminate();
     else
         actor.NextStep();
 }
 private void ConfirmTrayDetectSensorOnAndServoZStop(FASequence actor, TimeSpan time)
 {
     if (TraySideDetectSensor.IsOn)
     {
         TransferServoZ.Stop.Execute(actor);
         actor.NextStep();
     }
     else if (TransferServoZ.IsMotionDone()
         && TransferServoZ.IsInPosition(TargetPosition.PositionZ))
     {
         PickingTrayCount = 0;
         actor.NextTerminate();
     }
     else if (TransferServoZ.RunFlag == false && TransferServoZ.IsMotionDone() &&
         TransferServoZ.ErrorFlag == false)
     {
         TransferServoZ.MoveToPos.Execute(actor);
     }
 }
 private void ConfirmRemainTrayCount(FASequence actor, TimeSpan time)
 {
     if (SuppliedTrayCount == TargetTrayCount)
     {
         InterfaceEmptyTraySupplyConveyorReady.DoTurnOff(actor);
         actor.NextTerminate();
     }
     else
         actor.NextStep("SelectTargetStacker");
 }
 private void ConfirmSeperateActionCount(FASequence actor, TimeSpan time)
 {
     if (RetryInfoSeperateAction.IncreaseCount() == true)
         actor.NextStep();
     else
         actor.NextTerminate();
 }
 private void ConfirmStackFull(FASequence actor, TimeSpan time)
 {
     if (IsStackTerminated() == true)
     {
         if (ProductInfo.VT8792ProductInfo.TrayCount == ProductInfo.VT8792ProductInfo.TrayIndex &&
             ProductInfo.VT8792ProductInfo.LotScanCompleted.ScanSuccess == false)
         {
             RFTrayCoveringRequest = true;
             CoverTrayRequest = true;
             actor.NextStep();
         }
         else
         {
             CoverTrayRequest = true;
             actor.NextStep();
         }
     }
     else
         actor.NextTerminate();
 }