• Tags
  • Documentation
  • Order
  • Register
  • Login
Duet3D Logo Duet3D
  • Tags
  • Documentation
  • Order
  • Register
  • Login

Probing gcode G38 VS G30

Scheduled Pinned Locked Moved
General Discussion
2
3
135
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • undefined
    Shoki
    last edited by 25 Jan 2024, 15:24

    Hi,

    I have some questions about probing.

    I have an E3D Toolchanger with a Duet3, running RRF3.5rc2. It is equiped with 3 tools : 2 printing and one probe (this one).

    I'm trying to setup probing procedures to probe printed parts and other parts, for measurement and calibration.

    **My question are simple :

    • Which command should be used for general probing in XYZ ?
    • Why are the results from G38 different from the results from G30 ?**

    In the gcode dictionnary, i have found the G38 command which seems perfectly suitable for this.
    However, i'm noticing that there is no precision at all with it.

    I made some simple tests, starting with just the Z switch which i know is very precise.

    The simple script I used is this below. Everything is probed at the same slow speed of 6mm/s in Z.

    var number = 10
    var xpos = 0
    var ypos = -7
    ;Z switch
    M558 K0 P8 C"io1.in" H5 F360 ; Set Z probe
    G1 X{var.xpos} Y{var.ypos}
    ;Probing using G30 with Z switch
    while iterations<var.number-1
    G30 K0 P{iterations} X{var.xpos} Y{var.ypos} K0 Z-9999
    G1 Z5 F360
    G30 K0 P{var.number-1} X{var.xpos} Y{var.ypos} Z-9999 S-1
    G1 Z5 F360
    G1 Z10 F360
    ;Probing using G38 with Z switch
    M558 K0 F360 ; Set probe speed
    while iterations<var.number
    G38.2 K0 X{var.xpos} Y{var.ypos} Z-5
    echo "Right:"^move.axes[2].machinePosition
    G1 Z5 F360
    G1 Z10 360

    The results are the following :

    For the G30 command :
    -0.686,-0.686,-0.688,-0.686,-0.686,-0.686,-0.686,-0.686,-0.686,-0.686
    So it's very good, a single value is different and only 0.002.

    For the G38 command :
    1.158, 0.014, 0.014, 0.014, 0.014, 0.014, 0.614, 1.080, 0.014, 0.024
    So, the value is not the same and they range a full millimeter !

    I tried to do the same thing with my CNC probe. I managed to do it using the G38.2 command and also had a wide range of measurements.
    For the G30 command, the probed crashed into the bed because it was using the machine coordinates and not the active tool coordinates... I will fix it and try again.

    So G38 seems very unprecise compared to G30 ? Why is that ? I can use G30 when probing in Z but it does not work for other direction.

    Thanks in advance for the help.

    undefined 1 Reply Last reply 25 Jan 2024, 15:50 Reply Quote 0
    • undefined
      Shoki @Shoki
      last edited by 25 Jan 2024, 15:50

      Found the answer to my own question, should have searched the forum first.

      @dc42 said in EndStop Accuracy Test:

      @Nazar in RRF 3.5.x the machine position is read during moves instead of only at the end of a move, and at most every 250ms. So if you read the machine position immediately after the G1 H4 or G38.2 move has completed, you may gat a value that is up to 250ms out of date.

      I suggest you insert command G4 P260 after the G1 or G38.2 command, before you read the machine position.

      This solved the repetability problem with the G38.2 command.

      I also found this post :

      @dc42 said in EndStop Accuracy Test:

      @Nazar I think G1 H4 will do exactly what you need.

      Will the G1 H4 command work for my application of XYZ probing too ?
      In the gcode dictionary fo the documentation, i found this on G1 H4 :

      G1 Xnnn Ynnn Znnn H4 Sense endstops while moving, update the current position at which the endstop switch triggers (supported in RRF 3.2-b4 or newer).

      But which endstop does it sense while moving ? All of them ? I did not find a parameter to tell him which probe it needs to monitor ?

      undefined 1 Reply Last reply 26 Jan 2024, 07:25 Reply Quote 0
      • undefined
        oliof @Shoki
        last edited by 26 Jan 2024, 07:25

        @Shoki said in Probing gcode G38 VS G30:

        But which endstop does it sense while moving ? All of them ? I did not find a parameter to tell him which probe it needs to monitor ?

        usually you do this per axis, so G1 Xnnn H4 for X, G1 Ynnn H4 and so on

        <>RatRig V-Minion Fly Super5Pro RRF<> V-Core 3.1 IDEX k*****r <> RatRig V-Minion SKR 2 Marlin<>

        1 Reply Last reply Reply Quote 0
        3 out of 3
        • First post
          3/3
          Last post
        Unless otherwise noted, all forum content is licensed under CC-BY-SA