• Tags
  • Documentation
  • Order
  • Register
  • Login
Duet3D Logo Duet3D
  • Tags
  • Documentation
  • Order
  • Register
  • Login

1HCL basic tuning fails

Scheduled Pinned Locked Moved
Beta Firmware
2
5
422
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • undefined
    wiego
    last edited by 17 May 2022, 08:29

    Hi,

    I have a rotary axis with a Nema 17 stepper motor with a 500 cpr differential encoder with zero impulse (but as suggested only a+,b+ and power connected). Firmware is 3.4.1 rc1.
    Unfortunately I do not even pass basic tuning with this setup, but the motor moves apparently as expected (have seen this manoveur already on working motor). Might be something with the encoder? Cables are long (2m), but shielded and grounded at supply side.
    The error message is:

    Warning: Driver 123.0 warning: tuning failed
    Warning: Driver 123.0 new tuning error(s): The measured motion was inconsistent.

    Can you see what the problem is ?
    alt text
    alt text

    Thanks,
    wiego

    ....

    config.g:

    ; General preferences
    G90 ; send absolute coordinates...
    M83 ; ...but relative extruder moves
    M550 P"ClosedLoopTest" ; set device name
    ; Wait a moment for the CAN expansion boards to start
    G4 S2
    ; Network
    M552 P192.168.1.177 S1 ; enable network and set IP address
    M553 P255.255.255.0 ; set netmask
    M586 P0 S1 ; enable HTTP
    ; closed loop
    M569.1 P123.0 T2 C2.5 R100 I0 D0
    M569 P123.0 S1 D2
    M584 A123.0 ; set drive mapping
    M917 A0
    M350 A16 I0 ; configure microstepping without interpolation
    M92 A3200 ; set steps per mm
    M566 A1000 ; set maximum instantaneous speed changes (mm/min)
    M203 A1500 ; set maximum speeds (mm/min)
    M201 A1000 ; set accelerations (mm/s^2)
    M906 A1000 I30 ; set motor currents (mA) and motor idle factor in per cent
    M84 S30 ; Set idle timeout
    M208 A0 S1 ; set axis minima
    M208 A1000 S0 ; set axis maxima

    homea.g

    ; homea.g
    ;setup
    M569 P123.0 D2
    G91 ; relative positioning
    ;G1 A360 F2000
    G90
    M400
    M569 P123.0 D4 S0 ; Configure the motor on the 1HCL at can address 50 as being in closed-loop drive mode (D4) and not reversed (S1)
    M569.6 P123.0 V31
    ;G1 A0
    ;cleanup
    G92 A0 ; set zero coordinate system for this axis

    M122 for 1HCL:

    Diagnostics for board 123:
    Duet EXP1HCL firmware version 3.4.1rc1 (2022-05-03 09:32:27)
    Bootloader ID: SAME5x bootloader version 2.4 (2021-12-10)
    All averaging filters OK
    Never used RAM 52288, free system stack 178 words
    Tasks: Move(notifyWait,0.0%,152) HEAT(notifyWait,0.0%,78) CanAsync(notifyWait,0.0%,70) CanRecv(notifyWait,0.0%,79) CanClock(notifyWait,0.0%,70) TMC(notifyWait,34.2%,358) CLSend(notifyWait,0.0%,132) MAIN(running,64.0%,407) IDLE(ready,0.0%,30) AIN(notifyWait,1.7%,265), total 100.0%
    Last reset 01:11:31 ago, cause: power up
    Last software reset data not available
    Closed loop enabled: yes, pre-error threshold: 0.00, error threshold: 0.00, encoder type rotaryQuadrature, reverse polarity: no, position 6960, raw count = 7410, tuning mode: 0, tuning error: 0x10, collecting data: no
    Control loop runtime (ms): min=0.003, max=0.029, frequency (Hz): min=11538, max=17442
    Driver 0: pos 0, 3200.0 steps/mm,tuning failed, SG min 0, mspos 8, reads 36336, writes 55440 timeouts 0, steps req 0 done 0
    Moves scheduled 0, completed 0, in progress 0, hiccups 0, step errors 0, maxPrep 0, maxOverdue 0, maxInc 0, mcErrs 0, gcmErrs 0
    Peak sync jitter -10/10, peak Rx sync delay 195, resyncs 0/0, no step interrupt scheduled
    VIN voltage: min 12.2, current 24.2, max 24.3
    V12 voltage: min 10.4, current 12.1, max 12.1
    MCU temperature: min 32.8C, current 33.4C, max 33.9C
    Last sensors broadcast 0x00000000 found 0 218 ticks ago, 0 ordering errs, loop time 0
    CAN messages queued 69642, send timeouts 0, received 21697, lost 0, free buffers 37, min 37, error reg 0
    dup 0, oos 0/0/0/0, bm 0, wbm 0, rxMotionDelay 0
    undefined 1 Reply Last reply 17 May 2022, 12:28 Reply Quote 0
    • undefined
      dc42 administrators @wiego
      last edited by 17 May 2022, 12:28

      @wiego said in 1HCL basic tuning fails:

      I have a rotary axis with a Nema 17 stepper motor with a 500 cpr differential encoder with zero impulse (but as suggested only a+,b+ and power connected). Firmware is 3.4.1 rc1.

      By "power", please confirm that you mean +5V and ground.

      Unfortunately I do not even pass basic tuning with this setup, but the motor moves apparently as expected (have seen this manoveur already on working motor). Might be something with the encoder? Cables are long (2m), but shielded and grounded at supply side.

      Is the working motor of exactly the same type?

      I'm confused by your first image because I can only see the green line for measured motor steps, but there should also be a black line for raw encoder reading.

      Which version of the closed loop tuning plugin are you using?

      Duet WiFi hardware designer and firmware engineer
      Please do not ask me for Duet support via PM or email, use the forum
      http://www.escher3d.com, https://miscsolutions.wordpress.com

      undefined 1 Reply Last reply 17 May 2022, 14:20 Reply Quote 0
      • undefined
        wiego @dc42
        last edited by 17 May 2022, 14:20

        @dc42 said in 1HCL basic tuning fails:

        By "power", please confirm that you mean +5V and ground

        yes, from the eight differential wires of the eoncoder (A,/A,B,/B,Z,/Z,5V,GND) only A,B,5V,GND are connected to the Quadrature Input of 1HCL. 24V as board supply on VIN.

        @dc42 said in 1HCL basic tuning fails:

        Is the working motor of exactly the same type?

        No, unfortunately the motor that has been working is another type with TTL encoder.

        @dc42 said in 1HCL basic tuning fails:

        I'm confused by your first image because I can only see the green line for measured motor steps, but there should also be a black line for raw encoder reading.

        In the first picture both lines exactly on top of eachother, that is the reason why the black is hardly visible.

        @dc42 said in 1HCL basic tuning fails:

        Which version of the closed loop tuning plugin are you using?

        3.4-b1

        undefined 1 Reply Last reply 17 May 2022, 14:39 Reply Quote 0
        • undefined
          wiego @wiego
          last edited by 17 May 2022, 14:39

          i just found out that cpr can have two meanings 😓 :

          • counts per revolution (=4xPPR)
          • cycles per revolution (=1xPPR)

          so my encoder has actually 500 cycles per revolution means 2000 counts per revolution.

          @wiego said in 1HCL basic tuning fails:

          M569.1 P123.0 T2 C2.5 R100 I0 D0

          I change that to M569.1 P123.0 T2 C10 R100 I0 D0

          but recordings look still quite similar:

          alt text

          alt text

          undefined 1 Reply Last reply 18 May 2022, 17:10 Reply Quote 0
          • undefined
            dc42 administrators @wiego
            last edited by 18 May 2022, 17:10

            @wiego are you sure the encoder isn't higher resolution than that? It looks like the measured motor steps is too high.

            Do you get any other messages when the tuning fails? RRF normally reports its estimate of the measured CPR.

            Duet WiFi hardware designer and firmware engineer
            Please do not ask me for Duet support via PM or email, use the forum
            http://www.escher3d.com, https://miscsolutions.wordpress.com

            1 Reply Last reply Reply Quote 0
            2 out of 5
            • First post
              2/5
              Last post
            Unless otherwise noted, all forum content is licensed under CC-BY-SA