From 209ee305ea0f502c1044dfeb4d7e879bed093e17 Mon Sep 17 00:00:00 2001 From: Peter Boin Date: Tue, 22 Aug 2017 14:30:29 +1000 Subject: [PATCH] added readme --- tests/test-files/unsupported/README.md | 57 ++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 tests/test-files/unsupported/README.md diff --git a/tests/test-files/unsupported/README.md b/tests/test-files/unsupported/README.md new file mode 100644 index 0000000..98db6ad --- /dev/null +++ b/tests/test-files/unsupported/README.md @@ -0,0 +1,57 @@ +# Unsupported Files + +Files containing unsupported gcodes + +We can however still deal with these, workarounds shown below + +## Unsupported GCodes + + +When attempting to process unsupported gcode(s) via a `Machine` the following error (or similar) will be raised + + MachineInvalidState: unsupported gcode(s): 'P1 M10' (machine mode: ) + + +These codes are not currently supported by this library, but you may introduce +them for your project. with the following workaround + +**Workaround** + +Any class inheriting `GCode` is used to parse each gcode string. + +Look to the root `GCode` class definition in `gcodes.py` for more details. + +So, create the following class(es) (anywhere in your codebase, as long as it's +imported) + + +### `M10` / `M11` : Pallet Clamp + + import pygcode + + class GCodePalletClampOn(pygcode.GCode): + """M10: Pallet clamp on""" + word_key = pygcode.Word('M', 10) + word_letter = 'M' + param_letters = set('P') + + class GCodePalletClampOff(pygcode.GCode): + """M10: Pallet clamp off""" + word_key = pygcode.Word('M', 11) + word_letter = 'M' + param_letters = set('P') + + +### `G70` / `G71` : Fixed cycle, multiple repetitive cycle + + import pygcode + + class GCodeFixedCycleMultiRepCycleRough(pygcode.GCode): + """G70: Fixed cycle, multiple repetitive cycle, for finishing (including contours)""" + word_key = pygcode.Word('G', 70) + word_letter = 'G' + + class GCodeFixedCycleMultiRepCycleRough(pygcode.GCode): + """G71: Fixed cycle, multiple repetitive cycle, for roughing (Z-axis emphasis)""" + word_key = pygcode.Word('G', 71) + word_letter = 'G'