start_code()

Loads and starts executing a G-code program from a string containing G-Code commands.

Syntax

start_code(gcode_string)

Parameters

Parameter Type Description
gcode_string String A string containing G-Code commands to execute.

Return Value

Examples

Start executing G-Code from a string

start_code("G21\nG0 X10 Y10\nM3\nG1 X50 Y50 F1000\nM5");

Start another G-Code program from a string

start_code("G90\nG0 Z5\nG1 X100 Y100 Z0 F500");

See also

open_file
open_code
start_file
start_code
test_file
test_code