fig1 shows a longitudinal section through a locking device 1 for a blowout preventer 3 ( bop ), which is known from u . s . pat . no . 7 , 300 , 033 b1 . the bop components shown are essentially only a respective slide 48 , which is adapted to be displaced to the right in fig1 by means of an operating element 2 . the operating element 2 is connected to a hydraulic piston 4 . this hydraulic piston 4 is arranged at its open position . the hydraulic piston 4 is provided with a longitudinal bore having arranged therein a lock sleeve 5 and a lock rod 6 . the lock rod 6 is rotatable , but supported such that it is not longitudinally displaceable . when the lock rod 6 is rotated , the lock sleeve 5 can be displaced in an axial direction 46 through adequately engaged female and male threads . when , through pressure applied via the inlet bore 49 , the hydraulic piston 4 is displaced to the right in fig1 , the lock sleeve 5 can be caused to follow up the hydraulic piston by rotating the lock rod 6 until the lock sleeve 5 comes into contact with the hydraulic piston 4 and fixes it at the position in question . in the course of this process , hydraulic fluid is discharged through a respective bore 50 or supplied therethrough so as to return the hydraulic piston to the open position . furthermore , a chamber is provided , cf . reference numeral 45 , through which dead centre fluid can be supplied and discharged , cf . also bore 51 . fig2 shows a longitudinal section , analogously to fig1 , through a locking device 1 according to the present invention . the structural design of the bop is substantially analogous to that according to fig1 . in order to simplify matters , the respective bop parts have been omitted in fig2 . the hydraulic piston 4 is supported in an operating element housing 16 such that it is displaceable in the axial direction 46 . the hydraulic piston 4 separates a plurality of chambers from one another in the interior of the operating element housing 16 . a first chamber defines a pressure chamber 43 , which is acted upon by hydraulic fluid so as to displace the hydraulic piston to the closed position , cf . also fig1 . this applies analogously to the other chambers , which define pressure chambers 44 and 45 . the pressure chamber 44 has supplied thereto hydraulic fluid for displacing the hydraulic piston to the open position , and the pressure chamber 45 has supplied thereto dead centre fluid . for sealing the hydraulic piston in the interior of the operating element housing 16 , various sealing elements 32 , 33 and 34 are provided . the hydraulic piston is additionally sealed relative to the outer surface 26 of a sliding sleeve 25 via a sealing element 35 . this sliding sleeve 25 defines a part of the locking device 1 according to the present invention and is arranged in a respective internal or longitudinal bore of the hydraulic piston 4 . one end of said sliding sleeve 25 is releasably secured to an end portion of the operating element housing 16 by means of a plurality of screws 37 . in this area , the sliding sleeve is provided with a shoulder 31 which projects radially inwards into a respective longitudinal bore 47 of the sliding sleeve 25 . a radial steplike projection 30 of a lock rod 6 is arranged between this shoulder 31 and the operating element housing 16 . in this way , the lock rod is fixed in the axial direction 46 within the operating element housing 16 by means of the sliding sleeve 25 , the lock rod being , however , rotatably supported . the lock rod 6 extends through a bore in the operating element housing 16 up to and into the interior of a housing 15 of the locking device 1 , said housing 15 being flange - mounted on the outer surface of the operating element housing 16 . within this housing 15 the lock rod 6 is rotatably connected to an electric motor 7 via a safety clutch 17 . the electric motor 7 is implemented as a torque motor . the safety clutch decouples the rotary connection between the electric motor 7 and the lock rod 6 , if the rotational resistance should become excessively high . the lock rod 6 is provided with a longitudinal bore 10 . this longitudinal bore 10 extends over the full axial length 14 of the lock rod 6 . a position sensor 8 is disposed such that it extends through this longitudinal bore 10 . said position sensor 8 extends from a sensor head 39 up to an insertion bore 42 in the interior of the hydraulic piston 4 . the sensor head 39 is fixed to the housing 15 and defines there a fixed point 9 for the position sensor 8 . the position sensor 8 comprises a sensor rod 18 and a sensor tube 19 guided on said sensor rod 18 in a telescoping fashion . the sensor rod 18 extends essentially from the fixed point 9 or sensor head 39 up to a point close to the insertion bore 42 . the sensor tube 19 is releasably secured in position in the insertion bore 42 and partially pushed onto the sensor rod 18 . at the end 21 of the sensor tube 19 a sensor plug 22 is provided . said sensor plug 22 is used as a magnet carrier and is adapted to an inner diameter of the longitudinal bore 10 of the lock rod 6 . fastening in the insertion bore 42 is effected via a respective piston end 20 of the sensor tube 19 . for closing the longitudinal bore 10 of the lock rod 6 within the housing 15 , a respective end 23 of a screw - in plug 24 is screwed in position . this screw - in plug 24 is provided with sealing elements 41 which seal the sensor rod 18 that extends through the screw - in plug 24 . a relative movement between the sensor rod 18 and the screw - in plug 24 does not take place , at least not in the axial direction 46 . instead , these two components only rotate relative to one another . the housing 15 is also used for arranging the electric motor 7 . this electric motor 7 is adapted to be fed with electric current from outside via a plug 40 . the plug 40 also serves to transmit respective signals of the position sensor 8 . a lock sleeve 5 is arranged between the lock rod 6 and the sliding sleeve 25 . the lock sleeve 5 has on the inner side thereof an internal trapezoidal thread 11 which is threadedly engaged with an external trapezoidal thread 12 provided on the outer surface of the lock rod 6 . when the lock rod 6 is rotated via the safety clutch 17 by means of the electric motor 7 , the lock sleeve moves to the right in fig2 in the axial direction 46 . this is supported by engagement of a guide element 27 , which projects radially inwards and which is attached to the sliding sleeve 25 . this guide element 27 engages , in the form of a feather key , a guide groove 28 , which is arranged on the outer surface of the lock sleeve 5 . due to this engagement between the guide element 27 and the guide groove 28 , the lock sleeve 5 is supported such that it cannot be rotated , but displaced in the axial direction 46 . the lock sleeve 5 has an axial length 13 corresponding essentially to the length of the sliding sleeve 25 between the shoulder 31 and its open end . when the hydraulic piston 4 has applied thereto hydraulic fluid in the pressure chamber 44 , it will be displaced to the right in fig2 in the axial direction 46 at most up to and into the closed position of the slide 48 , cf . also fig1 . when the hydraulic piston 4 is being displaced , the sensor tube 19 is entrained , cf . the fixing of the piston end 20 of the sensor tube 19 in the insertion bore 42 . due to the fact that the sensor tube 19 is entrained , the sensor plug 22 is entrained as well . the movement of said sensor plug 22 relative to the sensor rod 18 results in the generation of a signal which can be converted into a distance between the fixed point 9 and the piston end 20 . it can thus always be determined precisely where the hydraulic piston 4 is located . the distance in question can also be used for rotating , by actuating the electric motor 7 , the lock rod 6 to such an extent that the lock sleeve 5 comes into contact with an internal shoulder 51 adjacent to the insertion bore 42 of the hydraulic piston 4 . at this position of the lock sleeve 5 , the hydraulic piston 4 is fixed at the respective position even if there is a decrease in pressure in the hydraulic fluid . the thread between the lock sleeve and the lock rod is implemented such that it is self - locking . an automatic turning back of the lock sleeve 5 relative to the lock rod 6 is not possible , not even if pressure should be applied to the hydraulic piston 4 via e . g . the slide 48 or the pressure chamber 43 . if the hydraulic supply should fail , it is possible to displace , by actuating the electric motor 7 , the hydraulic piston 4 at least in the closed position by an adequate displacement of the lock sleeve 5 by means of rotating the lock rod 6 . whenever the hydraulic piston 4 is displaced in the axial direction 46 , the position of the hydraulic piston 4 is determined in real time and in a precisely reproducible manner by means of the respective distance between said hydraulic piston 4 and the fixed point 9 . it can thus always be ascertained whether the hydraulic piston 4 is arranged e . g . at the closed position or at the open position or at any other intermediate position . the distance determination in question is also used for displacing the lock sleeve 5 by means of the lock rod 6 so as to fix e . g . the hydraulic piston 4 at its closed position . fig3 shows an enlarged representation of the lock sleeve 5 . the latter has a substantially simple tubular shape with an internal trapezoidal thread 11 along at least a part of the axial length 13 of the lock sleeve 5 . in the embodiment shown , the outer surface 29 of the lock sleeve 5 , cf . also fig4 , has formed therein two diametrically opposed guide grooves 28 which may extend over substantially the whole axial length 13 . these guide grooves 28 are used , cf . also fig2 , for guiding guide elements 27 in the axial direction 46 . the combined effect of the guide element and of the guide groove prevents a rotational displacement of the lock sleeve 5 when the lock rod 6 is being rotated . fig2 additionally shows damping elements 36 which , when the hydraulic piston 4 is arranged at the closed position , are in contact with the inner surface of the operating element housing 16 , as well as screws 38 which are used for fixing the housing 15 to the outer surface of the operating element housing 16 .