- Posts: 19
- Thank you received: 0
Seeing values of gcode settings
3 years 5 months ago #270582
by diep
Seeing values of gcode settings was created by diep
Hello, the active gcodes in the active gcode tab - what do i type in the mdi window or where do i click with mouse to see the value displayed for example of G64 gcode that is active?
Kind Regards,
Vincent
Kind Regards,
Vincent
Please Log in or Create an account to join the conversation.
3 years 5 months ago #271512
by andypugh
Replied by andypugh on topic Seeing values of gcode settings
I am not sure that there is a built-in way to see the G64 setting.
I have looked at increasingly hacky ways to find it (numbered and named parameters, HAL pins, Python status) and I don't see it mirrored anywhere.
The next step would be to start from the other end and see if the data gets put anywhere in the code, but it is going to be a long and winding journey an I don't have time right now:
github.com/LinuxCNC/linuxcnc/blob/master...erp_convert.cc#L2194
I have looked at increasingly hacky ways to find it (numbered and named parameters, HAL pins, Python status) and I don't see it mirrored anywhere.
The next step would be to start from the other end and see if the data gets put anywhere in the code, but it is going to be a long and winding journey an I don't have time right now:
github.com/LinuxCNC/linuxcnc/blob/master...erp_convert.cc#L2194
Please Log in or Create an account to join the conversation.
3 years 5 months ago - 3 years 5 months ago #271516
by Aciera
Replied by Aciera on topic Seeing values of gcode settings
Looks like the G64 settings can be found in the 'settings' attribute in the python interface:
linuxcnc.org/docs/master/html/config/python-interface.html
Not a 'point and click' solution I'm afraid.
linuxcnc.org/docs/master/html/config/python-interface.html
Not a 'point and click' solution I'm afraid.
Last edit: 3 years 5 months ago by Aciera.
Please Log in or Create an account to join the conversation.
3 years 5 months ago #271517
by andypugh
Replied by andypugh on topic Seeing values of gcode settings
And you can run Python in the MDI window (I think...)
I would be absolutely astonished if that actually worked, though.
Code:
(python, print(linuxcnc.status.settings[3])
I would be absolutely astonished if that actually worked, though.
Please Log in or Create an account to join the conversation.
3 years 5 months ago - 3 years 5 months ago #271518
by rodw
Replied by rodw on topic Seeing values of gcode settings
I thought Andy was right. But wait, there may be a shortcut. But it seems that the G64 P & Q Parameters are passed to the state tags structure
github.com/LinuxCNC/linuxcnc/blob/master...tion/state_tag.h#L96
and
github.com/LinuxCNC/linuxcnc/blob/master...ion/state_tag.h#L118
eg in fields_float[GM_FIELD_FLOAT_PATH_TOLERANCE]
Maybe Andy can tell you if that's accessible from the Python interface, otherwise you would need to add a pin for it in motion.c
github.com/LinuxCNC/linuxcnc/blob/master...motion/motion.c#L708
Good luck!
EDIT: Cross posted, heaps of options!
github.com/LinuxCNC/linuxcnc/blob/master...tion/state_tag.h#L96
and
github.com/LinuxCNC/linuxcnc/blob/master...ion/state_tag.h#L118
eg in fields_float[GM_FIELD_FLOAT_PATH_TOLERANCE]
Maybe Andy can tell you if that's accessible from the Python interface, otherwise you would need to add a pin for it in motion.c
github.com/LinuxCNC/linuxcnc/blob/master...motion/motion.c#L708
Good luck!
EDIT: Cross posted, heaps of options!
Last edit: 3 years 5 months ago by rodw.
Please Log in or Create an account to join the conversation.
3 years 5 months ago #271519
by rodw
Replied by rodw on topic Seeing values of gcode settings
So at a guess, the field_float array is copied ot the Python Settings array as the field order is the same
Very cool! Thank Andy for getting state tags into the code base
Very cool! Thank Andy for getting state tags into the code base
Please Log in or Create an account to join the conversation.
Time to create page: 0.057 seconds