1
0
mirror of https://github.com/bdring/Grbl_Esp32.git synced 2025-09-09 05:40:46 +02:00

Updated Using the SD Card (markdown)

bdring
2018-08-21 09:08:36 -05:00
parent abd5c8b787
commit 6f9dd52c22

@@ -1,8 +1,10 @@
# The is currently a proposal only.
![SD Card](http://www.buildlog.net/blog/wp-content/uploads/2018/08/pny_micro_sd_card-150x150.jpeg)
## Overview
The command style is temporary and subject to change. The commands and responses were chosen to in a Grbl style rather than a Marlin type style. This will allow Grbl senders to be used without issues. If a Marlin style is preferred, changes can be made after the system is fully tested.
This documents the current command set. The commands and responses were chosen to in a Grbl style rather than a Marlin type style. This will allow existing Grbl senders to be used without issues. The current commands have been approved by Sonny (Grbl Dev) and will be reserved for this use to prevent future conflicts.
If you have any suggestions, please post them as an issue.
## Commands
@@ -14,21 +16,21 @@ Mount the SD card. This must be done before listing or sending files.
Show all the files. This is recursive and will search all subdirectories. Each file will print like this...
[FILE:\FOO.NC SIZE:29547]
[FILE:\FOO.NC,SIZE:29547]
...where \FOO.NC is the filename. including the directory. In this case the directory is the root. The number following the file name is the file size. This is not case sensitive.
There is a filter for valid file types in grbl_sd.cpp
There is a filter for valid file types in grbl_sd.cpp. Only these types will display.
char fileTypes[FILE_TYPE_COUNT][8] = {".NC", ".TXT", ".GCODE"};
There are a few naming restrictions because of how grbl strips out characters. I'll need to post those rules or figure out a way around that. Using **line_flags** like **LINE_FLAG_COMMENT_PARENTHESES** might work.
There are a few naming restrictions because of how grbl strips out characters. I'll need to post those rules or figure out a way around that. For now: Use only alphanumeric names with no spaces.
**$F=\FOO.NC**
Run file \FOO.NC
This will run file \FOO.NC
Note: If in alarm mode command will fail with error 9
Note: If in alarm mode, this command will fail with error 9
## Other Actions
@@ -51,3 +53,6 @@ I am not sure how to send status. I think adding an optional thing to the ? is p
There will be some sort of state machine type thing to make sure mount, run, unmount, etc do not cause undesirable effects.
## Future
Adding a card detect would be nice to eliminate the card mounting command, but I am not sure what I/O to reassign.