CNC Example 5: Creating CNC from a File

 

Refer to the CNC_File.project sample project in the installation directory of CODESYS.

With this sample project, you can understand how a G code program is read from an ASCII file that is stored on the PLC. Using this kind of file makes sense when the G code program is very large.

The function of the project is similar to the CNCOnline.project sample project. However, the G code program is read from an ASCII file. No variables are used and the processing order is comparable to the one in the CNC_Online.project sample project.

The following differences can be ascertained:

  1. Additional virtual drive (z-axis)

  2. Function block smoothpath not required

  3. G code read from file

  4. Preprocessing online (see CNC-Online.project)