603,893 active members*
3,860 visitors online*
Register for free
Login
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2013
    Posts
    48

    isn't this script wrong?

    I'm just learning this script stuff in order to have touch plate zeroing capabilities. it seems to me that this routine attempts to touch the plate within 2" of down travel. if it never reaches the plate it still resets the Z DRO just as if it had reached it. should there not be a logic path for the situation of not registering a touch? I have looked at several different scripts and have the same question, i.e. what happens if the tool never touches? say you start the probe and the tool is 2.01" from the plate. it will appear to have touched, but it didn't, and no msg tells you the probe failed. am I missing something?

    Message( "Auto Zeroing Z..." )
    SetOEMDRO(ZaxisDRO, 0.0000)
    Sleep 1000
    If IsSuchSignal (22) Then
    code "G31 Z-2 F10"
    While IsMoving()
    Sleep 100
    Wend
    ' the thickness of the z touch plate described in this document is .180 inches
    Call SetOEMDRO(ZaxisDRO, .180)
    Sleep 100
    code "G1 Z1"
    End If

  2. #2
    Join Date
    Mar 2003
    Posts
    35494
    The simple answer is to just increase length of the G31 move to the maximum you'd ever need. Otherwise, I guess you could check the start and end positions of the probe move, and if it equals the commanded distance, than throw an error. But I've never seen anyone do this. If you're machine has 6" of Z travel, then just do a G31 Z-6.
    You also might want to check if you're in absolute or incrmental distance move before the G31 move, to make sure you get the results you're expecting.
    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

    Mach3 2010 Screenset
    http://www.thecncwoodworker.com/2010.html

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  3. #3
    Join Date
    Jan 2013
    Posts
    48
    I understand that. I can also foresee accidently shoving the tool into the table when the probe malfunctions, but that could occur in theory at any travel distance.

Similar Threads

  1. Replies: 4
    Last Post: 12-26-2023, 06:54 PM
  2. g53 in macro/script?
    By travisn in forum Mach Wizards, Macros, & Addons
    Replies: 7
    Last Post: 11-11-2011, 04:45 AM
  3. Need help with VB script Syntax Please.
    By Adamj12b in forum Mach Software (ArtSoft software)
    Replies: 6
    Last Post: 09-18-2008, 01:18 PM
  4. VB6,VB.net,VB script,What one???
    By hydrospin01 in forum Visual Basic
    Replies: 11
    Last Post: 05-25-2008, 02:09 AM
  5. Engraving Script
    By id 10 t in forum Rhino 3D
    Replies: 0
    Last Post: 07-07-2006, 05:17 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
  •