Disclosed is an automatic assembling machine for assembling a vehicle-mounted encoder. The automatic assembling machine comprises a rotating table assembly, a cam indexer assembly, a support feeding mechanism, a manual pendulum shaft core and shaft sleeve feeding mechanism, a first rotor feeding mechanism, a first drive plate feeding mechanism, a second rotor and second drive plate assembling mechanism, a manual pendulum body feeding mechanism, a riveting mechanism and a discharging mechanism, wherein the rotating table assembly, the cam indexer assembly, the support feeding mechanism, the manual pendulum shaft core and shaft sleeve feeding mechanism, the first rotor feeding mechanism, the first drive plate feeding mechanism, the second rotor and second drive plate assembling mechanism, the manual pendulum body feeding mechanism, the riveting mechanism and the discharging mechanism are arranged on the top of a machine box. The automatic assembling machine further comprises two shape trimming assemblies and a plurality of detection assemblies, wherein the shape trimming assemblies are used for shape trimming of supports. A plurality of station clamps are arranged on the circumferential edge of a rotating table of the rotating table assembly in an array mode. A rotating pendulum assembly is further arranged on the top of the machine box in a matched mode. The feeding mechanisms are matched with the movement of the rotating table assembly to conduct feeding in sequence, the riveting mechanism conducts riveting on parts of the encoder to form an encoder finished product, the discharging mechanism enables the encoder finished product to be discharged into a collecting box, the shape trimming assemblies conduct opening shape trimming and inward extrusion shape trimming on the supports, and the rotating pendulum assembly is used for transmitting a second rotor and second drive plate assembly assembled by the second rotor and second drive plate assembling mechanism to the matched station clamp.