Compiled Firmware with 5bar-Scara / Dual-Arm-Scara
-
@Enpixa I expect that a definition of the endstop pins is missing, please check the document https://duet3d.dozuki.com/Wiki/RepRapFirmware_3_overview , e.g. "Endstop numbers are no longer used in M591. Pin names replace them." At the end of this document is an overview of the pin names for the different boards.
If you don't find the reason, please post your complete config file and the type of hardware and firmware (I know it, but the others may not).
-
Jörg, you are crazy being up that late
I am running on a Duet2Wifi 1.04 - with latest Firmware Release 3.01-RC3
Actually im running my X-Arm with : G1 S2 X10 F20 to make it moving towards me.Endstop Pins are connected like shown here:
This is my complete config.g
; General preferences
G90 ; Send absolute coordinates...
M83 ; ...but relative extruder moves
M552 S1 ; Turn network on; Network
M111 S0 ; Debug off
M550 P********* ; Machine name and Netbios name (can be anything you like)-
M551 P********* ; Machine password (used for FTP)M586 P0 S1 ; Enable HTTP
M586 P1 S1 ; Enable FTP
M586 P2 S1 ; Enable Telnet; Drives
M569 P0 S1 ; Drive 0 (X) goes forwards
M569 P1 S1 ; Drive 1 (Y) goes forwards
M569 P2 S1 ; Drive 2 (Z) goes forwards
M569 P3 S1 ; Drive 3 (E0) goes forwardsM574 X2 S1 P"xstop" ; X min active high endstop switch
M574 Y2 S1 P"ystop" ; Y min active high endstop switch
;M574 Z1 S0 P"zstop" ; Z min active high endstop switchM669 B60:60
M669 K9 L2 X0:0 Y0:0 P265:260 D265:260:25:0 ; arms are 300 mm long, actuators are 100 mm apart, other parameters take defaults
M350 X128 Y128 Z128 E16 I1 S3 ; Configure microstepping with interpolationM203 X10000 Y10000 Z300 E3600 ; maximum speeds mm/minute
M92 X100 Y100 Z400 E95.2 ; Set steps per mm
M566 X15 Y15 Z2 E2 ; Set maximum instantaneous speed changes (mm/min)
M201 X20 Y20 Z20 E1000 ; Set accelerations (mm/s^2)
M906 X1200 Y1200 Z700 E600 ; Set motor currents (mA) and motor idle factor in per centM84 S0 ; Set idle timeout
; Axis Limits
M208 X-300 Y-300 Z0 S1 ; Set axis minima
M208 X300 Y300 Z300 S0 ; Set axis maximaIf anyone has an idea... this would be really great !
Thanks alot, Johannes -
@Enpixa I am not an endstop expert, but I think it is necessary to define and use a Z endstop even you don't need it. But I'm not sure.
-
@JoergS5 said in Compiled Firmware with 5bar-Scara / Dual-Arm-Scara:
@Enpixa I am not an endstop expert, but I think it is necessary to define and use a Z endstop even you don't need it. But I'm not sure.
No, it's not necessary with RepRapFirmware.
-
@Enpixa said in Compiled Firmware with 5bar-Scara / Dual-Arm-Scara:
M574 X1 Y1 Z0 S1 ; ( Also tried M574 X2 Y2 Z0 S0 )
As you are running RepRapFirmware 3, you need to specify the endstop pin names. If the endstop LEDs are normally on but go out when the endstop is triggered (which is the case when using normally closed switches, recommended) then you need:
M574 X1 S1 P"xstop"
M574 Y1 S1 P"ystop" -
Hello DC42,
thats what i already did, see my latest post/config: https://forum.duet3d.com/topic/13631/compiled-firmware-with-5bar-scara-dual-arm-scara/18
@Enpixa said in Compiled Firmware with 5bar-Scara / Dual-Arm-Scara:
M574 X2 S1 P"xstop" ; X min active high endstop switch
M574 Y2 S1 P"ystop" ; Y min active high endstop switch
;M574 Z1 S0 P"zstop" ; Z min active high endstop switchI tried all thinkable variations ( active low/high / trigger min/max )
Right now, i dont know what more i could try to make it work.
-
@Enpixa I don't have more ideas. I would try a last test inverting with the ! sign *), then trying other endstop hardware.
*)
P"pin_name" Defines the pin name(s) that the endstop(s) for the specified axis are connected to. Needed when S=1. May need ! before pin name to invert signal. in https://duet3d.dozuki.com/Wiki/Gcode#Section_M574_RepRapFirmware_Num_3 -
Is the red LED on the mainboard a good indicator if it is working properly hardware-wise ? Because when
i press the endstop manually the LED is on. if not pressed it is off.If you have a recommendation for me which endstops i should buy. i would appreciate it.
-
@Enpixa i've read "The second line (S1) defines all
active high endstops.
If you are unsure if your endstops
are active high or active low, you
can test them by observing the
light next to the corresponding
stepper motor connector. If the
light is lit when the button is
pressed, then this would indicate
an active low endstop"
in https://dozuki-guide-pdfs.s3.amazonaws.com/pdf/duet3d/guide_10_en.pdf page 11. So the light tells you the type of endstop. If it is the light you mean, then it would be a active low endstop. -
@Enpixa which type of endstop recommendation: for your current printer setup the endstop would be sufficient imho which you use. An alternative would be an optical endstop.
I want to go another direction with an optical encoder like described in https://github.com/JoergS5/OpticalEncoder
-
Hello Jörg,
thx for that information, for my understanding i got an active low endstop. LED next to stepper plug is lit when endstop is pressed.
Video of pressing Endstop: http://nörds.de/video_2020-03-05_14-04-43_1.mp4
This is the direction setting used in my Config
M569 P0 S1 ; Drive 0 (X) goes forwards
M569 P1 S1 ; Drive 1 (Y) goes forwards
M569 P2 S1 ; Drive 2 (Z) goes forwards
M569 P3 S1 ; Drive 3 (E0) goes forwardsThat Information i found for setting the endstops
The electrical type of the endstop (S parameter). This used to be just active high (S1, e.g. a normally-closed switch or opto switch), or active low (S0, e.g. normally-open switch or Hall sensor). There are now also options for using a Z probe (S2) and for using motor stall detection (S3).
These are the X, Y and Z parameters. 0 means no endstop present, 1 means an endstop switch at the minimum end, 2 means an endstop switch at the maximum end of the axis.
As the Arm is moving towards me and the Endstop when using positive X-Values i set X and Y to 2 for maximum checking. (G1 S2 X20 F100 makes the arm moving in direction to the endstop)
M574 X2 S0 P"xstop" ; X max active low endstop switch
M574 Y2 S0 P"ystop" ; Y max active low endstop switch
;M574 Z1 S0 P"zstop" ; Z min active high endstop switchI just set an Axis-Limit
; Axis Limits
M208 X-300 Y-300 Z0 S1 ; Set axis minima
M208 X300 Y300 Z300 S0 ; Set axis maximaBest, Johannes
-
Cool! Another 5-bar.
By putting the proximal inner joints on top of each other you actually have a 4-bar, the 5'th has zero length. I hope the math in the code works, it is a special case.
One effect of that is that most of the work modes no longer work, you will always be in work mode 2. Assuming your proximal arms have the same length.Your case with all arms the same length and inner joints in the same place is actually a much simpler case than what the current implementation can handle, but it should work fine.
I think your homing move is not right, you should use the H1 option to G1.
My homing file "home5barscara.g":
G91 ; relative positioning G1 H1 Z300 F1500 ; move quickly to endstop and stop there (first pass) G1 H2 Z-5 F900 ; go back a few mm G1 H1 Z300 F90 ; move slowly to endstop once more (second pass) G1 H1 X300 Y300 F2500 ; move quickly to endstop and stop there (first pass) G1 H1 X300 F2500 G1 H1 Y300 F2500 G1 H2 X-2 Y-2 F900 ; go back a few degrees G1 H1 X300 F90 ; move slowly to endstop once more (second pass) G1 H1 Y300 F90 ; move slowly to endstop once more (second pass) G0 Z-2 ; move down a bit to not make mesh calibration move it out of machine limits G90 ; absolute positioning G0 X0 Y0 F6000 ; move to a reasonable position
You would have to remove z-homing and make X (or is it Y?) move towards negative instead. I have my right arm homing switch in between the arm joints.
I think your steps/mm, G92, is wrong. It should be steps/deg in this case.
Assuming you have 200step/rev steppers. it should be 71.1111111111.
200 steps/rev * 128microstepping / 360degrees = 71.1111....
With the steppers directly attached to the arms you should be able to move stupendously fast but with pretty poor precision. -
@Enpixa said in Compiled Firmware with 5bar-Scara / Dual-Arm-Scara:
Is the red LED on the mainboard a good indicator if it is working properly hardware-wise ? Because when
i press the endstop manually the LED is on. if not pressed it is off.That's as expected for a normally-open switch; however normally-closed switches are preferred (which reverses the sense). The LED is a reliable indicator when the endstop is a simple microswitch. It isn't always reliable if the endstop is an optical switch.
-
Hi Bondus, thx for your feedback. Yes, in future i will use some kind of gears. For the very first protoype
i wanted the Software/Firmware getting working... later on alle the fine-tuning, rigid mechanics etc.********* UPDATE **********
I found this important info in the doku.Endstop type S0 (active low switch) is no longer supported in M574 commands. Instead, use type S1 and invert the input by prefixing the pin name with '!'. Ex: M574 X1 S1 P"!xstop" I think Jörg also mentioned it somewhere before.
Now is see pressing the X-Endstop with M119 !
Endstops - X: at max stop, Y: not stopped, Z: not stopped, Z probe: at min stop
Yeeehaa ! Thx alot, Video of first time homing:
http://nörds.de/first_time_homing.mp4
Best, Johannes
-
How can i tell the Firmware that there is no Z-Endstop and homing for it is not needed:
i tried to set M574 Z0 or removed that Line from config.G28 Error: G0/G1: insufficient axes homed
The following axis is not homed: Z -
@Enpixa Use G92 Z0
-
Hello Jörg, Bondus and DC,
thx for your input. As you suggested i built a small transmission for the steppers. Had to wait for the GT2 belts till today and printed some Gear-Pulleys.
Left Arm on Image is X and right Arm Y.
Working Mode 2, Distance of Rods 70mm, Length of arms 260.5mm and the Degree Defintion of Endstops 128/38
This is the most relevant Line in the config.g:
M669 K9 L2 X0:70 Y0:0 P260.5:260.5 D260.5:260.5 B128:38
Is this as it is meant with the forward direction ? (Also tried for X-arm M569 P0 S0 )
M569 P0 S1 ; Drive 0 (X) goes forwards
M569 P1 S1 ; Drive 1 (Y) goes forwards
M569 P2 S1 ; Drive 2 (Z) goes forwards
M569 P3 S1 ; Drive 3 (E0) goes forwardsHoming seems to work fine First it moves X arm zu Endstop, then Y arm to Endstop.
home5barscara.g
G91 ; relative positioning
G1 H1 X-120 F2000 ; move quickly to endstop and stop there (first pass)
G1 H1 Y120 F2000 ; move quickly to endstop and stop there (first pass)G92 X60
G92 Y60
G92 Z0
G90; abs pos
When trying to drawing a square everything seemes to be rotated by 45° and all Lines are very Curvy (and its not really a square, but that comes later, i hope):
Drawing Square Test ( See Cyan Color on Image )
G90
G1 H1 X0 Y0 F2000
G1 H1 X0 Y60 F2000
G1 H1 X60 Y60 F2000
G1 H1 X60 Y0 F2000
G1 H1 X0 Y0 F2000Any idea what i am doing wrong with the machine-setup/ config ?
Thx in advance, Johannes
-
This post is deleted! -
@Enpixa That "square" looks like the firmware still thinks it is a cartesian printer.
Run your M669 command from config.g on the console to make sure there are not errors.
Edit: Looks like the firmware requires 4 parameters to the "D" option, that's not intended. That's a bug. Just add some 0's and it should be fine.
-
@Enpixa said in Compiled Firmware with 5bar-Scara / Dual-Arm-Scara:
Drawing Square Test ( See Cyan Color on Image )
G90
G1 H1 X0 Y0 F2000
G1 H1 X0 Y60 F2000
G1 H1 X60 Y60 F2000
G1 H1 X60 Y0 F2000
G1 H1 X0 Y0 F2000And if you use H1 in the G1 command you will move a specific motor, it will not use the kinematics. Remove the H1s:
G90
G1 X0 Y0 F2000
G1 X0 Y60 F2000
G1 X60 Y60 F2000
G1 X60 Y0 F2000
G1 X0 Y0 F2000Edit: One more thing, you might want to change the Y parameters to M669 as well. As it is set up now Y 0 is on the arm joints where you pullys are. If you set it to negative about the distance to where your work area is your 0,0 coordinate will be on the work area.
For example: M669 .... X-35:35 Y-300:-300 ... will make X0 in the middle between the joints and Y0 300mm in front of the joints.