06 — G-Code Transfer to PLC with Python | XY Plotter

Опубликовано: 11 Сентябрь 2026
на канале: AndreasCAD
39
2

This video demonstrates how to transfer the generated G-code to the PLC using the snd_gcode_to_plc.py Python utility included with the XY Plotter project.

Preparation:

Place the generated G-code file in the same directory as snd_gcode_to_plc.py.
Make sure the PLC is online and running.
In TIA Portal, go online with the PLC and start the HMI simulation if a physical HMI is not being used.
Enable the drawing data receiving mode from the HMI.

G-code transfer:

Open Command Prompt in the directory containing snd_gcode_to_plc.py.
Run the Python program.
Wait until the complete drawing has been transferred to the PLC.
After the transfer is complete, reset the ESP32. Using the physical reset button is the fastest option.
Check the HMI and verify that the drawing points are being transferred from the PLC to the ESP32.

Once the points begin arriving correctly at the ESP32, the system is ready and the drawing can be started in Auto mode.

Complete workflow:
DWG → DXF → Inkscape → SVG → vpype → G-code → Python → PLC → ESP32 → Auto Mode

CAD drawing used in this video:
Sport Cars — DWG Models
https://dwgmodels.com/228-sport-cars....

The original drawing and its derived files are not distributed with this project.

🔧 Full project documentation and source code:
GitHub: https://github.com/shevtsovandreas/xy...

👤 Connect with me:
LinkedIn:   / andreywork