Having troubles with Closed Loop tuning Plugin
-
some background. I recently started playing with Duet, so I could be considered complete noob (though I have plenty of 3d printer and CNC experience)
I picked up a Duet mini5+, a 1HCL board (ver 1.0a), and a magnetic encoder (v0.3).
Upgraded the firmwares to 3.5.1
I've got it setup very minimally on the desk just getting used to the software/setup.I'm trying to follow the guide, (still can't post links) but the Plugin never allows me to select a driver. "No data available"
I can move the motor in open and closed loop.
and even do a manual M569.5, then open the subsequent file in the plugin.
I just can't get the plugin to cause the recording/tuning moves.I thought maybe it was my version, Started with RRF Version 3.5.1 on all, Updated to 3.5.4 on Mini 5+ 1HCL and DWC. uninstalled and reinstalled the ClosedLoop plugin 3.5.1. Same situation. Can move, can record, cannot get the plugin to cause the move.
is there something obvious i'm just missing?
Config.g
; Configuration file for RepRapFirmware on Duet 3 Mini 5+ Ethernet ; executed by the firmware on start-up ; General G91 ; Relative coordinates M83 ; relative extruder moves M550 P"TestSaw" ; set hostname ; Network M552 P192.168.1.14 S1 ; configure Ethernet adapter M553 P255.255.255.0 ; set netmask M554 P0.0.0.0 ; set gateway M586 P0 S1 ; configure HTTP ; Wait a moment for the CAN expansion boards to become available G4 S2 ; Closed Loop Drivers M569.1 P50.0 T3 E0.0:0.0 S200 R40 I0 D0 ; only magnetic shaft encoder M569 P50.0 S1 D4 ; driver 123.0 goes forwards (extruder 0) FEED ; Axes M584 E50.0 ; set axis mapping M350 E16 ; configure microstepping M906 E800 ; set axis driver currents ; (micro)Steps/mm Calculation: ; E: Driver 16 microsteps ; E: Motor 400steps/rev (89080.1598:1) {6400} ; E: Belt Reduction 1/2 (0.5)(222.7003995:1) {12800} ; E: Harmonic Reduction 1/100 (0.01)(111.35019977:1) {12800000} ; E: Pinch Roller Radius 7.212148 mm (circ 45.3153) (1.1135:1) {28246.530421/mm} ; E: Encoder Roller Diameter 12.954 mm (circ 40.6962)(1,610.371484 ticks/mm) M92 E28246.530421 ; configure microsteps per mm M566 E0 P1 ; set maximum instantaneous speed changes (mm/min) M203 E17.7 I0.1 ; set maximum speeds (mm/min) M201 E5462.962963 ; set accelerations (mm/s^2) ; Kinematics M669 K0 ; configure Cartesian kinematics ; Spindles M950 R0 C"nil + io1.out" Q500 L60:10000 ; configure spindle #0 ;P"io1.out" ; Tools M563 P0 S"Blade" D0 F0 R0 ; create tool #0 ; Miscellaneous M453 ; select CNC mode T0 ; select first tool ; Remove Requirement for homing G92 E0 ;
-
Figured I might as well try the 3.6.0-Beta3 because why not.
updated firmwares to that. upgraded the plugin to 3.6.0-beta.1
Now I can get the driver to show in the plugin, but any command I give, it does not move the motor when clicking record.
Then record remains greyed out until I stop and restart the plugin.I can still send manual logging commands and view the logged file with the plugin.
-
@ironhydroxide It confuses me that you mention using the quadrature encoder. if you are using the Magnetic encoder then that is in place of a quadrature encoder.
I need to replicate your setup to see if i have the same issues with the plugin. will do that and get back to you.
-
@T3P3Tony said in Having troubles with Closed Loop tuning Plugin:
It confuses me that you mention using the quadrature encoder. if you are using the Magnetic encoder then that is in place of a quadrature encoder.
I need to replicate your setup to see if i have the same issues with the plugin. will do that and get back to you.
I'm not sure where beyond the notes I am mentioning the quadrature encoder. Some of those notes are wrong/out of date, I've gone to a 200step motor instead of the 400 I was playing with before, so my microsteps/mm are wrong for the current setup. but I'd assume that's moot for the problems I'm having with the plugin not working as I expected.
I do have a quadrature encoder connected to the 1HCL as well, I configured the Closed Loop just as Magnetic encoder on the back of the motor. (M569.1 T3)
Baby stepping here to get familiar with the system/controls, So I figured I'd practice tuning the motor with only magnetic before "leveling up" to the quadrature and magnetic (M569.1 T1)
-
Was able to get some screengrabs of the issue
Thought a minute and a half was a bit long, so I cut it off and made another grab directly after the first.
ClosedLoop1.mp4
ClosedLoop2.mp4
from fresh boot of the boards.
config.g is a bit different than above (as seen in vid) but same results
start in Assisted open loop, motor moves just fine,
clear and calibrate the encoder, then drop into closed loop with macro.
confirm closed loop
start plugin, select options.
When Clicking on "Record" nothing happens. no movement, no results.
but I can manually send the M569.5 and get movement valid results.
record stays grey,
stop plugin and refresh,
Try again with options, click record nothing happens.
Again send M569.5 and get movement and valid results. -
@ironhydroxide said in Having troubles with Closed Loop tuning Plugin:
So I figured I'd practice tuning the motor with only magnetic before "leveling up" to the quadrature and magnetic (M569.1 T1)
Ahh right i did not realise you had a linear encoder on this axis as well. As you say, that's not relevant to the plugin issue.
I have got a test setup now, I note the following:
- In the video I see you initially capture, with the plugin, at a speed and acceleration above what is configured in config.g. The moves you sent directly on the command line are much shorter and slower
- You don't need to clear and re check the encoder calibration unless you change the mounting of the magnet encoder board. (although see below about the calibration values you are getting)
- Its setup as an extruder. Which i think is the core problem with the plugin - For some reason the plugin does not like tuning it with a step move as an extruder. I need to look at that further, but as a closedloop extruder is not something that people use often that would explain why this has not come up yet.
It does appear to work for me tuning it with a custom gcode move:
However for now if you remap it as the X axis, and use reasonable values for the step manoeuvre settings then it tunes for me:
I used these values, modified from your config.g:
M584 E0; set axis mapping M584 X123.0; set axis mapping M350 X16 ; configure microstepping M906 X800 ; set axis driver currents M92 X28246.530421 ; configure microsteps per mm M566 X0 P1 ; set maximum instantaneous speed changes (mm/min) M203 X17.7 I0.1 ; set maximum speeds (mm/min) M201 X5462.962963 ; set accelerations (mm/s^2)
And also set X to 0 to avoid homing
G92 X0
Calibration values:
As a point of reference my test rig has the following calibration:M569.6 P123.0 V2 Driver 123.0 calibration succeeded, measured backlash is 0.020 step Original encoder reading errors: min -28.1, max 29.8, rms 14.1 Corrections made: min -23.2, max 24.8, rms 13.9
You may want to check the magnet is centered, the reported agc value you showed in the video in the M122 report is not bad.