I'm trying to create a hal pin that indicates the current coordinate system. This pin does not exist in HALUI. There was some discussion of the creation of this pin here:
forum.linuxcnc.org/24-hal-components/454...or-coordinate-system
'If you converted it to one of the others then I think that the Python handler code could poll the linuxcnc.status() and update itself.'
(The value to retrieve is g5x_index.)
This link explains how to use the Python Interface:
linuxcnc.org/docs/2.7/html/config/python...ding_linuxcnc_status
This link explains how to use GStat to create a custom HAL pin:
linuxcnc.org/docs/html/gui/GStat.html#_sample_gstat_code
I was wondering if I chose to go down this route whether this is the simplest way to do this in QtPyVCP?, or am I missing something and there is a better way? Is there anything else that I should be aware of?
The purpose of this hal pin is create a message whenever the coordinate system is changed in auto mode, primarily used to indicate when M5 or M30 change the coordinate system. I recently destroyed a touch probe by accidentally ending a handwritten probing routine with M30, causing me to accidentally run the program in wrong coordinate system the second time, and rapid the probe into a fixture.
Any help is much appreciated!