π¦ ClawHub
pikoCNC G-CODE
by @midware
Interprets and executes full PikoCNC G-code commands with modal state tracking, motion control, parameter handling, and error detection for CNC machining.
TERMINAL
clawhub install pikocncπ About This Skill
PikoCNC G-Code Full Skill (Complete Implementation-Oriented)
PURPOSE
This document represents a complete, implementation-oriented skill for PikoCNC G-code. It includes:1. MACHINE STATE MODEL
Modal Groups
State Variables
2. PROGRAM STRUCTURE
Start / End
% ... M30Comments
( comment ) ; comment ' comment3. CORE COMMANDS
G0 β Rapid
G0 X10 Y10G1 β Linear
G1 X20 Y20 F100G2 β CW Arc
G2 X20 Y20 I5 J0G3 β CCW Arc
G3 X20 Y20 I-5 J0Rules
4. UNITS
G20 β Inches
G20G21 β Millimeters
G215. DWELL
G4
G4 P26. HOMING
G28
G28G30
G307. DRILLING
G81
G98 G81 X10 Y10 Z-5 R2 F100Cancel
G808. SCALING
G51
G51 I1.5 G51 I1.5 X10 Y109. PARAMETERS
F100 S1000
10. M-CODES
M0 M3 S1000 M4 M5 M6 T1 M8 M9 M10 M11 M30
11. TOOL CHANGE EXECUTION
M6 triggers: 1. M6_beg 2. M6_put 3. M6_get 4. M6_mess 5. M6_end
12. MODAL RULES
Example: G1 X10 Y10 X20 Y20
13. NON-MODAL
14. EXECUTION ENGINE (INTERPRETER LOGIC)
Step Processing
1. Parse line 2. Update modal state 3. Execute motion 4. Apply parametersMotion Execution
15. ERROR HANDLING
16. SAFE PROGRAM TEMPLATE
% G21 G0 Z5 G0 X0 Y0 G1 Z-1 F100 G1 X50 Y0 G1 X50 Y50 G1 X0 Y50 G1 X0 Y0 G0 Z5 M30
17. BEST PRACTICES
18. IMPLEMENTATION NOTES
To build interpreter in C#:
SUMMARY
This file provides:
It can be used for: