The utility model discloses a sensor fixing structure comprising a mounting rack used for mounting a sensor; the first support comprises a first fixing block and a magnetic attraction piece, the magnetic attraction piece is arranged on the first fixing block, and the magnetic attraction piece is used for fixing the first fixing block to the mounting surface of the
machine tool in a magnetic attraction mode; the second support comprises a second fixing block and a fastening ring, the fastening ring is connected to the second fixing block, and the fastening ring is used for wrapping and clamping a shaft body of the
machine tool; the mounting frame can be detachably connected to the first fixing block and the second fixing block alternatively. Therefore, according to different mounting spaces and fixing
modes, the first support or the second support can be selected for quick-change mounting of the mounting frame, so that the sensor is firmly fixed to a
machine tool and is not affected by vibration of the
machine tool or
impact of
cutting oil, the operation difficulty is low, the sensor fixing structure can be repeatedly used, and quick-change use can be performed in different mounting spaces. And when moving is needed, the position is determined again for fixing, the structure is simple, the function is easy to realize, and the production cost is low.