예제 #1
0
        // Constructors ------------------------------------------------------------
        public OutputEEController(HSTWorkcell workcell, string processID, string processName)
            : base(workcell, processID, processName)
        {
            this._workcell   = workcell;
            this._ioManifest = (HSTIOManifest)workcell.IOManifest;

            _axesProfile = workcell.SetupConfig.AxesProfile;

            if (HSTMachine.Workcell.SetupSettings.MoveProfile.OutputEEZ.Acceleration > outputEEMaxAcce)
            {
                HSTMachine.Workcell.SetupSettings.MoveProfile.OutputEEZ.Acceleration = outputEEMaxAcce;
            }
            _axesProfile.OutputEEZ.Acceleration = HSTMachine.Workcell.SetupSettings.MoveProfile.OutputEEZ.Acceleration;

            if (HSTMachine.Workcell.SetupSettings.MoveProfile.OutputEEZ.Deceleration > outputEEMaxDece)
            {
                HSTMachine.Workcell.SetupSettings.MoveProfile.OutputEEZ.Deceleration = outputEEMaxDece;
            }
            _axesProfile.OutputEEZ.Deceleration = HSTMachine.Workcell.SetupSettings.MoveProfile.OutputEEZ.Deceleration;

            if (HSTMachine.Workcell.SetupSettings.MoveProfile.OutputEEZ.Velocity > outputEEMaxVel)
            {
                HSTMachine.Workcell.SetupSettings.MoveProfile.OutputEEZ.Velocity = outputEEMaxVel;
            }
            _axesProfile.OutputEEZ.Velocity = HSTMachine.Workcell.SetupSettings.MoveProfile.OutputEEZ.Velocity;


            _teachPointRecipe = workcell.TeachPointRecipe;

            _diOutputEndEffectorPnpPresent1 = _ioManifest.GetDigitalInput((int)HSTIOManifest.DigitalInputs.Output_EE_VS1);
            _diOutputEndEffectorPnpPresent2 = _ioManifest.GetDigitalInput((int)HSTIOManifest.DigitalInputs.Output_EE_VS2);

            _doOutputEndEffectorPnpVacuumOn = _ioManifest.GetDigitalOutput((int)HSTIOManifest.DigitalOutputs.Output_EE_VCH);
            _doOutputEndEffectorPnpPurgeOn  = _ioManifest.GetDigitalOutput((int)HSTIOManifest.DigitalOutputs.Output_EE_PCH);

            _OutputEndEffectorZAxis = _ioManifest.GetAxis((int)HSTIOManifest.Axes.Z3);

            OutputEEPrecisorVacuumProcessTimeStopWatch = new Stopwatch();
            Machine.HSTMachine.Workcell.CalibrationSettings.OnSettingsChanged += VisionSettingsChanged;
            Machine.HSTMachine.Workcell.SetupSettings.OnSettingsChanged       += AutomationConfigChanged;
        }
        // Constructors ------------------------------------------------------------
        public InputEEController(HSTWorkcell workcell, string controllerID, string controllerName)
            : base(workcell, controllerID, controllerName)
        {
            this._ioManifest = (HSTIOManifest)workcell.IOManifest;

            _axesProfile = workcell.SetupConfig.AxesProfile;

            if (HSTMachine.Workcell.SetupSettings.MoveProfile.InputEEZ.Acceleration > inputEEMaxAcce)
            {
                HSTMachine.Workcell.SetupSettings.MoveProfile.InputEEZ.Acceleration = inputEEMaxAcce;
            }
            _axesProfile.InputEEZ.Acceleration = HSTMachine.Workcell.SetupSettings.MoveProfile.InputEEZ.Acceleration;

            if (HSTMachine.Workcell.SetupSettings.MoveProfile.InputEEZ.Deceleration > inputEEMaxDece)
            {
                HSTMachine.Workcell.SetupSettings.MoveProfile.InputEEZ.Deceleration = inputEEMaxDece;
            }
            _axesProfile.InputEEZ.Deceleration = HSTMachine.Workcell.SetupSettings.MoveProfile.InputEEZ.Deceleration;

            if (HSTMachine.Workcell.SetupSettings.MoveProfile.InputEEZ.Velocity > inputEEMaxVel)
            {
                HSTMachine.Workcell.SetupSettings.MoveProfile.InputEEZ.Velocity = inputEEMaxVel;
            }
            _axesProfile.InputEEZ.Velocity = HSTMachine.Workcell.SetupSettings.MoveProfile.InputEEZ.Velocity;

            _teachPointRecipe = workcell.TeachPointRecipe;

            _diInputEndEffectorPnpPresent1 = _ioManifest.GetDigitalInput((int)HSTIOManifest.DigitalInputs.Input_EE_VS1);
            _diInputEndEffectorPnpPresent2 = _ioManifest.GetDigitalInput((int)HSTIOManifest.DigitalInputs.Input_EE_VS2);

            _doInputEndEffectorPnpVacuumOn = _ioManifest.GetDigitalOutput((int)HSTIOManifest.DigitalOutputs.Input_EE_VCH);
            _doInputEndEffectorPnpPurgeOn  = _ioManifest.GetDigitalOutput((int)HSTIOManifest.DigitalOutputs.Input_EE_PCH);

            _doInputEndEffectorFlattener = _ioManifest.GetDigitalOutput((int)HSTIOManifest.DigitalOutputs.Input_EE_Flattener);

            _InputEndEffectorZAxis = _ioManifest.GetAxis((int)HSTIOManifest.Axes.Z1);

            Machine.HSTMachine.Workcell.CalibrationSettings.OnSettingsChanged += VisionSettingsChanged;
            Machine.HSTMachine.Workcell.SetupSettings.OnSettingsChanged       += AutomationConfigChanged;
        }