CoreXY configuration…
-
Also, check out this guide made by another user.
https://betrue3d.dk/duet-wifi-generating-firmware-using-configurator/ -
Many thanks Martin_S for the link.
Can I ask a couple of quick questions…
Looking at the configurator on the motor setup why are the Z axis steps different than the XY axes. I'm assuming this is because they are wired in series?
Also, does leaving the files on the SD card create problems, meaning are they read when the system is fired up maybe causing some confusion in the OS as to what type of system its running?
VB,
-
So using the configurator I made a bit of progress but I’m experiencing some issues with the limit switches.
I believe that the movements on each axis (300x300x325) are correct in length but the positioning within the axis is wrong.
I’ll post the config file as soon as I get to my pc.
Vb,
-
[c]B; Configuration file for Duet WiFi (firmware version 1.17 to 1.19)
; executed by the firmware on start-up
;
; generated by RepRapFirmware Configuration Tool on Tue Nov 14 2017 17:05:20 GMT-0500 (Eastern Standard Time); General preferences
M111 S0 ; Debugging off
G21 ; Work in millimetres
G90 ; Send absolute coordinates…
M83 ; ...but relative extruder moves
M555 P1 ; Set firmware compatibility to look like RepRapFirmareM667 S1 ; Select CoreXY mode
M208 X0 Y0 Z0 S1 ; Set axis minima
M208 X300 Y300 Z320 S0 ; Set axis maxima; Endstops
M574 X1 Y2 Z1 S1 ; Set active high endstops
M558 P0 X0 Y0 Z0 H5 F120 T6000 ; Set Z probe type to switch, the axes for which it is used and the dive height + speeds
G31 P600 X0 Y0 Z2.5 ; Set Z probe trigger value, offset and trigger height
M557 X15:285 Y15:310 S20 ; Define mesh grid; Drives
M569 P0 S0 ; Drive 0 goes backwards
M569 P1 S0 ; Drive 1 goes backwards
M569 P2 S1 ; Drive 2 goes forwards
M569 P3 S1 ; Drive 3 goes forwards
M350 X16 Y16 Z16 E16 I1 ; Configure microstepping with interpolation
M92 X80 Y80 Z4000 E420 ; Set steps per mm
M566 X900 Y900 Z12 E120 ; Set maximum instantaneous speed changes (mm/min)
M203 X6000 Y6000 Z180 E1200 ; Set maximum speeds (mm/min)
M201 X500 Y500 Z250 E250 ; Set accelerations (mm/s^2)
M906 X800 Y800 Z800 E800 I30 ; Set motor currents (mA) and motor idle factor in per cent
M84 S30 ; Set idle timeout; Heaters
M305 P0 T100000 B4138 C0 R4700 ; Set thermistor + ADC parameters for heater 0
M143 H0 S120 ; Set temperature limit for heater 0 to 120C
M305 P1 T100000 B4138 C0 R4700 ; Set thermistor + ADC parameters for heater 1
M143 H1 S280 ; Set temperature limit for heater 1 to 280C; Tools
M563 P0 D0 H1 ; Define tool 0
G10 P0 X0 Y0 Z0 ; Set tool 0 axis offsets
G10 P0 R0 S0 ; Set initial tool 0 active and standby temperatures to 0C; Network
M550 PDuetPrinter ; Set machine name
M551 Ppassword ; Set password
M552 S1 ; Enable network
M586 P0 S1 ; Enable HTTP
M586 P1 S0 ; Disable FTP
M586 P2 S0 ; Disable Telnet; Fans
M106 P0 S0.3 I0 F500 H-1 ; Set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off
M106 P1 S1 I0 F500 H1 T45 ; Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned on
M106 P2 S1 I0 F500 H1 T45 ; Set fan 2 value, PWM signal inversion and frequency. Thermostatic control is turned on; Custom settings are not configured[/c]
-
So, how can I test what's happening and zero in on the problems.. since the software allows for homing of a single axis I'll try the X axis first. Here is the homex.g file from my setup.
[c]; homex.g
; called to home the X axis
;
; generated by RepRapFirmware Configuration Tool on Tue Nov 14 2017 17:05:20 GMT-0500 (Eastern Standard Time); Lift Z relative to current position
G91
G1 Z5 F6000
G90; Move quickly to X axis endstop and stop there (first pass)
G1 X-300 F1800 S1; Go back a few mm
G91
G1 X5 F6000
G90; Move slowly to X axis endstop once more (second pass)
G1 X-300 F360 S1; Lower Z again
G91
G1 Z-5 F6000
G90[/c]If I power on the machine and connect to it via the control panel what should I expect when I hit the home X button? I would expect that the x axis should move towards the switch until it touches it then bounce off of it and stop.
-
https://duet3d.com/wiki/Configuring_RepRapFirmware_for_a_CoreXY_printer
About 1/4 of the way down that page are some g-code commands you enter into the c-gode entry box. They will test for correct x and y motor movement direction. -
The movement appears to be fine now after the configurator setup I'm just trying to establish the homing thanks.
-
If your X endstop switch is at the X Min end of the axis, then the carriage should move towards the endstop, bounce back 5mm when it is triggered, and then move more slowly towards the endstop until it triggers again. It should then stop, and the X coordinate should be zero because that is the value you have in the X parameter of your M208 S1 command.
-
Thanks DC42,
xMin is correct for the x axis switch.
OK, yes that makes sense then. The config.g sets the overall parameter for the axis X0 and then the homex.g file sets the specific parameter for the individual axis.
[c]M208 X0 Y0 Z0 S1 ; Set axis minima
M208 X300 Y300 Z320 S0 ; Set axis maxima[/c]So the movement for an absolute move of -300 is regardless of where the x axis is currently located correct? In this case, if it hit the endstop before moving -300 shouldn't it stop and bounce?
[c]…G90
; Move quickly to X axis endstop and stop there (first pass)
G1 X-300 F1800 S1[/c]The endstop setting says activehigh.
[c]; Endstops
M574 X1 Y2 Z1 S1 ; Set active high endstops[/c]When manually testing the switches the control panel correctly identifies them being triggered and the red light on the board flashes, so I'm assuming they are setup correctly. What kind of problem would I run into if I had the switch wired incorrectly??
Where else should I be looking for a faulty homing scenario?
VB,
-
I've built the core x-y from thingverse. For reference here is my files, but you may have differences with your build. Limit switches are High end on the Y (close to rear rail), low on the X (LHS as looking at the front), and high on the Z (bottom of the axis).
Config File
; General preferences M111 S0 ; Debugging off G21 ; Work in millimetres G90 ; Send absolute coordinates... M83 ; ...but relative extruder moves M555 P2 ; Set firmware compatibility to look like Marlin M667 S1 ; Select CoreXY mode M208 X0 Y0 Z-10 S1 ; Set axis minima M208 X300 Y300 Z314 S0 ; Set axis maxima ; Endstops M574 X1 Y2 Z2 S1 ; Define active high microswitches M556 S74.5 X0 Y-0.5 Z-0.5 ; Set orthogonal axis compensation parameters ; Drives M569 P0 S0 ; Drive 0 goes forwards M569 P1 S0 ; Drive 1 goes forwards M569 P2 S0 ; Drive 2 goes forwards M569 P3 S1 ; Drive 3 goes backwards M92 X100 Y100 Z400 E797.14 ; Set steps per mm (Default 16 microsteps) M566 X900 Y900 Z30 E300 ; Set maximum instantaneous speed changes (mm/min) M203 X9000 Y9000 Z600 E3000 ; Set maximum speeds (mm/min) M201 X800 Y800 Z250 E1000 ; Set accelerations (mm/s^2) M906 X800 Y800 Z800 E800 I30 ; Set motor currents (mA) and motor idle factor in per cent M84 S30 ; Set idle timeout ; Heaters M143 S260 ; Set maximum heater temperature to 260C M301 H0 S1.00 P10 I0.1 D200 T0.4 W180 B30 ; Use PID on bed heater (may require further tuning) M305 P0 T100000 B4138 C0 R1000 ; Set thermistor + ADC parameters for heater 0 M305 P1 T100000 B4138 C0 R1000 ; Set thermistor + ADC parameters for heater 1 ; Tools M563 P0 D0 H1 ; Define tool 0 G10 P0 X0 Y0 Z0 ; Set tool 0 axis offsets G10 P0 R0 S0 ; Set initial tool 0 active and standby temperatures to 0C ; Network M550 PDBot ; Set machine name M540 PBE:EF:DE:AD:FE:EF ; Set MAC address M552 P192.168.69.10 S1 ; Enable network and set IP address M553 P255.255.255.0 ; Set netmask M554 P192.168.85.1 ; Set gateway M586 P0 S1 ; Enable HTTP M586 P1 S0 ; Disable FTP M586 P2 S0 ; Disable Telnet ; Fans M106 P0 S0.3 I0 F500 H-1 ; Set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off M501 ; Read config override file. This is where the PID auto tune values for the heaters are stored.
Home X
G91 ; relative positioning G1 X-305 F2000 S1 ; move to limit G1 X5 F600 G1 X-10 F100 S1 G1 X6 F2000 ; Offset to correct zero position. G90 ; absolute positioning G92 X0
Home Y
G91 ; Relative positioning G1 Y350 F2000 S1 ;Run into stop G1 Y-5 F600 G1 Y10 F100 S1 ;Run into slowly G1 Y-3 F2000 ; Offset to correct high limit position. G90 G92 Y300
Home Z
G91 ; Relative positioning G1 Z350 S1 F300 ; Move Z down until the switch triggers G1 Z-2.5 F300 G1 Z10 S1 F150 ; Move Z down until the switch triggers G90 ; Back to absolute positioning G92 Z330 ; Tell the firmware where we are G1 Z295 F600
For the home all I simply strung the above together. The above aren't ideal yet but they work for my setup. Yours may be subtly different.
-
Thanks DocTucker for the assist.
I just ran a quick compare on the 2 files and I see the following differences:
Config File
M555 P2 ; Set firmware compatibility to look like Marlin - you
M555 P1 ; Set firmware compatibility to look like RepRapFirmareM574 X1 Y2 Z2 S1 ; Define active high microswitches - you
M574 X1 Y2 Z1 S1 ; Set active high endstopsM569 P0 S0 ; Drive 0 goes forwards - you
M569 P1 S0 ; Drive 1 goes forwards - you
M569 P2 S0 ; Drive 2 goes forwards - you
M569 P3 S1 ; Drive 3 goes backwards - you
M569 P0 S0 ; Drive 0 goes backwards
M569 P1 S0 ; Drive 1 goes backwards
M569 P2 S1 ; Drive 2 goes forwards
M569 P3 S1 ; Drive 3 goes forwardsxHome
G1 X-10 F100 S1 - you
G1 X-255 F1800 S1The one that is really confusing is the Marlin/RepRap I thought the DuetWifi was RepRap?
-
The compatibility setting only matters if you connect a USB host program such as Pronterface, or send commands over Telnet. Most such programs are written to assume the responses that Marlin provides, so it's usual to set that compatibility setting to Marlin.
-
The homing process is still a flop.. not sure what's going on but certainly not making any headway. So trying to isolate the problem here by simply homing the Xaxis only, I assume this can be done on a CoreXY setup?
[c]; homex.g
; called to home the X axis
;
; generated by RepRapFirmware Configuration Tool on Tue Nov 14 2017 17:05:20 GMT-0500 (Eastern Standard Time)G91 ; relative positioning
G1 X-305 F2000 S1 ; move to limit
G1 X5 F600
G1 X-10 F100 S1
G1 X6 F2000 ; Offset to correct zero position.
G90 ; absolute positioning
G92 X0[/c]After connecting to the Duet and pushing the button HomeX this is the outcome. So where should I start looking for the problem?
Here is a link to the video:
https://youtu.be/s_J4pvBM_1cCurrent file list in /sys
https://photos.app.goo.gl/r8m4Eb7xtqrhl11x2 -
Have you tested the endstop switches, using either the Machine Properties page of Duet Web Control or by sending M119 commands? I suspect that your endstop is reading in reverse.
-
DC42,
Thanks for your insight as ultimately the switch wiring and the machine properties page got me squared away. My newness overlooked that the Properties End Stop message said "EndStop Hit" was "yes" for all the axes..
Ultimately the problem was not that the switches were incorrectly wired, since the board had the 3.3v green light lit, but that the Gcode for the switches was set to normally closed and the switches are normally open.
[c]; Endstops
M574 X1 Y2 Z1 S1 ; Set active high endstops[/c]
modified to:
[c]; Endstops
M574 X1 Y2 Z1 S0 ; Set active high endstops[/c]Did I read the Gcode correctly, these are normally open switches?
Thanks.
VB,
-
Yes, if you are using normally open microswitches then you need S0 in M574 not S1. But if they are simple microswitches with 2 wires back to the Duet, then it's better to use the normally closed contacts.
-
DC42,
What am I not seeing that is causing my Yaxis to move backwards on my CoreXY? Directionally everything was working fine yesterday in regards to movement as I posted the config.g file earlier in the thread, today it isn't???
[c]; Configuration file for Duet WiFi (firmware version 1.17 to 1.19)
; executed by the firmware on start-up
;; executed by the firmware on start-up
;
; generated by RepRapFirmware Configuration Tool on Tue Nov 14 2017 17:05:20 GMT-0500 (Eastern Standard Time); General preferences
M111 S0 ; Debugging off
G21 ; Work in millimetres
G90 ; Send absolute coordinates…
M83 ; ...but relative extruder moves
M555 P1 ; Set firmware compatibility to look like RepRapFirmareM667 S1 ; Select CoreXY mode
M208 X0 Y0 Z0 S1 ; Set axis minima
M208 X300 Y300 Z320 S0 ; Set axis maxima; Endstops
M574 X1 Y2 Z1 S0 ; Set active low endstops
M558 P0 X0 Y0 Z0 H5 F120 T6000 ; Set Z probe type to switch, the axes for which it is used and the dive height + speeds
;G31 P600 X0 Y0 Z2.5 ; Set Z probe trigger value, offset and trigger height
;M557 X15:285 Y15:310 S20 ; Define mesh grid; Drives
M569 P0 S0 ; Drive 0 goes backwards
M569 P1 S0 ; Drive 1 goes backwards
M569 P2 S1 ; Drive 2 goes forwards
M569 P3 S1 ; Drive 3 goes forwardsM350 X16 Y16 Z16 E16 I1 ; Configure microstepping with interpolation
M92 X80 Y80 Z4000 E420 ; Set steps per mm
M566 X900 Y900 Z12 E120 ; Set maximum instantaneous speed changes (mm/min)
M203 X6000 Y6000 Z180 E1200 ; Set maximum speeds (mm/min)
M201 X500 Y500 Z250 E250 ; Set accelerations (mm/s^2)
M906 X800 Y800 Z800 E800 I30 ; Set motor currents (mA) and motor idle factor in per cent
M84 S30 ; Set idle timeout; Heaters
M305 P0 T100000 B4138 C0 R4700 ; Set thermistor + ADC parameters for heater 0
M143 H0 S120 ; Set temperature limit for heater 0 to 120C
M305 P1 T100000 B4138 C0 R4700 ; Set thermistor + ADC parameters for heater 1
M143 H1 S280 ; Set temperature limit for heater 1 to 280C; Tools
M563 P0 D0 H1 ; Define tool 0
G10 P0 X0 Y0 Z0 ; Set tool 0 axis offsets
G10 P0 R0 S0 ; Set initial tool 0 active and standby temperatures to 0C; Network
M550 PDuetPrinter ; Set machine name
M552 S1 ; Enable network
M586 P0 S1 ; Enable HTTP
M586 P1 S0 ; Disable FTP
M586 P2 S0 ; Disable Telnet; Fans
M106 P0 S0.3 I0 F500 H-1 ; Set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off
M106 P1 S1 I0 F500 H1 T45 ; Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned on
M106 P2 S1 I0 F500 H1 T45 ; Set fan 2 value, PWM signal inversion and frequency. Thermostatic control is turned on; Custom settings are not configured
; Miscellaneous
T0 ; Select first tool[/c] -
Have you upgraded the firmware between yesterday and today?
-
No, I had done that before I started with the configuration.
Does the movement of the axes get controlled from anywhere other than the config.g file, specifically the drive section?
[c]; Drives
M569 P0 S0 ; Drive 0 goes backwards
M569 P1 S0 ; Drive 1 goes backwards
M569 P2 S1 ; Drive 2 goes forwards
M569 P3 S1 ; Drive 3 goes forwards[/c] -
If it moved correctly yesterday AND you haven't changed anything in config.g, then it would suggest a wiring issue - possible a bad connection or some such. With a CoreXY both motors contribute to X and Y movement so if one motor isn't working properly, you'll get strange results. Suggest you have a look at this and run through the checks https://www.duet3d.com/wiki/Configuring_RepRapFirmware_for_a_CoreXY_printer