585,759 active members*
3,910 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > PlanetCNC > Limiting the Z descent on work/tool measure scripts
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2021
    Posts
    2

    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

  2. #2
    Join Date
    Aug 2020
    Posts
    131

    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
    Join Date
    Mar 2021
    Posts
    2

    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

Similar Threads

  1. Replies: 0
    Last Post: 09-20-2018, 03:18 AM
  2. Work Shift vs Measure
    By CncChaos in forum Fanuc
    Replies: 4
    Last Post: 02-15-2017, 10:21 AM
  3. Fanuc 18T work offset measure help
    By alabranche in forum Fanuc
    Replies: 4
    Last Post: 02-14-2017, 07:20 PM
  4. what is limiting factor of tool
    By poster in forum MetalWork Discussion
    Replies: 2
    Last Post: 02-23-2012, 06:39 PM
  5. machine is limiting after tool changes.
    By Fleck in forum BobCad-Cam
    Replies: 3
    Last Post: 01-19-2010, 04:23 AM

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
  •