
You “call” that code, it does its thing, and then it “returns” to your main program to continue executing right after the call. Think of each as a way to access code sequestered in its own little mini-program. The G-Code language provides two different methods for doing this: subprogram calls and macro calls. To make g-code convenient for re-use, we need some way of centralizing it and then accessing it from the part program. First thing that happens is you need to change the code, perhaps to fix a bug, but you have copies of it scattered everywhere. You could try copying and pasting your code everywhere to reuse it, but that’s a mess. In the article on Parameterized Programming, we learned how to modify g-code so it can be used in many different situations through the use of variables. The ‘hands-on’ approach we took with our puzzle-based SMOOTH simulator resonated well with visitors, and we certainly found it a thoroughly rewarding day.M98 & M99 G-Code: CNC Subprograms & Macro Calls CNCCookbook’s G-Code Tutorial Subprograms and Macro Calls for Code Building Blocks Moreover, as the first generation of digital natives, today’s pupils will be very well placed to help the manufacturing industry adopt and adapt the ever-converging spheres of connectivity and production. “While we have a highly successful apprenticeship programme at our manufacturing plant in Worcester that spans production, service and business support, fostering an interest among pupils at an early age is one way of future-proofing the industry against an ageing workforce. The Mazak stand also featured a video simulation of a variety of machined parts from everyday items that could be made using a Mazak machine tool, to emphasise the wide-ranging impact manufacturing has on daily life.Īlan Mucklow, Managing Director UK & Ireland Sales Division at Yamazaki Mazak, said: “Given the well-documented skills shortage facing the manufacturing industry, it is vital that we proactively engage with students from a young age, to familiarise them with the wonderful – and at times, limitless – opportunities a career in manufacturing can deliver.

Furthermore, participants could speak directly with a Mazak engineer based at the company’s European headquarters in Worcester to help them solve the puzzle, demonstrating the concept of connected manufacturing to the watching audience.


To encourage active engagement with the young audience, Mazak offered students the opportunity to solve an interactive puzzle on the CNC while wearing visual-assisted glasses and earpieces. Inspiring the next generation: Mazak challenged visitors to the GUTS event with an innovative CNC puzzle / Picture: Mazak
