예제 #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, out uint lifterTimeUsed)
        {
            lifterTimeUsed = 0;
            if (HSTMachine.Workcell.HSTSettings.Install.OperationMode == OperationMode.Simulation)
            {
                Thread.Sleep(CommonFunctions.SIMULATION_DELAY);
                return;
            }

            if (on)
            {
                try
                {
                    _lifter.Extend(nCylinderTimeout, out lifterTimeUsed);//chanfg mask LinearActuator call and replace with direct IO call
                }
                catch (Exception ex)
                {
                    HSTException.Throw(HSTErrors.InputStationLifterExtendError, ex);
                }
            }
            else
            {
                try
                {
                    _lifter.Retract(nCylinderTimeout, out lifterTimeUsed);//chanfg mask LinearActuator call and replace with direct IO call
                }
                catch (Exception ex)
                {
                    HSTException.Throw(HSTErrors.InputStationLifterRetractError, ex);
                }
            }

            return;
        }
예제 #3
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);
         }
     }
 }
예제 #4
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;
        }