An agricultural machine comprises a frame, at least one operating unitconnected to theframe, at least one wheel or crawler track rotatably attached to the frame toallow the movementof the machine on a supporting surface and a lifting unit operativelyinterposed between theframe and the wheel or between the frame and the operating unit, configured tovary the heightof the operating unit with respect to the supporting surface of the machine.The lifting unitcomprises at least one hydraulic cylinder provided with a liner, a first and asecond piston bothslidingly housed inside the liner and arranged in series to define at least afirst and a secondchamber inside the liner, wherein the first and the second piston can becontrolled independentlyof each other.