- Posts: 9
- Thank you received: 0
load specific g-file with button
10 years 10 months ago #67394
by markder13
load specific g-file with button was created by markder13
Hi,
I have write a separate python program that converts a G-code file. The file is loaded, modified and writen to new file. The python programm communicated with linuxcnc using the linuxcnc python module. Now I want to load the using this code:
However nothing happens. But when change the file to a non existing I get a error messages that the file does not exist. Hence linuxcnc is opening the file.
How do I load as G-code in Axis ?
thx
I have write a separate python program that converts a G-code file. The file is loaded, modified and writen to new file. The python programm communicated with linuxcnc using the linuxcnc python module. Now I want to load the using this code:
Code:
import linuxcnc
c = linuxcnc.command()
c.mode(linuxcnc.MODE_AUTO)
c.reset_interpreter()
c.program_open('/home/user/linuxcnc/nc_files/test.ngc')
How do I load as G-code in Axis ?
thx
Please Log in to join the conversation.
10 years 10 months ago #67402
by ArcEye
Replied by ArcEye on topic load specific g-file with button
I think you are getting confused between linuxcnc and Axis.
Axis assumes it is the only GUI and knows nothing about what another program might try to do.
As far as it is concerned the only file loaded is one that was loaded through Axis.
If you want to load a file directly into Axis, probably best just to use axis-remote
eg
system("axis-remote filename.ngc")
That way, everything is in sync
regards
Axis assumes it is the only GUI and knows nothing about what another program might try to do.
As far as it is concerned the only file loaded is one that was loaded through Axis.
If you want to load a file directly into Axis, probably best just to use axis-remote
eg
system("axis-remote filename.ngc")
That way, everything is in sync
regards
Please Log in to join the conversation.
10 years 10 months ago #67440
by markder13
Replied by markder13 on topic load specific g-file with button
Thanks
This solved the problem
This solved the problem
Please Log in to join the conversation.
10 years 10 months ago #67513
by andypugh
You can probably run this Python file automatically as a filter file.
linuxcnc.org/docs/2.7/html/config/ini-co...html#_filter_section
Replied by andypugh on topic load specific g-file with button
markder13 wrote: I have write a separate python program that converts a G-code file. The file is loaded, modified and writen to new file.
You can probably run this Python file automatically as a filter file.
linuxcnc.org/docs/2.7/html/config/ini-co...html#_filter_section
Please Log in to join the conversation.
Time to create page: 0.075 seconds
