GladeVCP for feed_override
- MatthiasF1210
- Offline
- Junior Member
Less
More
- Posts: 37
- Thank you received: 0
10 Aug 2017 20:44 #97316
by MatthiasF1210
GladeVCP for feed_override was created by MatthiasF1210
Hello,
I am doing my first steps with GladeVCP. My Goal is to set a fixed feed_override by a button. So I greated a file "velocity_mod.glade" and "velocity_mod.hal". The glade file has some buttons and a led. For testing I connected the hal as follows
I did all the setup at the INI and started GMOCCAPY. When I press the Button 10P in the new panel the LED is toggling. When I press the Button 25P feed override is reset. Every thing is fine so far. When I ad the following line
GMOCCAPY isn't showing my panel any more...
Any Ideas?
Matthias
I am doing my first steps with GladeVCP. My Goal is to set a fixed feed_override by a button. So I greated a file "velocity_mod.glade" and "velocity_mod.hal". The glade file has some buttons and a led. For testing I connected the hal as follows
net test1 velocity_mod.btn_feedrate_10p => velocity_mod.led1
net test2 velocity_mod.btn_feedrate_25p => gmoccapy.reset-feed-override
I did all the setup at the INI and started GMOCCAPY. When I press the Button 10P in the new panel the LED is toggling. When I press the Button 25P feed override is reset. Every thing is fine so far. When I ad the following line
net test3 velocity_mod.btn_feedrate_50p => gmoccapy.feed-override-value = 0.5
GMOCCAPY isn't showing my panel any more...
Any Ideas?
Matthias
Please Log in or Create an account to join the conversation.
14 Aug 2017 12:02 #97448
by andypugh
Replied by andypugh on topic GladeVCP for feed_override
your test3 is not valid HAL.
HAL is a net-list, it defines how pins are connected. But it isn't a programming language, it runs only once at startup.
Python _is_ a programming language, and you can link a bit of Python to each button with GladeVCP, and use that to set the feed override.
linuxcnc.org/docs/2.7/html/gui/gladevcp....gladevcp:programming
HAL is a net-list, it defines how pins are connected. But it isn't a programming language, it runs only once at startup.
Python _is_ a programming language, and you can link a bit of Python to each button with GladeVCP, and use that to set the feed override.
linuxcnc.org/docs/2.7/html/gui/gladevcp....gladevcp:programming
Please Log in or Create an account to join the conversation.
16 Aug 2017 18:25 #97590
by newbynobi
Replied by newbynobi on topic GladeVCP for feed_override
I would recommend to use a MUX4 component, to select the different overrides.
Norbert
Norbert
Please Log in or Create an account to join the conversation.
- MatthiasF1210
- Offline
- Junior Member
Less
More
- Posts: 37
- Thank you received: 0
16 Aug 2017 19:25 #97594
by MatthiasF1210
Replied by MatthiasF1210 on topic GladeVCP for feed_override
Hi everybody,
thanks for the hints. I just found some time today to play around a little bit.
I wrote a little python script as follows.
and than attached it to my vcp
It works fine so far in simulation, I will test it at the weekend at my real machine.
Any comments for that approach?
Thanks
Matthias
thanks for the hints. I just found some time today to play around a little bit.
I wrote a little python script as follows.
import linuxcnc
cmd = linuxcnc.command()
def btn_feedrate_10p_pressed(gtkobj,data=None):
cmd.feedrate(0.1)
def btn_feedrate_25p_pressed(gtkobj,data=None):
cmd.feedrate(0.25)
def btn_feedrate_50p_pressed(gtkobj,data=None):
cmd.feedrate(0.5)
def btn_feedrate_80p_pressed(gtkobj,data=None):
cmd.feedrate(0.8)
def btn_feedrate_110p_pressed(gtkobj,data=None):
cmd.feedrate(1.1)
and than attached it to my vcp
EMBED_TAB_COMMAND = gladevcp -x {XID} -u velocity_mod.py velocity_mod.glade
It works fine so far in simulation, I will test it at the weekend at my real machine.
Any comments for that approach?
Thanks
Matthias
Please Log in or Create an account to join the conversation.
Time to create page: 0.075 seconds