Conveying system for a machine with a production path, which is provided with an upstream take-up station (A, B, C) in which individual bags are produced from a weldable film or to which individual ready-prepared bags are conveyed, and with openings of the bags aligned directed upwards, a filling station downstream of this in which contents are filled into the open bags through the openings of the bags which are open upwards, and a sealing station downstream of this, in which the open openings of the bags are sealed, comprising: an endless rail with a working section which extends along the path, and a return section which extends from a downstream end of the working section to an upstream end of the working section; a plurality of carriages, each of which carries at least one permanent magnet and a clamp (27, 29), wherein the carriages travel on the rail for movement through the stations on the working section and for movement from the downstream end of the working section along the return section back to the upstream end of the working section; an electromagnet array on the rail; and an electronic control device which is connected to the electromagnets in order to propel the carriages downstream through the working section, while the travel speeds of at least half of the carriages are varied in the working section, in order in this way to fold and unfold bags which are held in the clamps (27, 29) of the carriages, wherein the electromagnet array is arranged only along the working section, wherein a mechanical or frequency-controlled conveying device is provided for propelling the carriages along the return section from the downstream end of the path to the upstream end of the path at a generally constant speed, and wherein the simple conveying device propels the carriages along the return section at a higher average speed than the average speed with which the carriages are moved by the control device on the working section. an endless rail with a working section which extends along the path, and a return section which extends from a downstream end of the working section to an upstream end of the working section; a plurality of carriages, each of which carries at least one permanent magnet and a clamp (27, 29), wherein the carriages travel on the rail for movement through the stations on the working section and for movement from the downstream end of the working section along the return section back to the upstream end of the working section; an electromagnet array on the rail; and an electronic control device which is connected to the electromagnets in order to propel the carriages downstream through the working section, while the travel speeds of at least half of the carriages are varied in the working section, in order in this way to fold and unfold bags which are held in the clamps (27, 29) of the carriages, wherein the electromagnet array is arranged only along the working section, wherein a mechanical or frequency-controlled conveying device is provided for propelling the carriages along the return section from the downstream end of the path to the upstream end of the path at a generally constant speed, and wherein the simple conveying device propels the carriages along the return section at a higher average speed than the average speed with which the carriages are moved by the control device on the working section.