An agricultural machine including a frame, at least one operating unit connected to the frame, at least one wheel or crawler track rotatably attached to the frame to allow the movement of the machine on a supporting surface and a lifting unit operatively interposed between the frame and the wheel or between the frame and the operating unit, configured to vary the height of the operating unit with respect to the supporting surface of the machine. The lifting unit includes at least one hydraulic cylinder provided with a liner, a first and a second piston both slidingly housed inside the liner and arranged in series to define at least a first and a second chamber inside the liner, wherein the first and the second piston can be controlled independently of each other.