Driving pinion 1 rotates about fixed axis A-A and meshes with gears 2 and 3 which rotate about fixed axis B-B and have slightly different numbers of teeth. Rigidly attached to gears 2 and 3 are cylinder cams 4 and 5. Bar 7 is reciprocated in fixed guides C-C by cam 5 along whose groove a-a roller 6 of the bar rolls and slides. Gears 2 and 3, together with cams 4 and 5, rotate freely on shaft 10, being confined between stopper rings 9. Roller 8 rotates about an axis rigidly attached to the base and rolls and slides along groove b-b of cam 4. Shaft 10 can reciprocate axially with gears 2 and 3 and cams 4 and 5. Owing to the different number of teeth on gears 2 and 3, the relative positions of cams 4 and 5 continually vary and the stroke of bar 7 increases when shaft 10 and bar 7 move in the same direction and decreases when they move in opposite directions.