1HCL 1.0 closed loop controller
-
@dc42 This is what I came up with on my heater calibrations:
M307 H0 R0.395 K0.368:0.000 D5.05 E1.35 S1.00 B0
M307 H1 R4.905 K0.241:0.035 D7.64 E1.35 S1.00 B0 V24.0
Do I try and perform Duet2and3Firmware-3.4.0.zip again? or is there something else I need to do? -
@supertb1 said in 1HCL 1.0 closed loop controller:
Do I try and perform Duet2and3Firmware-3.4.0.zip again? or is there something else I need to do?
Just to verify, you are uploading the whole zip file to the system tab in DWC? Correct?
Can you send M122 and M98 P"config.g" in the gcode console and copy and paste the results here?
Are you using a raspberry pi?
-
@phaedrux
To answer your question I am using the DWC to upload the Zip file as is with out unziping it in any way and no there is no Raspberry Pi or any other kind of USB handler. It is strictly Duet equipment in a stand alone format in the control box. Incedently I did get a good response back on the Y axis in closed loop so I am excited to get to that part. Let me know your thoughts please.
M122
=== Diagnostics ===
RepRapFirmware for Duet 3 MB6HC version 3.4.0 (2022-03-15 18:57:24) running on Duet 3 MB6HC v1.01 or later (standalone mode)
Board ID: 08DJM-956BA-NA3TJ-6J9F2-3SD6J-9B9AT
Used output buffers: 1 of 40 (13 max)
=== RTOS ===
Static ram: 151000
Dynamic ram: 96256 of which 0 recycled
Never used RAM 103416, free system stack 200 words
Tasks: NETWORK(ready,25.4%,237) ETHERNET(notifyWait,0.0%,184) HEAT(notifyWait,0.0%,321) Move(notifyWait,0.0%,352) CanReceiv(notifyWait,0.0%,797) CanSender(notifyWait,0.0%,374) CanClock(delaying,0.0%,339) TMC(notifyWait,8.0%,92) MAIN(running,66.4%,1101) IDLE(ready,0.1%,30), total 100.0%
Owned mutexes:
=== Platform ===
Last reset 00:01:45 ago, cause: power up
Last software reset at 2022-04-19 16:25, reason: User, GCodes spinning, available RAM 103216, slot 2
Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x00400000 BFAR 0x00000000 SP 0x00000000 Task MAIN Freestk 0 n/a
Error status: 0x00
Aux0 errors 0,0,0
Step timer max interval 127
MCU temperature: min 19.7, current 30.8, max 31.0
Supply voltage: min 24.2, current 24.2, max 24.3, under voltage events: 0, over voltage events: 0, power good: yes
12V rail voltage: min 12.0, current 12.1, max 12.2, under voltage events: 0
Heap OK, handles allocated/used 0/0, heap memory allocated/used/recyclable 0/0/0, gc cycles 0
Events: 0 queued, 0 completed
Driver 0: standstill, SG min 0, mspos 8, reads 59917, writes 14 timeouts 0
Driver 1: standstill, SG min 0, mspos 8, reads 59917, writes 14 timeouts 0
Driver 2: standstill, SG min 0, mspos 8, reads 59920, writes 11 timeouts 0
Driver 3: standstill, SG min 0, mspos 8, reads 59920, writes 11 timeouts 0
Driver 4: standstill, SG min 0, mspos 8, reads 59920, writes 11 timeouts 0
Driver 5: standstill, SG min 0, mspos 8, reads 59921, writes 11 timeouts 0
Date/time: 2022-04-19 20:48:29
Slowest loop: 2.39ms; fastest: 0.05ms
=== Storage ===
Free file entries: 10
SD card 0 detected, interface speed: 25.0MBytes/sec
SD card longest read time 1.5ms, write time 0.0ms, max retries 0
=== Move ===
DMs created 125, segments created 0, maxWait 0ms, bed compensation in use: none, comp offset 0.000
=== MainDDARing ===
Scheduled moves 0, completed 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1
=== AuxDDARing ===
Scheduled moves 0, completed 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1
=== Heat ===
Bed heaters 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1, chamber heaters -1 -1 -1 -1, ordering errs 0
=== GCodes ===
Segments left: 0
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
USB is idle in state(s) 0
Aux is idle in state(s) 0
Trigger is idle in state(s) 0
Queue is idle in state(s) 0
LCD is idle in state(s) 0
SBC is idle in state(s) 0
Daemon is idle in state(s) 0
Aux2 is idle in state(s) 0
Autopause is idle in state(s) 0
Code queue is empty
=== Filament sensors ===
Extruder 0 sensor: no data received
=== CAN ===
Messages queued 957, received 1698, lost 0, boc 0
Longest wait 6ms for reply type 6018, peak Tx sync delay 6, free buffers 50 (min 49), ts 526/525/0
Tx timeouts 0,0,0,0,0,0
=== Network ===
Slowest loop: 4.39ms; fastest: 0.02ms
Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0), 0 sessions Telnet(0), 0 sessions
HTTP sessions: 1 of 8-
Ethernet -
State: active
Error counts: 0 0 1 0 0
Socket states: 5 2 2 2 2 0 0 0M98 P"config.g"
HTTP is enabled on port 80
FTP is disabled
TELNET is disabled
M122 B50.0
Diagnostics for board 50:
Duet EXP1HCL firmware version 3.4.0 (2022-03-15 08:58:59)
Bootloader ID: SAME5x bootloader version 2.4 (2021-12-10)
All averaging filters OK
Never used RAM 52288, free system stack 192 words
Tasks: Move(notifyWait,0.0%,152) HEAT(notifyWait,0.0%,88) CanAsync(notifyWait,0.0%,70) CanRecv(notifyWait,0.0%,79) CanClock(notifyWait,0.0%,72) TMC(notifyWait,34.6%,360) CLSend(notifyWait,0.0%,152) MAIN(running,63.7%,407) IDLE(ready,0.0%,30) AIN(notifyWait,1.7%,265), total 100.0%
Last reset 00:04:37 ago, cause: power up
Last software reset data not available
Closed loop enabled: yes, pre-error threshold: 5.00, error threshold: 10.00, encoder type rotaryQuadrature, reverse polarity: no, position 1, raw count = 0, tuning mode: 0, tuning error: 0x1, collecting data: no
Control loop runtime (ms): min=0.003, max=0.012, frequency (Hz): min=11364, max=17045
Driver 0: pos 0, 106.5 steps/mm,not tuned, SG min 0, mspos 8, reads 2343, writes 34 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 -7/7, peak Rx sync delay 195, resyncs 0/0, no step interrupt scheduled
VIN voltage: min 24.3, current 24.3, max 24.4
V12 voltage: min 12.1, current 12.1, max 12.1
MCU temperature: min 22.7C, current 25.6C, max 25.8C
Last sensors broadcast 0x00000000 found 0 45 ticks ago, 0 ordering errs, loop time 0
CAN messages queued 2258, send timeouts 0, received 2511, lost 0, free buffers 37, min 37, error reg 0
dup 0, oos 0/0/0/0, bm 0, wbm 0, rxMotionDelay 0M122 B51.0
Diagnostics for board 51:
Duet EXP1HCL firmware version 3.4.0 (2022-03-15 08:58:59)
Bootloader ID: SAME5x bootloader version 2.4 (2021-12-10)
All averaging filters OK
Never used RAM 52288, free system stack 182 words
Tasks: Move(notifyWait,0.0%,152) HEAT(notifyWait,0.0%,88) CanAsync(notifyWait,0.0%,70) CanRecv(notifyWait,0.0%,79) CanClock(notifyWait,0.0%,72) TMC(notifyWait,34.6%,360) CLSend(notifyWait,0.0%,152) MAIN(running,63.7%,417) IDLE(ready,0.0%,30) AIN(notifyWait,1.7%,265), total 100.0%
Last reset 00:05:21 ago, cause: power up
Last software reset data not available
Closed loop enabled: yes, pre-error threshold: 5.00, error threshold: 10.00, encoder type rotaryQuadrature, reverse polarity: no, position 1, raw count = 0, tuning mode: 0, tuning error: 0x1, collecting data: no
Control loop runtime (ms): min=0.003, max=0.011, frequency (Hz): min=11364, max=17442
Driver 0: pos 0, 106.5 steps/mm,not tuned, SG min 0, mspos 8, reads 655, writes 34 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 -4/4, peak Rx sync delay 195, resyncs 0/0, no step interrupt scheduled
VIN voltage: min 24.3, current 24.3, max 24.4
V12 voltage: min 12.2, current 12.2, max 12.2
MCU temperature: min 22.1C, current 25.8C, max 25.8C
Last sensors broadcast 0x00000000 found 0 140 ticks ago, 0 ordering errs, loop time 0
CAN messages queued 2610, send timeouts 0, received 2909, lost 0, free buffers 37, min 37, error reg 0
dup 0, oos 0/0/0/0, bm 0, wbm 0, rxMotionDelay 0 -
-
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