Program Reload
22 Aug 2019 01:40 #142755
by phillc54
Program Reload was created by phillc54
Is there a way in Gmoccapy to reload the loaded program from an external source similar to what axis-remote can do for Axis.
Please Log in or Create an account to join the conversation.
22 Aug 2019 05:59 #142785
by pl7i92
Replied by pl7i92 on topic Program Reload
gmoccapy uses the same task
so you can do a EMC_task to reload the g-code
so you can do a EMC_task to reload the g-code
The following user(s) said Thank You: phillc54
Please Log in or Create an account to join the conversation.
22 Aug 2019 16:15 #142853
by newbynobi
Replied by newbynobi on topic Program Reload
Or you use a small python code to send a reload command.
Norbert
Norbert
The following user(s) said Thank You: phillc54
Please Log in or Create an account to join the conversation.
23 Aug 2019 00:08 - 23 Aug 2019 00:09 #142907
by phillc54
Replied by phillc54 on topic Program Reload
Thanks Guys,
I don't think I can do what I want. My configuration uses a filter program specified in the INI file to parse the GCode file when it is first loaded. I see that Gmoccapy actually loads a temporary copy of the original GCode file, I tried the following code but it doesn't seem to apply the filter.What I am trying to achieve is shown in this video:
I don't think I can do what I want. My configuration uses a filter program specified in the INI file to parse the GCode file when it is first loaded. I see that Gmoccapy actually loads a temporary copy of the original GCode file, I tried the following code but it doesn't seem to apply the filter.
self.s = linuxcnc.stat()
self.c = linuxcnc.command()
self.s.poll()
if self.s.file:
print('FILE: {}'.format(self.s.file))
self.c.program_open(self.s.file)
Last edit: 23 Aug 2019 00:09 by phillc54.
Please Log in or Create an account to join the conversation.
23 Aug 2019 00:34 #142908
by cmorley
Replied by cmorley on topic Program Reload
gladevcp's hal_filechooser is the basis of loading filter programs.
You may be able to use that to create an external reload.
Maybe Norbert could add a way for users to tap into Gmoccapy's event loop to make this easier.
Chris
You may be able to use that to create an external reload.
Maybe Norbert could add a way for users to tap into Gmoccapy's event loop to make this easier.
Chris
The following user(s) said Thank You: phillc54
Please Log in or Create an account to join the conversation.
26 Aug 2019 10:21 - 26 Aug 2019 10:24 #143201
by newbynobi
Replied by newbynobi on topic Program Reload
Gmoccapy do use the widget hal action for this.
This is the code I use in the Key handling.
If you are in auto mode, using 2.8 branch gmoccapy3.0.8 you can use a hal pin for that purpose:As that button has also other functions, you need to check also for halui.mode.is-auto, and connect them with an and component.
something like this:
Norbert
This is the code I use in the Key handling.
if (keyname == "R" or keyname == "r") and self.stat.interp_state == linuxcnc.INTERP_IDLE:
if event.state & gtk.gdk.CONTROL_MASK:
print("R und Control gedrückt")
self.widgets.hal_action_reload.emit("activate")
else:
self.command.auto(linuxcnc.AUTO_RUN,0)
If you are in auto mode, using 2.8 branch gmoccapy3.0.8 you can use a hal pin for that purpose:
gmoccapy.h-button.button-1
something like this:
net mode-is-auto_1 and2.in0 <= halui.mode.is-auto
net mode-is-auto_2 and2.in1 <= <your_input_signal>
net reload and2.out => gmoccapy.h-button.button-1
Norbert
Last edit: 26 Aug 2019 10:24 by newbynobi.
The following user(s) said Thank You: phillc54
Please Log in or Create an account to join the conversation.
27 Aug 2019 07:35 #143290
by phillc54
Replied by phillc54 on topic Program Reload
Thanks for that, I was able to use gmoccapy.h-button.button-1 and it did reload the program but unfortunately it only seems to reload the temp version of the program, not the original and it does not re-apply the filter program.
Please Log in or Create an account to join the conversation.
27 Aug 2019 19:46 #143349
by newbynobi
Replied by newbynobi on topic Program Reload
OK so you do not want to reload a program, you want to load a new program! That is a big difference.
IMHO as long as you do use your cam to save the program under the same name and after that reload the program, the changes will take effect. If you need to pass your program before that through a helper program, you will need to add your own button using python script to load the program with the load command.
IMHO as long as you do use your cam to save the program under the same name and after that reload the program, the changes will take effect. If you need to pass your program before that through a helper program, you will need to add your own button using python script to load the program with the load command.
Please Log in or Create an account to join the conversation.
27 Aug 2019 20:25 #143355
by rodw
Replied by rodw on topic Program Reload
Phill's not using CAM, his Plasmac system which runs on both Gmoccapy and Axis makes good use of Linuxcnc's filtering ability for plasma control.
It seems that Gmocappy is a bit out of step here. If filtering is a supported feature of Linuxcnc, the GUI (eg Gmocappy) should respect the feature and reapply any filter on a reload.
The thing is here is that Plasmac is a complete working system for Gmocappy. Plasmac is now part of the LinuxCNC core. The current Gmocappy plasma sim config that is an empty shell containing useless features for a modern plasma controller. and not including required features.
Plasmac deserves full support from the developers of the core LinuxCNC feature set. Its a very significant advance for Linuxcnc as it brings commercial quality control of a new class of machine to Linuxcnc. Furthermore, the way it build configs for new users sets a standard that other developers should adopt.
It seems that Gmocappy is a bit out of step here. If filtering is a supported feature of Linuxcnc, the GUI (eg Gmocappy) should respect the feature and reapply any filter on a reload.
The thing is here is that Plasmac is a complete working system for Gmocappy. Plasmac is now part of the LinuxCNC core. The current Gmocappy plasma sim config that is an empty shell containing useless features for a modern plasma controller. and not including required features.
Plasmac deserves full support from the developers of the core LinuxCNC feature set. Its a very significant advance for Linuxcnc as it brings commercial quality control of a new class of machine to Linuxcnc. Furthermore, the way it build configs for new users sets a standard that other developers should adopt.
Please Log in or Create an account to join the conversation.
27 Aug 2019 23:13 #143367
by phillc54
Replied by phillc54 on topic Program Reload
No, not a new program, I want to reload the program I selected in the filechooser so the original program passes through the filter program again.OK so you do not want to reload a program, you want to load a new program! That is a big difference.
IMHO as long as you do use your cam to save the program under the same name and after that reload the program, the changes will take effect. If you need to pass your program before that through a helper program, you will need to add your own button using python script to load the program with the load command.
Please Log in or Create an account to join the conversation.
Time to create page: 0.113 seconds