I am trying to implement a Tool and Offset Tab for my machine.
I can enter values for the offsets and those are then written to the .var file. As long as the machine stays on, those values are shown in the widget.
The problem is that after a new startup, the table is blank.
What could cause that behavior?
The Tooleditor widget doesn’t have that problem. It reads and displays the value from the file correctly.
To get it working I use a pyhton code snipped I found on the forum:
Code:
class HandlerClass:
def __init__(self, halcomp,builder,useropts):
tooledit = builder.get_object("tooledit1")
tooledit.set_filename("/home/linux/linuxcnc/configs/sim.axis.gladevcp/sim1.tbl")
def get_handlers(halcomp,builder,useropts):
return [HandlerClass(halcomp,builder,useropts)]
See attached screenshot, the higlighted variables correspond to G54 and are applied. Also the values from G59.1 are saved at the bottom of the .var file.