Setting up mesh grid and homing issues on SCARA type printer
-
Thanks for phaedrux, got firmware and some coding issues sorted out. I'm moving into tuning and tweaking now, so i'm posting here.
Need help setting up mesh grid etc for my Duet 3 mini 5+ on a Scara one arm printer. I feel like I might have something wrong with my settings.
Here's the original github for the X-scara printer: https://github.com/madl3x/x-scara/blob/master/firmware/CONFIGURE.md
Marlin config is here if some one can help: https://github.com/madl3x/x-scara/blob/master/firmware/Marlin-2.0.x/config/SCARA/X-SCARA/Configuration.h
Current settings:
M669 K4 P98.00 D98.00 A-105.5:106.5 B18.25:140 C-1:0:0 X100 Y-100 T0.5 S300I feel like I may have set the distal arm endstop in the wrong location? Here is my setup in the homeing files:
; homeall.g
; called to home all axes
;
; generated by RepRapFirmware Configuration Tool v3.3.10 on Sat Dec 18 2021 16:59:08 GMT-0800 (Pacific Standard Time)
; home x PROXIMAL ARM
G91 ; relative movement
G1 H2 Z4 F100 ; ensure head is clear of the bed
G1 H1 X-250 F3000 ; move proximal joint clockwise up to 200 degrees until the endstop switch is triggered
G1 H2 X10 ; move proximal joint anticlockwise by 10 degrees
G1 H1 X-20 F600 ; move proximal joint slowly to the endstop switch again
M117 "homed proximal arm"; home y DISTAL ARM
G1 H1 Y20 F3000 ; move distal joint anti clockwise up to 20 degrees FIRST TO PREVENT TOO FAR LEFT THAT IT'LL CRASH!
G1 H1 Y-250 F3000 ; move distal joint clockwise up to -200 degrees until the endstop switch is triggered
G1 H2 Y10 ; move distal joint anticlockwise by 10 degrees
G1 H1 Y-20 F600 ; move distal joint slowly to the endstop switch again
M117 "homed distal arm"; home z
G1 H2 Z9 F200 ; raise head 4mm to ensure it is above the switch trigger height
G1 H2 X102 F2000 ; move proximal joint anticlockwise by 10 degrees
G1 H2 Y87.5 F2000 ; move distal joint anticlockwise by 10 degrees
G30 ; lower head, stop when probe triggered and set Z to trigger height
G90 ; back to absolute mode
G1 H2 X-60 Y60; move into printable area
G0 X0 Y0; move to zero point
G1 H2 Z30 ; move to 30mm so probing won't failvideo of it currently homing https://www.dropbox.com/s/gph3fu8ar1gilcp/2021-12-19 15.53.02.mp4?dl=0
Reason I'm asking is cause the B parameter is currently set to B18.25:140, and doesn't seem right, but when I do G1 H2 X0 Y0, it does go to the middle and lines up both arms.
d
Second is mesh grid. don't want to use the whole thing yet as I don't have th proper bed size,
M557 X33:80 Y15:195 S30 ; define mesh grid
but it's just goint too far to the left for G32. What should I set it too?Third is that is there a command to test probe accuracy? Recall there was one awhile back, but forgot. Thanks!
-
@iamthebest22 Update: Getting a weird occasional error:
G28
Error: G1/G2/G3: intermediate position outside machine limits
I hate to ask this, but is there anyway to use a BLtouch or similar for a scara printer? I tried using the precision piezo orion, but unfortunately the arm design just enough stiff enough. While the piezo itself works, there's just too big of a deviation due to the arm being lax(and I know it's not the precision piezo orion because I tested it on other machines before and it was working fine with deviations of around 0.006 mm). I'm assuming the offset would be in degrees?
According to the creator Alex, he was able to do this in the config located here:
https://github.com/madl3x/x-scara/blob/master/firmware/Marlin-2.0.x/Marlin/Configuration.hline 104 says:
// Relative probe offset in angles, required for bed leveling (G29)
#define SCARA_PROBE_OFFSET_DEGREES 20Would suck not to be able to use this printer now that I've built it.
-
@iamthebest22 said in Setting up mesh grid and homing issues on SCARA type printer:
G28
Error: G1/G2/G3: intermediate position outside machine limits
Hello, nice to see you trying to use a Scara printer.
The BLtouch will not solve this issue. Such error messages mean, that the command tries to move somewhere and the path is not reachable. The end position or the path between. One possibility is, that from your homing position to the first G28 is not a valid path. Another possibility is, that trying to reach the point violates angle restrictions (especially parameters A and B of M669). In my experience, it is best to make a little drawing how the arms behave.
To solve such a problem, you can rotate both arms after the homing individually with G1 H2 commands, so the position is near the first G28 point. The G1 H2 commands can be stored in the homing file.
-
@joergs5 Hi joergs, thanks for the fast response. I went to bed right after I posted, was getting too tired.
I should be more clear, I don't expect the BLtouch to solve the G1G2 G3 issue, that's another issue entirely. I have no idea how the arms should behave xD, the only thing I have is this, https://github.com/madl3x/x-scara/blob/master/images/center_position.png
that's different than the G1 H2 X0 Y0 right? when I do that, both arms should be in line, or should it be like this picture?
I want to use the BLtouch because due to the arm not being stiff enough, I can't use a precision piezo orion with accuracy, but I don't think the option to use an offset for SCARA type printers has been create, as dc42 himself said here a few years back:
https://miscsolutions.wordpress.com/2017/09/24/improving-the-robotdigg-scara-printer/He said, in the adding a Z probe section, with quotes
"It must be possible to mount it very close to the nozzle. In most printers, XY offset between the Z probe and the nozzle can be compensated. But in a SCARA printer, the print head rotates, so the XY offsets are not constant. In principle the Z probe offset from the nozzle could be specified as a modified distal joint angle and a modified distal arm length, so that the probe can be moved to the exact spot required; but RepRapFirmware doesn’t implement this yet."So should I get a duet IR sensor instead? It should work on those black flexible matte type magnetic bed surfaces?
-
@iamthebest22 said in Setting up mesh grid and homing issues on SCARA type printer:
G1 H2 X0 Y0 right? when I do that, both arms should be in line, or should it be like this picture?
The degrees of your arms depend on where you homed the arms. G1 H1 homes an axis by moving an axis until hitting the endstop and then setting to the value which is specified with the A and B parameters (min or max value, this depends on whether the end stop is low or high).
You can verify the current firmware value of the stepper angle by calling M114 and checking the Count values: it is degrees * steps/degree, i. e. degrees * M92 value.I don't think the option to use an offset
This is true for all probes for scara. A probe has an offset by the nozzle, defined with G31, but it requires that the XY direction in respect to the nozzle stays the same. This is not true for nonlinear kinematics like scara (in other words, the hotend and nozzle rotates), so it doesn't work. You should set the probe to the same position like the nozzle. Z can be different. I saw a delta where the user attached the probe below the nozzle for probing and removed it after probing. Maybe you can do it the same.
An alternative to the probe at the nozzle position is to use the nozzle as the probe. This is used by a technique of piezo elements below the print bed as sensor. The nozzle slightly touches the bed and the piezo senses it. Described e.g. in https://reprap.org/forum/read.php?424,865620,874225
A third possibility is to have a toolchanger and to use one tool as probe.
-
@joergs5 Thanks and I think I may have gotten something confused myself. With Reprapfirmware, is it possible, cause a scara printer can do this, have a print area that is a half donut shape and have it defined in RRF? Or can you only define it as a square bed or circular? Thanks.
second thing is I'm waiting on the Duet IR sensor to arrive, so I can't test the homing until it arrives, hopefully this week. But yes the first question about the bed size is the most important one, cause I may have been thinking it all wrong this whole time.
-
@iamthebest22 said in Setting up mesh grid and homing issues on SCARA type printer:
have a print area that is a half donut shape and have it defined in RRF
I haven't developed this kinematics, so I don't know for sure. But I checked the source code, which is in https://github.com/Duet3D/RepRapFirmware/blob/3.4-dev/src/Movement/Kinematics/ScaraKinematics.cpp for RRF 3.4beta. The limits are calculated in the LimitPosition() from line 262, if you're interested.
LimitPosition makes those calculations:
- M208 sets absolute limits
- then arm lenghts are checked, whether they can reach the desired point
- then it checks whether the allowed arm movements allow reaching the path between
- some angle restrictions are checked
So in my understanding of the code, yes, is is like a cylinder with possibly a hole inside if the distal arm is shorter than the proximal arm (which is not the case for your config). If M208 is defined small, the M208 defined cubic area is the print area. If M208 is set outside the arm length sum (in every direction starting from the X, Y offsets), then the print area is defined by the maximum arm lengths and angle restrictions.
The maximum radius is a bit shortened ((proximal+distal)*0.995), so don't try to reach the maximum.
Additionally, some angle limits are calculated and limit the print area.
You can do two strategies
- set M208 small, defining a secure cubic print area, or
- set M208 bigger than the arm sums. Then the print area will be limited by the arm calculations. The area is like a cylinder then (with possible hole)
-
Sorry for the delay everyone, was waiting for my Duet IR probe sensor to arrive before I installed it. I got to to about 8mm of the nozzle, which while not perfect, should be close enough. My problem is when I run a macro M48 that is this:
M291 P"Probe will be tested 10 times and return mean and standard deviation. Ok or Cancel?" R"WARNING" S3 ; User must click OK or cancel.
G28
M401
G30 P0 X0 Y0 Z-9999
G30 P1 X0 Y0 Z-9999
G30 P2 X0 Y0 Z-9999
G30 P3 X0 Y0 Z-9999
G30 P4 X0 Y0 Z-9999
G30 P5 X0 Y0 Z-9999
G30 P6 X0 Y0 Z-9999
G30 P7 X0 Y0 Z-9999
G30 P8 X0 Y0 Z-9999
G30 P9 X0 Y0 Z-9999 S-1
M402I get this result: M292
G32 bed probe heights: -0.933 -0.877 -0.880 -0.877 -0.897 -0.890 -0.887 -0.885 -0.887 -0.885, mean -0.890, deviation from mean 0.015always one time where it's off by 0.05mm, which is big, my IR probe is slightly angled at about 6 degrees, should it not be angled at all?
My settings:
M558 P8 C"io3.in" H5 F60 T9000 R0.5
G31 P50 X0 Y0 Z1.0
M557 X33:80 Y15:195 S30 ; define mesh gridI really want to get this working, but man. It's probing against a black matte magnetic flexible bed, so shouldn't have issues.
-
@iamthebest22 my guess is that some sort of backlash is causing the first probe stop height to be different. To allow for this you can do an extra dummy G30 P0 probe before you start probing in earnest, or position the probe over the first probe point and move it down and then up, to simulate a probing move and take up the backlash.
-
@dc42 I will do that, I did find some issues (parts cracked on the arms and that may be why), and will fix it, though I probably won't be able to until Monday.
dc42 Merry Christmas and Happy New Year! (If you celebrate it). I got a question, I've been excited for SCARA since your blog 4 years ago.
You mentioned in adding a Z probe in the blog
"It must be possible to mount it very close to the nozzle. In most printers, XY offset between the Z probe and the nozzle can be compensated. But in a SCARA printer, the print head rotates, so the XY offsets are not constant. In principle the Z probe offset from the nozzle could be specified as a modified distal joint angle and a modified distal arm length, so that the probe can be moved to the exact spot required; but RepRapFirmware doesn’t implement this yet."
Would it be possible to implement it? I can wait, better late than never.
-
Hi Everyone, hope you all had a Merry Christmas and upcoming happy new year. I have been busy with getting the scara to have consistent improved deviation on the probing accuracy test. with a more rigid setup, I now can get it to usually within 0.02mm of deviation, with the worse being 0.04mm (out of like 11 tries that was the worse), so I'm happy with that. Still, I'm hoping we can implement a probing degree offset for scara printers. I've gotten the duet IR to about 8mm of the nozzle, so hopefully it works for bed leveling.
Back to mesh grid and other issues.
I've changed multiple settings, and here is my current settings. Still getting the error:
M120 G91 G1 Z25 F6000 G90 M121
Error: G1/G2/G3: intermediate position outside machine limitscurrent setup M669 K4 P98.00 D98.00 A-105.5:106.5 B0:140 C-1:0:0 X100 Y-100 T0.5 S300
; Axis Limits
M208 X0 Y0 Z0 S1 ; set axis minima
M208 X250 Y250 Z300 S0 ; set axis maxima; Endstops
M574 X1 S1 P"!io5.in"
M574 Y1 S1 P"!io6.in"; Z-Probe PRECISION PIEZO ORION NOW DUET IR PROBE SENSOR
M558 P8 C"io3.in" H5 F120 T6000 R0.8 A2
G31 P50 X0 Y0 Z2.30
M557 X33:80 Y15:195 S30 ; define mesh gridI'm at an absolute loss. dunno what to change so that I can lift z