Z probe moves Z axis up instead of down

Home Forums TinyG TinyG Support Z probe moves Z axis up instead of down

Viewing 15 posts - 16 through 30 (of 40 total)
  • Author
    Posts
  • #10833
    SteveD
    Member

    Thanks for that. Guess I’ve just deleted the boot loader. Not to worry, have an Atmel-ICE available and prefer it over avrdude.

    Have played some more and had G38.2 going both ways before I remembered that G38.2 always uses machine co-ordinates. Issue #157 contains a PDF link – https://github.com/synthetos/TinyG/files/139431/TinyG.wiki.-.G38_2.Probe.pdf, well worth a read.

    For better or worse, my machine home position is top, right, back (max Z, max X, max Y). In general I use G54 offsets to zero out the workpiece (all my gcode to date has used G54). My general process is:
    1) G21 G90 G54 – units=mm, absolute, use G54 offsets.
    2) G28.2 X0 Y0 Z0 – home machine (machine X, Y and Z all set to 0mm), Chilipeppr defaults to displaying machine values + G54 offsets.
    3) Move the cutter (jog) to the workpiece zero and issue G10 L2 P1 X[] Y[] Z[] to zero G54. My Z has always been a little off this way but I’ve compensated by using a 3mm MDF waste board underneath and making the tool path plunge a little deeper.
    4) Run the job.

    For general milling of wood, MDF and acrylic this has worked well.

    #10834
    RCG3
    Member

    Well I finally got a chance to play again and now the Z probe is back to going the wrong way. I cleared the g54x offset by setting it to zero. Homed the machine then jogged over to the middle of the table. Tried running the touch plate widget in Chilipeppr and CNCJS and it goes up instead of down. ztm=0, ztn=-115

    I’m still as lost as ever

    #10835
    SteveD
    Member

    I think I may have worked this out.

    Try this:
    1) Home your machine, do not jog once in home position
    2) G38.2 Z-10 F25

    Which way does it go?

    #10836
    RCG3
    Member

    I did what you said to do and it went down like it’s supposed to. I ran the macro in CNCJS and this is what it sent.

    ; Z-Probe
    G91
    G38.2 Z-10 F50
    G90
    ; Set the active WCS Z0
    G10 L20 P1 Z19
    ; Retract from the touch plate
    G91
    G0 Z4
    G90

    #10837
    SteveD
    Member

    Try:
    1) Home the machine
    2) Jog down 20mm
    3) G38.2 F-10 F25

    #10838
    RCG3
    Member

    You’re on to something!

    1. Homed
    2. Jogged down 20mm
    3. Ran Z Probe macro

    It went up instead of down.

    #10839
    SteveD
    Member

    Yeah, the G38.2 command ALWAYS uses absolute G53 co-ordinates. It ignores G54-G59 offsets and G90/91.

    When you’re at the top of the Z axis the G53 value is 0 so it goes down, i.e. seeks absolute -10. When you jog below the G53 -10 point, say at -20, it is going to seek up.

    To get the Chilipeppr touch plate widget to work right try this:
    1) put a thick sponge under the touch plate to prevent bit/plate damage
    2) home machine
    3) set G54 Z to zero i.e. clear out the offset
    4) jog down close to your touch plate
    5) G28.3 Z0
    6) run the touch plate widget (be ready with the ! just in case)

    #10840
    RCG3
    Member

    Thanks SteveD! I’ll have to work on this tomorrow. So by homing the machine I’m setting G53 to 0,0,0, right? Then by setting g54z=0 I’m essentially making g53 and g54 the same? What does G28.3 Z0 do right before running the widget?

    Sorry for the dumb questions. I have a lot to learn.

    #10841
    SteveD
    Member

    > So by homing the machine I’m setting G53 to 0,0,0, right?
    Correct

    > Then by setting g54z=0 I’m essentially making g53 and g54 the same?
    Yep

    G28.3 Z0 sets the G53 Z value to zero, i.e. machine zero has been moved down to the jog position.

    This means the the following G38.2 Z-10 F25 block will result in a downward movement. Without it the machine will move up.

    BTW, these are not dumb questions. It has taken me the best part of 2 weeks, a damaged engraving bit and a damaged touch plate to work this out.

    Cheers,
    Steve

    #10842
    RCG3
    Member

    I appreciate all your help Steve. I’ve learned more here tonight than I have in months.

    So if you jog below Z=-10 and run a G38.2 Z-10 F25 why does it want to go back up towards Z=-10 instead of down and additional 10mm?

    Thanks again,
    Reeve

    #10843
    RCG3
    Member

    I guess the Z-10 sends the machine to the “position Z=-10” instead of down 10mm. It’s making more sense to me if that’s the case.

    #10844
    SteveD
    Member

    Hi Reeve,
    you are correct. It’s an absolute versus relative co-ordinate thing. The TinyG developers have decided to implement G38.2 in G53 absolute terms, ignoring any user offsets (G54-G59) and absolute/incremental modes. This is confusing because other commands like G0/G1 don’t work this way.

    Working through an example, assume the WCS is G54 and mm (G21). The block “G0 Z-10” can mean one of two things. If you’re working in absolute mode (G90) then this means move the Z axis to position -10 in G54 space (an absolute move). If you’re in incremental mode (G91) then this means move the Z axis down by 10mm from its current position (a relative move).

    G38.2 Z-10 F25 always means move the Z axis to position -10 in G53 space.

    It doesn’t help that the GCODE from the touch plate widget and CNCJS are mixing useless G91’s into the sequence. Using your previous example:
    ; Z-Probe
    G91
    G38.2 Z-10 F50
    G90
    ; Set the active WCS Z0
    G10 L20 P1 Z19
    ; Retract from the touch plate
    G91
    G0 Z4
    G90

    This can be rewritten as:
    ; Z-probe
    G38.2 Z-10 F50
    ; Set the active WCS Z0
    G10 L2 P1 Z19
    ; Retract from the touch plate
    G91 G0 Z4 G90

    The first G91/G90 pair have no effect. G38.2 ignores the current absolute/incremental mode setting i.e. it is hardcoded to be G90. The current WCS is ignored and G53 is always used.

    Cheers,
    Steve

    #10846
    cmcgrath5035
    Moderator

    Thanks SteveD for your experienced participation.

    I created a sticky reference to this thread to help future visitors

    #11353
    steverichab
    Member

    I am trying to figure out why the touch probe widget in ChilliPeppr goes up instead of down!
    On tinyG V8 with 440.20 firmware. Here is my process
    1) Home the machine NC limits top for Z, Left for X and Front for Y
    2) Position the milling tool at the “origin” of the stock I set up in Fusion 360
    3) Position the tip of the tool about 10 mm from my stock surface
    4) Set G54 Zero
    5) Run the Touch Plate widget and the z axis goes up!!!!!!!!!

    Some how I occasionally get touch plate to work but I don’t know how, HELP

    [fb] firmware build 440.20
    [fv] firmware version 0.97
    [hp] hardware platform 1.00
    [hv] hardware version 8.00
    [id] TinyG ID 5X0850-VPK
    [ja] junction acceleration 100000 mm
    [ct] chordal tolerance 0.0100 mm
    [sl] soft limit enable 0
    [st] switch type 1 [0=NO,1=NC]
    [mt] motor idle timeout 2.00 Sec
    [ej] enable json mode 0 [0=text,1=JSON]
    [jv] json verbosity 4 [0=silent,1=footer,2=messages,3=configs,4=linenum,5=verbose]
    [js] json serialize style 1 [0=relaxed,1=strict]
    [tv] text verbosity 1 [0=silent,1=verbose]
    [qv] queue report verbosity 1 [0=off,1=single,2=triple]
    [sv] status report verbosity 1 [0=off,1=filtered,2=verbose]
    [si] status interval 100 ms
    [ec] expand LF to CRLF on TX 0 [0=off,1=on]
    [ee] enable echo 0 [0=off,1=on]
    [ex] enable flow control 2 [0=off,1=XON/XOFF, 2=RTS/CTS]
    [baud] USB baud rate 5 [1=9600,2=19200,3=38400,4=57600,5=115200,6=230400]
    [net] network mode 0 [0=master]
    [gpl] default gcode plane 0 [0=G17,1=G18,2=G19]
    [gun] default gcode units mode 1 [0=G20,1=G21]
    [gco] default gcode coord system 1 [1-6 (G54-G59)]
    [gpa] default gcode path control 2 [0=G61,1=G61.1,2=G64]
    [gdi] default gcode distance mode 0 [0=G90,1=G91]
    [1ma] m1 map to axis 0 [0=X,1=Y,2=Z…]
    [1sa] m1 step angle 1.800 deg
    [1tr] m1 travel per revolutio

    #11354
    cmcgrath5035
    Moderator

    Need to see your full parameter set.
    Copy it to a cloud drive (Gdrive, etc.) and post a URL.

    Have you tried launching a probe directly from the Serial Console rather than the widget in step 5 of your process?

Viewing 15 posts - 16 through 30 (of 40 total)
  • You must be logged in to reply to this topic.