CNC Machine designed for machining: fences (frames, galces, jambs, swing) speed flexible production capacity and reliability are the characteristics of this machine, the machine cuts the two ends of the fences and the header and optionally makes lower slot for staples in the 3 elements, while machining the housings of the hinges and locking hinges. The machine has: Automatic and programmable positioning of the beds Automatic positioning of the saws in function of the long to cut. Optionally the machine can be supplied with punt head for the predrilled of the screws from the hinges and locks. Lower grooving groups with automatic positioning for the subsequent placement of the union staples. Automatic extraction system of the finished pieces. Automatic feeding system. Number of cuts per stick for the headboard. Parameterized programming system in graphical environment. Program loading through bar-code reader. Job execution listings with automated programs loading and unloading. Telecare and breakdowns diagnostic via Internet.