Control for “Maslow” style cnc
-
@droftarts I figured, I could use any two of the ABC motor to define a 2D plane. So I took the BC motors, because they already defined the left and right corner. (A motor is the front/center motor)
Here's the basic config.g, but I don't know how to match XY with ABCD or how to define a tool for a plotter; Configuration file for Duet WiFi (firmware version 3) ; ; General preferences G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"Hangprinter_2D" ; set printer name M669 K6 A0.0:220.0:0.0 B-220.0:220.0:0.0 C220.0:220.0:0.0 D2000.0 P100.0 Q0.0 R1 M666 X0 Y0 Z0 ; put your endstop adjustments here, or let auto calibration find them ; Network M552 S1 ; enable network M586 P0 S1 ; enable HTTP M586 P1 S0 ; disable FTP M586 P2 S0 ; disable Telnet ; Drives M569 P0 S0 ; physical drive 0 goes forwards M569 P1 S0 ; physical drive 1 goes forwards M569 P2 S0 ; physical drive 2 goes forwards M569 P3 S0 ; physical drive 3 goes forwards M584 A0 B1 C2 D3 ; set drive mapping M350 A16 B16 C16 D16 I1 ; configure microstepping with interpolation M92 A200.00 B200.00 C200.00 D0 ; set steps per mm M566 A900.00 B900.00 C900.00 D1200 ; set maximum instantaneous speed changes (mm/min) M203 A24000.00 B24000.00 C24000.00 D4800 ; set maximum speeds (mm/min) M201 A4000.00 B4000.00 C4000.00 D1000 ; set accelerations (mm/s^2) M906 A200 B400 C400 D200 I70 ; set motor currents (mA) and motor idle factor in per cent M84 S10 ; Set idle timeout ; Axis Limits M208 X-100:100 Y-100:100 Z0:10 ; Tools M563 P0 ; define tool 0 G10 P0 X0 Y0 Z0 ; set tool 0 axis offsets M911 S20 R22 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; set voltage thresholds and actions to run on power loss T0 ; select first tool
//edit OK, I guess I found the reason for one of the errormessages: "D" on has one parameter in my config, but needs three....
YES, that solved most of it, although I still don't know, if I have to map AB drives to XY axes? I guess it should be done automatically by the kinematic model? -
@o_lampe Looks like our Hangprinter documentation needs updating; there's a whole bunch of parameters not covered on the wiki page here https://docs.duet3d.com/User_manual/Machine_configuration/Configuration_Hangprinter
Looks like you can define Q, R, U, O, L, H and J: https://github.com/Duet3D/RepRapFirmware/blob/47435151e110f373fc80721a2c265e38b8ec5e3b/src/Movement/Kinematics/HangprinterKinematics.cpp#L203
So it's coming up with sensible numbers for those as well, I guess. There's a reasonable amount of comments in HangprinterKinematics.cpp to hopefully work out what is going on!Ian
-
@o_lampe Also note that, as of RRF 3.5.0-beta4, Hangprinter support is removed from Duet 2 WiFi/Ethernet builds. RRF 3.4.6 is fine, though. Just in case you decide to update!
https://github.com/Duet3D/RepRapFirmware/wiki/Changelog-RRF-3.x-Beta#reprapfirmware-350-beta4[Duet 2] Hangprinter kinematics are no longer supported in the standard build of Duet2CombinedFirmware because of lack of flash memory space
Ian
-
@droftarts I have made some progress and got motion in the right directions. But tightening the belts and adding some gravity needs a propper balance of forces. I played with the L&H values and Q&R as well, but didn't see a difference.
@CNCModeller How about window cleaning on skyscrapers? The strap-on corners will fit almost anywhere.
-
I played a bit more with the HP-kinematics, but there are some weird things I couldn't work out yet:
- No matter what I set as steps/mm, it always moves 1/3 of the requested length (XYZABCD, tried all)
- I can't move past X0. Positive X-moves are straight, but lower than X0, it starts to make a curve
- although I only have ABCD axes in the kinematic model, I have to set motor currents for XYZ??
Not very promissing.
I really don't want to dig out an old RAMPS controller and bite my teeth out, configuring Marlin -
I found the inverse kinematics which are pretty simple.
Just don't want to fall in this rabbit hole called "RRF compiling...with Eclipse"; inverse kinematics of Makelangelo polargraph plotter function IK(P) { A = Px - M1x; B = Py - M1y; M1P = square_root(A*A+B*B); A = Px - M2x; // B is the same M2P = square_root(A*A+B*B); return M1P,M2P; }
-
I completely missed that M666 alters the Q,R,L,H,J... settings. Now I've set them to my best knowledge,
but now the steppers don't energize.
I had to set a Q-value greater 0 to make it work.
The XY axes both work in the right direction, but they aren't perpendicular to each other.m669 Kinematics is Hangprinter, 100 segments/sec, min. segment length 0.20mm A:0.00, -200.00, 0.00 B:193.00, 241.00, 0.00 C:-193.00, 241.00, 0.00 D:0.00, 0.00, 200.00 P:Print radius: 200.0 m666 Q:Buildup fac 0.0000 R:Spool r 6.00, 6.00, 6.00, 6.00 U:Mech Adv 1, 1, 1, 1 O:Lines/spool 1, 1, 1, 1 L:Motor gear teeth 20, 20, 20, 20 H:Spool gear teeth 20, 20, 20, 20 J:Full steps/rev 200, 200, 200, 200
-
-
@o_lampe I'm not sure where you are up to on your project, but a couple of notes might help from my Polargraph.
although I only have ABCD axes in the kinematic model, I have to set motor currents for XYZ??
In the config.g you posted earlier (which you may already have changed), you have defined the ABCD axes in M584. However, Hangprinter maps the ABCD drives to XYZU. Because ABCD are really anchor points, rather than motor axes. All speeds, accelerations, motor currents etc are in terms of XYZU. See https://docs.duet3d.com/User_manual/Machine_configuration/Configuration_Hangprinter#select-hangprinter-kinematics
I can't move past X0. Positive X-moves are straight, but lower than X0, it starts to make a curve
I had this too. It was caused by the motor assignments, and I actually had the motors mapped incorrectly. Because you only want to use the B and C anchor points, you only use the Y and Z motor assignments. For a long time I was using X and Y! Made particularly confusing for me, because I have the Z motor driver for the Y axis, and E1 motor driver for Z axis. If only we had just called them driver 0 to 4! See the config.g in the Polargraph thread: https://forum.duet3d.com/topic/35248/duet-polargraph
I think you resolved the M666 problems, and I think mine are set similar to yours. As far as I can tell, it's mostly to do with gearing and spool wind up, so largely irrelevant for our application, just have to set sensible numbers.
Ian