M122
Back to the Gcode Dictionary
M122: Diagnose
Parameters
- This command can be used without any additional parameters.
- Pnnn report specific information (See Notes)
- Bnnn Board number (RRF3/Duet 3 only, see Notes)
- "DSF" Immediate DSF diagnostics (RRF3/Duet3 only with attached SBC)
Example
- M122
Sending an M122 causes the RepRap to transmit diagnostic information.
Notes
The 'P' parameter is used to report specific information. The details vary between releases. As at RepRapFirmware version 2.03 they are:
- P1 print summary test report (additional parameters: Taa:bb = min/max accepted MCU temperature reading, Vaa:bb = min/max VIN voltage reading, Waa:bb = min/max 12V regulator voltage reading if applicable)
- P100 print a summary of recent moves (only if move logging is enabled in the firmware build)
- P101 print the status of an attached DueX expansion board
- P102 print how long it takes to evaluate the square root of a 62-bit unsigned integer
- P103 print how long it takes to evaluate sine and cosine
- P104 print how long it takes to write a file to the SD card (specify the file size in Mbytes in the S parameter, default 10)
- P105 print the sizes of various objects used by RepRapFirmware
Note: do not use M122 with a P parameter of 1000 or greater. There are a few values that deliberately cause the firmware to crash, which are used to test the error reporting facilities. As at firmware 2.03 these are:
- P1001 cause a watchdog reset
- P1002 test what happens when a module gets stuck in a spin loop
- P1003 test what happens when we write a blocking message to USB
- P1004 test integer division by zero
- P1005 test the response to an unaligned memory access
- P1006 test the response to accessing an invalid region of memory
The 'B' parameter is used in RepRapFirmware 3 on Duet 3 only, to report diagnostic information from connected boards. The B (board number) parameter is the CAN address of the board to be queried, default 0 (i.e. main board). Example:
M122 B1 Diagnostics for board 1: Board EXP3HC firmware 3.0beta1 2019-10-28b1 Never used RAM 163.4Kb, max stack 376b HEAT 1284 CanAsync 1456 CanRecv 1424 TMC 168 AIN 532 MAIN 2220 Driver 0: standstill, reads 26609, writes 11 timeouts 0, SG min/max 0/0 Driver 1: standstill, reads 26611, writes 11 timeouts 0, SG min/max 0/0 Driver 2: standstill, reads 26614, writes 11 timeouts 0, SG min/max 0/0 Move hiccups: 0 VIN: 24.4V, V12: 12.2V MCU temperature: min 43.8C, current 43.9C, max 44.1C
0 Comments