Exception thrown by M31 macro

If you have a question about the software please ask it here.

Exception thrown by M31 macro

Postby DavidT » Mon Sep 30, 2024 9:34 pm

Hi,
I've been having this error from time to time and to get arround I would reload a backup UCCNC folder.
I would really like to solve this for good.
If anyone can guide me on where to start, it would be appreciated.

The machine is a CNC mill equiped with an ATC and a MPG pendant.
C94 board with UC300ETH motion controller.
M31 is used to set the Z offset of tools.
The tool setter (TS) is simply a piston sitting on a limit switch.
The macro first rapidly touches the TS, back off then slowly touch it again and stop to acquire the position.
It ususally takes a few seconds before the tool goes back up but this is where I sometimes get the error (just before going up).
As I understand, the error occurs while trying to save the settings but I don't get what else is locking it.

Thank you
Attachments
M31.txt
The M31 macro in question
(5.47 KiB) Downloaded 14 times
M31error.png
M31 error message
User avatar
DavidT
 
Posts: 13
Joined: Fri Sep 24, 2021 5:51 pm
Location: Montreal, Canada

Re: Exception thrown by M31 macro

Postby cncdrive » Tue Oct 01, 2024 6:50 pm

Try to put it into a try/catch and in a loop inside the try and some Sleep in between and reset a boolean variable before the loop and set it after successful saving and test the variable and jump out of the loop only if the variable is set or if a macrostop has occured, because maybe the problem is only that the previous saving process did not end yet and you trying to save to the file while it is still in use.
cncdrive
Site Admin
 
Posts: 4851
Joined: Tue Aug 12, 2014 11:17 pm


Return to Ask a question from support here

Who is online

Users browsing this forum: No registered users and 12 guests