Command Syntax

Home » Projects » rStep » Command Syntax

Command Syntax

Input Grammar:

 | means OR, a value between quotes denotes a litteral and () means grouping. [] means optional

<XYZ Float> ::- [('X' <FLOAT>)] [('Y' <FLOAT>)] [('Z' <FLOAT>)]
<XYZ Bool> ::- [('X' <BOOL>)] [('Y' <BOOL>)] [('Z' <BOOL>)]
<XYZ Amps> ::- [('X' <AMPS>)] [('Y' <AMPS>)] [('Z' <AMPS>)]
<XYZ INT>  ::- [('X' <INT>)] [('Y' <INT>)] [('Z' <INT>)]
<Feedrate> ::- [('F' <FLOAT>)]
<Stepping> ::- ('S' <Step Options>)
<MotorPWM> ::- ('S' <PWM Value>)
<Step Options> ::- '1' | '2' | '4' | '16'
<BOOL> ::- '0' | '1
<AMPS> ::- <FLOAT Values 0.0 to 2.0>
<PWM Value> ::- <INT Values 1 to 255>

 

Input Commands Supported:

CMD Arguments Description
 G0  <XYZ Float>  Move to XYZ at Max Feedrate
 G1  <Feedrate> <XYZFloat>  Move to XYZ at specified feedrate, if specified, or last specified feedrate if not specified.  Max feedrate if no feedrate has been specified.
 G2    Clockwise arc 
 G3    Counerclockwise arc
 G4    Dwell (delay) 
 G20    Specify default units as INCHES
 G21    Specify default units as MM
 G28    Move to (0,0,0) at Max Feedrate
 G30  <XYZ Float>  Go to (0,0,0) via intermediate point (X,Y,Z)
 G81  <XYZ Float> Drill by moving to (X,Y) at max feedrate, Move to Z then back to oringal Z at max feedrate
 G90    XYZ is in absolute coordinates
 G91    XYZ is in relative coordinates
 G92    Specify current location as (0,0,0)
     
 M2    Turn on spindle motor
 M4    Turn on spindle motor
 M5    Turn off spindle motor
     
 M100  <XYZ Amps>  Specify AMPS per axis
 M101  <XYZ INT>  Specify STEPS PER INCH
 M102  <XYZ INT>  Specify Max Feedrate Per Axis in Steps Per Second 
 M103  <XYZ Stepping>  Specify Stepping Mode (1,1/2,1/4,1/16)
 M104  <XYZ Bool>  Specify Direction Per Axis (i.e. toggle value to reverse direction of an axis)
 M105  <Motor PWM>  Specify Duty Cycle of Motor On Time as value from 1 (0.39%) to 255 (100%)
 M200    Force Save Configuration
 M201    Dump Configuration
     


 

Output Grammar:


<rStep output> ::-  <GCode reply> | <message> | 'START' 
<GCode reply> ::-  'OK' | ( 'ERR ' <error type> )
<error type> ::- 'INIT' | 'CUR' | 'STEP_TYPE' | 'ADDOBJ_FULL' | 'NOT_SUPPORTED' | 'CHECKSUM'
<message> ::- 'MSG ' <message content>
<message content> ::- <step by inch message> | <max feed rate message> | <current message> | <stepping message> | <absolute mode message> | <coordinates message> | <debug message>
<step by inch message> ::- 'SBI(' <NUMBER> ',' <NUMBER> ',' <NUMBER> ')'
<max feed rate message> ::- 'MFR(' <NUMBER> ',' <NUMBER> ',' <NUMBER> ')'
<current message> ::- 'Cur(' <NUMBER> ',' <NUMBER> ',' <NUMBER> ')'
<stepping message> ::- 'Step(' <NUMBER> ')'
<absolute mode message> ::- 'Abs(' <NUMBER> ')'
<coordinates message> ::- 'Coord(' <NUMBER> ',' <NUMBER> ',' <NUMBER> ')'
<debug message> ::- 'Debug(' <STRING> ')'