Understanding and Writing G & M Code for CNC Machines