start_file()

Starts executing a G-code file immediately.

This function loads the specified G-code file and begins execution.

Syntax

planetcnc.start_file(filename)

Parameters

Parameter Type Description
filename str A string specifying the name of the G-code file to be started.

Return Value

Examples

#! /usr/bin/env python 
 
import planetcnc
 
# Start executing the G-code file "square.nc" immediately.
if planetcnc.start_file("square.nc"):
    print("G-code file execution started successfully.")
else:
    print("Failed to start G-code file execution.")

See also

open_file
open_code
start_file
start_code
test_file
test_code