Stepdance Software Library
Loading...
Searching...
No Matches
GCodeInterface Class Reference

G-code interface class for parsing and executing G-code commands as motion streams. More...

#include <interfaces.hpp>

Inheritance diagram for GCodeInterface:

Public Attributes

BlockPortoutput_x = target_interpolator.output_x
 Initialize the G-code interface with a USB serial port.
BlockPortoutput_y = target_interpolator.output_y
 BlockPort for Y axis output. Use this to map to downstream components to drive position based on G-code Y-axis commands.
BlockPortoutput_z = target_interpolator.output_z
 BlockPort for Z axis output. Use this to map to downstream components to drive position based on G-code Z-axis commands.
BlockPortoutput_e = target_interpolator.output_e
 BlockPort for extruder output. Use this to map to downstream components to drive position based on G-code E-axis commands.

Protected Member Functions

void loop ()

Detailed Description

G-code interface class for parsing and executing G-code commands as motion streams.

The GCodeInterface class provides a G-code parser and interpreter for motion control. It processes standard G-code commands sent via serial using gSender. To use, install gSender and set the output port to the serial port connected to the StepDance controller running this interface. You can send common G-code commands for linear motion, coordinate systems, and machine control. Note- currently not all G-code commands are supported; unsupported commands will return an error message. We are working on this. For an example of how to use this class, see gcode_interface/gcode_interface.ino

Member Data Documentation

◆ output_x

BlockPort& GCodeInterface::output_x = target_interpolator.output_x

Initialize the G-code interface with a USB serial port.

Parameters
target_usb_serialThe USB serial port to use.
// -- Start the G-Code interface
SerialUSB1.begin(115200);
gcode_interface.begin(&SerialUSB1);

BlockPort for X axis output. Use this to map to downstream components to drive position based on G-code X-axis commands.


The documentation for this class was generated from the following file: