Exemple #1
0
        public bool IsMoveDone(short Axis)
        {
            bool bResult;

            if (bAxisMoving[Axis])
            {
                bResult = false;
            }
            else
            {
                lock (lockObj)
                {
                    dTargetPos[Axis] = LTDMC.dmc_get_target_position(usCardNo, (ushort)Axis);
                }
                if (dCurrentPos[Axis] == dTargetPos[Axis] && (!bAlarm[Axis]) && (!bAxisMoving[Axis]))
                {
                    bResult = true;
                }
                else
                {
                    bResult = false;
                }
            }
            return(bResult);
        }
Exemple #2
0
        public void GetAllMotionStatus()
        {
            lock (lockObj)
            {
                for (ushort iAxis = 0; iAxis < 8; iAxis++)
                {
                    uint uiCurrent = 0;
                    try
                    {
                        dTargetPos[iAxis]  = LTDMC.dmc_get_target_position(usCardNo, iAxis);
                        dCurrentPos[iAxis] = LTDMC.dmc_get_position(usCardNo, iAxis);

                        if (LTDMC.dmc_check_done(usCardNo, iAxis) == 1)
                        {
                            bAxisMoving[iAxis] = false;
                        }
                        else
                        {
                            bAxisMoving[iAxis] = true;
                        }
                        uiCurrent = LTDMC.dmc_axis_io_status(usCardNo, iAxis);
                    }
                    catch
                    {
                    }

                    if ((uiCurrent & 0x1) == 0)
                    {
                        bAlarm[iAxis] = false;
                    }
                    else
                    {
                        bAlarm[iAxis] = true;
                    }
                    if ((uiCurrent & 0x2) == 0)
                    {
                        bCWL[iAxis] = false;
                    }
                    else
                    {
                        bCWL[iAxis] = true;
                    }
                    if ((uiCurrent & 0x4) == 0)
                    {
                        bCCWL[iAxis] = false;
                    }
                    else
                    {
                        bCCWL[iAxis] = true;
                    }
                    if ((uiCurrent & 0x10) == 0)
                    {
                        bHome[iAxis] = false;
                    }
                    else
                    {
                        bHome[iAxis] = true;
                    }
                }
            }
        }