Skip to main content
Submitted by Elvis on Wed, 03/21/2018 - 12:12

I'm trying to utilize #AUTOERR and #CMDERR.
I currently have those subroutines inside my #AUTO subroutine & I'm thinking that's a problem but the command reference doesn't say where to place the automatic subroutines.

Can/should these automatic subroutines be added after the end of my programming as if they're standalone subroutines that my program never calls?

Comments 2

andriys on 03/22/2018 - 14:43

Hello Elvis,
You might encounter complications if you will keep built-in subroutines such as #AUTOERR and #CMDERR as part of your program running routine.
If you do that, you run a risk accidentally going into that subroutine without actual errors.
To avoid extra troubleshooting, it is a good practice to keep such routines as a standalone routine to prevent the program calling them with no need.
Thank you,
Andriy Stasyuk
Applications Engineer
Galil Motion Control

Elvis on 03/23/2018 - 05:19

Thank you, thank you very much.
That's what I was seeing - the automatic subroutine code was actually being executed within the #AUTO routine.
I simply moved the #AUTOERR and #CMDERR routines just after the #AUTO routine and all was well.