Пример #1
0
        public void RaiseInputStationStopper(bool on, out uint timeUsed)
        {
            timeUsed = 0;
            if (HSTMachine.Workcell.HSTSettings.Install.OperationMode == OperationMode.Simulation)
            {
                Thread.Sleep(CommonFunctions.SIMULATION_DELAY);
                return;
            }

            if (on)
            {
                try
                {
                    _stopper.Extend(nCylinderTimeout, out timeUsed);
                    _stopper.WaitForExtend(nCylinderTimeout);
                }
                catch (Exception ex)
                {
                    HSTException.Throw(HSTErrors.InputStationStopperExtendError, ex);
                }
            }
            else
            {
                try
                {
                    _stopper.Retract(nCylinderTimeout, out timeUsed);
                    _stopper.WaitForRetract(nCylinderTimeout);
                }
                catch (Exception ex)
                {
                    HSTException.Throw(HSTErrors.InputStationStopperRetractError, ex);
                }
            }
        }
Пример #2
0
        public void RaiseInputLifter(bool on)
        {
            if (HSTMachine.Workcell.HSTSettings.Install.OperationMode == OperationMode.Simulation ||
                (HSTMachine.Workcell.HSTSettings.Install.OperationMode == OperationMode.Bypass && HSTMachine.Workcell.HSTSettings.Install.BypassInputAndOutputEEsPickAndPlace == true))
            {
                Thread.Sleep(CommonFunctions.SIMULATION_DELAY);
                return;
            }

            if (on)
            {
                try
                {
                    _lifter.Extend(nCylinderTimeout);
                }
                catch (Exception ex)
                {
                    HSTException.Throw(HSTErrors.InputStationLifterExtendError, ex);
                }
            }
            else
            {
                try
                {
                    _lifter.Retract(nCylinderTimeout);
                }
                catch (Exception ex)
                {
                    HSTException.Throw(HSTErrors.InputStationLifterRetractError, ex);
                }
            }

            return;
        }
Пример #3
0
        public void WaitInputTurnStationPartCleared()
        {
            if (HSTMachine.Workcell.HSTSettings.Install.OperationMode == OperationMode.Simulation)
            {
                Thread.Sleep(10 * CommonFunctions.SIMULATION_DELAY);
                return;
            }
            else
            {
                int autoRetry = 2;

                do
                {
                    try
                    {
                        inputTurnSectionIO.inPosition.WaitForState(DigitalIOState.Off, 5000);
                        HSTMachine.Workcell.InputTurnStationBoatPositionError = false;
                        autoRetry = 0;
                    }
                    catch (Exception ex)
                    {
                        if (autoRetry <= 0)
                        {
                            HSTMachine.Workcell.InputTurnStationBoatPositionError = true;
                            HSTException.Throw(HSTErrors.InputTurnStationInPositionNotOffError, ex);
                        }
                        else
                        {
                            autoRetry--;
                        }
                    }
                } while (autoRetry > 0);
            }
        }
Пример #4
0
 public void InputStationClampRotaryOpenCover(bool on)
 {
     if (HSTMachine.Workcell.HSTSettings.Install.OperationMode == OperationMode.Simulation ||
         (HSTMachine.Workcell.HSTSettings.Install.OperationMode == OperationMode.Bypass && HSTMachine.Workcell.HSTSettings.Install.BypassInputAndOutputEEsPickAndPlace == true))
     {
         Thread.Sleep(CommonFunctions.SIMULATION_DELAY);
         return;
     }
     if (on)
     {
         try
         {
             _clampRotary.Extend(nCylinderTimeout);
         }
         catch (Exception ex)
         {
             HSTException.Throw(HSTErrors.InputStationCarrierScrewDriverRotateClockwiseError, ex);
         }
     }
     else
     {
         try
         {
             _clampRotary.Retract(nCylinderTimeout);
         }
         catch (Exception ex)
         {
             HSTException.Throw(HSTErrors.InputStationCarrierScrewDriverRotateCounterClockwiseError, ex);
         }
     }
 }
Пример #5
0
        public void OutputStationForwardClamp(bool on)
        {
            if (HSTMachine.Workcell.HSTSettings.Install.OperationMode == OperationMode.Simulation)
            {
                Thread.Sleep(CommonFunctions.SIMULATION_DELAY);
                return;
            }

            if (on)
            {
                try
                {
                    _clamp.Extend(nCylinderTimeout);
                }
                catch (Exception ex)
                {
                    HSTException.Throw(HSTErrors.OutputStationCarrierScrewDriverExtendError, ex);
                }
            }
            else
            {
                try
                {
                    _clamp.Retract(nCylinderTimeout);
                }
                catch (Exception ex)
                {
                    HSTException.Throw(HSTErrors.OutputStationCarrierScrewDriverRetractError, ex);
                }
            }
            return;
        }
Пример #6
0
 public void CheckPnpPartPresent(bool bOn)
 {
     if (HSTMachine.Workcell.HSTSettings.Install.OperationMode == OperationMode.Simulation ||
         HSTMachine.Workcell.HSTSettings.Install.OperationMode == OperationMode.DryRun)
     {
         return;
     }
     else
     {
         if (bOn)
         {
             // Input EE Pnp Present 1
             try
             {
                 _diOutputEndEffectorPnpPresent1.WaitForState(DigitalIOState.On, _sensorTimeout);
             }
             catch (Exception ex)
             {
                 HSTException.Throw(HSTErrors.OutputEndEffectorVacuumPressureSensor1NotOnError, ex);
                 //End Effector1 Pnp Present1 Not On Error
             }
         }
         else
         {
             try
             {
                 _diOutputEndEffectorPnpPresent1.WaitForState(DigitalIOState.Off, _sensorTimeout);
             }
             catch (Exception ex)
             {
                 HSTException.Throw(HSTErrors.OutputEndEffectorVacuumPressureSensor1NotOffError, ex);
                 //End Effector1 Pnp Present1 Not Off Error
             }
         }
     }
     if (bOn)
     {
         try
         {
             _diOutputEndEffectorPnpPresent2.WaitForState(DigitalIOState.On, _sensorTimeout);
         }
         catch (Exception ex)
         {
             HSTException.Throw(HSTErrors.OutputEndEffectorVacuumPressureSensor2NotOnError, ex);
             //End Effector1 Pnp Present2 Not On Error
         }
     }
     else
     {
         try
         {
             _diOutputEndEffectorPnpPresent2.WaitForState(DigitalIOState.Off, _sensorTimeout);
         }
         catch (Exception ex)
         {
             HSTException.Throw(HSTErrors.OutputEndEffectorVacuumPressureSensor2NotOffError, ex);
             //End Effector1 Pnp Present2 Not Off Error
         }
     }
 }
Пример #7
0
        public void RaiseInputStationStopper(bool on)
        {
            if (HSTMachine.Workcell.HSTSettings.Install.OperationMode == OperationMode.Simulation)
            {
                Thread.Sleep(CommonFunctions.SIMULATION_DELAY);
                return;
            }

            if (on)
            {
                try
                {
                    _stopper.Extend(nCylinderTimeout);//chanfg mask LinearActuator call and replace with direct IO call
                }
                catch (Exception ex)
                {
                    HSTException.Throw(HSTErrors.InputStationStopperExtendError, ex);
                }
            }
            else
            {
                try
                {
                    _stopper.Retract(nCylinderTimeout);//chanfg mask LinearActuator call and replace with direct IO call
                }
                catch (Exception ex)
                {
                    HSTException.Throw(HSTErrors.InputStationStopperRetractError, ex);
                }
            }
        }
 public void OutputTurnSectionReleaseCarrier(bool on)
 {
     if (HSTMachine.Workcell.HSTSettings.Install.OperationMode == OperationMode.Simulation)
     {
         Thread.Sleep(CommonFunctions.SIMULATION_DELAY);
         return;
     }
     try
     {
         if (on)
         {
             if (outputTurnSectionIO.At90DegSensor.Get() == DigitalIOState.Off)
             {
                 throw new ControllerException("Output TurnSection no in 90 degree position.");
             }
             outputTurnSectionIO.exitRelay.Set(DigitalIOState.On);
         }
         else
         {
             outputTurnSectionIO.exitRelay.Set(DigitalIOState.Off);
         }
     }
     catch (Exception ex)
     {
         HSTException.Throw(HSTErrors.OutputTurnStationExitClearNotOnError, ex);
     }
     return;
 }
        private QState StateInputTurnSectionTurnForward(IQEvent qEvent)
        {
            LogStateInfo(_processName, System.Reflection.MethodBase.GetCurrentMethod().Name, qEvent);

            if (qEvent.IsSignal(SigStateJob))
            {
                try
                {
                    if (!_controller.IsInputTurnStationHoldCarrier())
                    {
                        int retrycount = 0;
                        while (!_controller.IsInputTurnStationHoldCarrier())
                        {
                            if (retrycount < 4)
                            {
                                Thread.Sleep(500);
                            }
                            else
                            {
                                HSTException.Throw(HSTErrors.InputTurnStationInPositionNotOnError, new Exception("Inpositon on timeout"));
                            }
                            retrycount++;
                        }
                    }

                    _controller.InhibitInputConveyor(true);
                    _controller.InputTurnSectionTurnTo90Deg(out _timeUsed);
                    TransitionTo(stateVisionInspectCarrierAfterLoad);
                    _retryCount = 0;
                }
                catch (Exception ex)
                {
                    if (_retryCount < 3)
                    {
                        Log.Error(this, "Failed to turn Input Turn Station to 90 degrees. Retry count: {0}, Exception: {1}, StateName: {2}", _retryCount, ex.Message, this.CurrentStateName);
                        TransitionTo(this.targetState);
                    }
                    else
                    {
                        ButtonList btnlst = new ButtonList(ErrorButton.Retry, ErrorButton.Stop, ErrorButton.NoButton);
                        TransitionToErrorState(btnlst, ex);
                    }
                    _retryCount++;
                    return(null);
                }
                return(null);
            }
            return(stateRun);
        }
        private QState StateReportGetputError(IQEvent qEvent)
        {
            LogStateInfo(_processName, System.Reflection.MethodBase.GetCurrentMethod().Name, qEvent);

            if (qEvent.IsSignal(SigRecover))
            {
                if (errorMessage != null)
                {
                    ErrorButton response = (ErrorButton)(((QEvent)qEvent).EventObject);
                    switch (response)
                    {
                    case ErrorButton.OK:     // Reject, treat as bad carrier
                    {
                        PublishSignal(new QEvent(HSTWorkcell.SigEndRunProcess));
                    }
                    break;

                    default:
                        errorMessage = null;
                        System.Windows.Forms.MessageBox.Show(string.Format("Unhandled Button: {0}", response.ToString()), response.ToString());
                        return(null);
                    }
                    return(null);
                }
            }

            if (qEvent.IsSignal(SigStateJob))
            {
                try
                {
                    CommonFunctions.Instance.ActivePopupGetputErrorMessage = true;
                    if (FISManager.Instance.IsFISConnected)
                    {
                        HSTException.Throw(HSTErrors.TestElectronecsGetputErrorDetection2, new Exception(CommonFunctions.Instance.GetputErrorMessage));
                    }
                    else
                    {
                        HSTException.Throw(HSTErrors.TestElectronecsGetputErrorDetection, new Exception(CommonFunctions.Instance.GetputErrorMessage));
                    }
                }
                catch (Exception ex)
                {
                    ButtonList btnlst = new ButtonList(ErrorButton.OK, ErrorButton.NoButton, ErrorButton.NoButton);
                    TransitionToErrorState(btnlst, ex);
                    return(null);
                }
            }
            return(stateRun);
        }
Пример #11
0
        public double GetInputEEPositionZ()
        {
            double position = 0;

            try
            {
                position = _InputEndEffectorZAxis.GetActualPosition();
            }
            catch (Exception ex)
            {
                HSTException.Throw(HSTErrors.InputHandlerZAxisReadPositionError, ex);
            }

            return(position);
        }
        public void WriteFolaRFID()
        {
            //SetAction(9);
            if (HSTMachine.Workcell.HSTSettings.Install.OperationMode == OperationMode.Simulation ||
                (HSTMachine.Workcell.HSTSettings.Install.OperationMode == OperationMode.Bypass && HSTMachine.Workcell.HSTSettings.Install.BypassRFIDAndSeatrackWriteAtOutput == true))
            {
                Thread.Sleep(CommonFunctions.SIMULATION_DELAY);
                return;
            }
            else
            {
                try
                {
                    if (HSTMachine.Workcell.HSTSettings.Install.DataLoggingForRFIDAndSeatrackRecordUpdateEnabled)
                    {
                        if (HSTMachine.Workcell.HSTSettings.Install.EnableDebugLog)
                        {
                            XyratexOSC.Logging.Log.Info(this, "Write RFID tag at Output Station for Carrier: {0}", _writeFolaTagData.CarrierID);
                            XyratexOSC.Logging.Log.Info(this, "Carrier Size: {0}", _writeFolaTagData.CarrierSize);
                            XyratexOSC.Logging.Log.Info(this, "Current Process Station Code: {0}", _writeFolaTagData.CurrentProcessStep.StationCode);
                            XyratexOSC.Logging.Log.Info(this, "Current Process Recipe: {0}", _writeFolaTagData.CurrentProcessStep.ProcessRecipe);
                            for (int x = 0; x < _writeFolaTagData.CarrierSize; x++)
                            {
                                XyratexOSC.Logging.Log.Info(this, "HGA {0} Serial Number: {1}, Status: {2}, HGA Process Recipe: {3}, HGA Station Code: {4}", (x + 1), _writeFolaTagData.HGAData[x].HgaSN, _writeFolaTagData.HGAData[x].Status.ToString(), _writeFolaTagData.ProcStep[x].ProcessRecipe, _writeFolaTagData.ProcStep[x].StationCode.ToString());
                            }
                            XyratexOSC.Logging.Log.Info(this, "Last Step: {0}", _writeFolaTagData.LastStep);
                            XyratexOSC.Logging.Log.Info(this, "MaxProcStep: {0}", _writeFolaTagData.MaxProcStep);

                            XyratexOSC.Logging.Log.Info(this, "Work Order: {0}", _writeFolaTagData.WorkOrder);
                            XyratexOSC.Logging.Log.Info(this, "Work Order Version: {0}", _writeFolaTagData.WorkOrderVersion.ToString());
                            XyratexOSC.Logging.Log.Info(this, "Write Count: {0}", _writeFolaTagData.WriteCount);
                        }
                    }


                    _state = RFIDState.Writing;
                    _RFIDScanner.WriteRFIDTag(RFHead.Head2, _writeFolaTagData, false);
                    _state = RFIDState.Idle;
                }
                catch (Exception ex)
                {
                    _state = RFIDState.Idle;
                    HSTException.Throw(HSTErrors.OutputRFIDWriteError, ex);
                }
            }
        }
 public void OutputTurnSectionTurnTo90Deg()
 {
     if (HSTMachine.Workcell.HSTSettings.Install.OperationMode == OperationMode.Simulation)
     {
         Thread.Sleep(CommonFunctions.SIMULATION_DELAY);
         return;
     }
     try
     {
         outputTurnSection.RotaryCylinder.TurnCCW(nCylinderTimeout);
     }
     catch (Exception ex)
     {
         HSTException.Throw(HSTErrors.OutputTurnStationRotaryRotateClockwiseError, ex);
     }
     return;
 }
        private QState StateReportWriterBrigeError(IQEvent qEvent)
        {
            LogStateInfo(_processName, System.Reflection.MethodBase.GetCurrentMethod().Name, qEvent);

            if (qEvent.IsSignal(SigRecover))
            {
                if (errorMessage != null)
                {
                    ErrorButton response = (ErrorButton)(((QEvent)qEvent).EventObject);
                    switch (response)
                    {
                    case ErrorButton.OK:     // Reject, treat as bad carrier
                    {
                        HSTMachine.Workcell.IsUnderWriterBridgeFailureAlert = false;
                        PublishSignal(new QEvent(HSTWorkcell.SigEndRunProcess));
                        HSTMachine.Instance.MainForm.getPanelCommand().stopSystemProcess();
                    }
                    break;

                    default:
                        errorMessage = null;
                        System.Windows.Forms.MessageBox.Show(string.Format("Unhandled Button: {0}", response.ToString()), response.ToString());
                        return(null);
                    }
                    return(null);
                }
            }

            if (qEvent.IsSignal(SigStateJob))
            {
                try
                {
                    HSTException.Throw(HSTErrors.TestElectronicsWriterBridgeDetection,
                                       new Exception(string.Format("{0},{1}Carrier ID={2}", "High percentage of writer bridging was detected, please confirm UTIC machine!",
                                                                   Environment.NewLine, HSTMachine.Workcell.WRBridgeFailueCarrierId)));
                }
                catch (Exception ex)
                {
                    ButtonList btnlst = new ButtonList(ErrorButton.OK, ErrorButton.NoButton, ErrorButton.NoButton);
                    TransitionToErrorState(btnlst, ex);
                    return(null);
                }
            }
            return(stateRun);
        }
Пример #15
0
        public void CheckCarrierPresentAtInputTurnStation()
        {
            if (HSTMachine.Workcell.HSTSettings.Install.OperationMode == OperationMode.Simulation)
            {
                Thread.Sleep(10 * CommonFunctions.SIMULATION_DELAY);
                return;
            }

            try
            {
                inputTurnSectionIO.inPosition.WaitForState(DigitalIOState.On, 200);
                HSTMachine.Workcell.InputTurnStationBoatPositionError = false;
            }
            catch (Exception ex)
            {
                HSTMachine.Workcell.InputTurnStationBoatPositionError = true;
                HSTException.Throw(HSTErrors.InputTurnStationInPositionNotOnError, ex);
            }
        }
Пример #16
0
 public void InputTurnSectionTurnTo90Deg()
 {
     if (HSTMachine.Workcell.HSTSettings.Install.OperationMode == OperationMode.Simulation)
     {
         Thread.Sleep(CommonFunctions.SIMULATION_DELAY);
         return;
     }
     try
     {
         inputTurnSection.RotaryCylinder.TurnCCW(nCylinderTimeout);
         if (inputTurnSectionIO.At90DegSensor.Get() == DigitalIOState.Off)
         {
             throw new ControllerException("Input TurnSection no in 90 degree position.");
         }
     }
     catch (Exception ex)
     {
         HSTException.Throw(HSTErrors.InputTurnStationRotaryRotateClockwiseError, ex);
     }
     return;
 }
Пример #17
0
 public void WaitInputStationPartPresent()
 {
     if (HSTMachine.Workcell.HSTSettings.Install.OperationMode == OperationMode.Simulation)
     {
         Thread.Sleep(CommonFunctions.SIMULATION_DELAY);
         return;
     }
     else
     {
         try
         {
             _diInputStationInPosition.WaitForState(DigitalIOState.On, _carrierInPositionTimeout);
             HSTMachine.Workcell.InputStationBoatPositionError = false;
         }
         catch (Exception ex)
         {
             HSTMachine.Workcell.InputStationBoatPositionError = true;
             HSTException.Throw(HSTErrors.InputStationInPositionNotOnError, ex);
         }
     }
 }
 public void WaitOutputTurnStationPartReady()
 {
     if (HSTMachine.Workcell.HSTSettings.Install.OperationMode == OperationMode.Simulation)
     {
         Thread.Sleep(10 * CommonFunctions.SIMULATION_DELAY);
         return;
     }
     else
     {
         try
         {
             outputTurnSectionIO.inPosition.WaitForState(DigitalIOState.On, 5000);
             HSTMachine.Workcell.OutputTurnStationBoatPositionError = false;
         }
         catch (Exception ex)
         {
             HSTMachine.Workcell.OutputTurnStationBoatPositionError = true;
             HSTException.Throw(HSTErrors.OutputTurnStationInPositionNotOnError, ex);
         }
     }
 }
Пример #19
0
        private QState StateOutputTurnSectionTurnForward(IQEvent qEvent)
        {
            LogStateInfo(_processName, System.Reflection.MethodBase.GetCurrentMethod().Name, qEvent);

            if (qEvent.IsSignal(SigStateJob))
            {
                try
                {
                    //lai: Add delay march12-2016
                    Thread.Sleep(500);
                    if (!_controller.IsOutputTurnStationHoldCarrier())
                    {
                        int retrycount = 0;
                        while (!_controller.IsOutputTurnStationHoldCarrier())
                        {
                            if (retrycount < 4)
                            {
                                Thread.Sleep(500);
                            }
                            else
                            {
                                HSTException.Throw(HSTErrors.OutputTurnStationInPositionNotOnError, new Exception("Inposition on timeout"));
                            }
                            retrycount++;
                        }
                    }

                    _controller.OutputTurnSectionTurnTo90Deg(out _timeUsed);
                    TransitionTo(stateCheckNextZoneReady);
                }
                catch (Exception ex)
                {
                    ButtonList btnlst = new ButtonList(ErrorButton.Retry, ErrorButton.Stop, ErrorButton.NoButton);
                    TransitionToErrorState(btnlst, ex);
                }
                return(null);
            }
            return(stateRun);
        }
Пример #20
0
 public void InputTurnSectionTurnTo0Deg(out uint timeUsed)
 {
     timeUsed = 0;
     if (HSTMachine.Workcell.HSTSettings.Install.OperationMode == OperationMode.Simulation)
     {
         Thread.Sleep(CommonFunctions.SIMULATION_DELAY);
         return;
     }
     try
     {
         inputTurnSection.RotaryCylinder.TurnCW(nCylinderTimeout, out timeUsed);//chanfg mask LinearActuator call and replace with direct IO call
         if (inputTurnSectionIO.At0DegSensor.Get() == DigitalIOState.Off)
         {
             throw new ControllerException("Input TurnSection no in 0 degree position.");
         }
     }
     catch (Exception ex)
     {
         HSTException.Throw(HSTErrors.InputTurnStationRotaryRotateCounterClockwiseError, ex);
     }
     return;
 }
Пример #21
0
 public void HomeZAxis()
 {
     if (HSTMachine.Workcell.HSTSettings.Install.OperationMode == OperationMode.Simulation)
     {
         Thread.Sleep(CommonFunctions.SIMULATION_DELAY);
         return;
     }
     try
     {
         if (!_workcell.IsIgnoreHomeAxisForByPass)
         {
             _workcell._a3200HC.FaultAcknowlegde(_InputEndEffectorZAxis);
             _InputEndEffectorZAxis.Enable(true);
             Thread.Sleep(500);
             _InputEndEffectorZAxis.Home(_actuatorHomeTimeout);
             Thread.Sleep(1000);
         }
     }
     catch (Exception ex)
     {
         HSTException.Throw(HSTErrors.InputHandlerZAxisHomeError, ex);
     }
 }
        public void GetSLDRData(Carrier inputCarrier)
        {
            SLDR_PARAM_BIN_DATA SLDR_PARAM_BIN = new SLDR_PARAM_BIN_DATA();
            List <ISI_Data_Map> ISI_data_map   = new List <ISI_Data_Map>();

            try
            {
                for (int _hga = 0; _hga < _rfidController.FolaTagDataReadInfor.CarrierSize; _hga++)
                {
                    SLDR_PARAM_BIN.Clear();
                    var          getData      = FISManager.Instance.GetSLDR_PARAM_BIN_Data(SLDR_PARAM_BIN, _rfidController.FolaTagDataReadInfor[_hga].HgaSN);
                    IBSObj       ibsobj       = null;
                    ISI_Data_Map isi_Data_Map = new ISI_Data_Map
                    {
                        slot           = _hga,
                        HgaSN          = inputCarrier.RFIDData.RFIDTag[_hga].HgaSN,
                        ISIReader1Data = Convert.ToDouble(SLDR_PARAM_BIN.SLDR_RES),
                        ISIReader2Data = Convert.ToDouble(SLDR_PARAM_BIN.SLDR_RES_RD2)
                    };

                    ISI_data_map.Add(isi_Data_Map);

                    switch (_hga)
                    {
                    case 0:
                        inputCarrier.Hga1.DeltaISIResistanceRD1 = Convert.ToDouble(SLDR_PARAM_BIN.SLDR_RES);
                        inputCarrier.Hga1.DeltaISIResistanceRD2 = Convert.ToDouble(SLDR_PARAM_BIN.SLDR_RES_RD2);
                        if (inputCarrier.WorkOrderData.IBSCheck && SLDR_PARAM_BIN.ISI_WR_IBS_PATTERN != null && SLDR_PARAM_BIN.ISI_WR_IBS_PATTERN.Trim() == "2")
                        {
                            inputCarrier.Hga1.DeltaISIResistanceWriter = Convert.ToDouble(SLDR_PARAM_BIN.ET_WRT2_RES);
                        }
                        else
                        {
                            inputCarrier.Hga1.DeltaISIResistanceWriter = Convert.ToDouble(SLDR_PARAM_BIN.ET_WRT1_RES);
                        }

                        inputCarrier.Hga1.TST_STATUS          = SLDR_PARAM_BIN.TST_STATUS.Trim() != string.Empty ? Convert.ToChar(SLDR_PARAM_BIN.TST_STATUS.Trim()) : '\0';
                        inputCarrier.Hga1.Slider_Lot_Number   = SLDR_PARAM_BIN.SLDR_LOT_ID;
                        inputCarrier.Hga1.IsGetISIPassed      = getData;
                        inputCarrier.Hga1.ISI_WAF_WTR_RES     = SLDR_PARAM_BIN.WAF_WTR_RES;
                        inputCarrier.Hga1.ISI_WAF_WTR_HTR_RES = SLDR_PARAM_BIN.WAF_WTR_HTR_RES;
                        inputCarrier.Hga1.ISI_WAF_TAD_RES     = SLDR_PARAM_BIN.WAF_TAD_RES;
                        inputCarrier.Hga1.ISI_WAF_RDR_HTR_RES = SLDR_PARAM_BIN.WAF_RDR_HTR_RES;
                        inputCarrier.Hga1.ISI_RES_AT_ET       = SLDR_PARAM_BIN.SLDR_RES;
                        inputCarrier.Hga1.ISI_RES_AT_ET_RD2   = SLDR_PARAM_BIN.SLDR_RES_RD2;
                        inputCarrier.Hga1.ISI_AMP_AT_ET       = SLDR_PARAM_BIN.SLDR_F1;
                        inputCarrier.Hga1.ISI_AMP_AT_ET_RD2   = SLDR_PARAM_BIN.SLDR_F1_RD2;
                        inputCarrier.Hga1.ISI_ASYM_AT_ET      = SLDR_PARAM_BIN.SLDR_ASYM;
                        inputCarrier.Hga1.ISI_ASYM_AT_ET_RD2  = SLDR_PARAM_BIN.SLDR_ASYM_RD2;
                        inputCarrier.Hga1.ISI_TAB             = SLDR_PARAM_BIN.SLDR_TAB;
                        inputCarrier.Hga1.ISI_ET_RD2_RES      = Convert.ToDouble(SLDR_PARAM_BIN.ET_RD2_RES);
                        inputCarrier.Hga1.ISI_ET_RD1_RES      = Convert.ToDouble(SLDR_PARAM_BIN.ET_RD1_RES);
                        inputCarrier.Hga1.UTIC_DATA           = FISManager.Instance.GetUTICMachineNumber(_rfidController.FolaTagDataReadInfor[_hga].HgaSN);
                        //if(!string.IsNullOrEmpty(inputCarrier.Hga1.UTIC_DATA.EVENT_DATE))
                        //{
                        //    var getUticDate = DateTime.Parse(inputCarrier.Hga1.UTIC_DATA.EVENT_DATE).ToString("dd-MMM-yy:HH:mm:ss").ToUpper();

                        //}


                        inputCarrier.Hga1.Set_sdet_reader1(Convert.ToDouble(SLDR_PARAM_BIN.ET_RD1_RES));
                        inputCarrier.Hga1.Set_sdet_reader2(Convert.ToDouble(SLDR_PARAM_BIN.ET_RD2_RES));
                        inputCarrier.Hga1.Set_sdet_writer(Convert.ToDouble(SLDR_PARAM_BIN.ET_WRT1_RES));

                        if (inputCarrier.WorkOrderData.IBSCheck)
                        {
                            inputCarrier.Hga1.IBS_Data = new IBSObj(SLDR_PARAM_BIN.ISI_RD_IBS_PATTERN, SLDR_PARAM_BIN.ISI_WR_IBS_PATTERN, inputCarrier.HGATabType);
                        }
                        break;

                    case 1:
                        inputCarrier.Hga2.DeltaISIResistanceRD1 = Convert.ToDouble(SLDR_PARAM_BIN.SLDR_RES);
                        inputCarrier.Hga2.DeltaISIResistanceRD2 = Convert.ToDouble(SLDR_PARAM_BIN.SLDR_RES_RD2);
                        if (inputCarrier.WorkOrderData.IBSCheck && SLDR_PARAM_BIN.ISI_WR_IBS_PATTERN != null && SLDR_PARAM_BIN.ISI_WR_IBS_PATTERN.Trim() == "2")
                        {
                            inputCarrier.Hga2.DeltaISIResistanceWriter = Convert.ToDouble(SLDR_PARAM_BIN.ET_WRT2_RES);
                        }
                        else
                        {
                            inputCarrier.Hga2.DeltaISIResistanceWriter = Convert.ToDouble(SLDR_PARAM_BIN.ET_WRT1_RES);
                        }
                        inputCarrier.Hga2.TST_STATUS          = SLDR_PARAM_BIN.TST_STATUS.Trim() != string.Empty ? Convert.ToChar(SLDR_PARAM_BIN.TST_STATUS.Trim()) : '\0';
                        inputCarrier.Hga2.Slider_Lot_Number   = SLDR_PARAM_BIN.SLDR_LOT_ID;
                        inputCarrier.Hga2.IsGetISIPassed      = getData;
                        inputCarrier.Hga2.ISI_WAF_WTR_RES     = SLDR_PARAM_BIN.WAF_WTR_RES;
                        inputCarrier.Hga2.ISI_WAF_WTR_HTR_RES = SLDR_PARAM_BIN.WAF_WTR_HTR_RES;
                        inputCarrier.Hga2.ISI_WAF_TAD_RES     = SLDR_PARAM_BIN.WAF_TAD_RES;
                        inputCarrier.Hga2.ISI_WAF_RDR_HTR_RES = SLDR_PARAM_BIN.WAF_RDR_HTR_RES;
                        inputCarrier.Hga2.ISI_RES_AT_ET       = SLDR_PARAM_BIN.SLDR_RES;
                        inputCarrier.Hga2.ISI_RES_AT_ET_RD2   = SLDR_PARAM_BIN.SLDR_RES_RD2;
                        inputCarrier.Hga2.ISI_AMP_AT_ET       = SLDR_PARAM_BIN.SLDR_F1;
                        inputCarrier.Hga2.ISI_AMP_AT_ET_RD2   = SLDR_PARAM_BIN.SLDR_F1_RD2;
                        inputCarrier.Hga2.ISI_ASYM_AT_ET      = SLDR_PARAM_BIN.SLDR_ASYM;
                        inputCarrier.Hga2.ISI_ASYM_AT_ET_RD2  = SLDR_PARAM_BIN.SLDR_ASYM_RD2;
                        inputCarrier.Hga2.ISI_TAB             = SLDR_PARAM_BIN.SLDR_TAB;
                        inputCarrier.Hga2.ISI_ET_RD2_RES      = Convert.ToDouble(SLDR_PARAM_BIN.ET_RD2_RES);
                        inputCarrier.Hga2.ISI_ET_RD1_RES      = Convert.ToDouble(SLDR_PARAM_BIN.ET_RD1_RES);
                        inputCarrier.Hga2.UTIC_DATA           = FISManager.Instance.GetUTICMachineNumber(_rfidController.FolaTagDataReadInfor[_hga].HgaSN);

                        inputCarrier.Hga2.Set_sdet_reader1(Convert.ToDouble(SLDR_PARAM_BIN.ET_RD1_RES));
                        inputCarrier.Hga2.Set_sdet_reader2(Convert.ToDouble(SLDR_PARAM_BIN.ET_RD2_RES));
                        inputCarrier.Hga2.Set_sdet_writer(Convert.ToDouble(SLDR_PARAM_BIN.ET_WRT1_RES));

                        if (inputCarrier.WorkOrderData.IBSCheck)
                        {
                            inputCarrier.Hga2.IBS_Data = new IBSObj(SLDR_PARAM_BIN.ISI_RD_IBS_PATTERN, SLDR_PARAM_BIN.ISI_WR_IBS_PATTERN, inputCarrier.HGATabType);
                        }
                        break;

                    case 2:
                        inputCarrier.Hga3.DeltaISIResistanceRD1 = Convert.ToDouble(SLDR_PARAM_BIN.SLDR_RES);
                        inputCarrier.Hga3.DeltaISIResistanceRD2 = Convert.ToDouble(SLDR_PARAM_BIN.SLDR_RES_RD2);
                        if (inputCarrier.WorkOrderData.IBSCheck && SLDR_PARAM_BIN.ISI_WR_IBS_PATTERN != null && SLDR_PARAM_BIN.ISI_WR_IBS_PATTERN.Trim() == "2")
                        {
                            inputCarrier.Hga3.DeltaISIResistanceWriter = Convert.ToDouble(SLDR_PARAM_BIN.ET_WRT2_RES);
                        }
                        else
                        {
                            inputCarrier.Hga3.DeltaISIResistanceWriter = Convert.ToDouble(SLDR_PARAM_BIN.ET_WRT1_RES);
                        }
                        inputCarrier.Hga3.TST_STATUS          = SLDR_PARAM_BIN.TST_STATUS.Trim() != string.Empty ? Convert.ToChar(SLDR_PARAM_BIN.TST_STATUS.Trim()) : '\0';
                        inputCarrier.Hga3.Slider_Lot_Number   = SLDR_PARAM_BIN.SLDR_LOT_ID;
                        inputCarrier.Hga3.IsGetISIPassed      = getData;
                        inputCarrier.Hga3.ISI_WAF_WTR_RES     = SLDR_PARAM_BIN.WAF_WTR_RES;
                        inputCarrier.Hga3.ISI_WAF_WTR_HTR_RES = SLDR_PARAM_BIN.WAF_WTR_HTR_RES;
                        inputCarrier.Hga3.ISI_WAF_TAD_RES     = SLDR_PARAM_BIN.WAF_TAD_RES;
                        inputCarrier.Hga3.ISI_WAF_RDR_HTR_RES = SLDR_PARAM_BIN.WAF_RDR_HTR_RES;
                        inputCarrier.Hga3.ISI_RES_AT_ET       = SLDR_PARAM_BIN.SLDR_RES;
                        inputCarrier.Hga3.ISI_RES_AT_ET_RD2   = SLDR_PARAM_BIN.SLDR_RES_RD2;
                        inputCarrier.Hga3.ISI_AMP_AT_ET       = SLDR_PARAM_BIN.SLDR_F1;
                        inputCarrier.Hga3.ISI_AMP_AT_ET_RD2   = SLDR_PARAM_BIN.SLDR_F1_RD2;
                        inputCarrier.Hga3.ISI_ASYM_AT_ET      = SLDR_PARAM_BIN.SLDR_ASYM;
                        inputCarrier.Hga3.ISI_ASYM_AT_ET_RD2  = SLDR_PARAM_BIN.SLDR_ASYM_RD2;
                        inputCarrier.Hga3.ISI_TAB             = SLDR_PARAM_BIN.SLDR_TAB;
                        inputCarrier.Hga3.ISI_ET_RD2_RES      = Convert.ToDouble(SLDR_PARAM_BIN.ET_RD2_RES);
                        inputCarrier.Hga3.ISI_ET_RD1_RES      = Convert.ToDouble(SLDR_PARAM_BIN.ET_RD1_RES);
                        inputCarrier.Hga3.UTIC_DATA           = FISManager.Instance.GetUTICMachineNumber(_rfidController.FolaTagDataReadInfor[_hga].HgaSN);

                        inputCarrier.Hga3.Set_sdet_reader1(Convert.ToDouble(SLDR_PARAM_BIN.ET_RD1_RES));
                        inputCarrier.Hga3.Set_sdet_reader2(Convert.ToDouble(SLDR_PARAM_BIN.ET_RD2_RES));
                        inputCarrier.Hga3.Set_sdet_writer(Convert.ToDouble(SLDR_PARAM_BIN.ET_WRT1_RES));

                        if (inputCarrier.WorkOrderData.IBSCheck)
                        {
                            inputCarrier.Hga3.IBS_Data = new IBSObj(SLDR_PARAM_BIN.ISI_RD_IBS_PATTERN, SLDR_PARAM_BIN.ISI_WR_IBS_PATTERN, inputCarrier.HGATabType);
                        }
                        break;

                    case 3:
                        inputCarrier.Hga4.DeltaISIResistanceRD1 = Convert.ToDouble(SLDR_PARAM_BIN.SLDR_RES);
                        inputCarrier.Hga4.DeltaISIResistanceRD2 = Convert.ToDouble(SLDR_PARAM_BIN.SLDR_RES_RD2);
                        if (inputCarrier.WorkOrderData.IBSCheck && SLDR_PARAM_BIN.ISI_WR_IBS_PATTERN != null && SLDR_PARAM_BIN.ISI_WR_IBS_PATTERN.Trim() == "2")
                        {
                            inputCarrier.Hga4.DeltaISIResistanceWriter = Convert.ToDouble(SLDR_PARAM_BIN.ET_WRT2_RES);
                        }
                        else
                        {
                            inputCarrier.Hga4.DeltaISIResistanceWriter = Convert.ToDouble(SLDR_PARAM_BIN.ET_WRT1_RES);
                        }
                        inputCarrier.Hga4.TST_STATUS          = SLDR_PARAM_BIN.TST_STATUS.Trim() != string.Empty ? Convert.ToChar(SLDR_PARAM_BIN.TST_STATUS.Trim()) : '\0';
                        inputCarrier.Hga4.Slider_Lot_Number   = SLDR_PARAM_BIN.SLDR_LOT_ID;
                        inputCarrier.Hga4.IsGetISIPassed      = getData;
                        inputCarrier.Hga4.ISI_WAF_WTR_RES     = SLDR_PARAM_BIN.WAF_WTR_RES;
                        inputCarrier.Hga4.ISI_WAF_WTR_HTR_RES = SLDR_PARAM_BIN.WAF_WTR_HTR_RES;
                        inputCarrier.Hga4.ISI_WAF_TAD_RES     = SLDR_PARAM_BIN.WAF_TAD_RES;
                        inputCarrier.Hga4.ISI_WAF_RDR_HTR_RES = SLDR_PARAM_BIN.WAF_RDR_HTR_RES;
                        inputCarrier.Hga4.ISI_RES_AT_ET       = SLDR_PARAM_BIN.SLDR_RES;
                        inputCarrier.Hga4.ISI_RES_AT_ET_RD2   = SLDR_PARAM_BIN.SLDR_RES_RD2;
                        inputCarrier.Hga4.ISI_AMP_AT_ET       = SLDR_PARAM_BIN.SLDR_F1;
                        inputCarrier.Hga4.ISI_AMP_AT_ET_RD2   = SLDR_PARAM_BIN.SLDR_F1_RD2;
                        inputCarrier.Hga4.ISI_ASYM_AT_ET      = SLDR_PARAM_BIN.SLDR_ASYM;
                        inputCarrier.Hga4.ISI_ASYM_AT_ET_RD2  = SLDR_PARAM_BIN.SLDR_ASYM_RD2;
                        inputCarrier.Hga4.ISI_TAB             = SLDR_PARAM_BIN.SLDR_TAB;
                        inputCarrier.Hga4.ISI_ET_RD2_RES      = Convert.ToDouble(SLDR_PARAM_BIN.ET_RD2_RES);
                        inputCarrier.Hga4.ISI_ET_RD1_RES      = Convert.ToDouble(SLDR_PARAM_BIN.ET_RD1_RES);
                        inputCarrier.Hga4.UTIC_DATA           = FISManager.Instance.GetUTICMachineNumber(_rfidController.FolaTagDataReadInfor[_hga].HgaSN);

                        inputCarrier.Hga4.Set_sdet_reader1(Convert.ToDouble(SLDR_PARAM_BIN.ET_RD1_RES));
                        inputCarrier.Hga4.Set_sdet_reader2(Convert.ToDouble(SLDR_PARAM_BIN.ET_RD2_RES));
                        inputCarrier.Hga4.Set_sdet_writer(Convert.ToDouble(SLDR_PARAM_BIN.ET_WRT1_RES));

                        if (inputCarrier.WorkOrderData.IBSCheck)
                        {
                            inputCarrier.Hga4.IBS_Data = new IBSObj(SLDR_PARAM_BIN.ISI_RD_IBS_PATTERN, SLDR_PARAM_BIN.ISI_WR_IBS_PATTERN, inputCarrier.HGATabType);
                        }
                        break;

                    case 4:
                        inputCarrier.Hga5.DeltaISIResistanceRD1 = Convert.ToDouble(SLDR_PARAM_BIN.SLDR_RES);
                        inputCarrier.Hga5.DeltaISIResistanceRD2 = Convert.ToDouble(SLDR_PARAM_BIN.SLDR_RES_RD2);
                        if (inputCarrier.WorkOrderData.IBSCheck && SLDR_PARAM_BIN.ISI_WR_IBS_PATTERN != null && SLDR_PARAM_BIN.ISI_WR_IBS_PATTERN.Trim() == "2")
                        {
                            inputCarrier.Hga5.DeltaISIResistanceWriter = Convert.ToDouble(SLDR_PARAM_BIN.ET_WRT2_RES);
                        }
                        else
                        {
                            inputCarrier.Hga5.DeltaISIResistanceWriter = Convert.ToDouble(SLDR_PARAM_BIN.ET_WRT1_RES);
                        }
                        inputCarrier.Hga5.TST_STATUS          = SLDR_PARAM_BIN.TST_STATUS.Trim() != string.Empty ? Convert.ToChar(SLDR_PARAM_BIN.TST_STATUS.Trim()) : '\0';
                        inputCarrier.Hga5.Slider_Lot_Number   = SLDR_PARAM_BIN.SLDR_LOT_ID;
                        inputCarrier.Hga5.IsGetISIPassed      = getData;
                        inputCarrier.Hga5.ISI_WAF_WTR_RES     = SLDR_PARAM_BIN.WAF_WTR_RES;
                        inputCarrier.Hga5.ISI_WAF_WTR_HTR_RES = SLDR_PARAM_BIN.WAF_WTR_HTR_RES;
                        inputCarrier.Hga5.ISI_WAF_TAD_RES     = SLDR_PARAM_BIN.WAF_TAD_RES;
                        inputCarrier.Hga5.ISI_WAF_RDR_HTR_RES = SLDR_PARAM_BIN.WAF_RDR_HTR_RES;
                        inputCarrier.Hga5.ISI_RES_AT_ET       = SLDR_PARAM_BIN.SLDR_RES;
                        inputCarrier.Hga5.ISI_RES_AT_ET_RD2   = SLDR_PARAM_BIN.SLDR_RES_RD2;
                        inputCarrier.Hga5.ISI_AMP_AT_ET       = SLDR_PARAM_BIN.SLDR_F1;
                        inputCarrier.Hga5.ISI_AMP_AT_ET_RD2   = SLDR_PARAM_BIN.SLDR_F1_RD2;
                        inputCarrier.Hga5.ISI_ASYM_AT_ET      = SLDR_PARAM_BIN.SLDR_ASYM;
                        inputCarrier.Hga5.ISI_ASYM_AT_ET_RD2  = SLDR_PARAM_BIN.SLDR_ASYM_RD2;
                        inputCarrier.Hga5.ISI_TAB             = SLDR_PARAM_BIN.SLDR_TAB;
                        inputCarrier.Hga5.ISI_ET_RD2_RES      = Convert.ToDouble(SLDR_PARAM_BIN.ET_RD2_RES);
                        inputCarrier.Hga5.ISI_ET_RD1_RES      = Convert.ToDouble(SLDR_PARAM_BIN.ET_RD1_RES);
                        inputCarrier.Hga5.UTIC_DATA           = FISManager.Instance.GetUTICMachineNumber(_rfidController.FolaTagDataReadInfor[_hga].HgaSN);

                        inputCarrier.Hga5.Set_sdet_reader1(Convert.ToDouble(SLDR_PARAM_BIN.ET_RD1_RES));
                        inputCarrier.Hga5.Set_sdet_reader2(Convert.ToDouble(SLDR_PARAM_BIN.ET_RD2_RES));
                        inputCarrier.Hga5.Set_sdet_writer(Convert.ToDouble(SLDR_PARAM_BIN.ET_WRT1_RES));

                        if (inputCarrier.WorkOrderData.IBSCheck)
                        {
                            inputCarrier.Hga5.IBS_Data = new IBSObj(SLDR_PARAM_BIN.ISI_RD_IBS_PATTERN, SLDR_PARAM_BIN.ISI_WR_IBS_PATTERN, inputCarrier.HGATabType);
                        }
                        break;

                    case 5:
                        inputCarrier.Hga6.DeltaISIResistanceRD1 = Convert.ToDouble(SLDR_PARAM_BIN.SLDR_RES);
                        inputCarrier.Hga6.DeltaISIResistanceRD2 = Convert.ToDouble(SLDR_PARAM_BIN.SLDR_RES_RD2);
                        if (inputCarrier.WorkOrderData.IBSCheck && SLDR_PARAM_BIN.ISI_WR_IBS_PATTERN != null && SLDR_PARAM_BIN.ISI_WR_IBS_PATTERN.Trim() == "2")
                        {
                            inputCarrier.Hga6.DeltaISIResistanceWriter = Convert.ToDouble(SLDR_PARAM_BIN.ET_WRT2_RES);
                        }
                        else
                        {
                            inputCarrier.Hga6.DeltaISIResistanceWriter = Convert.ToDouble(SLDR_PARAM_BIN.ET_WRT1_RES);
                        }
                        inputCarrier.Hga6.TST_STATUS          = SLDR_PARAM_BIN.TST_STATUS.Trim() != string.Empty ? Convert.ToChar(SLDR_PARAM_BIN.TST_STATUS.Trim()) : '\0';
                        inputCarrier.Hga6.Slider_Lot_Number   = SLDR_PARAM_BIN.SLDR_LOT_ID;
                        inputCarrier.Hga6.IsGetISIPassed      = getData;
                        inputCarrier.Hga6.ISI_WAF_WTR_RES     = SLDR_PARAM_BIN.WAF_WTR_RES;
                        inputCarrier.Hga6.ISI_WAF_WTR_HTR_RES = SLDR_PARAM_BIN.WAF_WTR_HTR_RES;
                        inputCarrier.Hga6.ISI_WAF_TAD_RES     = SLDR_PARAM_BIN.WAF_TAD_RES;
                        inputCarrier.Hga6.ISI_WAF_RDR_HTR_RES = SLDR_PARAM_BIN.WAF_RDR_HTR_RES;
                        inputCarrier.Hga6.ISI_RES_AT_ET       = SLDR_PARAM_BIN.SLDR_RES;
                        inputCarrier.Hga6.ISI_RES_AT_ET_RD2   = SLDR_PARAM_BIN.SLDR_RES_RD2;
                        inputCarrier.Hga6.ISI_AMP_AT_ET       = SLDR_PARAM_BIN.SLDR_F1;
                        inputCarrier.Hga6.ISI_AMP_AT_ET_RD2   = SLDR_PARAM_BIN.SLDR_F1_RD2;
                        inputCarrier.Hga6.ISI_ASYM_AT_ET      = SLDR_PARAM_BIN.SLDR_ASYM;
                        inputCarrier.Hga6.ISI_ASYM_AT_ET_RD2  = SLDR_PARAM_BIN.SLDR_ASYM_RD2;
                        inputCarrier.Hga6.ISI_TAB             = SLDR_PARAM_BIN.SLDR_TAB;
                        inputCarrier.Hga6.ISI_ET_RD2_RES      = Convert.ToDouble(SLDR_PARAM_BIN.ET_RD2_RES);
                        inputCarrier.Hga6.ISI_ET_RD1_RES      = Convert.ToDouble(SLDR_PARAM_BIN.ET_RD1_RES);

                        inputCarrier.Hga6.UTIC_DATA = FISManager.Instance.GetUTICMachineNumber(_rfidController.FolaTagDataReadInfor[_hga].HgaSN);

                        inputCarrier.Hga6.Set_sdet_reader1(Convert.ToDouble(SLDR_PARAM_BIN.ET_RD1_RES));
                        inputCarrier.Hga6.Set_sdet_reader2(Convert.ToDouble(SLDR_PARAM_BIN.ET_RD2_RES));
                        inputCarrier.Hga6.Set_sdet_writer(Convert.ToDouble(SLDR_PARAM_BIN.ET_WRT1_RES));

                        if (inputCarrier.WorkOrderData.IBSCheck)
                        {
                            inputCarrier.Hga6.IBS_Data = new IBSObj(SLDR_PARAM_BIN.ISI_RD_IBS_PATTERN, SLDR_PARAM_BIN.ISI_WR_IBS_PATTERN, inputCarrier.HGATabType);
                        }
                        break;

                    case 6:
                        inputCarrier.Hga7.DeltaISIResistanceRD1 = Convert.ToDouble(SLDR_PARAM_BIN.SLDR_RES);
                        inputCarrier.Hga7.DeltaISIResistanceRD2 = Convert.ToDouble(SLDR_PARAM_BIN.SLDR_RES_RD2);
                        if (inputCarrier.WorkOrderData.IBSCheck && SLDR_PARAM_BIN.ISI_WR_IBS_PATTERN != null && SLDR_PARAM_BIN.ISI_WR_IBS_PATTERN.Trim() == "2")
                        {
                            inputCarrier.Hga7.DeltaISIResistanceWriter = Convert.ToDouble(SLDR_PARAM_BIN.ET_WRT2_RES);
                        }
                        else
                        {
                            inputCarrier.Hga7.DeltaISIResistanceWriter = Convert.ToDouble(SLDR_PARAM_BIN.ET_WRT1_RES);
                        }
                        inputCarrier.Hga7.TST_STATUS          = SLDR_PARAM_BIN.TST_STATUS.Trim() != string.Empty ? Convert.ToChar(SLDR_PARAM_BIN.TST_STATUS.Trim()) : '\0';
                        inputCarrier.Hga7.Slider_Lot_Number   = SLDR_PARAM_BIN.SLDR_LOT_ID;
                        inputCarrier.Hga7.IsGetISIPassed      = getData;
                        inputCarrier.Hga7.ISI_WAF_WTR_RES     = SLDR_PARAM_BIN.WAF_WTR_RES;
                        inputCarrier.Hga7.ISI_WAF_WTR_HTR_RES = SLDR_PARAM_BIN.WAF_WTR_HTR_RES;
                        inputCarrier.Hga7.ISI_WAF_TAD_RES     = SLDR_PARAM_BIN.WAF_TAD_RES;
                        inputCarrier.Hga7.ISI_WAF_RDR_HTR_RES = SLDR_PARAM_BIN.WAF_RDR_HTR_RES;
                        inputCarrier.Hga7.ISI_RES_AT_ET       = SLDR_PARAM_BIN.SLDR_RES;
                        inputCarrier.Hga7.ISI_RES_AT_ET_RD2   = SLDR_PARAM_BIN.SLDR_RES_RD2;
                        inputCarrier.Hga7.ISI_AMP_AT_ET       = SLDR_PARAM_BIN.SLDR_F1;
                        inputCarrier.Hga7.ISI_AMP_AT_ET_RD2   = SLDR_PARAM_BIN.SLDR_F1_RD2;
                        inputCarrier.Hga7.ISI_ASYM_AT_ET      = SLDR_PARAM_BIN.SLDR_ASYM;
                        inputCarrier.Hga7.ISI_ASYM_AT_ET_RD2  = SLDR_PARAM_BIN.SLDR_ASYM_RD2;
                        inputCarrier.Hga7.ISI_TAB             = SLDR_PARAM_BIN.SLDR_TAB;
                        inputCarrier.Hga7.ISI_ET_RD2_RES      = Convert.ToDouble(SLDR_PARAM_BIN.ET_RD2_RES);
                        inputCarrier.Hga7.ISI_ET_RD1_RES      = Convert.ToDouble(SLDR_PARAM_BIN.ET_RD1_RES);

                        inputCarrier.Hga7.UTIC_DATA = FISManager.Instance.GetUTICMachineNumber(_rfidController.FolaTagDataReadInfor[_hga].HgaSN);

                        inputCarrier.Hga7.Set_sdet_reader1(Convert.ToDouble(SLDR_PARAM_BIN.ET_RD1_RES));
                        inputCarrier.Hga7.Set_sdet_reader2(Convert.ToDouble(SLDR_PARAM_BIN.ET_RD2_RES));
                        inputCarrier.Hga7.Set_sdet_writer(Convert.ToDouble(SLDR_PARAM_BIN.ET_WRT1_RES));

                        if (inputCarrier.WorkOrderData.IBSCheck)
                        {
                            inputCarrier.Hga7.IBS_Data = new IBSObj(SLDR_PARAM_BIN.ISI_RD_IBS_PATTERN, SLDR_PARAM_BIN.ISI_WR_IBS_PATTERN, inputCarrier.HGATabType);
                        }

                        break;

                    case 7:
                        inputCarrier.Hga8.DeltaISIResistanceRD1 = Convert.ToDouble(SLDR_PARAM_BIN.SLDR_RES);
                        inputCarrier.Hga8.DeltaISIResistanceRD2 = Convert.ToDouble(SLDR_PARAM_BIN.SLDR_RES_RD2);
                        if (inputCarrier.WorkOrderData.IBSCheck && SLDR_PARAM_BIN.ISI_WR_IBS_PATTERN != null && SLDR_PARAM_BIN.ISI_WR_IBS_PATTERN.Trim() == "2")
                        {
                            inputCarrier.Hga8.DeltaISIResistanceWriter = Convert.ToDouble(SLDR_PARAM_BIN.ET_WRT2_RES);
                        }
                        else
                        {
                            inputCarrier.Hga8.DeltaISIResistanceWriter = Convert.ToDouble(SLDR_PARAM_BIN.ET_WRT1_RES);
                        }
                        inputCarrier.Hga8.TST_STATUS          = SLDR_PARAM_BIN.TST_STATUS.Trim() != string.Empty ? Convert.ToChar(SLDR_PARAM_BIN.TST_STATUS.Trim()) : '\0';
                        inputCarrier.Hga8.Slider_Lot_Number   = SLDR_PARAM_BIN.SLDR_LOT_ID;
                        inputCarrier.Hga8.IsGetISIPassed      = getData;
                        inputCarrier.Hga8.ISI_WAF_WTR_RES     = SLDR_PARAM_BIN.WAF_WTR_RES;
                        inputCarrier.Hga8.ISI_WAF_WTR_HTR_RES = SLDR_PARAM_BIN.WAF_WTR_HTR_RES;
                        inputCarrier.Hga8.ISI_WAF_TAD_RES     = SLDR_PARAM_BIN.WAF_TAD_RES;
                        inputCarrier.Hga8.ISI_WAF_RDR_HTR_RES = SLDR_PARAM_BIN.WAF_RDR_HTR_RES;
                        inputCarrier.Hga8.ISI_RES_AT_ET       = SLDR_PARAM_BIN.SLDR_RES;
                        inputCarrier.Hga8.ISI_RES_AT_ET_RD2   = SLDR_PARAM_BIN.SLDR_RES_RD2;
                        inputCarrier.Hga8.ISI_AMP_AT_ET       = SLDR_PARAM_BIN.SLDR_F1;
                        inputCarrier.Hga8.ISI_AMP_AT_ET_RD2   = SLDR_PARAM_BIN.SLDR_F1_RD2;
                        inputCarrier.Hga8.ISI_ASYM_AT_ET      = SLDR_PARAM_BIN.SLDR_ASYM;
                        inputCarrier.Hga8.ISI_ASYM_AT_ET_RD2  = SLDR_PARAM_BIN.SLDR_ASYM_RD2;
                        inputCarrier.Hga8.ISI_TAB             = SLDR_PARAM_BIN.SLDR_TAB;
                        inputCarrier.Hga8.ISI_ET_RD2_RES      = Convert.ToDouble(SLDR_PARAM_BIN.ET_RD2_RES);
                        inputCarrier.Hga8.ISI_ET_RD1_RES      = Convert.ToDouble(SLDR_PARAM_BIN.ET_RD1_RES);
                        inputCarrier.Hga8.UTIC_DATA           = FISManager.Instance.GetUTICMachineNumber(_rfidController.FolaTagDataReadInfor[_hga].HgaSN);

                        inputCarrier.Hga8.Set_sdet_reader1(Convert.ToDouble(SLDR_PARAM_BIN.ET_RD1_RES));
                        inputCarrier.Hga8.Set_sdet_reader2(Convert.ToDouble(SLDR_PARAM_BIN.ET_RD2_RES));
                        inputCarrier.Hga8.Set_sdet_writer(Convert.ToDouble(SLDR_PARAM_BIN.ET_WRT1_RES));

                        if (inputCarrier.WorkOrderData.IBSCheck)
                        {
                            inputCarrier.Hga8.IBS_Data = new IBSObj(SLDR_PARAM_BIN.ISI_RD_IBS_PATTERN, SLDR_PARAM_BIN.ISI_WR_IBS_PATTERN, inputCarrier.HGATabType);
                        }
                        break;

                    case 8:
                        inputCarrier.Hga9.DeltaISIResistanceRD1 = Convert.ToDouble(SLDR_PARAM_BIN.SLDR_RES);
                        inputCarrier.Hga9.DeltaISIResistanceRD2 = Convert.ToDouble(SLDR_PARAM_BIN.SLDR_RES_RD2);
                        if (inputCarrier.WorkOrderData.IBSCheck && SLDR_PARAM_BIN.ISI_WR_IBS_PATTERN != null && SLDR_PARAM_BIN.ISI_WR_IBS_PATTERN.Trim() == "2")
                        {
                            inputCarrier.Hga9.DeltaISIResistanceWriter = Convert.ToDouble(SLDR_PARAM_BIN.ET_WRT2_RES);
                        }
                        else
                        {
                            inputCarrier.Hga9.DeltaISIResistanceWriter = Convert.ToDouble(SLDR_PARAM_BIN.ET_WRT1_RES);
                        }
                        inputCarrier.Hga9.TST_STATUS          = SLDR_PARAM_BIN.TST_STATUS.Trim() != string.Empty ? Convert.ToChar(SLDR_PARAM_BIN.TST_STATUS.Trim()) : '\0';
                        inputCarrier.Hga9.Slider_Lot_Number   = SLDR_PARAM_BIN.SLDR_LOT_ID;
                        inputCarrier.Hga9.IsGetISIPassed      = getData;
                        inputCarrier.Hga9.ISI_WAF_WTR_RES     = SLDR_PARAM_BIN.WAF_WTR_RES;
                        inputCarrier.Hga9.ISI_WAF_WTR_HTR_RES = SLDR_PARAM_BIN.WAF_WTR_HTR_RES;
                        inputCarrier.Hga9.ISI_WAF_TAD_RES     = SLDR_PARAM_BIN.WAF_TAD_RES;
                        inputCarrier.Hga9.ISI_WAF_RDR_HTR_RES = SLDR_PARAM_BIN.WAF_RDR_HTR_RES;
                        inputCarrier.Hga9.ISI_RES_AT_ET       = SLDR_PARAM_BIN.SLDR_RES;
                        inputCarrier.Hga9.ISI_RES_AT_ET_RD2   = SLDR_PARAM_BIN.SLDR_RES_RD2;
                        inputCarrier.Hga9.ISI_AMP_AT_ET       = SLDR_PARAM_BIN.SLDR_F1;
                        inputCarrier.Hga9.ISI_AMP_AT_ET_RD2   = SLDR_PARAM_BIN.SLDR_F1_RD2;
                        inputCarrier.Hga9.ISI_ASYM_AT_ET      = SLDR_PARAM_BIN.SLDR_ASYM;
                        inputCarrier.Hga9.ISI_ASYM_AT_ET_RD2  = SLDR_PARAM_BIN.SLDR_ASYM_RD2;
                        inputCarrier.Hga9.ISI_TAB             = SLDR_PARAM_BIN.SLDR_TAB;
                        inputCarrier.Hga9.ISI_ET_RD2_RES      = Convert.ToDouble(SLDR_PARAM_BIN.ET_RD2_RES);
                        inputCarrier.Hga9.ISI_ET_RD1_RES      = Convert.ToDouble(SLDR_PARAM_BIN.ET_RD1_RES);

                        inputCarrier.Hga9.UTIC_DATA = FISManager.Instance.GetUTICMachineNumber(_rfidController.FolaTagDataReadInfor[_hga].HgaSN);

                        inputCarrier.Hga9.Set_sdet_reader1(Convert.ToDouble(SLDR_PARAM_BIN.ET_RD1_RES));
                        inputCarrier.Hga9.Set_sdet_reader2(Convert.ToDouble(SLDR_PARAM_BIN.ET_RD2_RES));
                        inputCarrier.Hga9.Set_sdet_writer(Convert.ToDouble(SLDR_PARAM_BIN.ET_WRT1_RES));

                        if (inputCarrier.WorkOrderData.IBSCheck)
                        {
                            inputCarrier.Hga9.IBS_Data = new IBSObj(SLDR_PARAM_BIN.ISI_RD_IBS_PATTERN, SLDR_PARAM_BIN.ISI_WR_IBS_PATTERN, inputCarrier.HGATabType);
                        }
                        break;

                    case 9:
                        inputCarrier.Hga10.DeltaISIResistanceRD1 = Convert.ToDouble(SLDR_PARAM_BIN.SLDR_RES);
                        inputCarrier.Hga10.DeltaISIResistanceRD2 = Convert.ToDouble(SLDR_PARAM_BIN.SLDR_RES_RD2);
                        if (inputCarrier.WorkOrderData.IBSCheck && SLDR_PARAM_BIN.ISI_WR_IBS_PATTERN != null && SLDR_PARAM_BIN.ISI_WR_IBS_PATTERN.Trim() == "2")
                        {
                            inputCarrier.Hga10.DeltaISIResistanceWriter = Convert.ToDouble(SLDR_PARAM_BIN.ET_WRT2_RES);
                        }
                        else
                        {
                            inputCarrier.Hga10.DeltaISIResistanceWriter = Convert.ToDouble(SLDR_PARAM_BIN.ET_WRT1_RES);
                        }
                        inputCarrier.Hga10.TST_STATUS          = SLDR_PARAM_BIN.TST_STATUS.Trim() != string.Empty ? Convert.ToChar(SLDR_PARAM_BIN.TST_STATUS.Trim()) : '\0';
                        inputCarrier.Hga10.Slider_Lot_Number   = SLDR_PARAM_BIN.SLDR_LOT_ID;
                        inputCarrier.Hga10.IsGetISIPassed      = getData;
                        inputCarrier.Hga10.ISI_WAF_WTR_RES     = SLDR_PARAM_BIN.WAF_WTR_RES;
                        inputCarrier.Hga10.ISI_WAF_WTR_HTR_RES = SLDR_PARAM_BIN.WAF_WTR_HTR_RES;
                        inputCarrier.Hga10.ISI_WAF_TAD_RES     = SLDR_PARAM_BIN.WAF_TAD_RES;
                        inputCarrier.Hga10.ISI_WAF_RDR_HTR_RES = SLDR_PARAM_BIN.WAF_RDR_HTR_RES;
                        inputCarrier.Hga10.ISI_RES_AT_ET       = SLDR_PARAM_BIN.SLDR_RES;
                        inputCarrier.Hga10.ISI_RES_AT_ET_RD2   = SLDR_PARAM_BIN.SLDR_RES_RD2;
                        inputCarrier.Hga10.ISI_AMP_AT_ET       = SLDR_PARAM_BIN.SLDR_F1;
                        inputCarrier.Hga10.ISI_AMP_AT_ET_RD2   = SLDR_PARAM_BIN.SLDR_F1_RD2;
                        inputCarrier.Hga10.ISI_ASYM_AT_ET      = SLDR_PARAM_BIN.SLDR_ASYM;
                        inputCarrier.Hga10.ISI_ASYM_AT_ET_RD2  = SLDR_PARAM_BIN.SLDR_ASYM_RD2;
                        inputCarrier.Hga10.ISI_TAB             = SLDR_PARAM_BIN.SLDR_TAB;
                        inputCarrier.Hga10.ISI_ET_RD2_RES      = Convert.ToDouble(SLDR_PARAM_BIN.ET_RD2_RES);
                        inputCarrier.Hga10.ISI_ET_RD1_RES      = Convert.ToDouble(SLDR_PARAM_BIN.ET_RD1_RES);
                        inputCarrier.Hga10.UTIC_DATA           = FISManager.Instance.GetUTICMachineNumber(_rfidController.FolaTagDataReadInfor[_hga].HgaSN);

                        inputCarrier.Hga10.Set_sdet_reader1(Convert.ToDouble(SLDR_PARAM_BIN.ET_RD1_RES));
                        inputCarrier.Hga10.Set_sdet_reader2(Convert.ToDouble(SLDR_PARAM_BIN.ET_RD2_RES));
                        inputCarrier.Hga10.Set_sdet_writer(Convert.ToDouble(SLDR_PARAM_BIN.ET_WRT1_RES));

                        if (inputCarrier.WorkOrderData.IBSCheck)
                        {
                            inputCarrier.Hga10.IBS_Data = new IBSObj(SLDR_PARAM_BIN.ISI_RD_IBS_PATTERN, SLDR_PARAM_BIN.ISI_WR_IBS_PATTERN, inputCarrier.HGATabType);
                        }
                        break;
                    }
                }

                try
                {
                    _workcell.ISIDataListIn.Remove(inputCarrier.CarrierID);
                    _workcell.ISIDataListIn.Add(inputCarrier.CarrierID, ISI_data_map);
                }
                catch (Exception)
                {
                }
            }
            catch (Exception ex)
            {
                HSTException.Throw(HSTErrors.InputStationLifterExtendError, ex);
            }
        }
Пример #23
0
        public void CheckPnpPartPresent(bool bOn)
        {
            if (HSTMachine.Workcell.HSTSettings.Install.OperationMode == OperationMode.Simulation ||
                HSTMachine.Workcell.HSTSettings.Install.OperationMode == OperationMode.DryRun)
            {
                return;
            }
            else
            {
                if (bOn)
                {
                    // Input EE Pnp Present 1
                    try
                    {
                        _diInputEndEffectorPnpPresent1.WaitForState(DigitalIOState.On, _sensorTimeout);
                    }
                    catch (Exception ex)
                    {
                        HSTException.Throw(HSTErrors.InputEndEffectorVacuumPressureSensor1NotOnError, ex);
                    }
                }
                else
                {
                    try
                    {
                        _diInputEndEffectorPnpPresent1.WaitForState(DigitalIOState.Off, _sensorTimeout);
                    }
                    catch (Exception ex)
                    {
                        HSTException.Throw(HSTErrors.InputEndEffectorVacuumPressureSensor1NotOffError, ex);
                    }
                }
            }
            if (bOn)
            {
                try
                {
                    _diInputEndEffectorPnpPresent2.WaitForState(DigitalIOState.On, _sensorTimeout);
                }
                catch (Exception ex)
                {
                    HSTException.Throw(HSTErrors.InputEndEffectorVacuumPressureSensor2NotOnError, ex);
                }
            }
            else
            {
                try
                {
                    _diInputEndEffectorPnpPresent2.WaitForState(DigitalIOState.Off, _sensorTimeout);
                }
                catch (Exception ex)
                {
                    HSTException.Throw(HSTErrors.InputEndEffectorVacuumPressureSensor2NotOffError, ex);
                }
            }

            //Reset seaveyor
            CommonFunctions.Instance.powerOnConveyor  = false;
            CommonFunctions.Instance.powerOffConveyor = true;
            Thread.Sleep(1000);
            CommonFunctions.Instance.powerOnConveyor  = true;
            CommonFunctions.Instance.powerOffConveyor = false;
            Thread.Sleep(1000);
        }
        /// <summary>
        /// Read RFID
        /// </summary>
        public void ReadFolaRFID(RFHead RFIDHead)
        {
            _isReflowRequired = true;
            _rfidError        = RFIDErrors.NoError;
            if (HSTMachine.Workcell.HSTSettings.Install.OperationMode == OperationMode.Simulation)
            {
                Thread.Sleep(CommonFunctions.SIMULATION_DELAY);
                return;
            }


            _state = RFIDState.Reading;
            if (RFIDHead == RFHead.Head1)
            {
                try
                {
                    _readFolaTagData = _RFIDScanner.ReadRFIDTag(RFHead.Head1);  // Read RFID from Input Station
                    _state           = RFIDState.Idle;

                    if (HSTMachine.Workcell.HSTSettings.Install.DataLoggingForRFIDAndSeatrackRecordUpdateEnabled)
                    {
                        if (HSTMachine.Workcell.HSTSettings.Install.EnableDebugLog)
                        {
                            XyratexOSC.Logging.Log.Info(this, "Read RFID tag at Input Station for Carrier: {0}", _readFolaTagData.CarrierID);
                            XyratexOSC.Logging.Log.Info(this, "Carrier Size: {0}", _readFolaTagData.CarrierSize);
                            XyratexOSC.Logging.Log.Info(this, "Current Process Station Code: {0}", _readFolaTagData.CurrentProcessStep.StationCode);
                            XyratexOSC.Logging.Log.Info(this, "Current Process Recipe: {0}", _readFolaTagData.CurrentProcessStep.ProcessRecipe);
                            for (int x = 0; x < _readFolaTagData.CarrierSize; x++)
                            {
                                XyratexOSC.Logging.Log.Info(this, "HGA {0} Serial Number: {1}, Status: {2}, HGA Process Recipe: {3}, HGA Station Code: {4}", (x + 1), _readFolaTagData.HGAData[x].HgaSN, _readFolaTagData.HGAData[x].Status.ToString(), _readFolaTagData.ProcStep[x].ProcessRecipe, _readFolaTagData.ProcStep[x].StationCode.ToString());
                            }
                            XyratexOSC.Logging.Log.Info(this, "Last Step: {0}", _readFolaTagData.LastStep);
                            XyratexOSC.Logging.Log.Info(this, "MaxProcStep: {0}", _readFolaTagData.MaxProcStep);

                            XyratexOSC.Logging.Log.Info(this, "Work Order: {0}", _readFolaTagData.WorkOrder);
                            XyratexOSC.Logging.Log.Info(this, "Work Order Version: {0}", _readFolaTagData.WorkOrderVersion.ToString());
                            XyratexOSC.Logging.Log.Info(this, "Write Count: {0}", _readFolaTagData.WriteCount);
                        }

                        if (OnRFIDFolaReadInputStationDone != null)
                        {
                            OnRFIDFolaReadInputStationDone(_readFolaTagData);
                        }
                    }
                }
                catch (Exception ex)
                {
                    _state     = RFIDState.Idle;
                    _rfidError = RFIDErrors.RFIDReadError;
                    HSTException.Throw(HSTErrors.InputRFIDReadFailed, ex);
                }
            }
            else if (RFIDHead == RFHead.Head2)
            {
                try
                {
                    _readFolaTagData = _RFIDScanner.ReadRFIDTag(RFHead.Head2);  // Read RFID from Output Station
                    _state           = RFIDState.Idle;

                    if (HSTMachine.Workcell.HSTSettings.Install.DataLoggingForRFIDAndSeatrackRecordUpdateEnabled)
                    {
                        if (HSTMachine.Workcell.HSTSettings.Install.EnableDebugLog)
                        {
                            XyratexOSC.Logging.Log.Info(this, "Read RFID tag at Output Station for Carrier: {0}", _readFolaTagData.CarrierID);
                            XyratexOSC.Logging.Log.Info(this, "Carrier Size: {0}", _readFolaTagData.CarrierSize);
                            XyratexOSC.Logging.Log.Info(this, "Current Process Station Code: {0}", _readFolaTagData.CurrentProcessStep.StationCode);
                            XyratexOSC.Logging.Log.Info(this, "Current Process Recipe: {0}", _readFolaTagData.CurrentProcessStep.ProcessRecipe);
                            for (int x = 0; x < _readFolaTagData.CarrierSize; x++)
                            {
                                XyratexOSC.Logging.Log.Info(this, "HGA {0} Serial Number: {1}, Status: {2}, HGA Process Recipe: {3}, HGA Station Code: {4}", (x + 1), _readFolaTagData.HGAData[x].HgaSN, _readFolaTagData.HGAData[x].Status.ToString(), _readFolaTagData.ProcStep[x].ProcessRecipe, _readFolaTagData.ProcStep[x].StationCode.ToString());
                            }
                            XyratexOSC.Logging.Log.Info(this, "Last Step: {0}", _readFolaTagData.LastStep);
                            XyratexOSC.Logging.Log.Info(this, "MaxProcStep: {0}", _readFolaTagData.MaxProcStep);

                            XyratexOSC.Logging.Log.Info(this, "Work Order: {0}", _readFolaTagData.WorkOrder);
                            XyratexOSC.Logging.Log.Info(this, "Work Order Version: {0}", _readFolaTagData.WorkOrderVersion.ToString());
                            XyratexOSC.Logging.Log.Info(this, "Write Count: {0}", _readFolaTagData.WriteCount);
                        }

                        if (OnRFIDFolaReadOutputStationDone != null)
                        {
                            OnRFIDFolaReadOutputStationDone(_readFolaTagData);
                        }
                    }
                }
                catch (Exception ex)
                {
                    _state     = RFIDState.Idle;
                    _rfidError = RFIDErrors.RFIDReadError;
                    HSTException.Throw(HSTErrors.OutputRFIDReadError, ex);
                }
            }

            return;
        }
Пример #25
0
        public void MoveZAxis(Motor_Position pos, bool maintenanceSpeed)
        {
            if (HSTMachine.Workcell.HSTSettings.Install.OperationMode == OperationMode.Simulation)
            {
                Thread.Sleep(CommonFunctions.SIMULATION_DELAY);
                return;
            }

            double y        = 0;
            double dMovePos = 0;
            //double pc = 100.0;
            bool moveDown = false;

            switch (pos)
            {
            case Motor_Position.ZPosParkPos:
            {
                dMovePos = _teachPointRecipe.InputEESafeHeight;
                moveDown = false;
            }
            break;

            case Motor_Position.ZPosPickPos:
            {
                dMovePos = _teachPointRecipe.InputEEPickHeight;
                moveDown = true;
            }
            break;

            case Motor_Position.ZPosPlacePos_UpTab:
            {
                dMovePos = _teachPointRecipe.InputEEPlaceHeight_UpTab;
                moveDown = true;
            }
            break;

            case Motor_Position.ZPosPlacePos_DownTab:
            {
                dMovePos = _teachPointRecipe.InputEEPlaceHeight_DownTab;
                moveDown = true;
            }
            break;

            case Motor_Position.ZPosDycem:
            {
                dMovePos = _teachPointRecipe.InputEEDycemHeight;
                moveDown = true;
            }
            break;
            }

            try
            {
                if (HSTMachine.Workcell.HSTSettings.Install.EnableDebugLog)
                {
                    Log.Info(this, "InputEE Axis before move position:{0}, Target position:{1}, Acce:{2}, Dece:{3}, Vel:{4}", _InputEndEffectorZAxis.GetActualPosition(), dMovePos, _axesProfile.InputEEZ.Acceleration, _axesProfile.InputEEZ.Deceleration, _axesProfile.InputEEZ.Velocity);
                }

                if (maintenanceSpeed && HSTMachine.Workcell.HSTSettings.Install.EnableMaintenanceSpeedForManualMove)
                {
                    _InputEndEffectorZAxis.MoveAbsolute(inputEEMaxAcce * maintenanceSpeedRatio, inputEEMaxVel * maintenanceSpeedRatio, dMovePos, _moveTimeout);
                }
                else
                {
                    _InputEndEffectorZAxis.MoveAbsolute(_axesProfile.InputEEZ.Acceleration, _axesProfile.InputEEZ.Velocity, dMovePos, _moveTimeout);
                }

                if (HSTMachine.Workcell.HSTSettings.Install.EnableDebugLog)
                {
                    Log.Info(this, "InputEE Axis after move position:{0}, Target position:{1}, Acce:{2}, Dece:{3}, Vel:{4}", _InputEndEffectorZAxis.GetActualPosition(), dMovePos, _axesProfile.InputEEZ.Acceleration, _axesProfile.InputEEZ.Deceleration, _axesProfile.InputEEZ.Velocity);
                }
            }
            catch (Exception ex)
            {
                HSTException.Throw((moveDown) ? HSTErrors.InputHandlerZAxisMoveDownError : HSTErrors.InputHandlerZAxisMoveUpError, ex);
            }
        }
Пример #26
0
        public void BoundaryCheck()
        {
            if (HSTMachine.Workcell.HSTSettings.Install.OperationMode == OperationMode.Simulation)
            {
                return;
            }

            try
            {
                double dMoveDownPos = _teachPointRecipe.InputEEPickHeight;//lowest position in operation range

                if (HSTMachine.Workcell.HSTSettings.Install.EnableDebugLog)
                {
                    Log.Info(this, "InputEE Axis before move position:{0}, Target position:{1}, Acce:{2}, Dece:{3}, Vel:{4}", _InputEndEffectorZAxis.GetActualPosition(), dMoveDownPos, _axesProfile.InputEEZ.Acceleration, _axesProfile.InputEEZ.Deceleration, _axesProfile.InputEEZ.Velocity);
                }

                if (!_workcell.IsIgnoreHomeAxisForByPass)
                {
                    _InputEndEffectorZAxis.MoveAbsolute(_axesProfile.InputEEZ.Acceleration, _axesProfile.InputEEZ.Velocity, dMoveDownPos, _moveTimeout);

                    while (_InputEndEffectorZAxis.GetActualPosition() < dMoveDownPos - 10)
                    {
                        MessageBox.Show(string.Format("{0}: Actual Position not tally with target position after move done", this));
                        if (HSTMachine.Workcell.HSTSettings.Install.EnableDebugLog)
                        {
                            Log.Info(this, "InputEEMoveZAxis. _InputEndEffectorZAxis.GetActualPosition():{0} targetposition:{1}", _InputEndEffectorZAxis.GetActualPosition(), dMoveDownPos);
                        }
                        Thread.Sleep(100);
                    }
                }

                if (HSTMachine.Workcell.HSTSettings.Install.EnableDebugLog)
                {
                    Log.Info(this, "InputEE Axis after move position:{0}, Target position:{1}, Acce:{2}, Dece:{3}, Vel:{4}", _InputEndEffectorZAxis.GetActualPosition(), dMoveDownPos, _axesProfile.InputEEZ.Acceleration, _axesProfile.InputEEZ.Deceleration, _axesProfile.InputEEZ.Velocity);
                }
            }
            catch (Exception ex)
            {
                HSTException.Throw(HSTErrors.InputHandlerZAxisMoveDownError, ex);
            }

            try
            {
                double dMoveUpPos = _teachPointRecipe.InputEESafeHeight;//highest position in operation range

                if (HSTMachine.Workcell.HSTSettings.Install.EnableDebugLog)
                {
                    Log.Info(this, "InputEE Axis before move position:{0}, Target position:{1}, Acce:{2}, Dece:{3}, Vel:{4}", _InputEndEffectorZAxis.GetActualPosition(), dMoveUpPos, _axesProfile.InputEEZ.Acceleration, _axesProfile.InputEEZ.Deceleration, _axesProfile.InputEEZ.Velocity);
                }

                if (!_workcell.IsIgnoreHomeAxisForByPass)
                {
                    _InputEndEffectorZAxis.MoveAbsolute(_axesProfile.InputEEZ.Acceleration, _axesProfile.InputEEZ.Velocity, dMoveUpPos, _moveTimeout);

                    while (_InputEndEffectorZAxis.GetActualPosition() > dMoveUpPos + 10)
                    {
                        MessageBox.Show(string.Format("{0}: Actual Position not tally with target position after move done", this));
                        if (HSTMachine.Workcell.HSTSettings.Install.EnableDebugLog)
                        {
                            Log.Info(this, "InputEE MoveZAxis. _InputEndEffectorZAxis.GetActualPosition():{0} targetposition:{1}", _InputEndEffectorZAxis.GetActualPosition(), dMoveUpPos);
                        }
                        Thread.Sleep(100);
                    }
                }

                if (HSTMachine.Workcell.HSTSettings.Install.EnableDebugLog)
                {
                    Log.Info(this, "InputEE Axis after move position:{0}, Target position:{1}, Acce:{2}, Dece:{3}, Vel:{4}", _InputEndEffectorZAxis.GetActualPosition(), dMoveUpPos, _axesProfile.InputEEZ.Acceleration, _axesProfile.InputEEZ.Deceleration, _axesProfile.InputEEZ.Velocity);
                }
            }
            catch (Exception ex)
            {
                HSTException.Throw(HSTErrors.InputHandlerZAxisMoveUpError, ex);
            }
        }
        private QState StateVisionInspectCarrierAfterLoad(IQEvent qEvent)
        {
            bool carrierLoadedInWrongDirection = false;

            LogStateInfo(_processName, System.Reflection.MethodBase.GetCurrentMethod().Name, qEvent);

            InputCameraHGADetectionAtInputTurnStationProcessCycleTimeStopWatch.Start();

            if (qEvent.IsSignal(SigRecover))
            {
                if (errorMessage != null)
                {
                    ErrorButton response = (ErrorButton)(((QEvent)qEvent).EventObject);
                    switch (response)
                    {
                    case ErrorButton.Reject:
                    {
                        BoatLeavesInputTurnStationProcessCycleTimeStopWatch.Start();
                        _currentInputCarrier.IsRejectedCarrier = true;
                        Log.Info(this, "{0}, ProcessName:{1}, StateVisionInspectCarrierAfterLoad, Carrier rejected by user", LoggerCategory.StateTransition, _processName);
                        CommonFunctions.Instance.InputCarriers.Enqueue(_currentInputCarrier);
                        TransitionTo(stateWaitForSigInputStationReady);
                    }
                    break;

                    case ErrorButton.OK:
                    {
                        _retryCount = 0;
                    }
                    break;

                    default:
                        errorMessage = null;
                        System.Windows.Forms.MessageBox.Show(string.Format("Unhandled Button: {0}", response.ToString()), response.ToString());
                        return(null);
                    }
                    return(null);
                }
            }

            if (qEvent.IsSignal(SigStateJob))
            {
                try
                {
                    if (HSTMachine.Workcell.HSTSettings.Install.OperationMode == OperationMode.Simulation || HSTMachine.Workcell.HSTSettings.Install.OperationMode == OperationMode.DryRun)
                    {
                        CarrierSettings carrierSettings = SimulatedInputCarriersSettingsQueue.Dequeue();
                        Mapper.CreateMap <CarrierSettings, Carrier>();
                        _currentInputCarrier         = Mapper.Map <Carrier>(carrierSettings);
                        _currentInputCarrierSettings = carrierSettings;


                        if (_currentInputCarrier == null)
                        {
                            throw new Exception("Failed to find valid input carrier object to be assigned with the read RFID data.");
                        }
                    }
                    else if (HSTMachine.Workcell.HSTSettings.Install.OperationMode == OperationMode.Bypass && HSTMachine.Workcell.HSTSettings.Install.BypassVisionAtInputTurnStation == true)
                    {
                        _currentInputCarrier = new Carrier();
                        _currentInputCarrier.Hga1.Hga_Status  = HGAStatus.HGAPresent;
                        _currentInputCarrier.Hga2.Hga_Status  = HGAStatus.HGAPresent;
                        _currentInputCarrier.Hga3.Hga_Status  = HGAStatus.HGAPresent;
                        _currentInputCarrier.Hga4.Hga_Status  = HGAStatus.HGAPresent;
                        _currentInputCarrier.Hga5.Hga_Status  = HGAStatus.HGAPresent;
                        _currentInputCarrier.Hga6.Hga_Status  = HGAStatus.HGAPresent;
                        _currentInputCarrier.Hga7.Hga_Status  = HGAStatus.HGAPresent;
                        _currentInputCarrier.Hga8.Hga_Status  = HGAStatus.HGAPresent;
                        _currentInputCarrier.Hga9.Hga_Status  = HGAStatus.HGAPresent;
                        _currentInputCarrier.Hga10.Hga_Status = HGAStatus.HGAPresent;
                    }
                    else
                    {
                        Thread.Sleep(HSTMachine.Workcell.SetupSettings.Delay.InputTurnTableFullyStopDelay);
                        _currentInputCarrier = _workcell.Process.InputEEProcess.Controller.VisionInspect();

                        if (CommonFunctions.Instance.visionError != "NoError")
                        {
                            HSTException.Throw(HSTErrors.InputDetectionCameraError, new Exception("Failed to run tool block: " + CommonFunctions.Instance.visionError));
                        }

                        if (_currentInputCarrier.IsLoadedInWrongDirection)
                        {
                            carrierLoadedInWrongDirection = true;
                            Log.Info(this, "{0}, ProcessName:{1}, StateVisionInspectCarrierAfterLoad, Input HGADetection camera detected carrier loaded in wrong direction. Reject this carrier.");

                            HSTException.Throw(HSTErrors.InputDetectionCameraCarrierLoadedInWrongDirection, new Exception("Input Camera detected current carrier was loaded in wrong direction."));
                        }

                        if (HSTMachine.Workcell.HSTSettings.Install.EnableDebugLog)
                        {
                            Log.Info(this, "{0}, ProcessName:{1}, StateVisionInspectCarrierAfterLoad, Input HGADetection camera result Carrier ID:{2}, " +
                                     "HGA1:{3}, HGA2:{4}, HGA3:{5}, HGA4:{6}, HGA5:{7}, " +
                                     "HGA6:{8},  HGA7:{9}, HGA8:{10}, HGA9:{11}, HGA10:{12}", LoggerCategory.StateTransition, _processName, "Unknown",
                                     _currentInputCarrier.Hga1.Hga_Status, _currentInputCarrier.Hga2.Hga_Status, _currentInputCarrier.Hga3.Hga_Status, _currentInputCarrier.Hga4.Hga_Status, _currentInputCarrier.Hga5.Hga_Status,
                                     _currentInputCarrier.Hga6.Hga_Status, _currentInputCarrier.Hga7.Hga_Status, _currentInputCarrier.Hga8.Hga_Status, _currentInputCarrier.Hga9.Hga_Status, _currentInputCarrier.Hga10.Hga_Status);
                        }
                    }
                    _currentInputCarrier.CarrierCurrentLocation = CarrierLocation.InputTurnStation;

                    lock (CommonFunctions.Instance.InputCarriersLock)
                    {
                        CommonFunctions.Instance.InputCarriers.Enqueue(_currentInputCarrier);
                    }

                    _currentInputCarrier.IsCarrierEmpty = IsCarrierEmpty.Empty;

                    if (_currentInputCarrier.Hga1.Hga_Status >= HGAStatus.HGAPresent ||
                        _currentInputCarrier.Hga2.Hga_Status >= HGAStatus.HGAPresent ||
                        _currentInputCarrier.Hga3.Hga_Status >= HGAStatus.HGAPresent ||
                        _currentInputCarrier.Hga4.Hga_Status >= HGAStatus.HGAPresent ||
                        _currentInputCarrier.Hga5.Hga_Status >= HGAStatus.HGAPresent ||
                        _currentInputCarrier.Hga6.Hga_Status >= HGAStatus.HGAPresent ||
                        _currentInputCarrier.Hga7.Hga_Status >= HGAStatus.HGAPresent ||
                        _currentInputCarrier.Hga8.Hga_Status >= HGAStatus.HGAPresent ||
                        _currentInputCarrier.Hga9.Hga_Status >= HGAStatus.HGAPresent ||
                        _currentInputCarrier.Hga10.Hga_Status >= HGAStatus.HGAPresent)
                    {
                        _currentInputCarrier.IsCarrierEmpty = IsCarrierEmpty.NotEmpty;
                    }

                    InputCameraHGADetectionAtInputTurnStationProcessCycleTimeStopWatch.Stop();
                    if (HSTMachine.Workcell.HSTSettings.Install.EnableDebugLog)
                    {
                        CommonFunctions.Instance.LogProcessCycleTime("Input Camera HGA Detection At Input Turn Station Process Cycle Time.csv", InputCameraHGADetectionAtInputTurnStationProcessCycleTimeStopWatch.ElapsedTime);
                    }

                    BoatLeavesInputTurnStationProcessCycleTimeStopWatch.Start();
                    TransitionTo(stateWaitForSigInputStationReady);
                }
                catch (Exception ex)
                {
                    bool skipRetry = carrierLoadedInWrongDirection ? true : false;

                    if (_retryCount < 3 && !skipRetry)
                    {
                        Log.Error(this, "Failed to perform vision inspection. Retry count: {0}, Exception: {1}, StateName: {2}", _retryCount, ex.Message, this.CurrentStateName);
                        TransitionTo(this.targetState);
                    }
                    else
                    {
                        ButtonList btnlst;
                        if (carrierLoadedInWrongDirection)
                        {
                            btnlst = new ButtonList(ErrorButton.Reject, ErrorButton.Stop, ErrorButton.NoButton);
                        }
                        else
                        {
                            btnlst = new ButtonList(ErrorButton.Retry, ErrorButton.Reject, ErrorButton.Stop);
                        }

                        TransitionToErrorState(btnlst, ex);
                    }
                    _retryCount++;
                }
                return(null);
            }
            return(stateRun);
        }
        public void GetSLDRData_New(Carrier inputCarrier)
        {
            SLDR_PARAM_BIN_DATA SLDR_PARAM_BIN = new SLDR_PARAM_BIN_DATA();
            List <ISI_Data_Map> ISI_data_map   = new List <ISI_Data_Map>();

            try
            {
                for (int _hga = 0; _hga < _rfidController.FolaTagDataReadInfor.CarrierSize; _hga++)
                {
                    SLDR_PARAM_BIN.Clear();
                    var          getData      = FISManager.Instance.GetSLDR_PARAM_BIN_Data(SLDR_PARAM_BIN, _rfidController.FolaTagDataReadInfor[_hga].HgaSN);
                    IBSObj       ibsobj       = null;
                    ISI_Data_Map isi_Data_Map = new ISI_Data_Map
                    {
                        slot           = _hga,
                        HgaSN          = inputCarrier.RFIDData.RFIDTag[_hga].HgaSN,
                        ISIReader1Data = Convert.ToDouble(SLDR_PARAM_BIN.SLDR_RES),
                        ISIReader2Data = Convert.ToDouble(SLDR_PARAM_BIN.SLDR_RES_RD2)
                    };

                    ISI_data_map.Add(isi_Data_Map);

                    var hga = new Hga(0, HGAStatus.Unknown);
                    switch (_hga)
                    {
                    case 0:
                        hga = inputCarrier.Hga1;
                        break;

                    case 1:
                        hga = inputCarrier.Hga2;
                        break;

                    case 2:
                        hga = inputCarrier.Hga3;
                        break;

                    case 3:
                        hga = inputCarrier.Hga4;
                        break;

                    case 4:
                        hga = inputCarrier.Hga5;
                        break;

                    case 5:
                        hga = inputCarrier.Hga6;
                        break;

                    case 6:
                        hga = inputCarrier.Hga7;
                        break;

                    case 7:
                        hga = inputCarrier.Hga8;
                        break;

                    case 8:
                        hga = inputCarrier.Hga9;
                        break;

                    case 9:
                        hga = inputCarrier.Hga10;
                        break;
                    }

                    hga.DeltaISIResistanceRD1 = Convert.ToDouble(SLDR_PARAM_BIN.SLDR_RES);
                    hga.DeltaISIResistanceRD2 = Convert.ToDouble(SLDR_PARAM_BIN.SLDR_RES_RD2);
                    if (inputCarrier.WorkOrderData.IBSCheck && SLDR_PARAM_BIN.ISI_WR_IBS_PATTERN != null && SLDR_PARAM_BIN.ISI_WR_IBS_PATTERN.Trim() == "2")
                    {
                        hga.DeltaISIResistanceWriter = Convert.ToDouble(SLDR_PARAM_BIN.ET_WRT2_RES);
                    }
                    else
                    {
                        hga.DeltaISIResistanceWriter = Convert.ToDouble(SLDR_PARAM_BIN.ET_WRT1_RES);
                    }
                    hga.TST_STATUS          = SLDR_PARAM_BIN.TST_STATUS.Trim() != string.Empty ? Convert.ToChar(SLDR_PARAM_BIN.TST_STATUS.Trim()) : '\0';
                    hga.Slider_Lot_Number   = SLDR_PARAM_BIN.SLDR_LOT_ID;
                    hga.IsGetISIPassed      = getData;
                    hga.ISI_WAF_WTR_RES     = SLDR_PARAM_BIN.WAF_WTR_RES;
                    hga.ISI_WAF_WTR_HTR_RES = SLDR_PARAM_BIN.WAF_WTR_HTR_RES;
                    hga.ISI_WAF_TAD_RES     = SLDR_PARAM_BIN.WAF_TAD_RES;
                    hga.ISI_WAF_RDR_HTR_RES = SLDR_PARAM_BIN.WAF_RDR_HTR_RES;
                    hga.ISI_RES_AT_ET       = SLDR_PARAM_BIN.SLDR_RES;
                    hga.ISI_RES_AT_ET_RD2   = SLDR_PARAM_BIN.SLDR_RES_RD2;
                    hga.ISI_AMP_AT_ET       = SLDR_PARAM_BIN.SLDR_F1;
                    hga.ISI_AMP_AT_ET_RD2   = SLDR_PARAM_BIN.SLDR_F1_RD2;
                    hga.ISI_ASYM_AT_ET      = SLDR_PARAM_BIN.SLDR_ASYM;
                    hga.ISI_ASYM_AT_ET_RD2  = SLDR_PARAM_BIN.SLDR_ASYM_RD2;
                    hga.ISI_TAB             = SLDR_PARAM_BIN.SLDR_TAB;
                    hga.ISI_ET_RD2_RES      = Convert.ToDouble(SLDR_PARAM_BIN.ET_RD2_RES);
                    hga.ISI_ET_RD1_RES      = Convert.ToDouble(SLDR_PARAM_BIN.ET_RD1_RES);
                    hga.Last_ET_Threshold   = Convert.ToDouble(SLDR_PARAM_BIN.ET_LAS_THRESHOLD);
                    hga.UTIC_DATA           = FISManager.Instance.GetUTICMachineNumber(_rfidController.FolaTagDataReadInfor[_hga].HgaSN);
                    hga.Set_sdet_reader1(Convert.ToDouble(SLDR_PARAM_BIN.ET_RD1_RES));
                    hga.Set_sdet_reader2(Convert.ToDouble(SLDR_PARAM_BIN.ET_RD2_RES));
                    hga.Set_sdet_writer(Convert.ToDouble(SLDR_PARAM_BIN.ET_WRT1_RES));

                    if (inputCarrier.WorkOrderData.IBSCheck)
                    {
                        hga.IBS_Data = new IBSObj(SLDR_PARAM_BIN.ISI_RD_IBS_PATTERN, SLDR_PARAM_BIN.ISI_WR_IBS_PATTERN, inputCarrier.HGATabType);
                    }
                }

                try
                {
                    _workcell.ISIDataListIn.Remove(inputCarrier.CarrierID);
                    _workcell.ISIDataListIn.Add(inputCarrier.CarrierID, ISI_data_map);
                }
                catch (Exception)
                {
                }
            }
            catch (Exception ex)
            {
                HSTException.Throw(HSTErrors.InputStationLifterExtendError, ex);
            }
        }
Пример #29
0
        private QState StateMoveTestProbeToProbePosition(IQEvent qEvent)
        {
            LogStateInfo(_processName, System.Reflection.MethodBase.GetCurrentMethod().Name, qEvent);

            if (qEvent.IsSignal(SigRecover))
            {
                if (errorMessage != null)
                {
                    ErrorButton response = (ErrorButton)(((QEvent)qEvent).EventObject);
                    switch (response)
                    {
                    case ErrorButton.Stop:
                    {
                        _retryCount = 0;
                    }
                    break;

                    default:
                        errorMessage = null;
                        System.Windows.Forms.MessageBox.Show(string.Format("Unhandled Button: {0}", response.ToString()), response.ToString());
                        return(null);
                    }
                    return(null);
                }
            }

            if (qEvent.IsSignal(SigStateJob) /* || qEvent.IsSignal(_sigTimeout)*/)
            {
                try
                {
                    if (_controller.IsSafeToMoveDown())
                    {
                        if ((HSTMachine.Workcell.HSTSettings.Install.OperationMode == OperationMode.Bypass && HSTMachine.Workcell.HSTSettings.Install.BypassMeasurementTestAtTestProbe == true))
                        {
                            // Do nothing
                        }
                        else
                        {
                            bool foundMatchingProductType = false;
                            if (String.Compare(CalibrationSettings.Instance.MeasurementTest.CurrentInstalledTestProbeType, CommonFunctions.Instance.MeasurementTestRecipe.RecipeProbeType, true) == 0)
                            {
                                foundMatchingProductType = true;
                                if (HSTMachine.Workcell.HSTSettings.Install.EnableDebugLog)
                                {
                                    Log.Info(this, "In TestProbeProcess' StateMoveTestProbeToProbePosition , found a match in the HGA Product Type database in which the Product ID = {0} and Product Name = {1}.",
                                             CalibrationSettings.Instance.MeasurementTest.CurrentInstalledTestProbeType, CommonFunctions.Instance.MeasurementTestRecipe.RecipeProbeType);
                                }
                            }

                            if (foundMatchingProductType == false)
                            {
                                try
                                {
                                    try
                                    {
                                        throw new Exception(String.Format("Unrecognized Product Name of '{0}'.", _currentInputCarrier.WorkOrderData.ProductName));
                                    }
                                    catch (Exception ex)
                                    {
                                        HSTException.Throw(HSTErrors.TestElectronicsOutdatedMeasurementTestConfiguration, new Exception(String.Format("Unrecognized Product Name of '{0}'.", _currentInputCarrier.WorkOrderData.ProductName)));
                                    }
                                }
                                catch (Exception ex)
                                {
                                    ButtonList btnlst = new ButtonList(ErrorButton.OK, ErrorButton.NoButton, ErrorButton.NoButton);
                                    TransitionToErrorState(btnlst, ex);
                                }
                            }
                        }

                        TestProbeMovesDownToPrecisorNestProbePositionProcessCycleTimeStopWatch.Start();

                        TestProbeDownToTestPositionTravellingTimeStopWatch.Start();
                        bool isUp = (_currentInputCarrier.HGATabType == HGAProductTabType.Up);
                        _controller.GoToProbePosition(isUp, false);

                        TestProbeDownToTestPositionTravellingTimeStopWatch.Stop();

                        if (HSTMachine.Workcell.HSTSettings.Install.OperationMode != OperationMode.Simulation)
                        {
                            _currentInputCarrier.setPrecisorNestPositionZ(_controller.GetTestProbePositionZ());
                        }

                        if (HSTMachine.Workcell != null)
                        {
                            if (HSTMachine.Workcell.getPanelOperation() != null)
                            {
                                if (HSTMachine.Workcell.getPanelOperation().getOperationStatusPanel() != null)
                                {
                                    UIUtility.Invoke(HSTMachine.Workcell.getPanelOperation().getOperationStatusPanel(), () =>
                                    {
                                        HSTMachine.Workcell.getPanelOperation().getOperationStatusPanel().labelDownToTestPositionTravellingTime.Text = TestProbeDownToTestPositionTravellingTimeStopWatch.ElapsedTime.ToString();
                                    });
                                }
                            }
                        }

                        TestProbeStabilityProcessCycleTimeStopWatch.Start();
                        HGAMeasurementTestAtTestProbeProcessCycleTimeStopWatch.Start();

                        if (HSTMachine.Workcell.HSTSettings.Install.EnableDebugLog)
                        {
                            if (CommonFunctions.Instance.TestProbeHandlerMovesDownToPrecisorNestProcessCycleTimeStopWatch.Count > 0)
                            {
                                ProcessStopWatch PSW = CommonFunctions.Instance.TestProbeHandlerMovesDownToPrecisorNestProcessCycleTimeStopWatch.First();
                                PSW.Stop();
                                CommonFunctions.Instance.LogProcessCycleTime("Test Probe Handler Moves Down To Precisor Nest Process Cycle Time.csv.csv", PSW.GetElapsedTime(), PSW.CarrierID, PSW.GetStartTime(), PSW.GetStopTime());
                                CommonFunctions.Instance.TestProbeHandlerMovesDownToPrecisorNestProcessCycleTimeStopWatch.Dequeue();
                            }
                        }

                        TransitionTo(statePublishSigRequestForHGATesting);
                    }
                    else
                    {
                        _qTimer.FireIn(new TimeSpan(0, 0, 0, 0, 200), new QEvent(_sigTimeout));
                        return(null);
                    }
                }
                catch (Exception ex)
                {
                    ButtonList btnlst = new ButtonList(ErrorButton.OK, ErrorButton.NoButton, ErrorButton.NoButton);
                    TransitionToErrorState(btnlst, ex);
                }
                return(null);
            }
            return(stateRun);
        }
Пример #30
0
        private QState StateWaitForSigHGATestingDone(IQEvent qEvent)
        {
            LogStateInfo(_processName, System.Reflection.MethodBase.GetCurrentMethod().Name, qEvent);

            if (qEvent.IsSignal(SigRecover))
            {
                if (errorMessage != null)
                {
                    ErrorButton response = (ErrorButton)(((QEvent)qEvent).EventObject);
                    switch (response)
                    {
                    case ErrorButton.Yes:     // Retry testing
                    {
                        TransitionTo(statePublishSigRequestForHGATesting);
                    }
                    break;

                    case ErrorButton.No:     // Skip testing
                    {
                        Log.Info(this, "{0}, ProcessName:{1}, StateWaitForSigHGATestingDone, Carrier rejected by user", LoggerCategory.StateTransition, _processName);
                        if (_currentInputCarrier.Hga1.Hga_Status == HGAStatus.HGAPresent)
                        {
                            _currentInputCarrier.Hga1.Hga_Status = HGAStatus.Untested;
                        }
                        if (_currentInputCarrier.Hga2.Hga_Status == HGAStatus.HGAPresent)
                        {
                            _currentInputCarrier.Hga2.Hga_Status = HGAStatus.Untested;
                        }
                        if (_currentInputCarrier.Hga3.Hga_Status == HGAStatus.HGAPresent)
                        {
                            _currentInputCarrier.Hga3.Hga_Status = HGAStatus.Untested;
                        }
                        if (_currentInputCarrier.Hga4.Hga_Status == HGAStatus.HGAPresent)
                        {
                            _currentInputCarrier.Hga4.Hga_Status = HGAStatus.Untested;
                        }
                        if (_currentInputCarrier.Hga5.Hga_Status == HGAStatus.HGAPresent)
                        {
                            _currentInputCarrier.Hga5.Hga_Status = HGAStatus.Untested;
                        }
                        if (_currentInputCarrier.Hga6.Hga_Status == HGAStatus.HGAPresent)
                        {
                            _currentInputCarrier.Hga6.Hga_Status = HGAStatus.Untested;
                        }
                        if (_currentInputCarrier.Hga7.Hga_Status == HGAStatus.HGAPresent)
                        {
                            _currentInputCarrier.Hga7.Hga_Status = HGAStatus.Untested;
                        }
                        if (_currentInputCarrier.Hga8.Hga_Status == HGAStatus.HGAPresent)
                        {
                            _currentInputCarrier.Hga8.Hga_Status = HGAStatus.Untested;
                        }
                        if (_currentInputCarrier.Hga9.Hga_Status == HGAStatus.HGAPresent)
                        {
                            _currentInputCarrier.Hga9.Hga_Status = HGAStatus.Untested;
                        }
                        if (_currentInputCarrier.Hga10.Hga_Status == HGAStatus.HGAPresent)
                        {
                            _currentInputCarrier.Hga10.Hga_Status = HGAStatus.Untested;
                        }
                        TransitionTo(stateMoveTestProbeToParkPosition);
                    }
                    break;

                    default:
                        errorMessage = null;
                        System.Windows.Forms.MessageBox.Show(string.Format("Unhandled Button: {0}", response.ToString()), response.ToString());
                        return(null);
                    }
                    return(null);
                }
            }

            if (qEvent.IsSignal(SigStateJob))
            {
                _qTimer.FireIn(new TimeSpan(0, 0, 0, 0, 1000), new QEvent(_sigTimeout));

                if (RecallDeferredSignal(HSTWorkcell.SigHGATestingDone))
                {
                    UpdateSignalRecipient(HSTWorkcell.SigHGATestingDone);
                    return(null);
                }
                return(null);
            }

            if (qEvent.IsSignal(HSTWorkcell.SigHGATestingDone))
            {
                HSTMachine.Workcell.TestTimePerCarrier.Stop();
                HSTMachine.Workcell.TestTimePerHead = HSTMachine.Workcell.TestTimePerCarrier.ElapsedTime_sec / 10;
                if (HSTMachine.Workcell.HSTSettings.Install.EnableDebugLog)
                {
                    AfterProbeTimeStamp = DateTime.Now;
                    TimeSpan ProbeTimeSpan = AfterProbeTimeStamp.Subtract(BeforeProbeTimeStamp);
                    if (HSTMachine.Workcell.HSTSettings.Install.EnableDebugLog)
                    {
                        Log.Info(this, "Received SigHGATestingDone in TestProbeProcess, AfterProbeTimeStamp : {0}, ProbeTimeSpan : {1}", AfterProbeTimeStamp, (ProbeTimeSpan.Seconds + ProbeTimeSpan.Milliseconds / 1000.0));
                    }
                }

                TransitionTo(stateMoveTestProbeToParkPosition);
                return(null);
            }

            if (qEvent.IsSignal(_sigTimeout))
            {
                DateTime currentTime  = DateTime.Now;
                TimeSpan diffTime     = currentTime.Subtract(_lastRequestTestTime);
                int      totalTimeout = 0;
                if (!Controller.IsDoubleTestActive)
                {
                    totalTimeout = HSTMachine.Workcell.HSTSettings.Install.MeasurementTestTimeOutLimit;
                }
                else
                {
                    totalTimeout = HSTMachine.Workcell.HSTSettings.Install.MeasurementTestTimeOutLimit * 2;
                }

                if (HSTMachine.Workcell.HSTSettings.Install.MeasurementTestTimeOutLimit > 0)
                {
                    if ((int)diffTime.TotalSeconds >= totalTimeout)
                    {
                        try
                        {
                            HSTException.Throw(HSTErrors.TestElectronicsMeasurementTimeout, new Exception(String.Format("Test duration exceed {0}s timeout Limit. \nPress 'Yes' to retry HGA testing, and 'No'to skip the testing.", HSTMachine.Workcell.HSTSettings.Install.MeasurementTestTimeOutLimit)));
                        }
                        catch (Exception ex)
                        {
                            ButtonList btnlst = new ButtonList(ErrorButton.Yes, ErrorButton.No, ErrorButton.NoButton);
                            TransitionToErrorState(btnlst, ex);
                            return(null);
                        }
                    }
                }

                _qTimer.FireIn(new TimeSpan(0, 0, 0, 0, 1000), new QEvent(_sigTimeout));
                return(null);
            }

            return(stateRun);
        }