The invention relates to a buffer with a prolongable service life and suitable for attracting a sliding block in the
impact process. The buffer comprises cylinder bodies and cylinder covers sealing openings. Central through holes are formed in the central axis positions of the cylinder covers;
piston rods penetrate through the central through holes,
piston body assemblies are arranged at the top ends of the
piston rods, and the
tail ends of the piston rods are connected to the left side end of an outer
barrel; during buffering work, the right end face of the corresponding cylinder body serves as the contact face colliding with the sliding block;
electromagnetic coil are wound in the side walls of the cylinder bodies, and a
pressure sensor for detecting
medium pressure is arranged on the right end face of the corresponding piston body
assembly and connected with a processor module; when the sliding block impacts the right end face of the corresponding cylinder, the processor module is applied to control a current driving module to output current matched with a
medium pressure value according to the
medium pressure value, so that the electromagnetic coils generate a corresponding
magnetic field to attract the sliding block. The current driving module is controlled to
cut off the output current till the medium pressure value detected by the processor module is an equilibrium value, and the sliding block is released.