Scara Setup
-
With zero X and Y origin offset in the M669 command, X0 Y0 is the location of the proximal joint, and +X is the direction that the proximal arm points at angle zero. So if both arms home to 90 degrees clockwise, then X= -distal arm length and Y= -proximal arm length sounds right to me. This is assuming that you don't have any other arm movement commands in homeall.g after the homing move, and that you have corrected the crosstalk factor to allow for the different steps/mm as we discussed previously.
Please try the following:
1. With power off, set both arms at 0 degrees. This is the position that the firmware assumes at power on.
2. Power on. The web interface should report the position as X= sum of arm lengths, Y= 0. Does it? M114 should report the step counts as zero.
3. Send G91 followed by G1 S2 Y90 to move the distal arm clockwise 90 degrees. Does the web interface report the correct position?
-
With the arms at 0 the printer turns on and reports x = 210.7 y = 0. Lengths of the arms would be 211.8 as defined in config.
I think this happens on this command
maxRadius *= 0.995; Which gives the 210.741
M669 K4 P111.4 D100.4 A-85:85 B-85:85 C-2.37:0:0 S150 T0.1 X0 Y0;
7:52:36 PM
M114
X:210.741 Y:0.000 Z:0.000 E0:0.0 E1:0.0 E2:0.0 E3:0.0 E4:0.0 E5:0.0 E6:0.0 E7:0.0 E8:0.0 Count -365 -41 0 User 210.7 -0.0 0.0Sending g91 followed by g1 s2 y90 rotates the distal arm clockwise 90 degrees. The web interface reports x = 100.3 y=89.3. I would expect x=111.4 y=100.4 or something close to this?
-
I can see what's happened. The original position is outside maxRadius, so the firmware has "corrected" it to be within maxRadius as if it were a position commanded by the user, by assuming the distal arm is rotated clockwise a few degrees (hence the motor step count of -41) and the proximal arm is rotated the same number of degrees clockwise. That's why the reported position doesn't agree exactly with the actual position.
When you home the printer, what is the reported position now?
-
11:18:00 AM
M114
X:95.221 Y:-58.365 Z:0.000 E0:0.0 E1:0.0 E2:0.0 E3:0.0 E4:0.0 E5:0.0 E6:0.0 E7:0.0 E8:0.0 Count -5695 -2401 0 User 95.2 -58.4 0.0This is with the printer sitting at the homing switches, same as before.
-
Your config says the homing positions are at -85deg for each arm. So by my calculations the position should be:
X = P * cos(85) + D * cos(85+85) = -89.17mm
Y = P * sin(85) + D * sin(85+85) = -128.41mmDo you agree?
I think I see what is happening. When the distal homing switch is triggered, the firmware is setting the distal motor position without allowing for the effect that the proximal motor has on the distal joint position. I'll fix this in the next beta.
As a temporary workaround, try this in your homeall.g file:
1. G1 S1 X… move to home the proximal joint.
2. G2 S2 X85 move to put the proximal joint at zero degrees.
3. Then home the distal joint.
-
There is a point where the crosstalk parameter starts to cause erratic movement. I will wait till I try your new release for further testing.
-
OK, I've just built the new version, so I'll test it with a view to releasing it shortly.
-
Installed new firmware this is results of M114 which is now right.
8:47:37 PM
M114
X:-89.163 Y:-128.423 Z:0.000 E0:0.0 E1:0.0 E2:0.0 E3:0.0 E4:0.0 E5:0.0 E6:0.0 E7:0.0 E8:0.0 Count -5695 -8092 0 User -89.2 -128.4 0.0Homing then rotating back to 0 angle results in x211.8 y0 which is right. Sometimes says y0.1 ?
OK David very good. I am able to send coordinates that make sense and it draws lines that are close to accurate. Can I expect the robot to change arm positions when just sending g1 commands or will it only work when running files?
-
Once you have homed all axes, it should respond to normal G1 commands from any source. G1 moves will be in straight lines. G0 moves will generally be curved.
-
I knew that was not clear enough question. If I were to command it to move to a coordinate that would require the use of the opposite distal/proximal arm angle should it switch. Also should I be able to manually command it to go to positions past the min radius.
-
If you give it a G0 command that requires an arm mode switch, then it should switch. A G1 command won't because G1 commands are supposed to be straight line movements. However, my own SCARA printer is only capable of one arm mode, so that is untested.
Positions below the min radius or above the max radius are unreachable, so if you command movement to such a position, the destination coordinate will be changed to an achievable position.
-
Just wanted to thank you again for helping with this David. I was able to get things dialed in fairly well using M579 to scale the y axis by 1.06. Further testing needed but I have confidence that this will work for me. Cross talk seems to be working with a value of -1, anything too far away from -1 get out whack? I have test printed (with a pen) a number of cubes rectangles and other shapes and designs with good results. Thanks again.
-
I'm glad it's working for you. From what I understand of your machine, a crosstalk value of -1 should be exactly right.
It should also work on your Duet 06, although the trig calculations will be somewhat slower so the maximum speed and/or segments/sec you can use may be lower.
-
Ok I will switch it back over to the 0.6 and see what happens
-
David
it was interesting to see your Scara project from robotdiggs. I guess I was thinking along the same line and purchased this Scara from robotdiggs.
I have it all wired up and I purchase a Duet wifi which should arrive tomorrow.https://www.robotdigg.com/product/1193/Closed-loop-Stepper-Motor-SCARA-Robot-Arm
-
David
it was interesting to see your Scara project from robotdiggs. I guess I was thinking along the same line and purchased this Scara from robotdiggs.
I have it all wired up and I purchase a Duet wifi which should arrive tomorrow.https://www.robotdigg.com/product/1193/Closed-loop-Stepper-Motor-SCARA-Robot-Arm
It will be interesting to compare our experiences. You may find that you can get rid of the distal arm backlash just by replacing the distal arm belts with ones from the UK supplier that I used for the proximal arm belt, instead of replacing the belts and pulleys by GT2 ones. I suggest you still replace the 20 tooth pulley by a 16 tooth one, to get a higher steps per degree.
Another upgrade I am considering is to replace the proximal and distal motors by 0.9deg ones.
-
Thanks for your comments about backlash, but this model has virtually zero backlash. I'm using hybrid closed loop stepper motors which should be quite accurate for the scara
Have a look at the photo and you can see some initial setup parameters.
Do you have the config file for your current robotDiggs Scara, this might be helpful.
I'm using external driver signals off of the header, how do you reassign these to x y and z.
thanks Dannyhttps://www.dropbox.com/s/27ekssq1lk9ntzd/scara%20robotdiggs.jpg?dl=0
-
Extern drivers must be connected to the expansion connector (I hope that is what you mean by "the header"). Use M584 to remap the XYZ axes to them, see https://duet3d.com/wiki/G-code#M584:_Set_drive_mapping. Depending on the drivers and how you have connected them, you may need to use the R1 parameter in the M569 commands to invert the Enable signal.
Here is my config.g file:
; Configuration file for Duet Ethernet in SCARA printer (firmware version 1.19)
; General preferences
M111 S0 ; Debug off
M550 PRobotdigg SCARA ; Machine name
M551 Preprap ; Machine password
M552 S1 ; Enable networking
M555 P2 ; Set USB output to look like Marlin
M575 P1 B57600 S1 ; Set aux port baud rate and require checksum, for PanelDue; Drives
M569 P0 S0 ; Drive 0 goes backwards X
M569 P1 S1 ; Drive 1 goes forwards Y
M569 P2 S0 ; Drive 2 goes backwards Z
M569 P3 S0 ; Drive 3 goes backwards E; Movement
M669 K4 P160 D159.5 A-130:22 B-27:157.5 C0:0:0 X65 Y-175 S100 ; set SCARA mode and parameters
M574 X2 Y2 Z1 S1 ; Define active high homing switches
M92 X71.1111 Y100 ; Steps/degree for proximal and distal joints
M92 Z1600 E106 ; Steps/mm for Z and EM208 S1 X0 Y-120 Z-1 ; Axis minima
M208 X200 Y330 Z150 ; Axis maximaM350 X16 Y16 Z16 U16 E16:16 I1 ; x16 microstepping with interpolation
M566 X500 Y500 Z100 E500 ; XYZE jerk (mm/min)
M203 X4500 Y4500 Z600 E3600 ; Maximum speeds (mm/min)
M201 X300 Y300 Z50 E1000 ; Accelerations (mm/s^2)
M906 X1000 Y1000 Z1000 E1300 I30 ; Motor currents (mA) and motor idle percent; Heaters
M143 H1 S260 ; Maximum heater temperature
M140 H-1 ; No bed heater
M305 P1 T100000 B4138 C0 R4700 ; Thermistor parameters for heater 1
M307 H1 A577.0 C199.0 D9.8 S1.00 B0; Tools
M563 P0 D0 H1
G10 P0 X0 Y0 Z0 ; Set tool 0 axis offsets
G10 P0 R00 S00 ; Set initial tool 0 active and standby temperatures to 0C; Fans
M106 P1 S0 I0 F200 H1 T45 ; Fan 1 frequency, thermostatic control; Z probe
M558 P1 X0 Y0 Z0 F600 T10000 R0.4
G31 P500 Z1.75
M557 X25:175 Y-100:325 S25 ; grid for G29 probing
M671 X-45:-300:-45 Y0:175:350 P1.0 ; adjusting screw positions, M6 screw = 1mm pitch; Power fail not configured
; Pressure advance
M572 D0 S0.5; Misc
M83
T0 -
Yes I'm using the expansion port , I'm connecting on 2 5 6 and 7. I've connect to the motor on E2. I think I've configured M584 and M569 correct but I don't have any movement. I've changed the engage signal also.
; SCARA MINI
M111 S0 ; Debug off
M550 SCARA MINI ; Machine name and Netbios name (can be anything you like)
M551 Preprap ; Machine password (used for FTP)
;*** If you have more than one Duet on your network, they must all have different MAC addresses, so change the last digits
M540 P0xBE:0xEF:0xDE:0xAD:0xFE:0xED ; MAC Address;*** Networking
M552 S1 ; Turn network on;*** Ethernet networking: Adjust the IP address and gateway in the following 2 lines to suit your network
M552 P192.168.1.14 ; (0 = DHCP)
M554 P192.168.1.255 ; Gateway
M553 P255.255.255.0 ; NetmaskM555 P2 ; Set output to look like Marlin
G21 ; Work in millimetres
G90 ; Send absolute coordinates…
M83 ; ...but relative extruder moves; Disable Fan 1 thermostatic mode
M106 P1 H-1
M584 X2 Y3 Z4 E5 ;Set drive mapping
; Axis and motor configuration
;M569 P0 S1 ; Drive 0 goes forwards
;M569 P1 S1 ; Drive 1 goes forwards
M569 P2 S0 R1 ; Drive 2 goes forwards
;M569 P3 S1 ; Drive 3 goes forwards
;M569 P4 S1 ; Drive 4 goes forwards
M669 K4 P200 D200 A-179:170 B-120:120 C0:0:0 ; set SCARA mode and parameters
M574 X2 Y2 Z2 S1 ; set endstop configuration (all endstops at high end, active high)
;*** The homed height is deliberately set too high in the following - you will adjust it during calibrationM666 X0 Y0 Z0
M208 S1 X179 Y-121 Z-1 ; Axis minima
M208 X179 Y121 Z100 ; Axis maxima ; put your endstop adjustments here, or let auto calibration find them
M350 X1 Y1 Z1 E1 I1 ; Set 16x microstepping with interpolation
M92 X25.9820 Y17.777 ; Steps/degree for proximal and distal joints
M92 Z1600 E106 ; Steps/mm for Z and E
M906 X1000 Y1000 Z1000 E800 I60 ; Set motor currents (mA) and increase idle current to 60%
M201 X1000 Y1000 Z1000 E1000 ; Accelerations (mm/s^2)
M203 X2000 Y2000 Z2000 E3600 ; Maximum speeds (mm/min)
M566 X1200 Y1200 Z1200 E1200 ; Maximum instant speed changes mm/minute; Thermistors
;M305 P0 T100000 B3950 R4700 H30 L0 ; Put your own H and/or L values here to set the bed thermistor ADC correction
;M305 P1 T100000 B3974 R4700 H30 L0 ; Put your own H and/or L values here to set first nozzle thermistor ADC correction
;M305 P2 T100000 B3974 R4700 H30 L0 ; Put your own H and/or L values here to set 2nd nozzle thermistor ADC correction; Tool definitions
M563 P0 D0
;G10 P0 X0 Y0 Z0 ; Set tool 0 axis offsets
;G10 P0 R00 S00 ; Set initial tool 0 active and standby temperatures to 0CM92 E663:663 ; Set extruder steps per mm
;*** If you are using axis compensation, put the figures in the following command
;M556 S78 X0 Y0 Z0 ; Axis compensation hereM208 S1 Z-0.2 ; set minimum Z
;T0 ; select first hot end
; Pressure advance
;M572 D0 S0.5; Misc
M83 -
Please clarify what you have connected where. Your M584 command says you are using stepper drivers on the Duet for X, Y and Z (but not the usual outputs) and you have one external stepper driver for the extruder.