Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: RecceDG on November 06, 2021, 11:05:07 AM

Title: Screen Script Error
Post by: RecceDG on November 06, 2021, 11:05:07 AM
So I get this whenever I change mach 4 configuration:

The associated code is here:

It's part of the SigLib{ structure.

This watches the error line from my motor drivers, and is supposed to stop everything if a driver issues an error.

The machine works fine; Mach only complains when I save configs.
Title: Re: Screen Script Error
Post by: DazTheGas on November 06, 2021, 12:57:25 PM
It looks to me that its cant find a function called eStop()

DazTheGas
Title: Re: Screen Script Error
Post by: RecceDG on November 06, 2021, 01:26:39 PM
...but it found the first instance, right above it...
Title: Re: Screen Script Error
Post by: jbuehn on November 08, 2021, 12:30:08 PM
Does input 10 ever change state though where it's function would have been called?
Title: Re: Screen Script Error
Post by: RecceDG on November 08, 2021, 12:42:02 PM
Theoretically it changes state if the motor driver errors out via losing steps or failing to reach a commanded position.

That's... hard to test, for obvious reasons.

But I'm not getting the error because of a state change (which if the function was truly undefined would be fair ball if it complained). Instead, I get the error only when I edit the configuration and save it.

If I just run the machine, I never see the error.
Title: Re: Screen Script Error
Post by: jbuehn on November 08, 2021, 01:58:42 PM
When you say edit the configuration, that's the Configure > Control menu?
Title: Re: Screen Script Error
Post by: RecceDG on November 08, 2021, 02:48:00 PM
When you say edit the configuration, that's the Configure > Control menu?

Ayup.
Title: Re: Screen Script Error
Post by: jbuehn on November 08, 2021, 06:10:03 PM
I bet if you commented out the eStop() in input 9's function you'd then see it complain it can't find eStop() in input 10's function.

If you have logging opened and started when you enter/exit the configuration, you can watch all the signals get forced HIGH/LOW (on exit). It's calling input 9's function and erroring out before it calls input 10's function, because Mach is going through the signal ID's in order.

Do you have a global function called eStop?