Help with setting up firmware for coreXY machine - unable to home.



  • While I'm pretty knowledgeable with ramps and marlin / repetier this is my first experience with reprap firmware, so I'm hoping someone could help me out setting up my firmware.

    I'm trying to set up my duet wifi for use with a 300mm x 300mm x 325mm coreXY machine. Here's my config.g

    [c]
    ; Communication and general
    M111 S0 ; Debug off
    M550 PCoreXY ; Machine name and Netbios name (can be anything you like)
    M551 none ; 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 –mac address is here-- ; MAC Address
    ;*** Wifi Networking
    M552 S1 ; Enable WiFi

    M555 P2 ; Set output to look like Marlin
    M575 P1 B57600 S1 ; Comms parameters for PanelDue

    ;set axis/drive directions
    M569 P0 S1 ;x axis +'ve
    M569 P1 S1 ;y axis +'ve
    M569 P2 S1 ;z axis +'ve
    M569 P3 S1 ;E0 drive +'ve
    M569 P4 S1 ;E1 drive +'ve
    M574 X1 Y1 Z1 S1 ; set endstop configuration (all endstops at low end, active high)
    M666 X0 Y0 Z0 ; put your endstop adjustments here, or let auto calibration find them
    M350 X16 Y16 E16 I1 ; Set 16x microstepping with interpolation
    M92 X100 Y100 Z400 ; Set axis steps/mm
    M906 X1000 Y1000 Z1000 E800 I60 ; Set motor currents (mA) and increase idle current to 60%
    M201 X8000 Y8000 Z100 E4000 ; Accelerations (mm/s^2)
    M203 X4200 Y4200 Z600 E3600 ; Maximum speeds (mm/min)
    M566 X1200 Y1200 Z40 E1200 ; Maximum instant speed changes mm/minute
    M208 X300 Y300 Z325 ; set axis maxima and high homing switch positions (adjust to suit your machine)
    ;M208 X-8 Y0 Z-0.5 S1 ; set axis minima and low homing switch positions (adjust to make X=0 and Y=0 the edges of the bed)
    G21 ; Work in millimetres
    G90 ; Send absolute coordinates...
    M83 ; ...but relative extruder moves

    ; Axis and motor configuration
    M667 S1 Y-1.0 ; switch to CoreXY mode

    ; 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 the first nozzle thermistor ADC correction
    M305 P2 T100000 B3974 R4700 H30 L0 ; Put your own H and/or L values here to set the second nozzle thermistor ADC correction
    M570 S180 ; Hot end may be a little slow to heat up so allow it 180 seconds

    ; Fans
    M106 P1 H-1 ; disable thermostatic mode for fan 1

    ; Tool definitions
    M563 P0 D0 H1 ; Define tool 0
    G10 P0 S0 R0 ; Set tool 0 operating and standby temperatures
    ;*** If you have a single-nozzle build, comment the next 2 lines
    M563 P1 D1 H2 ; Define tool 1
    G10 P1 S0 R0 ; Set tool 1 operating and standby temperatures
    M92 E663:663 ; Set extruder steps per mm

    ; Z probe and compensation definition
    ;*** If you have a switch instead of an IR probe, change P1 to P4 in the following M558 command
    M558 P1 X0 Y0 Z0 ; Z probe is an IR probe and is not used for homing any axes
    G31 X0 Y0 Z4.80 P500 ; Set the zprobe height and threshold (put your own values here)

    ;*** If you are using axis compensation, put the figures in the following command
    M556 S78 X0 Y0 Z0 ; Axis compensation here

    M208 S1 Z-0.2 ; set minimum Z
    ;
    T0 ; select first hot end
    [/c]

    My SD card came preloaded with a delta configuration so i deleted the homedelta.g, per documentation coreXY machines need a homeall.g file, so i created one and uploaded it with this code that was given as a sample:

    [c]
    ; Home all axes

    G91 ; relative mode
    G1 S1 X-350 Y-350 F3000 ; course home X or Y
    G1 S1 X-350 ; course home X
    G1 S1 Y-350 ; course home Y
    G1 X4 Y4 F600 ; move away from the endstops
    G1 S1 X-10 ; fine home X
    G1 S1 Y-10 ; fine home Y
    ; Z homing section follows
    [/c]

    I'm not sure how to home Z, but it won't home X or Y either.. it just moves X in the positive direction about 5mm if i try to home all.

    Any help would be greatly appreciated, thanks!



  • Check that your endstops are connected and working correctly with M119.



  • Do the axes all move in the right directions and by the right amounts?


  • administrators

    It sounds to me that either your end stop switches are not connected, or if they are signalling active low instead of active high. Use M119 to confirm. If they are microswitches then you should use the normally closed contacts. If they are some other sort then you can change S1 to S0 in the M574 command.



  • Hi I'm in pity much the same sinario as you I'm coming form a prusa 13 home built marlin firm Ware and building a corexy machine I'd love to see some pics and as I'm waiting for my duet to arrive would love to look over your firmware…. If you don't mind sharing
    Thanks in advance



  • Thanks everyone, David was right, they switches were set the wrong way in software. Luckily someone posted a link to the reprap configurator https://configurator.reprapfirmware.org. I just deleted all the files present except for the webserver ones and uploaded the zip file. All is working now and the file seems much cleaner, kudos to the reprap firmware team!

    Hey david, great work on the wifi!

    Just for efficacy though in case anyone else runs into the problem of not being able to get a motor in the correct orientation (I seriously tried flipping the motor connectors to the board and changing stepper driver directions via software in every possibly combination) you'll want to add that extra little bit to the end of the M667 line

    [c]M667 S1 Y-1.0[/c]

    with mine it was my Y motor, it always went forward instead of backwards, or if I switched connections then my X motor went the wrong way adding the axis X or Y -1.0 makes it go the right way.

    As for you cap, I'd seriously recommend the configurator, it's just like the repetier one except with a few more bugs (my config.g had the line for adding interpolation 5 or 6 times repeated).. but here's my config.g now in case you wanted to see

    [c]; Configuration file for Duet WiFi
    ; executed by the firmware on start-up
    ;
    ; generated by RepRapFirmware Configuration Tool on Mon Sep 12 2016 13:24:34 GMT-0400 (EDT)

    ; 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 Y-1.0; Select CoreXY mode
    M208 X0 Y0 Z0 S1 ; Set axis minima
    M208 X300 Y300 Z325 S0 ; Set axis maxima

    ; Endstops
    M574 X1 Y1 Z1 S0 ; Define active high microswitches
    ;M558 P1 X0 Y0 Z0 H5 F0 T6000 ; Set Z probe type to unmodulated, the axes for which it is used and the probe + travel speeds
    ;G31 P600 X0 Y0 Z2.5 ; Set Z probe trigger value, offset and trigger height

    ; Drives
    M569 P0 S1 ; Drive 0 goes forwards
    M569 P1 S1 ; Drive 1 goes forwards
    M569 P2 S1 ; Drive 2 goes forwards
    M569 P3 S0 ; Drive 3 goes backwards
    M350 X16 Y16 Z16 I1 ; Configure microstepping with interpolation
    M92 X87.489 Y87.489 Z400 E420 ; Set steps per mm
    M566 X900 Y900 Z20 E120 ; Set maximum instantaneous speed changes (mm/min)
    M203 X6000 Y6000 Z180 E1200 ; Set maximum speeds (mm/min)
    M201 X500 Y500 Z40 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
    M143 S260 ; Set maximum heater temperature to 260C
    M570 S150 ; Set maximum heating time to 150s
    ;M305 P0 T100000 B3950 R4700 H30 L0
    M305 P0 T100000 B3950 C0.0000000000000000 R4700 L0 H0 ; Set thermistor + ADC parameters for heater 0
    M305 P1 T100000 B3950 C0.0000000000000000 R4700 L0 H0 ; Set thermistor + ADC parameters for heater 1

    ; Tools
    M563 P0 D0 H1 ; Define tool 0
    G10 P0 X0 Y0 ; Set tool 0 axis offsets
    G10 P0 R0 S0 ; Set initial tool 0 active and standby temperatures to 0C

    ; Network
    M550 PCoreXY ; Set machine name
    M552 P0.0.0.0 S1 ; Enable network and acquire dynamic address via DHCP

    ; 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]


  • administrators

    The other way apart from adding that -1.0 is to swap the X and Y motor connections.



  • Thankyou
    I see I got a lot to learn cart wait to start wading in
    P.s congratz on getting it working


  • administrators

    forgets, could you upload or send me the config.json file from your generated config bundle? I haven't been able to reproduce your problem where multiple interpolation lines would be generated.



  • Hey Chris scratch what I said, I was just looking it over and it's because I'd left interpolation on and off for certain drives like E0 and E1, so that's why it had multiple lines. My apologies, I hadn't looked it over very thoroughly before. By the way, while I have dc42's IR sensor I haven't wired it yet.. as far as I saw there's no way to opt out of Z-bed probing in the configurator, so I just commented out all the bed probing lines and adapted the homing instructions from X to Z. Is there currently a way to not select Z-Probing?



  • hi thought id add my problem here as it is very similar to the one above my ill get straight to the point and list the problems

    1. x moves when i tell y to move and my y axes move when i tell x to move

    2. if i tell x to move 50mm and i hit the end stop it dose not stop do not want to try a home until i know they stop are working
      M119 retruns this report
      Endstops - X: at min stop, Y: at max stop, Z: at min stop, Z probe: not stopped

    3. i do not have a z prode and the firmware programe is great but needs a off witch for z prob
      my Editing /sys/homeall.g file is below
      ; homeall.g
      ; called to home all axes
      ;
      ; generated by RepRapFirmware Configuration Tool on Fri Oct 07 2016 11:58:10 GMT+0100 (GMT Daylight Time)

    ; Relative positioning
    G91

    ; Lift Z
    G1 Z5 F6000

    ; Move towards X and Y axis endstops (first pass)
    G1 X-205 Y205 F1800 S1

    ; Go back a few mm
    G1 X5 Y-5 F6000

    ; Move slowly to axis endstops once more (second pass)
    G1 X-205 Y205 F360 S1

    ; Absolute positioning
    G90

    ; Go to first bed probe point and home the Z axis
    G1 X15 Y15 F6000
    G30

    ; Uncomment the following line to lift the nozzle after probing
    ;G1 Z5 F100

    thanks for any help please i am new to gcode commands so full explanations if you do not mind


  • administrators

    Reverse the X motor direction by changing S0 to S1 or vice versa in config.g. This will swap the axes over. If they move in the wrong direction, reverse the Y motor direction instead.



  • fantastic changed this bit of code and now that x and y work correctly
    M569 P0 S1 ; Drive 0 goes forwards
    to
    M569 P0 S0 ; Drive 0 goes forwards

    thankyou for the help any ideas about homing is it a case of changing the homeall flie


  • administrators

    Are you using the homeall.g file from the sys-CoreXY folder in my repo? See also https://duet3d.com/wiki/Configuring_RepRapFirmware_for_a_CoreXY_printer#homeall.g_file.



  • hi my filing sys folders are a mess here all the folders i have

    Size
    bed.g 343 B
    config.g 2.4 KiB
    config.json 2.3 KiB
    deployprobe.g 283 B
    DuetWebControl.bin 3.0 MiB
    DuetWiFiServer.bin 288.3 KiB
    homeall.g 335 B
    homedelta.g 644 B
    homex.g 437 B
    homey.g 436 B
    homez.g 352 B
    iap.bin 52.3 KiB
    iap4e.bin 54.1 KiB
    pause.g 239 B
    resume.g 234 B
    retractprobe.g 292 B
    sleep.g 54 B
    stop.g 86 B
    tfree0.g 150 B
    tpost0.g 210 B
    tpre0.g 153 B
    just removed homedelta.g
    which to me dose not look right
    my homeall.g look like this
    G91 ; relative mode
    G1 S1 X-200 Y-240 F3000 ; course home X or Y
    G1 S1 X-200 ; course home X
    G1 S1 Y-200 ; course home Y
    G1 X4 Y4 F600 ; move away from the endstops
    G1 S1 X-10 ; fine home X
    G1 S1 Y-10 ; fine home Y
    ; Z homing section follows
    i changed to the print bed to 200 in xy and z to start with keep to things i know while working this stuff out

    thanks for any help the info for all this stuff is all over the places


  • administrators

    The homing switches are only active during homing, so there are no limits on movement until you have homed. For testing homing, you may wish to reduce the homing speed and motor current.



  • ok ive now removed all the 3 of these files homex.g homey.g homez.g
    and just left the homeall.g
    i can get x and y to home but not z in fact on the web interface it is now in yellow telling me it not available


  • administrators

    Read https://duet3d.com/wiki/Configuring_RepRapFirmware_for_a_Cartesian_printer#Homing_files. The files for a CoreXY printer are similar except for homeall.g.



  • ok thanks sorted it
    sorry to be a pain could not see it throw looking changed homez to this
    G91 ; relative mode
    G1 Z4 F200 ; raise head 4mm to ensure it is above the switch trigger height
    G90 ; back to absolute mode
    G1 X0 Y0 F2000 ; put head wherever you want it to be when you home Z (omit this line if it doesn't matter)
    G91 ; relative mode
    G1 Z-200 S1 F100 ; move Z down until the switch triggers
    G90 ; back to absolute mode
    G92 Z0.3

    and it worked a treat



  • So I had the same type of issues in the previous posts but now it will home the X and Y axis correctly, The drives go in the right direction…Awesome...but...now when I home everything seems to be locked up when I try to make the X or Y axis to move. I can't move by g-code or by pushing the buttons on the PanelDue or Web page. Any ideas?

    I tried the sample g-code:
    G91 ; relative mode
    G1 S2 X10 ; move the X motor forward 10mm
    G1 S2 X-10 ; move the X motor back 10mm
    G1 S2 Y10 ; move the Y motor forward 10mm
    G1 S2 Y-10 ; move the Y motor back 10mm
    G90 ; back to absolute mode

    Works UNLESS I home the X axis and Y axis then nothing. It just stops and no further movements work.


 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.