A CNC program is a step-by-step control of a tool, or tool-handler, to accomplish a particular task.
A CNC program usually, if not always, contains all of the steps necessary to accomplish the task.
A CNC program is always sequential. The code will not proceed from one step to the next until the previous step is completed. In a PLC, the code will constantly check all steps (rungs) to see if the necessary conditions have occurred before proceeding.
In general, a CNC program is a "One-Step-At-A-Time" sequence.
In general, a PLC program looks at all conditions, all of the time, to determine what to do next.
A CNC program is much easier to develop than a PLC Program.
A CNC Program is...
Do this...
Then this...
Then this...
Then this...
etc.
However, the better CNC Programming tools allow for fault handling, which includes over-travel, motor-fault, and etc.