I'm posting this in the Bug forum as I can't see an issue with the code, feel free to move if I'm mistaken.
As part of the M31 macro we update the the Z axis softlimits to prevent machining past the bleeder board - sort of a fail safe. In the past this has worked fine, however it is not correctly updating the field now (now = the last few months - it hasn't been a priority. We don't believe anything major changed to break it). The correct value is shown briefly in the box, but it then quickly reverts back to the original value. We have tried running the commands in different orders without success.
As an aside manually updating this field only works if we press Apply before Save. Pressing Save first (my understanding was this was the same as Apply then Save) causes the value to revert and not update.
These are the lines of code. I've added lines here to show the variables referenced. All else works in the wider script and no errors are generated.
Many thanks,
Nick
- Code: Select all
int Zaxissoftlimitminus = 41;
double Zzero = exec.GetZmachpos();
double zSoft = Zzero - zProbeH;
AS3.Setfield(zSoft, Zaxissoftlimitminus);
AS3.Validatefield(Zaxissoftlimitminus);
exec.Callbutton(168);
exec.Callbutton(167);