Limiting the Z descent on work/tool measure scripts

Results 1 to 3 of 3

Thread: Limiting the Z descent on work/tool measure scripts

  1. #1
    Member
    Join Date
    Mar 2021
    Posts
    2
    Downloads
    0
    Uploads
    0

    Default Limiting the Z descent on work/tool measure scripts

    Hello,

    I'm in the process of adding a movable Z sensor to our CNC which is a quite powerfull industrial type machine that was refurbished by a programmer with a MK3/4 controller.
    This machine doesnt have a switch at the bottom of the Z axis (only a top limit switch), the bottom is managed by soft limits.

    So when hitting measure buttons (either work or tool measure), the descent will be "infinite" (i see the scripts says -10000) until it finds a contact. (it doesnt consider the softlimit parameters)

    Thing is we are a kind of fablab so different people use the machine, and even if we are carefull, one day an error can occur where someone forgets the bottom plate, or the contact is not made, or whatever...
    And as an industrial grade machine, the Z motor is very powerfull and can push the spindle into the table and..... we don't want that to be even possible

    So: how could I limit the Z probing move so that it doesnt override the soft limits (or add another limit in the script so that it stops at Machine Z0 if it didnt find a contact?)

    Thanks a lot for the help

    Similar Threads:


  2. #2
    Member ScorpionTDL's Avatar
    Join Date
    Aug 2020
    Posts
    131
    Downloads
    0
    Uploads
    0

    Default Re: Limiting the Z descent on work/tool measure scripts

    I think the simples way would be to change all the scripts for height measurement and change the "Z-100000" to whantever you lowest allowed Z Travel Limit would be. For example if your Spindle head hits the table at Z -225 set it to -220, this would give you 5 mm clearance.
    In Addition you need to add a G53 in front of the G38 to have it running in the machine coordinate system.
    Test it with a higher number first to make sure its working correctly.
    If the probe is not triggered till the machine reached the position a warning will pop up.

    The part in Machine.Work_Position_Measure_Height could look something like this:

    M11P0 G53 G38.2 Z-188 F#<_workoff_speed>
    G91 G01 Z[+#<_workoff_swdist>]
    o<low> if [#<_workoff_speed_low> GT 0]
    G90 G53 G38.2 Z-188 F#<_workoff_speed_low>
    G91 G01 Z[+#<_workoff_swdist>] F#<_workoff_speed>
    o<low> endif
    M11P1 G90


    you could even make this into a global parameter and set it in the Parameters.txt file


    M11P0 G53 G38.2 Z#<_lowest_z_for_measure> F#<_workoff_speed>
    G91 G01 Z[+#<_workoff_swdist>]
    o<low> if [#<_workoff_speed_low> GT 0]
    G90 G53 G38.2 Z#<_lowest_z_for_measure> F#<_workoff_speed_low>
    G91 G01 Z[+#<_workoff_swdist>] F#<_workoff_speed>
    o<low> endif
    M11P1 G90

    and add
    _lowest_z_for_measure -220
    to Parameters.txt, now you can adapt it at a central place for all scripts, could come in handy if you later add something permanent to the table that you would like to protect (vacuum table for example)

    However keep in mind that if _lowest_z_for_measure is above your current Z position the Z axis will move up when running the probe script instead of down ;-)
    Please carefully doublecheck the code above, this was just a quick and dirty test in the simulation;-)


    In general I'm not sure how much such a safety will indeed help you. In most cases there will me something solid below the spindle when triggering the measurement (either Stock Material or a vice or whatever) and the Spindel will still crash into this before its hitting the travel limit.

    best Regards,
    Klaus



  3. #3
    Member
    Join Date
    Mar 2021
    Posts
    2
    Downloads
    0
    Uploads
    0

    Default Re: Limiting the Z descent on work/tool measure scripts

    Thanks,

    Will try something like this and let you know.
    I thought about the G53 but thought that it might mess with the principle of placing the Z in work.

    But my G-Code knowledge is questionable...

    Will do carefull tests with small moves



Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Limiting the Z descent on work/tool measure scripts

Limiting the Z descent on work/tool measure scripts