Hydraulic system with a device for controlling the charge state of at least one pressure accumulator, the hydraulic system comprising - at least one pressure accumulator, - a pressure source, - a tank, - a working line which can be connected to the respective pressure accumulator for supplying pressure to a consumer and a charging and discharging circuit for optionally connecting the respective pressure accumulator to the pressure source for a charging operation or to the tank for a discharging operation, wherein the charging and discharging circuit has a pressure compensator, the control piston of which can be deflected from a central locked position into a charging position connecting the relevant pressure accumulator to the pressure source or into a discharging position connecting the pressure accumulator to the tank, wherein the piston of the pressure compensator can be acted upon on the one hand by a control pressure related to the pressure of the pressure accumulator and on the other hand by a control pressure related to the pressure of the working line, wherein the one side of the control piston of the pressure compensator is in communication with the respective pressure accumulator via a first control line and wherein the other side of the control piston can be connected via a second control line to the working line or to a connection for supplying an externally generated control pressure related to the load pressure of the working line, characterised in that the charging and discharging circuit comprises a first control valve via which the pressure source can be connected to the pressure connection of the pressure compensator and a second control valve via which the tank connection of the pressure compensator can be connected to the tank; in that a first pressure sensor, which detects the pressure of the first control line prevailing at the control piston of the pressure compensator, and a second pressure sensor, which detects the pressure of the second control line prevailing at the control piston, are provided; and in that the first and second control valve can be actuated by means of switching signals which are generated based on the pressure values detected by the first and second pressure sensor. - at least one pressure accumulator, - a pressure source, - a tank, - a working line which can be connected to the respective pressure accumulator for supplying pressure to a consumer and a charging and discharging circuit for optionally connecting the respective pressure accumulator to the pressure source for a charging operation or to the tank for a discharging operation, wherein the charging and discharging circuit has a pressure compensator, the control piston of which can be deflected from a central locked position into a charging position connecting the relevant pressure accumulator to the pressure source or into a discharging position connecting the pressure accumulator to the tank, wherein the piston of the pressure compensator can be acted upon on the one hand by a control pressure related to the pressure of the pressure accumulator and on the other hand by a control pressure related to the pressure of the working line, wherein the one side of the control piston of the pressure compensator is in communication with the respective pressure accumulator via a first control line and wherein the other side of the control piston can be connected via a second control line to the working line or to a connection for supplying an externally generated control pressure related to the load pressure of the working line, characterised in that the charging and discharging circuit comprises a first control valve via which the pressure source can be connected to the pressure connection of the pressure compensator and a second control valve via which the tank connection of the pressure compensator can be connected to the tank; in that a first pressure sensor, which detects the pressure of the first control line prevailing at the control piston of the pressure compensator, and a second pressure sensor, which detects the pressure of the second control line prevailing at the control piston, are provided; and in that the first and second control valve can be actuated by means of switching signals which are generated based on the pressure values detected by the first and second pressure sensor. the charging and discharging circuit comprises a first control valve via which the pressure source can be connected to the pressure connection of the pressure compensator and a second control valve via which the tank connection of the pressure compensator can be connected to the tank; in that a first pressure sensor, which detects the pressure of the first control line prevailing at the control piston of the pressure compensator, and a second pressure sensor, which detects the pressure of the second control line prevailing at the control piston, are provided; and in that the first and second control valve can be actuated by means of switching signals which are generated based on the pressure values detected by the first and second pressure sensor.