Hello Guest it is August 20, 2019, 10:48:25 AM

Author Topic: How to STOP EVERYTHING on scripter compiler error?  (Read 2016 times)

0 Members and 1 Guest are viewing this topic.

How to STOP EVERYTHING on scripter compiler error?
« 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??

Offline Hood

*
  •  25,849 25,849
  • Carnoustie, Scotland
    • View Profile
Re: How to STOP EVERYTHING on scripter compiler error?
« Reply #1 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

Offline BR549

*
  •  6,886 6,886
    • View Profile
Re: How to STOP EVERYTHING on scripter compiler error?
« Reply #2 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        
« Last Edit: July 05, 2010, 06:13:16 PM by BR549 »