This is an old revision of the document!


The Player module allows you to play files from the SD card.

Files are read one line at a time, and each line is executed as if it had been received from a controlling host.

Mac users beware: it appears that the play function does not accept files that have a space in their name.

Here are all the available options for the Player module

~ Option ~ Example value ~ Explanation

page>player-options

Here are all the available commands for the Player module

<kbd>play</kbd>

You can use the « play » command to execute files stored on the SD card.

You must specify a file name and its path, for example : 

code play /sd/gcodefile.gcode
code

By default, the command will be quiet. If you want the command to output every G-code in the file to the serial port ( the command was called from ), add the -v ( verbose ) parameter : 

code play /sd/gcodefile.gcode -v
code

Pronterface

Pronterface will ignore commands it does not understand, unless you prefix them with @.

Therefore, send your command as « @play /sd/gcodefile.gcode » and it will work

Repetier

Repetier will act kind of mean, and ignore any command it doesn't understand.

Unlike Pronterface it won't give you a method to pass commands anyway.

You can possibly use the M24 G-code instead.

<kbd>progress</kbd>

When a file is playing, you can use the progress command to get a report of the current position in the file, and elapsed time.

<kbd>abort</kbd>

You can also use the abort command to stop the execution of the file.

<kbd>suspend</kbd>

Can be used for either sd card playing or when streaming from Pronterface or Octoprint.

Will suspend a print in progress it does the following…

1. send pause to upstream host, or pause if printing from sd
2. wait for empty queue
3. save the current position, extruder position, temperatures - any state that would need to be restored
4. –retract by specified amount either on command line or in config– - not implemened yet
5. turn off heaters. (unless the config has leave_heaters_on_suspend true)
6. optionally run after_suspend gcode (set in config defines gcode to run eg. after_suspend G91G0E20G90)

User may jog or remove and insert filament at this point, extruding or retracting as needed.

This could be triggered by a Switch module to setup a simple out of filament detector.

NOTE Issuing a home after a suspend will cancel the suspend and you will not be able to resume.

page>stopping-smoothie

<kbd>resume</kbd>

Will resume a suspended print it does the following…

1. restore the temperatures and wait for them to get up to temp
2. optionally run before_resume gcode if specified
3. restore the position it was at and E and any other saved state
4. resume sd print or send resume upstream

The following G-codes are supported by the Player module : 

  • M21 : Initialize the SD card. This does nothing in Smoothie but is kept for compatibility
  • M23 : Select a file, for example : M23 file.gcode
  • M24 : Start or resume SD card print
  • M25 : Pause SD card print
  • M26 : Abort a SD card print
  • M27 : Report print progress
  • M32 : Select a file, and start playing it, for example : M32 file.gcode
  • M600 : Suspend print in progress (use console command resume or M601 to continue)
  • M601 : Resume print after suspend