Difference between revisions of "Sekret!"

From Hyrel3D
Jump to navigation Jump to search
Line 116: Line 116:
=== M772 Reset All Metrics ===
=== M772 Reset All Metrics ===


In addition to info on the Code page, these other reports are available:
In addition to info on the [[GCode]] page, these other reports are available:


   M772 - reset all internal data gathering to “0” state
   M772 - reset all internal data gathering to “0” state

Revision as of 15:53, 11 May 2020

Gcodes Not For Everyone

Diagnostics, reporting.

G38 Distance Probing

G38 will move the bed until a probe until contact is made, and report the position when contact is made, storing a list of coordinate points with depths. This is helpful for making the bed level (and potentially working on non-planar surfaces).

Usage

 G38 Xn Yn Zn An Bn T# Pn Dn In Hn On Fn

Parameters

 Xn relative move in this axis
 Yn relative move in this axis
 Zn relative move in this axis
 An relative move in this axis
 Bn relative move in this axis
 T# head where probe is loaded; if no T#, probe is not in a tool position; default: no T
 Pn probe connection
     If T is specified, P values can be:
       0  : PA3 pin on 10-pin connector
       1  : PA2 pin on 10-pin connector
       2  : LIMIT1 pin on 18-pin connector
       3  : LIMIT2 pin on 18-pin connector
       4  : RTD1 pin on 18-pin connector
       5  : RTD2 pin on 18-pin connector
     If T is not specified, P values can be:
       0  : No direct connect probe; canbus based probe one  *** must specify probeHead via T arg
       1  : X Limit1 or W_RTD1 (sys30)
       2  : X Limit2 or W_RTD2 (sys30)
       3  : X Fault
       4  : X Home
       5  : unused
       6  : Y Limit1
       7  : Y Limit2
       8  : Y Fault
       9  : Y Home
       10 : unused
       11 : Z Limit1
       12 : Z Limit2
       13 : Z Fault
       14 : Z Home
       15 : unused
       16 : A Limit1
       17 : A Limit2
       18 : A Fault
       19 : A Home
       20 : unused
       21 : B Limit1
       22 : B Limit2
       23 : B Fault
       24 : B Home
       25 : unused
       26 : C Limit1
       27 : C Limit2
       28 : C Fault
       29 : C Home
 D only 1 is presently supported; other options for future development
 I is probe polarity; 0 if contact makes a circuit, 1 if contact breaks the circuit
 H head offset register to use for tool dimension
 O additional offset
 F feedrate in mm/min (nonpersistent)

Example

 G38 Z-9 T# P3 D1 I1 F200 

This command is decoded and executed by the printer as follows:

  • G38 (probe)
    • Z-9 (9 mm in Z toward 0)
    • T# (target head)
    • P3 (LIMIT2 pin on 18-pin connector)
    • D1 (only option)
    • I1 (contact breaks circuit)
    • F200 (at 200 mm/smin)



M670 Toggle Y-Arm Light Now

Turn on Y-arm light immediately. S 0 - 100 for duty.



M671 Toggle X-Arm Lights

Toggle X-arm Lights S 0 - 100 for duty.



M672 Toggle Y-Arm with Sensor

See main Gcode page.



M673 Toggle Y-Arm Light Next

Toggle Y-arm light after all previous commands are finished. S 0 - 100 for duty.



M772 Reset All Metrics

In addition to info on the GCode page, these other reports are available:

 M772 - reset all internal data gathering to “0” state
 Sn - optional.  If Sn != 0, then Sn is a mask of which reports to auto send when M30 is processed.   S1 or S3 are typical user settings to get basic print info.
 Bit0 (0x01): enables M773 report (basic print stats)
 Bit1 (0x02): enables M774 report (system configuration)
 Bit2 (0x04): enables M774 report (queue metrics)
 Bit3 (0x08): enables M775 report (crashDataFromRam)
 Bit4 (0x10): enables M776 report (command and motionQ usage)
 Bit5 (0x20): enables M779 report (slice timing)



M773 Generate Basic Report

M773 generates a basic report of printing statistics (including average speed, number of primes, etc.)

Note: this report will be more meaningful if you use M772 to reset these counters at the start of a job.

Usage

 M773

Parameters

 N/A

Example

 M773
  • M773 (generate basic report)

Sample Output

 >IN:  50: ******************************************************************
 >IN:  50: **  Begin M773 - print job metrics Report
 >IN:  50: ******************************************************************
 >IN:  50: 
 >IN:  50:                       Time (s)    Dist (m)
 >IN:  50:                       --------    --------
 >IN:  50: Totals:                    0.0       0.000
 >IN:  50: 
 >IN:  50: Printing moves:            0.0       0.000
 >IN:  50: Non-printing moves         0.0       0.000
 >IN:  50: 
 >IN:  50: Accelerating:              0.0       0.000
 >IN:  50: Cruising:                  0.0       0.000
 >IN:  50: Decelerating:              0.0       0.000
 >IN:  50: 
 >IN:  50: can e steps issued:       0
 >IN:  50: approx filament (PI*d)    0.000 m
 >IN:  50: approx filament (PIr^2)   0.000 m
 >IN:  50: unprimes issued:          0
 >IN:  50: primes issued:            0
 >IN:  50: unprime-primes avoided:   0
 >IN:  50: 
 >IN:  50: ******************************************************************
 >IN:  50: **  End M773 Report
 >IN:  50: ******************************************************************



M774 Generate Queue Report

M774 generates a queue metrics report:

Usage

 M774

Parameters

 N/A

Example

 M774
  • M774 (generate queue report)

Sample Output

 >IN:  50: ******************************************************************
 >IN:  50: **  Begin M774 - queue metrics Report
 >IN:  50: ******************************************************************
 >IN:  50: 
 >IN:  50: Total commands:                  109
 >IN:  50: Total moves:                       0
 >IN:  50: Max commands in CmdQue:            9 (60)
 >IN:  50: Max commands in motionQ:           0 (50)
 >IN:  50: Max commands in deferredCmdQue:    0 (15)
 >IN:  50: Max chars in raw RX buffer:        1 (256)
 >IN:  50: Max chars in urgent RX buffer:     0 (1024)
 >IN:  50: Max chars in normal RX buffer:    43 (6144)
 >IN:  50: Max chars in direct RX buffer:     0 (8192)
 >IN:  50: Max chars in serial TX buffer:   697 (6144)
 >IN:  50: Total serial TX chars rejected:    0 (6144)
 >IN:  50: 
 >IN:  50: ******************************************************************
 >IN:  50: **  End M774 Report
 >IN:  50: ******************************************************************



M775 Generate Crash Report

M775 generates a crash data report:

Usage

 M775

Parameters

 N/A

Example

 M775
  • M775 (generate queue report)

Sample Output

 >IN:  50: ******************************************************************
 >IN:  50: **  Begin M775 - current crashDataFromRAM Report
 >IN:  50: ******************************************************************
 >IN:  50: 
 >IN:  50:     slice_1Hz = 1
 >IN:  50:     slice_10Hz = 5
 >IN:  50:     slice_100Hz = 9
 >IN:  50:     slice_1000Hz = 3
 >IN:  50:     lsiActualFreq = 0
 >IN:  50: 
 >IN:  50:     CAN1->MCR = 0x00010044
 >IN:  50:     CAN1->MSR = 0x00000c00
 >IN:  50:     CAN1->TSR = 0x1c030303
 >IN:  50:     CAN1->IER = 0x00000000
 >IN:  50:     CAN1->ESR = 0x00000000
 >IN:  50:     CAN1->BTR = 0x0012000d
 >IN:  50: 
 >IN:  50:     CAN1->sTxMailBox[0].TIR = 0x89408004
 >IN:  50:     CAN1->sTxMailBox[0].TDTR = 0x00000008
 >IN:  50:     CAN1->sTxMailBox[0].TDLR = 0x00000008
 >IN:  50:     CAN1->sTxMailBox[0].TDHR = 0x00000008
 >IN:  50:     CAN1->sTxMailBox[1].TIR = 0x80088006
 >IN:  50:     CAN1->sTxMailBox[1].TDTR = 0x00000008
 >IN:  50:     CAN1->sTxMailBox[1].TDLR = 0x00000000
 >IN:  50:     CAN1->sTxMailBox[1].TDHR = 0x00000000
 >IN:  50:     CAN1->sTxMailBox[2].TIR = 0x880a0924
 >IN:  50:     CAN1->sTxMailBox[2].TDTR = 0x00000008
 >IN:  50:     CAN1->sTxMailBox[2].TDLR = 0x00000003
 >IN:  50:     CAN1->sTxMailBox[2].TDHR = 0x00000000
 >IN:  50: 
 >IN:  50:     total_commandsProcessed = 109
 >IN:  50:     total_motionQprocessed = 0
 >IN:  50:     total_DeferredProcessed = 0
 >IN:  50:     total_charsRx = 2331
 >IN:  50:     total_charsTx = 22871
 >IN:  50:     total_canRx = 3233
 >IN:  50:     total_canTx = 1772
 >IN:  50: 
 >IN:  50:     max_CommandsInQue = 9
 >IN:  50:     max_motionQvalidEntries = 0
 >IN:  50:     max_DeferredCommandsInQue = 0
 >IN:  50:     max_rawRxCharsInBuf = 1
 >IN:  50:     max_urgentRxCharsInBuf = 0
 >IN:  50:     max_normalRxCharsInBuf = 43
 >IN:  50:     max_directRxCharsInBuf = 0
 >IN:  50:     max_normalTxCharsInBuf = 697
 >IN:  50:     max_canRxQ_numMsg = 88
 >IN:  50:     max_canTxQ_numMsg = 34
 >IN:  50: 
 >IN:  50:     curr_CommandsInQue = 5
 >IN:  50:     curr_motionQ.validEntries = 0
 >IN:  50:     curr_DeferredCommandsInQue = 0
 >IN:  50:     curr_rawRxCharsInBuf = 0
 >IN:  50:     curr_urgentRxCharsInBuf = 0
 >IN:  50:     curr_normalRxCharsInBuf = 0
 >IN:  50:     curr_normalTxCharsInBuf = 0
 >IN:  50:     curr_gs._canRxQ.numMsg = 0
 >IN:  50:     curr_gs._canRxQ.numMsg = 0
 >IN:  50: 
 >IN:  50:     curr_rawRxIndexIn = 73
 >IN:  50:     curr_rawRxIndexOut = 73
 >IN:  50:     curr_urgentRxIndexIn = 0
 >IN:  50:     curr_urgentRxIndexOut = 0
 >IN:  50:     curr_normalRxIndexIn = 822
 >IN:  50:     curr_normalRxIndexOut = 822
 >IN:  50:     curr_normalTxIndexIn = 6084
 >IN:  50:     curr_normalTxIndexOut = 6126
 >IN:  50: 
 >IN:  50:     _serialPortRxOverrunCnt = 0
 >IN:  50:     flushedRxCharsDuringAbort = 0
 >IN:  50: 
 >IN:  50:     pendingAcknowledge = 0
 >IN:  50:     _gcodeCmdsReceived = 43
 >IN:  50:     _gcodeAcksSent = 43
 >IN:  50: 
 >IN:  50:     _g4DwellTimer = 0
 >IN:  50:     _gcodePaused = 0
 >IN:  50:     _abortInProgress = 0
 >IN:  50:     _blockAllMotion = 1
 >IN:  50:     _blockAbsoluteMotion = 0
 >IN:  50:     _motionSensorTripped = 0
 >IN:  50:     _waitingFor.flags.u32 = 0x00000000
 >IN:  50:     _needToProcessDeferredCommands = 0
 >IN:  50: 
 >IN:  50:     X.HomeSense.State = 1
 >IN:  50:     Y.HomeSense.State = 1
 >IN:  50:     Z.HomeSense.State = 2
 >IN:  50:     A.HomeSense.State = 2
 >IN:  50:     B.HomeSense.State = 2
 >IN:  50:     C.HomeSense.State = 2
 >IN:  50: 
 >IN:  50:     X.FaultSense.State = 2
 >IN:  50:     Y.FaultSense.State = 2
 >IN:  50:     Z.FaultSense.State = 2
 >IN:  50:     A.FaultSense.State = 2
 >IN:  50:     B.FaultSense.State = 2
 >IN:  50:     C.FaultSense.State = 2
 >IN:  50: 
 >IN:  50:     X.Limit1Sense.State = 2
 >IN:  50:     Y.Limit1Sense.State = 2
 >IN:  50:     Z.Limit1Sense.State = 2
 >IN:  50:     A.Limit1Sense.State = 2
 >IN:  50:     B.Limit1Sense.State = 2
 >IN:  50:     C.Limit1Sense.State = 2
 >IN:  50: 
 >IN:  50:     X.Limit2Sense.State = 2
 >IN:  50:     Y.Limit2Sense.State = 2
 >IN:  50:     Z.Limit2Sense.State = 2
 >IN:  50:     A.Limit2Sense.State = 2
 >IN:  50:     B.Limit2Sense.State = 2
 >IN:  50:     C.Limit2Sense.State = 2
 >IN:  50: 
 >IN:  50:     X.HasBeenHomed = 0
 >IN:  50:     Y.HasBeenHomed = 0
 >IN:  50:     Z.HasBeenHomed = 1
 >IN:  50:     A.HasBeenHomed = 1
 >IN:  50:     B.HasBeenHomed = 1
 >IN:  50:     C.HasBeenHomed = 1
 >IN:  50: 
 >IN:  50:     _validFirmwareKey = 1
 >IN:  50: 
 >IN:  50: ******************************************************************
 >IN:  50: **  End M775 Report
 >IN:  50: ******************************************************************



M776 Generate Motion Report

M776 generates a motion report:

Usage

 M776

Parameters

 N/A

Example

 M776
  • M776 (generate queue report)

Sample Output

 >IN:  50: ******************************************************************
 >IN:  50: **  Begin M776 - cmd/motionQ usage histograms Report
 >IN:  50: ******************************************************************
 >IN:  50: 
 >IN:  50: motionQ numEntries histogram at start of move (total moves: 0)
 >IN:  50:  --:     0 (executed while forcing Q empty)
 >IN:  50:   1:     0
 >IN:  50:   2:     0
 >IN:  50:   3:     0
 >IN:  50:   4:     0
 >IN:  50:   5:     0
 >IN:  50:   6:     0
 >IN:  50:   7:     0
 >IN:  50:   8:     0
 >IN:  50:   9:     0
 >IN:  50:  10:     0
 >IN:  50:  11:     0
 >IN:  50:  12:     0
 >IN:  50:  13:     0
 >IN:  50:  14:     0
 >IN:  50:  15:     0
 >IN:  50:  16:     0
 >IN:  50:  17:     0
 >IN:  50:  18:     0
 >IN:  50:  19:     0
 >IN:  50:  20:     0
 >IN:  50:  21:     0
 >IN:  50:  22:     0
 >IN:  50:  23:     0
 >IN:  50:  24:     0
 >IN:  50:  25:     0
 >IN:  50:  26:     0
 >IN:  50:  27:     0
 >IN:  50:  28:     0
 >IN:  50:  29:     0
 >IN:  50:  30:     0
 >IN:  50:  31:     0
 >IN:  50:  32:     0
 >IN:  50:  33:     0
 >IN:  50:  34:     0
 >IN:  50:  35:     0
 >IN:  50:  36:     0
 >IN:  50:  37:     0
 >IN:  50:  38:     0
 >IN:  50:  39:     0
 >IN:  50:  40:     0
 >IN:  50:  41:     0
 >IN:  50:  42:     0
 >IN:  50:  43:     0
 >IN:  50:  44:     0
 >IN:  50:  45:     0
 >IN:  50:  46:     0
 >IN:  50:  47:     0
 >IN:  50:  48:     0
 >IN:  50:  49:     0
 >IN:  50:  50:     0
 >IN:  50: 
 >IN:  50: ******************************************************************
 >IN:  50: 
 >IN:  50: cmdQue numEntries histogram when cmd received (total cmds: 109)
 >IN:  50: 
 >IN:  50:   0:    89
 >IN:  50:   1:     2
 >IN:  50:   2:     4
 >IN:  50:   3:     2
 >IN:  50:   4:     4
 >IN:  50:   5:     2
 >IN:  50:   6:     2
 >IN:  50:   7:     2
 >IN:  50:   8:     2
 >IN:  50:   9:     0
 >IN:  50:  10:     0
 >IN:  50:  11:     0
 >IN:  50:  12:     0
 >IN:  50:  13:     0
 >IN:  50:  14:     0
 >IN:  50:  15:     0
 >IN:  50:  16:     0
 >IN:  50:  17:     0
 >IN:  50:  18:     0
 >IN:  50:  19:     0
 >IN:  50:  20:     0
 >IN:  50:  21:     0
 >IN:  50:  22:     0
 >IN:  50:  23:     0
 >IN:  50:  24:     0
 >IN:  50:  25:     0
 >IN:  50:  26:     0
 >IN:  50:  27:     0
 >IN:  50:  28:     0
 >IN:  50:  29:     0
 >IN:  50:  30:     0
 >IN:  50:  31:     0
 >IN:  50:  32:     0
 >IN:  50:  33:     0
 >IN:  50:  34:     0
 >IN:  50:  35:     0
 >IN:  50:  36:     0
 >IN:  50:  37:     0
 >IN:  50:  38:     0
 >IN:  50:  39:     0
 >IN:  50:  40:     0
 >IN:  50:  41:     0
 >IN:  50:  42:     0
 >IN:  50:  43:     0
 >IN:  50:  44:     0
 >IN:  50:  45:     0
 >IN:  50:  46:     0
 >IN:  50:  47:     0
 >IN:  50:  48:     0
 >IN:  50:  49:     0
 >IN:  50:  50:     0
 >IN:  50:  51:     0
 >IN:  50:  52:     0
 >IN:  50:  53:     0
 >IN:  50:  54:     0
 >IN:  50:  55:     0
 >IN:  50:  56:     0
 >IN:  50:  57:     0
 >IN:  50:  58:     0
 >IN:  50:  59:     0
 >IN:  50:  60:     0
 >IN:  50: 
 >IN:  50: ******************************************************************
 >IN:  50: **  End M776 Report
 >IN:  50: ******************************************************************



M784 Generate Summary Report

M784 generates a system summary report:

Usage

 M784

Parameters

 N/A

Example

 M784
  • M784 (generate queue report)

Sample Output

 >IN:  50: ******************************************************************
 >IN:  50: **  Begin M784 - System Summary Report
 >IN:  50: ******************************************************************
 >IN:  50: 
 >IN:  50: Motion Controller: 
 >IN:  50: 
 >IN:  50:    DEBUG_EngineSR_30M_5.000za :mcu 0x413 0x1001 :uid 0x3a002c00 0x18473132 0x39373139 :UART6
 >IN:  50:    License key: 4vxBFI46rsyXbS6__dU5mdS3WP8X8dLi
 >IN:  50: 
 >IN:  50: ******************************************************************
 >IN:  50: 
 >IN:  50: Compatible Devices:
 >IN:  50: 
 >IN:  50:     T#   Location    DeviceType   SW Loaded                  PCB      RTD1     RTD2     RTD3     SubType      SW Codebase  Can# Fmt# 
 >IN:  50:    ----- ----------- ------------ -------------------------- -------- -------- -------- -------- ------------ ------------ ---- ---- 
 >IN:  50:     T1   Yoke1 Head2 MK1          Heads_Beds_103_5.000za.hex 4988_J   1K       None     None     Standard     Medusa5       1    2  
 >IN:  50: 
 >IN:  50: ******************************************************************
 >IN:  50: 
 >IN:  50: Incompatible Devices (must be upgraded to 5.x software):
 >IN:  50: 
 >IN:  50:    OldT# Location   
 >IN:  50:    ----- -----------
 >IN:  50:     T14  Yoke1 Head4
 >IN:  50: 
 >IN:  50: ******************************************************************
 >IN:  50: **  End M784 Report
 >IN:  50: ******************************************************************



M797 Report Sensors

M797 generates a sensor status report:

Usage

 M797 In

Parameters

 I can be 1 (logical states) or 2 (physical values)

Example 1

 M797 I1

This command is decoded and executed by the printer as follows:

  • M797 (generate sensor report)
    • I1 (show logical states)

Sample Output 1

 >GB: Logical States  (M797 I1)
 >GB: AX ST DR  HM L1 L2 FT
 >GB: == == ==  == == == ==
 >GB: X  -  F   H  .  .  . 
 >GB: Y  -  F   H  .  .  . 
 >GB: Z  -  F   .  .  .  . 
 >GB: A  not installed
 >GB: B  not installed
 >GB: <end>

Column definitions: AX - Axis ST - Step DR - Direction HM - Home L1 - Limit 1 L2 - Limit 2 FT - Fault

Example 2

 M797 I2

This command is decoded and executed by the printer as follows:

  • M797 (generate sensor report)
    • I2 (show physical values)

Sample Output 2

 >GB: Physical values  (M797 I2)
 >GB: AX ST DR  HM L1 L2 FT
 >GB: == == ==  == == == ==
 >GB: X  1  0   1  .  .  . 
 >GB: Y  1  0   0  .  .  . 
 >GB: Z  1  0   .  .  .  . 
 >GB: A  not installed
 >GB: B  not installed
 >GB: <end>