PLC hydraulic control