public bool IsMoveDone(short sAxis)
 {
     lock (lockObj)
     {
         return(Dmc1000.d1000_check_done(sAxis) == 0 ? false : true);
     }
 }
        public void GetAllMotionStatus()
        {
            lock (lockObj)
            {
                for (ushort iAxis = 0; iAxis < 4; iAxis++)
                {
                    int iCurrent = 0;
                    try
                    {
                        _dArrayTargetPos[iAxis] = Dmc1000.d1000_get_command_pos(iAxis);
                        _dArrayCurrPos[iAxis]   = Dmc1000.d1000_get_command_pos(iAxis);
                        _bArrayIsMoving[iAxis]  = Dmc1000.d1000_check_done(iAxis) == 0 ? true : false;

                        iCurrent = Dmc1000.d1000_get_axis_status(iAxis);
                    }
                    catch
                    {
                    }
                    if ((iCurrent & 0x4) == 0)
                    {
                        _bArrayHomeSta[iAxis] = false;
                    }
                    else
                    {
                        _bArrayHomeSta[iAxis] = true;
                    }

                    //if ((uiCurrent & 0x1) == 0)
                    //{
                    //    _bArrayAlarmSta[iAxis] = false;
                    //}
                    //else
                    //{
                    //    _bArrayAlarmSta[iAxis] = true;
                    //}
                    //if ((uiCurrent & 0x2) == 0)
                    //{
                    //    _bArrayCWLLimitSta[iAxis] = false;
                    //}
                    //else
                    //{
                    //    _bArrayCWLLimitSta[iAxis] = true;
                    //}
                    //if ((uiCurrent & 0x4) == 0)
                    //{
                    //    _bArrayCCWLLimitSta[iAxis] = false;
                    //}
                    //else
                    //{
                    //    _bArrayCCWLLimitSta[iAxis] = true;
                    //}
                    //if ((uiCurrent & 0x10) == 0)
                    //{
                    //    _bArrayHomeSta[iAxis] = false;
                    //}
                    //else
                    //{
                    //    _bArrayHomeSta[iAxis] = true;
                    //}
                }
            }
        }