Reading gcode variable from python?

More
7 years 3 days ago #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 to join the conversation.

More
7 years 3 days ago #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 to join the conversation.

More
7 years 3 days ago #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 to join the conversation.

More
7 years 3 days ago #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 to join the conversation.

More
7 years 2 days ago #148994 by thang
It's a named variable.
example: #<_variable>.
i would like to create a part of GUI that show variable values.

Please Log in to join the conversation.

More
7 years 2 days ago #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 to join the conversation.

More
7 years 2 days ago #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 to join the conversation.

Time to create page: 0.272 seconds
Powered by Kunena Forum