Machsupport Forum

G-Code, CAD, and CAM => G-Code, CAD, and CAM discussions => Topic started by: cobnashine on January 09, 2020, 05:33:12 PM

Title: edit button script problem with command code
Post by: cobnashine on January 09, 2020, 05:33:12 PM
Purchased CNC router, running it with Mach3.  Setting it up, necessary to edit the button script for "Auto Tool Zero".  Macro supplied with the machine (lines of text in an instruction sheet) has these lines of code for providing this script:

Code: [Select]
Call SetDRO(2,0.00)
code "G31 Z"Zprobe & "F"&ZfeedRate
While IsMoving()

I keep getting "Syntax Error" for the 2nd of these 3 lines.  I gather that the macro's purpose is to generate a line of G-code, something like
Code: [Select]
G31 Z2.50 F20

(if Zprobe happens to be 2.50 and ZfeedRate 20 inches per second)

Does anyone know what is wrong?

Any and all suggestions greatly appreciated.
Title: Re: edit button script problem with command code
Post by: Tweakie.CNC on January 10, 2020, 01:18:03 AM
Try;

Call SetDRO(2,0.00)
code "G31 Z"&Zprobe & "F"&ZfeedRate
While IsMoving()