public void MoveHome(int nRefSpeed) { // send command and read recv buffer EMCL.ERAETech_EMCL_SetRefSearchSpeed(m_nPort, Convert.ToByte(m_nModuleID), Convert.ToInt32(nRefSpeed)); EMCL.ERAETech_EMCL_WaitAndGetReply(m_nPort, ref m_nRetValue); // send command and read recv buffer EMCL.ERAETech_EMCL_SetRefSwitchSpeed(m_nPort, Convert.ToByte(m_nModuleID), Convert.ToInt32(nRefSpeed)); EMCL.ERAETech_EMCL_WaitAndGetReply(m_nPort, ref m_nRetValue); // send command and read recv buffer EMCL.ERAETech_EMCL_StartRefSearch(m_nPort, Convert.ToByte(m_nModuleID)); EMCL.ERAETech_EMCL_WaitAndGetReply(m_nPort, ref m_nRetValue); }