A method for determining a switching position of a directly controlled hydraulic valve, the hydraulic valve comprising a valve element and a solenoid with an armature and a coil, the armature being coupled to the valve element for joint movement between different switching positions, the method being carried out by a control unit associated with the hydraulic valve and comprising:
- impressing a coil current in the coil of the solenoid, wherein the coil current is composed of an actuating current and a measuring current profile superimposed on the actuating current;
- recording of the impressed coil current over time as a current profile;
- determining a compensation characteristic value of the hydraulic valve on a basis of the current profile;
- determining a position characteristic value of the hydraulic valve based on the current profile;
- and
- calculating the switching position of the hydraulic valve on a basis of the compensation characteristic value and the position characteristic value.