Reading gcode variable from python?

More
28 Oct 2019 03:38 #148959 by thang
are there any solution that help me read gcode variable from python?
Linuxcnc has commands such as: debug,print. These command can display gcode variables when program reach this command but i'd like to read variables via python to show these value on GUI.

Please Log in or Create an account to join the conversation.

More
28 Oct 2019 08:37 #148967 by pl7i92
hi
you read the lines in as a TXT and as you got the linenumber running fom hal you know where the Gcode is

Please Log in or Create an account to join the conversation.

More
28 Oct 2019 08:49 #148969 by thang
Tks for the answer but could you please explain more detail? , i want these variable values keep update without using DEBUG or PRINT command when linuxcnc is running in auto mode.

Please Log in or Create an account to join the conversation.

More
28 Oct 2019 12:45 #148974 by pl7i92
what is in this variables you want to read
and how does a word line looks you use
so there may be a better way to taken them

Please Log in or Create an account to join the conversation.

More
28 Oct 2019 17:45 - 28 Oct 2019 18:15 #148994 by thang
It's a named variable.
example: #<_variable>.
i would like to create a part of GUI that show variable values.
Last edit: 28 Oct 2019 18:15 by thang.

Please Log in or Create an account to join the conversation.

More
28 Oct 2019 17:53 #148995 by fixer
It is not possible to access gcode variables with python interface. The only way to interface gcode with some outer signal is via M62 - M68 mcodes.

Please Log in or Create an account to join the conversation.

More
28 Oct 2019 20:08 #148998 by Todd Zuercher
I know that you can access g-code parameter values from within python in g-code remaps, but I am not sure how or if it can apply to what you are trying to do.

Please Log in or Create an account to join the conversation.

Time to create page: 0.074 seconds
Powered by Kunena Forum