What does the controller do with a CNC program ?
Ever wondered what actually happens to the various commands in a CNC program when it is run ? How do various parts of the machine move in response to the commands ?
This diagram shows what happens to the various commands. The controller is the ‘chief brain’ of the machine, and it has a group of ‘assistant brains’, the PLC and drives. The chief and assistant brains have computers, digital logic, and decision making ability. Their job is to drive a bunch of devices like spindle and axes motors, coolant motor, stack lights, etc. These devices are dumb – have no logic, and no decision making ability.
The controller reads a line of the NC program and interprets it, then routes various commands in the program to appropriate assistant brains. The assistant brains in turn control the various devices like the spindle and axes motors, coolant pump, etc. They get feedback from sensors (like encoders and limit switches) on the devices and ensure that the original command from the controller is executed properly.
Some examples
For an X axis motion command (e.g., G01 X50. F200.), the controller sends the distance and velocity commands to the X axis drive. The drive in turn moves the X axis motor by the desired distance at the commanded feed rate.
If there is a spindle ON command, the controller sends the command and spindle speed to the spindle drive. The spindle drive starts the spindle at the commanded spindle speed.
If there is a coolant OFF command, the controller informs the PLC which in turn switches off the coolant motor. If there is a tool change command, it informs the PLC which starts a sequence of actions of various devices that are needed to change the tool.
Text and pics. source: CADEM NCyclopedia multimedia CNC training software.