Beispiel #1
0
        public void ConveyorIn(int timeoutSec = 30)
        {
            _mc.Jog(MotorConveyor, MotorConveyor.Velocity, MoveDirection.Positive);

            var state     = false;
            var stopwatch = new Stopwatch();

            stopwatch.Start();
            do
            {
                if (stopwatch.ElapsedMilliseconds > timeoutSec * 1000)
                {
                    _mc.Stop(MotorConveyor);
                    throw new Exception("Conveyor In timeout V laod tray station.");
                }
                state = GetInsideOpticalSensor();
            } while (state == false);

            _mc.Stop(MotorConveyor);
        }