-
-
Notifications
You must be signed in to change notification settings - Fork 532
Using the SD Card
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.
$FM
Mount the SD card. This must be done before listing or sending files.
$F
Show all the files. This is recursive and will search all subdirectories. Each file will print like this...
[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. 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. For now: Use only alphanumeric names with no spaces.
$F=\FOO.NC
This will run file \FOO.NC
Note: If in alarm mode, this command will fail with error 9
Pause/Restart
Just use the normal grbl cycle start and feedhold commands
Stop/Quit a file
Initially this will be Grbl Reset. If that does not work out then $FQ will be added.
Status
I am not sure how to send status. I think adding an optional thing to the ? is probably the best. Maybe a percentage that gets added in when an SD file is running.
<Idle|WPos:195.000,144.000,19.000|Bf:15,128|FS:0.000,0.000|Pn:P|WCO:-195.000,-144.000,-19.000|SD:45.5>
There will be some sort of state machine type thing to make sure mount, run, unmount, etc do not cause undesirable effects.
Adding a card detect would be nice to eliminate the card mounting command, but I am not sure what I/O to reassign.
- Home
- Hardware
- ESP32 Dev Kit Versions
- Compiling with Arduino IDE
- Compiling with PlatformIO
- Using the Serial Port
- Grbl_ESP32 Settings
- Controlling Grbl_ESP32
- Setting Up the I/O pins
- Spindle Types
- Basic Kinematics
- Custom Machine Functions
- Home/Limit Switches
- Machine Work Space
- Stepper Motor Drivers
- Trinamic Drivers
- Axis Squaring and Ganging
- Settings
- SD Card
- Bluetooth
- Wifi
- WebUI
- Using Telnet
- Servo Axis
- Push notifications
- Switches
- Stepper Drivers
- Spindle options
- Other Ouputs
Testing public edit