A method for operating a machine , the machine comprising moveable axes (42a-42n) and an apparatus for emitting an energy beam, the method comprising: - providing a computing device or system ; - providing , by the computing device or system , a program for operating the axes (42a-42n) of the machine based on a Computer-Aided Design, CAD, file, the program comprising a plurality of controller instructions (150a-150n) for operating the axes (42a-42n); and - providing the program to a controller of the machine ; the method being characterized in that it further comprises: - adding, by the computing device or system , a plurality of apparatus instructions (160a-160m) to the program , each apparatus instruction (160a-160m) indicating an energy beam radiation configuration of a plurality of energy beam radiation configurations for the apparatus ; and - each time the controller runs a line of the program that has an apparatus instruction (160a-160m), the computing device or system operates the apparatus according to the apparatus instruction (160a-160m); wherein each apparatus instruction (160a-160m) added to the program is a comment (161a-161m) for the controller ; and wherein each configuration of the plurality of configurations comprises a scanning pattern, one or more scanning speeds, and one or more of: a size of the spot of the energy beam, a power of the energy beam, and a power distribution within the energy beam. - providing a computing device or system ; - providing , by the computing device or system , a program for operating the axes (42a-42n) of the machine based on a Computer-Aided Design, CAD, file, the program comprising a plurality of controller instructions (150a-150n) for operating the axes (42a-42n); and - providing the program to a controller of the machine ; the method being characterized in that it further comprises: - adding, by the computing device or system , a plurality of apparatus instructions (160a-160m) to the program , each apparatus instruction (160a-160m) indicating an energy beam radiation configuration of a plurality of energy beam radiation configurations for the apparatus ; and - each time the controller runs a line of the program that has an apparatus instruction (160a-160m), the computing device or system operates the apparatus according to the apparatus instruction (160a-160m); - adding, by the computing device or system , a plurality of apparatus instructions (160a-160m) to the program , each apparatus instruction (160a-160m) indicating an energy beam radiation configuration of a plurality of energy beam radiation configurations for the apparatus ; and - each time the controller runs a line of the program that has an apparatus instruction (160a-160m), the computing device or system operates the apparatus according to the apparatus instruction (160a-160m); wherein each apparatus instruction (160a-160m) added to the program is a comment (161a-161m) for the controller ; and wherein each configuration of the plurality of configurations comprises a scanning pattern, one or more scanning speeds, and one or more of: a size of the spot of the energy beam, a power of the energy beam, and a power distribution within the energy beam. <EOS>