load specific g-file with button
28 Dec 2015 12:05 #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:
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 or Create an account to join the conversation.
28 Dec 2015 16:46 #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
The following user(s) said Thank You: markder13
Please Log in or Create an account to join the conversation.
29 Dec 2015 09:14 #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 or Create an account to join the conversation.
30 Dec 2015 13:40 #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
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 or Create an account to join the conversation.
Moderators: HansU
Time to create page: 0.163 seconds