M122 Driver SG values

  • When I am running test prints I like to periodically run a M122 and see what it come up with. I noticed that one of the four drives reported a much higher SG value then the others (1023), I assume it's just the max value actually. What do the SG values mean and second, what does a high value implicate?

    If there is anything else that I should know about in the logs, let me know 🙂

    The printer is a delta with a bondtech BMG as direct drive.

    === Diagnostics ===
    RepRapFirmware for Duet 2 WiFi/Ethernet version 2.01(RTOS) running on Duet WiFi 1.0 or 1.01
    Board ID: 08D6M-91AST-L23S4-7JTD0-3S86K-1NX1K
    Used output buffers: 3 of 20 (16 max)
    === RTOS ===
    Static ram: 28476
    Dynamic ram: 96400 of which 0 recycled
    Exception stack ram used: 468
    Never used ram: 5728
    Tasks: NETWORK(ready,400) HEAT(blocked,1248) MAIN(running,512)
    Owned mutexes: WiFi(NETWORK)
    === Platform ===
    Last reset 03:11:02 ago, cause: power up
    Last software reset at 2018-09-03 13:12, reason: User, spinning module GCodes, available RAM 5876 bytes (slot 1)
    Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0041f000 BFAR 0xe000ed38 SP 0xffffffff Task 0x4e49414d
    Error status: 16
    Free file entries: 10
    SD card 0 detected, interface speed: 20.0MBytes/sec
    SD card longest block write time: 0.0ms, max retries 0
    MCU temperature: min 40.1, current 40.4, max 42.8
    Supply voltage: min 11.9, current 12.1, max 12.3, under voltage events: 0, over voltage events: 0
    Driver 0: standstill, SG min/max 0/471
    Driver 1: standstill, SG min/max 0/430
    Driver 2: standstill, SG min/max 0/479
    Driver 3: standstill, SG min/max 0/1023
    Driver 4: standstill, SG min/max not available
    Date/time: 2018-09-04 15:59:07
    Slowest loop: 103.19ms; fastest: 0.07ms
    === Move ===
    Hiccups: 0, StepErrors: 0, LaErrors: 0, FreeDm: 240, MinFreeDm: 120, MaxWait: 9ms, Underruns: 0, 1
    Scheduled moves: 0, completed moves: 0
    Bed compensation in use: none
    Bed probe heights: 0.240 -0.113 -0.177 0.150 0.189
    === Heat ===
    Bed heaters = 0 -1 -1 -1, chamberHeaters = -1 -1
    Heater 0 is on, I-accum = 0.0
    Heater 1 is on, I-accum = 0.6
    === GCodes ===
    Segments left: 0
    Stack records: 3 allocated, 0 in use
    Movement lock held by null
    http is idle in state(s) 0
    telnet is idle in state(s) 0
    file is idle in state(s) 0
    serial is idle in state(s) 0
    aux is idle in state(s) 0
    daemon is idle in state(s) 0
    queue is idle in state(s) 0
    autopause is idle in state(s) 0
    Code queue is empty.
    === Network ===
    Slowest loop: 171.40ms; fastest: 0.08ms
    Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0) Telnet(0)
    HTTP sessions: 1 of 8
    - WiFi -
    Network state is running
    WiFi module is connected to access point 
    Failed messages: pending 0, notready 0, noresp 0
    WiFi firmware version 1.21
    WiFi MAC address a0:20:a6:16:ec:ed
    WiFi Vcc 3.36, reset reason Turned on by main processor
    WiFi flash size 4194304, free heap 14160
    WiFi IP address
    WiFi signal strength -67dBm, reconnections 0, sleep mode modem
    Socket states: 0 0 0 0 0 0 0 0
    === Expansion ===

  • @nxt-1 SG stands for stallGuard. It is the internal value returned by the TMC2660 stepper drivers. As you already guessed 1023 is one end of the spectrum - but counter-intuitively this is the low end. This value will be motor and settings specific but never exceed 1023 but can be lower. More relevant is the lower number on the left side of the slash. This will indicate a possible stall if the number is 0 (which again is the other end of the value range).

    I say possible because this detection needs to be tuned for every motor separately by changing the sensitivity with M915 until it does no longer report false positives - which sometimes even cannot be achieved at all. Until you did that and enabled stallGuard functionality this value is meaningless and can be ignored.

  • @wilriker Thanks for the clear explanation.


Looks like your connection to Duet3D was lost, please wait while we try to reconnect.