As it stands in the new gcode wiki, you should be able to readout the current state/error of the toolhead with M1006:
https://wiki.snapmaker.com/en/Snapmaker_Luban/manual/2_supported_gcode_references
M1006 (SM2.0) - Get Toolhead Details
Description
- Get detailed information of the toolhead. For different toolheads, the information format may vary. Only key fields are explained here, and see the following example for details.
- 3DP
Tool Head: 3DP
active_probe_sensor: 0
hotend_type: 0: 1, 1: 1
hotend_diameter: 0: 0.40, 1:0.40
Kp: 150.000, Ki: 1.000, Kd: 30000.000
z_compensation: 0: 0.585, 1: 0.397
echo:Hotend offsets: 0.00,0.00,0.000 26.00,0.00,-1.524
ok
Copy
* `Tool Head: 3DP`: Toolhead type - 3DP.
* `z_compensation: 0: 0.585, 1: 0.397`: Z probe compensation.
- Laser
Tool Head: 20W LASER
Current Status: OFF
Current Power: 0.00
Focus Height: 65
ok
Copy
* `Tool Head: 20W LASER`: Toolhead type - 20W Laser.
* `Current Status: OFF`: Current status of the laser.
* `Current Power: 0.00`: Current power of the laser.
- CNC
Tool Head: 200W CNC
rpm: 0, error: 0x0
M_I: 346, M_V: 24.23
M_TEMP: 25.80, PCB_TEMP: 26.90
ctr mode: CNC_CONSTANT_RPM_MODE
run status: STOP
cur_power: 0 target_power: 0
cur_rpm: 0 target_rpm: 0
last error: 0x0
ok
Copy
* `Tool Head: 200W CNC`: Toolhead type - 200W CNC.
* `cur_rpm: 0 target_rpm: 0`: Current rpm and target rpm.
Usage
M1006