This paper designes the structure and control system of the machining unit of cylinder cap in cylinder production line according to its demands for machining unit.The structure control systems includes the dividing plate which have four work station,pneumatic system,machining working process.The electrical control system used PLC control, introduces the hardware and the software design of the system in detail.The machining unit have high accuracy of positioning and good expansion.