示例#1
0
        public void TimerEvent(object source, System.Timers.ElapsedEventArgs e)
        {
            if (SlewStatue == 1)
            {
                MyFocuser.SlewOut();
            }
            else if (SlewStatue == 2)
            {
                MyFocuser.SlewIn();
            }
            MyFocuser.GetPosition();
            //if (MyFocuser.IsMoving)
            MyFocuser.GetMovState();
            if (i >= 17)
            {
                MyFocuser.GetTemperature();
                MyFocuser.GetSpeed();
                i = 0;
            }
            else
            {
                i++;
            }
            TimerFunc func = new TimerFunc(UpdateStatus);

            this.Invoke(func, new Object[] { });
        }
示例#2
0
        public void TimerEvent(object source, System.Timers.ElapsedEventArgs e)
        {
            if (SlewStatue == 1)
            {
                MyFocuser.SlewOut();
            }
            else if (SlewStatue == 2)
            {
                MyFocuser.SlewIn();
            }
            TimerFunc func = new TimerFunc(UpdateStatus);

            this.Invoke(func, new Object[] { });
        }
示例#3
0
        public void TimerEvent(object source, System.Timers.ElapsedEventArgs e)
        {
            if (SlewStatue == 1)
            {
                MyFocuser.SlewOut();
            }
            else if (SlewStatue == 2)
            {
                MyFocuser.SlewIn();
            }
            //查询时间
            //GetPosition-0.5S,GetMovState-1S,GetSpeed-5S,GetReverse()-10S,GetMicrostep-10S,GetTemperature()-10S,GetPowerState-10S
            MyFocuser.GetPosition();
            switch (i)
            {
            case 0:
                MyFocuser.GetSpeed();
                MyFocuser.GetReverse();
                break;

            case 1:
                MyFocuser.GetMovState();
                break;

            case 3:
                MyFocuser.GetMovState();
                break;

            case 5:
                MyFocuser.GetMovState();
                MyFocuser.GetTemperature();
                break;

            case 7:
                MyFocuser.GetMovState();
                break;

            case 9:
                MyFocuser.GetMovState();
                break;

            case 10:
                MyFocuser.GetSpeed();
                MyFocuser.GetMicrostep();
                break;

            case 11:
                MyFocuser.GetMovState();
                break;

            case 13:
                MyFocuser.GetMovState();
                break;

            case 15:
                MyFocuser.GetMovState();
                MyFocuser.GetPowerWaste();
                break;

            case 17:
                MyFocuser.GetMovState();
                break;

            case 19:
                MyFocuser.GetMovState();
                break;
            }
            if (i >= 20)
            {
                i = 0;
            }
            else
            {
                i++;
            }
            TimerFunc func = new TimerFunc(UpdateStatus);

            this.Invoke(func, new Object[] { });
        }