- Posts: 20
- Thank you received: 0
path of current active ngc-file (or calling ngc for remap M6)
5 years 9 months ago #195822
by freisei
Hi!
i have nearly finished auto tool-lenght measuring feature in probe-screen.
One of the last thing is that i want show some informations in the tool-change dialog that i can get from the NGC-file.
Is it possible to get the path/filename from inside g-code (especially from the M6-remap-code which is a ngc-macro). Or are there other possibilitys from external programs (which i could call by M-Codes)
Greets,
Freisei
i have nearly finished auto tool-lenght measuring feature in probe-screen.
One of the last thing is that i want show some informations in the tool-change dialog that i can get from the NGC-file.
Is it possible to get the path/filename from inside g-code (especially from the M6-remap-code which is a ngc-macro). Or are there other possibilitys from external programs (which i could call by M-Codes)
Greets,
Freisei
Please Log in to join the conversation.
5 years 9 months ago #195899
by andypugh
Replied by andypugh on topic path of current active ngc-file (or calling ngc for remap M6)
G-code has (almost) no string handling at all. So it's hard to think of a way to do that.
Where do you want to use the file name?
linuxcnc.status.file() returns the G-code file via the Python interface:
linuxcnc.org/docs/2.8/html/config/python-interface.html
Where do you want to use the file name?
linuxcnc.status.file() returns the G-code file via the Python interface:
linuxcnc.org/docs/2.8/html/config/python-interface.html
Please Log in to join the conversation.
5 years 9 months ago #195929
by joekline9
Replied by joekline9 on topic path of current active ngc-file (or calling ngc for remap M6)
I put :
(MSG, LOAD TOOL 1, Turn & face )
M6 T1 G43
...
It prints on the bottom right of the AXIS GUI
It is not in the manual tool change box but still useful.
You can put any text in the (MSG, text...)
Also see:
(PRINT,...)
(DEBUG,...)
Print can output variables.
(MSG, LOAD TOOL 1, Turn & face )
M6 T1 G43
...
It prints on the bottom right of the AXIS GUI
It is not in the manual tool change box but still useful.
You can put any text in the (MSG, text...)
Also see:
(PRINT,...)
(DEBUG,...)
Print can output variables.
Please Log in to join the conversation.
5 years 9 months ago #195932
by andypugh
Replied by andypugh on topic path of current active ngc-file (or calling ngc for remap M6)
If you use (DEBUG. parameter1 = #1 parameter 2 = #2) then it will print the numerical values of parameters.
Please Log in to join the conversation.
5 years 9 months ago #195980
by freisei
Replied by freisei on topic path of current active ngc-file (or calling ngc for remap M6)
thats exacly what i need! Thank you!
Please Log in to join the conversation.
5 years 9 months ago #195992
by freisei
Replied by freisei on topic path of current active ngc-file (or calling ngc for remap M6)
btw in remapped code with ngc the linuxcnc.status.file() shows only the remap-file. Of course i need the calling file. For now i use the change_prolog to store the filename in a separate file and load/use this file in the remap-code by a custom m-call.
Maybe there is a better way to store the filename (maybe in linuxcnc.status-object?). If someone knows, let me know too.
Greets,
Freisei
Maybe there is a better way to store the filename (maybe in linuxcnc.status-object?). If someone knows, let me know too.
Greets,
Freisei
Please Log in to join the conversation.
Time to create page: 0.082 seconds
