The turret should be all hydraulic. So, a piston pushes the shaft out and pulls it in to unclamp and clamp the turret. Then a hydraulic indexing motor rotates the shaft to index the turret. The indexing motor has a shot pin to stop it at the same place each time. The motor is typically geared or belted to the turret shaft at a ratio equal to the number of tool stations. So, if you have a 10 station turret, the motor is geared 1:10. That way each time the indexing motor makes one revolution and hits the internal shot pin, it has moved the turret one tool station.
There should be two solenoid valves and two flow control valves for the turret. There may also be some sequencing valves and other things. Try to find them. They may be on the turret or on the back of the machine near the hydraulic pump.
You should be able to manually actuate the solenoid valves by pushing on the ends of the spool. The solenoid will have a metal or plastic cap on the ends. If you push in the very center with a pen or small punch, you can manually move the spool in the solenoid and manually actuate the hydraulics.
Your machine is pushing the turret out OK, but not letting it come back. There could be an issue with the flow control, the solenoid, or the actual piston and shaft that are moving. I would manually actuate the solenoid and see if it works differently than when the control actuates it automatically.
The control is waiting for the piston to pull in and make the switch. If it does not happen in the time limit set in the ladder, the machine will alarm out.