1HCL 1.0 closed loop controller
-
At least it looks like all of the boards are up to date now, so it did apply the firmware.
It may help to see a video of the entire firmware zip file upload process so we can see what it's doing along the way.
-
@phaedrux https://www.youtube.com/watch?v=N9KXrUuBpnk
It took this time... thank god... ok so I tried to home my "X" axis in closed loop and it failed to home properly. The console reports:
4/20/2022, 3:31:42 PM Error: Driver 50.0 error: failed to maintain position
4/20/2022, 3:31:41 PM Warning: Driver 50.0 warning: tuning failed
Warning: Driver 50.0 new tuning error(s): The measured motion was inconsistent.
4/20/2022, 3:31:40 PM Error: Driver 50.0 error: failed to maintain position
4/20/2022, 3:31:37 PM Error: Driver 50.0 error: failed to maintain position
Error: Driver 50.0 error: failed to maintain position -
@phaedrux Y axis and Z axis home fine
Here is my HomeX:
M569 P50.0 D0 ; Turn off closed loopG91 ; relative positioning
G1 H2 Z5 F6000 ; lift Z relative to current position
G1 H1 X-240 F3000 ; move quickly to X axis endstop and stop there (first pass)
G1 H2 X5 F6000 ; go back a few mm
G1 H1 X-240 F240 ; move slowly to X axis endstop once more (second pass)G90 ; absolute positioning
G1 X50 F3000 ; Move to a known-safe position
M400 ; Wait for the move to complete
G4 P500 ; Wait for the motor to settle
M569 P50.0 D4 ; Turn closed loop back on
M569.6 P50.0 V31 ; Perform the tuning manoeuvres for a quadrature encoder
G1 X0 ; Move back to X0G1 H2 Z0 F6000 ; lower Z again
-
Glad it worked this time. Hopefully that means everything is up to date and in sync now and should stay that way going forward.
As for the homing and closed loop, I'm not really familiar. Best I can do is point you to the M569.x gcode command documentation here:
https://docs.duet3d.com/User_manual/Reference/Gcodes#m5696-execute-closed-loop-tuning-move
Let me know how you proceed and we can figure it out.
-
@dc42 In open loop what would cause the 1HCL board to report a failed to maintain position on a homing sequence? As soon as I move the axis it makes the same report, as soon as I restart the main board it makes that report
-
@supertb1 are you sure that the driver is in open loop mode? Try using D2 instead of D0 in the M569 command to set the driver to open loop mode.
-
@dc42 Yes sir, that is how it is set at the moment, would resetting the board help?
; Drives
G4 S1 ;wait for expansion boards to start
M569.1 P50.0 T2 C5 E5:10 ; Configure the 1HCL board at CAN address 50 with a quadrature encoder on the motor shaft that has 20 steps per motor full step.
M569.1 P51.0 T2 C5 E5:10 ; Configure the 1HCL board at CAN address 51 with a quadrature encoder on the motor shaft that has 20 steps per motor full step.
M569 P50.0 D2 S1 ; Configure the motor on the 1HCL at can address 50 as being in closed-loop drive mode (D4), Open loop (D2) and not reversed (S1) X axis
M569 P51.0 D4 S1 ; Configure the motor on the 1HCL at can address 51 as being in closed-loop drive mode (D4), Open loop (D2) and not reversed (S1) Y axis
M569 P0.0 S1 ; physical drive 0.0 goes forwards
M569 P0.1 S1 ; physical drive 0.1 goes forwards
M584 X50.0 Y51.0 Z0.0 E0.1 ; set drive mapping
M350 X16 Y16 Z16 E16 I1 ; configure microstepping with interpolation
M92 X80.50 Y81.70 Z407.00 E420.00 ; set steps per mm
M566 X900.00 Y900.00 Z60.00 E120.00 ; set maximum instantaneous speed changes (mm/min)
M203 X6000.00 Y6000.00 Z180.00 E1200.00 ; set maximum speeds (mm/min)
M201 X500.00 Y500.00 Z20.00 E250.00 ; set accelerations (mm/s^2)
M906 X1000 Y1000 Z800 E800 I30 ; set motor currents (mA) and motor idle factor in per cent
M84 S30 ; Set idle timeout
M917 X100 Y100 ; Set the closed loop axes to have a holding current of zero; homex.g
; called to home the X axis
;
; generated by RepRapFirmware Configuration Tool v3.3.10 on Fri Apr 08 2022 20:56:07 GMT-0500 (Central Daylight Time)
G91 ; relative positioning
G1 H2 Z5 F6000 ; lift Z relative to current position
G1 H1 X-240 F1800 ; move quickly to X axis endstop and stop there (first pass)
G1 H2 X5 F6000 ; go back a few mm
G1 H1 X-240 F360 ; move slowly to X axis endstop once more (second pass)
G1 H2 Z-5 F6000 ; lower Z again
G90 ; absolute positioning
; homex.g -
@supertb1 I was referring to this line in your homex.g file:
M569 P50.0 D0 ; Turn off closed loop
-
@dc42 I added that line to the first line of code in my home”x” and I’m still getting the same error “ driver 50.0 error: failed to maintain position. It is homing in open loop and is working that way but the error persists… I’m going to put it back in close loop and see what it does. I put it back into closed loop and of course the error persists. I switch the cards around and manually operated the switches by hand, the problem follows the motor. I disconnected the motor leads from the board, ran M122 B50 looking for the raw count being zero, then moved the motor armature and ran M122 B50 again and no change in the raw count so I think I have a bad encoder on my motor. I guess I am back to the drawing board on my end... aside from this issue I have all my other areas of concern addressed. Thank you all for your help @dc42, @Phaedrux
-
@supertb1 what exactly is the sequence that gives rise to that error message? Does it occur during homing; or when homing is complete; or when you attempt an axis movement after homing? Has the driver been switched back to closed loop mode when it occurs?
-
@dc42 it happens immediately upon initiation of homing sequence, on command movement and at board reset in both open and closed loop, it will home in both open and close loop but in close loop it will not maintain position. I am going to take the motor apart to try and understand what is happening better… more to follow
-
@supertb1 I popped the side cover off the motor and found the A+ wire had a bad solder joint, put it all back together and now when I home the axis it still returns 4/22/2022, 8:43:39 PM Error: Driver 50.0 error: failed to maintain position
And then it displays drive 50.0 tuned successfully measured hysteresis 0.17 step… go figure… it is holding position and everything. So last question, how do I get the error to go away? -
@supertb1 so is the only problem now that in open loop mode when you are homing and have not tuned, you are getting the "filed to maintain position" message?
-
@dc42 no it is giving the alarm on a tuned closed loop homing cycle… it is doing it on my other system that I recently updated… the alarm has something to do with one of the updates I think
-
@supertb1 the homing move or moves should aways be done in open loop mode, and should be followed by the basic tuning move before switching to closed loop.
-
@dc42 I am using the recommended homing sequence as prescribed
-
@supertb1 please can you test if this issue is resolved in 3.5b3
-
@T3P3Tony Hi. I am almost scared to update... I am currently working through issues with my new coreXY (https://forum.duet3d.com/topic/32222/corexy-1hcl-issues/2?_=1682288729468). Apparently the close loop tuning maneuver has changed from the previous coding and it may be part of what is going on with this new machine. I will update and see if any errors develope
-
@supertb1 any news?
-
@dc42 said in 1HCL 1.0 closed loop controller:
@supertb1 the homing move or moves should aways be done in open loop mode, and should be followed by the basic tuning move before switching to closed loop.
You mean after homing, switch to closed loop and THEN do the tuning maneuvre? The documentation states it that way...?
Still having trouble with my Nema34's closed loop so i'm looking at everything right now.