Exemplo n.º 1
0
        public static short singleAxisMove(ref AxisInfo axisInfo, long pos, ushort positionMode)
        {
            short m = 0;

            if (axisInfo.m_run_status == RUN)
            {
                return(-1);
            }
            RFIDControl.dmc_set_pulse_outmode(axisInfo.m_card_num, axisInfo.m_axis_num, axisInfo.m_pulse_mode);

            RFIDControl.dmc_set_profile(axisInfo.m_card_num, axisInfo.m_axis_num, axisInfo.m_speed_min, axisInfo.m_speed_max, axisInfo.m_acc_time, axisInfo.m_dcc_time, 100);
            //设定S段时间
            RFIDControl.dmc_set_s_profile(axisInfo.m_card_num, axisInfo.m_axis_num, 0, 0.4);
            m = RFIDControl.dmc_pmove(axisInfo.m_card_num, axisInfo.m_axis_num, pos, positionMode);

            checkDmcMessage(m);
            axisInfo.m_run_status = RUN;
            return(m);
        }