Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
player [2017/01/25 16:05]
arthur
player [2020/05/21 13:41] (current)
wolfmanjm [Playing G-code files]
Line 1: Line 1:
 += Playing G-code files
 +
 The Player module allows you to play files from the SD card.  The Player module allows you to play files from the SD card. 
  
Line 4: Line 6:
  
 Mac users beware: it appears that the play function does not accept files that have a space in their name.  Mac users beware: it appears that the play function does not accept files that have a space in their name. 
 +
 +Files on sdcard **MUST** be line terminated by ''​\n''​ **ONLY**, not ''​\r''​ (Note for MAC users).
 +On the very latest version of smoothieware it will tolerate ''​\r\n''​ terminated lines.
 +
  
 == Configuration == Configuration
Line 9: Line 15:
 Here are all the available options for the Player module Here are all the available options for the Player module
  
-||~ Option ​||~ Example value ||~ Explanation ​||+Option ​Example value Explanation ​^
 {{page>​player-options}} {{page>​player-options}}
  
Line 16: Line 22:
 Here are all the available commands for the Player module Here are all the available commands for the Player module
  
-=== {{play}} +<​html><​h3><​kbd>​play</​kbd></​h3></​html>​
-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 : +You can use the <​kbd>​play</​kbd>​ command to execute files stored on the SD card.
  
-[[code]]+You must specify a file name and its path, for example : 
 + 
 +<code>
 play /​sd/​gcodefile.gcode play /​sd/​gcodefile.gcode
-[[/code]]+</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 : +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 <kbd>-v</​kbd> ​( verbose ) parameter :
  
-[[code]]+<code>
 play /​sd/​gcodefile.gcode -v play /​sd/​gcodefile.gcode -v
-[[/code]]+</code>
 <callout type="​warning"​ icon="​true"​ title="​ Pronterface">​ <callout type="​warning"​ icon="​true"​ title="​ Pronterface">​
  
-Pronterface will ignore commands it does not understand, unless you prefix them with {{@}}.+Pronterface will ignore commands it does not understand, unless you prefix them with <kbd>@</​kbd>​.
  
-Therefore, send your command as Â« {{@play /​sd/​gcodefile.gcode}} » and it will work+Therefore, send your command as <kbd>@play /​sd/​gcodefile.gcode</​kbd> ​and it will work
 </​callout>​ </​callout>​
 <callout type="​danger"​ icon="​true"​ title="​ Repetier">​ <callout type="​danger"​ icon="​true"​ title="​ Repetier">​
Line 42: Line 49:
 Unlike Pronterface it won't give you a method to pass commands anyway. Unlike Pronterface it won't give you a method to pass commands anyway.
  
-You can possibly use the [http://​smoothieware.org/​supported-g-codes M24] G-code instead.+You can possibly use the [[http://​smoothieware.org/​supported-g-codes|M24]] G-code instead.
 </​callout>​ </​callout>​
  
-===  {{progress}} 
-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. 
  
-===  {{abort}} +<​html><​h3><​kbd>​progress</​kbd></​h3></​html>​ 
-You can also use the {{abort}} ​command to stop the execution ​of the file.+When a file is playing, you can use the <​kbd>​progress</​kbd> ​command to get a report ​of the current position in the file, and elapsed time.
  
-=== {{suspend}}+<​html><​h3><​kbd>​abort</​kbd></​h3></​html>​ 
 +You can also use the <​kbd>​abort</​kbd>​ command to stop the execution of the file.
  
-[[Pronterface]]+<​html><​h3><​kbd>​suspend</​kbd></​h3></​html>​ 
 + 
 +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... Will suspend a print in progress it does the following...
Line 61: Line 69:
 3. save the current position, extruder position, temperatures - any state that would need to be restored 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 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}}+5. turn off heaters. (unless the config has <kbd>leave_heaters_on_suspend true</​kbd>​
-6. optionally run after_suspend gcode (set in config defines gcode to run eg. {{after_suspend G91G0E20G90}})+6. optionally run after_suspend gcode (set in config defines gcode to run eg. <kbd>after_suspend G91G0E20G90</​kbd>​)
  
 User may jog or remove and insert filament at this point, extruding or retracting as needed. User may jog or remove and insert filament at this point, extruding or retracting as needed.
  
-[[Switch]]+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. **NOTE** Issuing a home after a suspend will cancel the suspend and you will not be able to resume.
 +
 +**NOTE** the queue must drain before it will suspend, if you need to have the system suspend quicker the only way to do it is to set the config variable ''​mm_per_line_segment 1''​ this will mean it will stop within 32mm, but there is a performance penalty for segmenting when you do not need to.
  
 {{page>​stopping-smoothie}} {{page>​stopping-smoothie}}
  
-=== {{resume}}+<​html><​h3><​kbd>​resume</​kbd></​h3></​html>​
  
 Will resume a suspended print it does the following... Will resume a suspended print it does the following...
Line 83: Line 93:
 == G-codes == G-codes
  
-The following G-codes are supported by the Player module : +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 +<kbd>M21</​kbd> ​: Initialize the SD card. This does nothing in Smoothie but is kept for compatibility 
-{{M23}} : Select a file, for example : {{M23 file.gcode}} +<kbd>M23</​kbd> ​: Select a file, for example : <kbd>M23 file.gcode</​kbd>​ 
-{{M24}} : Start or resume SD card print +<kbd>M24</​kbd> ​: Start or resume SD card print 
-{{M25}} : Pause SD card print  +<kbd>M25</​kbd> ​: Pause SD card print  
-{{M26}} : Abort a SD card print +<kbd>M26</​kbd> ​: Abort a SD card print 
-{{M27}} : Report print progress +<kbd>M27</​kbd> ​: Report print progress 
-{{M32}} : Select a file, and start playing it, for example : {{M32 file.gcode}} +<kbd>M32</​kbd> ​: Select a file, and start playing it, for example : <kbd>M32 file.gcode</​kbd>​ 
-{{M600}} : Suspend print in progress (use console command resume or M601 to continue) +<kbd>M600</​kbd> ​: Suspend print in progress (use console command resume or M601 to continue) 
-{{M601}} : Resume print after suspend+<​kbd>​M600.1</​kbd>​ : Suspend print in progress, but leave heaters on 
 +* <kbd>M601</​kbd> ​: Resume print after suspend