gcode_line_add_allowed()

Checks whether adding a new G-code line is currently permitted.

This function is used to determine if the application is in a state where G-code line additions are allowed.

Typically, it is used before attempting to add lines to the G-code list.

Syntax

planetcnc.gcode_line_add_allowed()

Parameters

Parameter Type Description
None

Return Value

Examples

#! /usr/bin/env python 
 
import planetcnc
 
if planetcnc.gcode_line_add_allowed():
    print("G-code line addition is allowed.")
else:
    print("G-code line addition is not allowed.")

See also

gcode_is_ready
gcode_is_opening
gcode_is_running
gcode_close
gcode_open
gcode_load
gcode_line_add_allowed
gcode_line_add