Exemplo n.º 1
0
        public MMultiAxes_YMC(CObjectInfo objInfo, CMutliAxesYMCRefComp refComp, CMultiAxesYMCData data)
            : base(objInfo)
        {
            m_RefComp = refComp;
            SetData(data);

            for (int i = 0; i < DEF_MAX_COORDINATE; i++)
            {
                ServoStatus[i] = new CServoStatus();
            }
        }
Exemplo n.º 2
0
        public int GetData(out CMultiAxesYMCData target)
        {
            target = ObjectExtensions.Copy(m_Data);

            return(SUCCESS);
        }
Exemplo n.º 3
0
        public int SetData(CMultiAxesYMCData source)
        {
            m_Data = ObjectExtensions.Copy(source);

            return(SUCCESS);
        }
Exemplo n.º 4
0
        int CreateMultiAxes_YMC()
        {
            CObjectInfo          objInfo;
            CMutliAxesYMCRefComp refComp = new CMutliAxesYMCRefComp();
            CMultiAxesYMCData    data;
            int deviceNo;

            int[] axisList  = new int[DEF_MAX_COORDINATE];
            int[] initArray = new int[DEF_MAX_COORDINATE];
            for (int i = 0; i < DEF_MAX_COORDINATE; i++)
            {
                initArray[i] = DEF_AXIS_NONE_ID;
            }

            refComp.Motion = m_YMC;

            // Loader
            deviceNo = (int)EYMC_Device.LOADER;
            Array.Copy(initArray, axisList, initArray.Length);
            axisList[DEF_Z] = (int)EYMC_Axis.LOADER_Z;
            data            = new CMultiAxesYMCData(deviceNo, axisList);

            m_SystemInfo.GetObjectInfo(251, out objInfo);
            m_AxLoader = new MMultiAxes_YMC(objInfo, refComp, data);

            // PushPull
            deviceNo = (int)EYMC_Device.PUSHPULL;
            Array.Copy(initArray, axisList, initArray.Length);
            axisList[DEF_Y] = (int)EYMC_Axis.PUSHPULL_Y;
            data            = new CMultiAxesYMCData(deviceNo, axisList);

            m_SystemInfo.GetObjectInfo(252, out objInfo);
            m_AxPushPull = new MMultiAxes_YMC(objInfo, refComp, data);

            // C1_CENTERING
            deviceNo = (int)EYMC_Device.C1_CENTERING;
            Array.Copy(initArray, axisList, initArray.Length);
            axisList[DEF_T] = (int)EYMC_Axis.C1_CENTERING_T;
            data            = new CMultiAxesYMCData(deviceNo, axisList);

            m_SystemInfo.GetObjectInfo(253, out objInfo);
            m_AxCentering1 = new MMultiAxes_YMC(objInfo, refComp, data);

            // C1_ROTATE
            deviceNo = (int)EYMC_Device.C1_ROTATE;
            Array.Copy(initArray, axisList, initArray.Length);
            axisList[DEF_T] = (int)EYMC_Axis.C1_CHUCK_ROTATE_T;
            data            = new CMultiAxesYMCData(deviceNo, axisList);

            m_SystemInfo.GetObjectInfo(254, out objInfo);
            m_AxRotate1 = new MMultiAxes_YMC(objInfo, refComp, data);

            // C1_CLEAN_NOZZLE
            deviceNo = (int)EYMC_Device.C1_CLEAN_NOZZLE;
            Array.Copy(initArray, axisList, initArray.Length);
            axisList[DEF_T] = (int)EYMC_Axis.C1_CLEAN_NOZZLE_T;
            data            = new CMultiAxesYMCData(deviceNo, axisList);

            m_SystemInfo.GetObjectInfo(255, out objInfo);
            m_AxCleanNozzle1 = new MMultiAxes_YMC(objInfo, refComp, data);

            // C1_COAT_NOZZLE
            deviceNo = (int)EYMC_Device.C1_COAT_NOZZLE;
            Array.Copy(initArray, axisList, initArray.Length);
            axisList[DEF_T] = (int)EYMC_Axis.C1_COAT_NOZZLE_T;
            data            = new CMultiAxesYMCData(deviceNo, axisList);

            m_SystemInfo.GetObjectInfo(256, out objInfo);
            m_AxCoatNozzle1 = new MMultiAxes_YMC(objInfo, refComp, data);

            // C2_CENTERING
            deviceNo = (int)EYMC_Device.C2_CENTERING;
            Array.Copy(initArray, axisList, initArray.Length);
            axisList[DEF_T] = (int)EYMC_Axis.C2_CENTERING_T;
            data            = new CMultiAxesYMCData(deviceNo, axisList);

            m_SystemInfo.GetObjectInfo(257, out objInfo);
            m_AxCentering2 = new MMultiAxes_YMC(objInfo, refComp, data);

            // C2_ROTATE
            deviceNo = (int)EYMC_Device.C2_ROTATE;
            Array.Copy(initArray, axisList, initArray.Length);
            axisList[DEF_T] = (int)EYMC_Axis.C2_CHUCK_ROTATE_T;
            data            = new CMultiAxesYMCData(deviceNo, axisList);

            m_SystemInfo.GetObjectInfo(258, out objInfo);
            m_AxRotate2 = new MMultiAxes_YMC(objInfo, refComp, data);

            // C2_CLEAN_NOZZLE
            deviceNo = (int)EYMC_Device.C2_CLEAN_NOZZLE;
            Array.Copy(initArray, axisList, initArray.Length);
            axisList[DEF_T] = (int)EYMC_Axis.C2_CLEAN_NOZZLE_T;
            data            = new CMultiAxesYMCData(deviceNo, axisList);

            m_SystemInfo.GetObjectInfo(259, out objInfo);
            m_AxCleanNozzle2 = new MMultiAxes_YMC(objInfo, refComp, data);

            // C2_COAT_NOZZLE
            deviceNo = (int)EYMC_Device.C2_COAT_NOZZLE;
            Array.Copy(initArray, axisList, initArray.Length);
            axisList[DEF_T] = (int)EYMC_Axis.C2_COAT_NOZZLE_T;
            data            = new CMultiAxesYMCData(deviceNo, axisList);

            m_SystemInfo.GetObjectInfo(260, out objInfo);
            m_AxCoatNozzle2 = new MMultiAxes_YMC(objInfo, refComp, data);

            // UHANDLER
            deviceNo = (int)EYMC_Device.UHANDLER;
            Array.Copy(initArray, axisList, initArray.Length);
            axisList[DEF_X] = (int)EYMC_Axis.UHANDLER_X;
            axisList[DEF_Z] = (int)EYMC_Axis.UHANDLER_Z;
            data            = new CMultiAxesYMCData(deviceNo, axisList);

            m_SystemInfo.GetObjectInfo(261, out objInfo);
            m_AxUpperHandler = new MMultiAxes_YMC(objInfo, refComp, data);

            // LHANDLER
            deviceNo = (int)EYMC_Device.LHANDLER;
            Array.Copy(initArray, axisList, initArray.Length);
            axisList[DEF_X] = (int)EYMC_Axis.LHANDLER_X;
            axisList[DEF_Z] = (int)EYMC_Axis.LHANDLER_Z;
            data            = new CMultiAxesYMCData(deviceNo, axisList);

            m_SystemInfo.GetObjectInfo(262, out objInfo);
            m_AxLowerHandler = new MMultiAxes_YMC(objInfo, refComp, data);

            // CAMERA1
            deviceNo = (int)EYMC_Device.CAMERA1;
            Array.Copy(initArray, axisList, initArray.Length);
            axisList[DEF_Z] = (int)EYMC_Axis.CAMERA1_Z;
            data            = new CMultiAxesYMCData(deviceNo, axisList);

            m_SystemInfo.GetObjectInfo(263, out objInfo);
            m_AxCamera1 = new MMultiAxes_YMC(objInfo, refComp, data);

            // LASER1
            deviceNo = (int)EYMC_Device.LASER1;
            Array.Copy(initArray, axisList, initArray.Length);
            axisList[DEF_Z] = (int)EYMC_Axis.LASER1_Z;
            data            = new CMultiAxesYMCData(deviceNo, axisList);

            m_SystemInfo.GetObjectInfo(264, out objInfo);
            m_AxLaser1 = new MMultiAxes_YMC(objInfo, refComp, data);

            return(SUCCESS);
        }