586,375 active members*
3,276 visitors online*
Register for free
Login
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2013
    Posts
    1

    Z zero, error in script

    Hi,

    I have a problem with the "HiddenScript.m1s" script from the "auto tool zero" button .

    CurrentFeed = 50
    PlateThickness = 1
    ProbeFeed = 50

    Code "G90 F" &ProbeFeed

    If GetOemLed (825)=0 Then

    Code "G4 P5"

    Code "G31Z-5 F" &ProbeFeed
    While IsMoving()
    Wend
    Code "G4 P0.25"
    ZProbePos = GetVar(2002)
    Code "G0 Z" &ZProbePos
    While IsMoving()
    Wend
    Call SetDro ( PlateThickness)
    Code "G4 P0.5"
    Code "G0 Z2.0"
    Code "(Z axis is now zeroed)"
    Code "F" &CurrentFeed
    Else
    Code "(Z-Plate is grounded, check connection and try again)"
    Exit Sub
    End If

    Wen I run this script from "Auto tool zero" button in the "Mach3 VB ScriptEditor "
    I get this error "Error on line: 11 - Internal error<Code>.

    I have tryed many things, but only wen I remove Z-5 its getting through.

    Plz help my !!

    Stef

  2. #2
    Join Date
    Mar 2003
    Posts
    35538
    This line is wrong, there should be a DRO number in there.
    Call SetDro ( PlateThickness)

    Try this code:



    CurrentFeed = 50
    PlateThickness = 1
    ProbeFeed = 50

    Code "G90"

    If Not GetOemLed(825) Then

    Code "G4 P5"

    Code "G31Z-5 F" &ProbeFeed
    While IsMoving()
    Wend
    Code "G4 P0.25"
    ZProbePos = GetVar(2002)
    Code "G0 Z" &ZProbePos
    While IsMoving()
    Wend
    SetDro(2, PlateThickness)
    Code "G4 P0.5"
    Code "G0 Z2.0"
    Code "(Z axis is now zeroed)"
    Code "F" &CurrentFeed
    Else
    Code "(Z-Plate is grounded, check connection and try again)"
    Exit Sub
    End If
    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)

Similar Threads

  1. Script Error since 996
    By velocityxlrg in forum BobCad-Cam
    Replies: 1
    Last Post: 06-12-2013, 05:56 PM
  2. Run G-code from script
    By leif_brunosson in forum LinuxCNC (formerly EMC2)
    Replies: 1
    Last Post: 11-11-2008, 08:39 PM
  3. VB6,VB.net,VB script,What one???
    By hydrospin01 in forum Visual Basic
    Replies: 11
    Last Post: 05-25-2008, 02:09 AM
  4. Macro/script-can this be done?
    By Splint in forum Rhino 3D
    Replies: 3
    Last Post: 02-13-2006, 04:50 AM

Posting Permissions

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