CNC Mode, Z normally open touch home & mesh



  • I get this error when I try to home:
    G28 Z
    Error: Z probe already triggered at start of probing move
    Error: Homing failed

    This is how I setup the endstops:

    M453 ; CNC Mode

    ; Endstops
    M574 X1 Y1 S1 ; Set active high endstops
    M574 Z1 S0

    ; Z-Probe
    M307 H7 A-1 C-1 D-1 ; Disable heater on PWM channel
    M558 P4 C2 H2 F400 T1000 ; Set Z probe
    G31 X0 Y0 Z0 P700
    M557 X30:380 Y30:380 S50 ; Define mesh grid, I will override manually this with the size of the PCB

    I want to mill a PCB, I connected an alligator clip wire to the endmill, and the other to the PCB. They are connected to the "Z Stop", to GND and Z_Stop pins.
    So it's normally open switch, but I can't get it to work even though I set "M574 Z1 S0"

    I had to use M307, otherwise I would get another error: Error: M280: Invalid servo index 7 in M280 command

    I also want to run a Mesh Grid Compensation after I home on the PCB surface, but right now, I can't even get it home on Z axis

    What am I doing wrong? please help


  • administrators

    1. I'm confused about what type of Z probe you are using. From your config I guess it's either a BLTouch or a servo-deployed switch (because you are using M280 commands somewhere); but then you say you are touching the PCB.

    2. Which firmware version are you running? The C parameter of the M558 command is supported in firmware 2.02 and later.

    3. For a normally open switch, add parameter i1 to your M558 command to invert the reading.

    4. 2mm dive height (H2 in M558) is very small. I suggest you use at least H5, to allow for different thicknesses of PCB.



  • Hi dc42, thanks for replying 🙂

    #3 fixed my problem, adding the I1

    Thank you!!

    #1 - A quick google search for images gave me this:
    alt text
    Image found on this page: https://buildyourcnc.com/PrimeronHomingandLimitSwitches.aspx

    So basically one wire is connected to the drill bit with an alligator clip wire, and the other on the PCB. When the drill bit touches the PCB, it makes contact.

    The error for M280, I get when I home on Z axis, when I run "G28 Z". Also the file homez.g goes not contain M280 code

    #2 - This is the firmware version I am using: 2.02(RTOS) (2018-12-24b1)

    #4 - I set it back to H5


  • administrators

    I suspect that somehow you have created deployprobe.g and retractprobe.g files suitable for a BLTouch probe. That's where you will find the M280 commands. You can delete those two files because your Z probe doesn't need them.



  • Hi dc42,

    Yes, I do have the deployprobe.g and retractprobe.g with M280 gcode in those files, but the problem is that I need those files because I also have tools for 3D printing, actually I have 8 tools in total:
    0_1552348083643_2019-03-11 19.35.19b.jpg

    I use BL-Touch on the first 6 (first 4 the BL-Touch is in front, the next 2 are in the back so they are obstructed in this image), number 7 is a touch probe (for 3D scanning), and last one is the milling motor that I am trying to use now.



  • Is there a way to put an IF statement to omit those g code if a flag is raised?

    Kind of like "#define flag" and then "if else" in the deployprobe.g and retractprobe.g file, just like in C/C++ ?


  • administrators

    @cvmichael said in CNC Mode, Z normally open touch home & mesh:

    Is there a way to put an IF statement to omit those g code if a flag is raised?

    Kind of like "#define flag" and then "if else" in the deployprobe.g and retractprobe.g file, just like in C/C++ ?

    Conditional GCode is not available yet, but is scheduled to be implemented.


 

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