Reading gcode variable from python?

More
7 years 4 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 or Create an account to join the conversation.

More
7 years 4 days ago #148967 by pl7i92
Replied by pl7i92 on topic Reading gcode variable from python?
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
7 years 4 days ago #148969 by thang
Replied by thang on topic Reading gcode variable from python?
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
7 years 4 days ago #148974 by pl7i92
Replied by pl7i92 on topic Reading gcode variable from python?
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
7 years 4 days ago - 7 years 4 days ago #148994 by thang
Replied by thang on topic Reading gcode variable from python?
It's a named variable.
example: #<_variable>.
i would like to create a part of GUI that show variable values.
Last edit: 7 years 4 days ago by thang.

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

More
7 years 4 days ago #148995 by fixer
Replied by fixer on topic Reading gcode variable from python?
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.

Time to create page: 0.274 seconds
Powered by Kunena Forum