a schematic block diagram showing the nc system and a control system for the cylinder device cyl and its hydraulic circuit hyd in fig2 the cylinder device cyl is provided with a piston 7b and a ram 7c movable in the vertical z axis direction is connected to this piston 7b further the reference symbol cl denotes a workpiece clamp device p denotes a punch and d denotes a die respectively on the lower surface of the cylinder housing 7a there is mounted an encoder 25 having a roller brought into contact with the ram 7c to detect the movement of the ram 7c as a pulse signal ps the hydraulic circuit hyd is composed of a hydraulic pump op and a servovalve 27 connected between an upper chamber and a lower chamber of the cylinder housing 7a via two hydraulic lines ol 1 and ol 2 a pressure detector 29 is provided for the hydraulic line ol 1 to detect hydraulic pressure in the line as an electric signal the nc system nc is composed of an nc data input unit 31 a main controller 33 in x y axis commander 35 a z axis commander 37 a position detector 39 and a servovalve controller 41 the nc data input 31 is connected to the cad cam coa via off line or on line to receive various nc data for controlling the.