To provide a control device capable of easily controlling an engine and a pump even when combination of the engine and pump is various in a construction machine.
A rack of a fuel injection pump is displaced and an engine speed is increased and/or decreased. Necessary torque of a hydraulic pump is adjusted by the variation of the engine speed. A means for detecting the engine speed and a means for detecting a rack position are provided in order to calculate a target rack position from the engine speed. Target toque of the hydraulic pump is calculated by a difference between the actually detected rack position and the target rack position. A restriction is added so that a torque command value of the hydraulic pump does not exceed torque +ΔT of the engine. Thus, a torque command signal of the hydraulic pump is outputted.