Abstract
A ring magnetic encoder includes a ring magnetic object and a ring code configured on the outside of the ring magnetic object. The ring magnetic object is divided into a first ring part and a second ring part. The ring code further includes a plurality of sector IDs, upper offset codes and lower offset codes. The sector IDs are configured on the outside of the ring magnetic object in fixed intervals. The upper offset codes and the lower offset codes are configured in the intervals respectively. The upper offset codes are configured on the first ring part, and the lower offset codes are configured on the second ring part. According to the upper offset codes and the lower offset codes, the offset of the rotary shaft during rotating can be detected for precisely positioning.