a modifed version of naxes_motion_control