Mechanisms form the basic geometrical elements of many mechanical devices including automatic packaging machinery, typewriters, textile and printing machinery, and others. A mechanism typically is designed to create a desired motion of a rigid body relative to a reference member by the help of gears, cam systems or spatial linkages. In flow pack machines a tube of wrapper containing the products moves with a uniform velocity, while the reciprocating heads move forward and backwards sealing different products. In an existing machine, these motions are produced by a rather complex mechanism involving cams and adjustable links. The paper suggests replacing these cams by a suitable quick-return mechanism with a minimum number of adjustable links. The dimensions of this mechanism are optimized such that the motions produced are as near as possible to those obtained by the original cam mechanisms. The simplification can result in reduction in the mass of different components and existing forces in the mechanism.