open_code()

Opens a G-Code program from a string containing G-Code commands.

Syntax

open_code(gcode_string)

Parameters

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

Return Value

Examples

Load G-Code from a string

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

Load another G-Code program from a string

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

See also

open_file
open_code
start_file
start_code
test_file
test_code