Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: frogblender on July 05, 2010, 03:53:39 PM

Title: How to STOP EVERYTHING on scripter compiler error?
Post by: frogblender on July 05, 2010, 03:53:39 PM
I use VB scripts.   If there is an error (syntax or otherwise) in the script, you don't know until you try to run it.

Trouble is, if your script is part of a Gcode program, and Mach3 encounters a script compiler error, Mach3 continues on to the next G-code command as if nothing happened.   Chaos ensues.

Some of these errors may be deep in a branch of code which rarely gets executed, and so are difficult to catch.

How do I get Mach3 to Estop if it encounters a vbscript error??

Title: Re: How to STOP EVERYTHING on scripter compiler error?
Post by: Hood on July 05, 2010, 05:05:37 PM
Can you not just open your macros in the editor and run them, it should point out syntax errors for you.
Hood
Title: Re: How to STOP EVERYTHING on scripter compiler error?
Post by: BR549 on July 05, 2010, 06:11:25 PM
Frog I am sure you know CNC rule#1 so we won't go there.

I do not know of any mach error code to trap VB syntax errors on start, OTHER THAN making sure you debug it fully before you run it.

There IS an error trap for VB during run time but it will not run until the VB loads correctly first. On trapping internal errors you can direct it to message you then do whatever you want it to do  STOP,Estop Hold, etc etc

On Error