MPG jogging using gui increments

More
05 Aug 2015 22:51 #61168 by OT-CNC
Hi,

New user here. I need your help with a simple MPG setup. I would like to modify hal so I can use the mouse selected jog increments in the axis gui for mpg control. Basically have the same increments that the keyboard jog arrows use be linked to my 2 mpgs. I don't have any external switches.

So far I have a basic configuration that works with my x and z lathe axis using 2 mpgs. The jog rate is set at a default .001" per detent.

TIA
OT

Please Log in or Create an account to join the conversation.

More
06 Aug 2015 06:07 #61181 by BigJohnT
I don't think Axis has the jog amount as a pin but you could check in Show Hal Configuration. Short of that you could add a PyVCP panel and put a radio button there for you MPG.

JT

Please Log in or Create an account to join the conversation.

More
06 Aug 2015 06:24 #61182 by OT-CNC
JT thanks for the response. I'll check the hal config. Not sure I want to add a PyVCP panel. It may be more practical to put a physical selector switch next to the mpgs.
If I go that traditional route, do the units on the gui update to what is selected on the switch? Or is the MPG pendant handled as a separate item?

Please Log in or Create an account to join the conversation.

More
06 Aug 2015 08:39 #61184 by cradek
AXIS has axisui.* hal pins that are exactly for this.
% halcmd show pin axisui
Component Pins:
Owner   Type  Dir         Value  Name
    67  bit   OUT         FALSE  axisui.jog.a
    67  bit   OUT         FALSE  axisui.jog.b
    67  bit   OUT         FALSE  axisui.jog.c
    67  float OUT         0.001  axisui.jog.increment
    67  bit   OUT         FALSE  axisui.jog.u
    67  bit   OUT         FALSE  axisui.jog.v
    67  bit   OUT         FALSE  axisui.jog.w
    67  bit   OUT          TRUE  axisui.jog.x
    67  bit   OUT         FALSE  axisui.jog.y
    67  bit   OUT         FALSE  axisui.jog.z
    67  bit   IN          FALSE  axisui.notifications-clear
    67  bit   IN          FALSE  axisui.notifications-clear-error
    67  bit   IN          FALSE  axisui.notifications-clear-info

Please Log in or Create an account to join the conversation.

More
07 Aug 2015 19:43 #61205 by OT-CNC
Thanks for the reply cradek. Do you have an example of what I need to add to the HAL file to make this work?

Please Log in or Create an account to join the conversation.

More
08 Aug 2015 18:15 #61221 by BigJohnT
Here is a MPG example from the manual.

linuxcnc.org/docs/html/examples/mpg.html

JT

Please Log in or Create an account to join the conversation.

More
08 Aug 2015 22:52 #61225 by OT-CNC
I have looked at the manual and the code generated by pncconf.
Do I need to connect the axisui.jog.a etc to the mux components? Not fully following as I'm new to this. It seems all the examples use external selector switches. No?

Please Log in or Create an account to join the conversation.

More
10 Aug 2015 19:20 #61269 by andypugh

I have looked at the manual and the code generated by pncconf.
Do I need to connect the axisui.jog.a etc to the mux components? Not fully following as I'm new to this. It seems all the examples use external selector switches. No?


You don't need the mux, as the selector is in the axis software.

You just need something like
net some_net_name_increment axisui.jog-increment 
net some_net_name_increment axis.0.jog-scale
net some_net_name_increment axis.1.jog-scale
net some_net_name_increment axis.2.jog-scale
...

Of course, you could choose a shorter name for the net, and put it all on the same line :-)

You can then delete everything "upstream" of axis.0.jog-scale from the original config.
The following user(s) said Thank You: Delron

Please Log in or Create an account to join the conversation.

More
19 Aug 2015 03:18 #61535 by OT-CNC
andypugh, thanks for the feedback. I spent 2 hrs trying to make this work. I need a bit more guidance sorry.

So far this is what I have that works:

net x-jog-count <=hm2_5i25.0.7i84.0.0.enc0.count

setp axis.0.jog-vel-mode 0
net x-jog-enable => axis.0.jog-enable
net x-jog-count => axis.0.jog-counts
net selected-jog-incr =>axis.0.jog-scale
sets x-jog-enable true

sets selected-jog-incr .001

This is repeated for the other axis.

I tried net 0.005_ axisui.jog.increment =>axis.0.jog-scale in the above example in the scale line. I don't get movement.

Please Log in or Create an account to join the conversation.

More
19 Aug 2015 05:21 - 19 Aug 2015 05:21 #61537 by andypugh

I tried net 0.005_ axisui.jog.increment =>axis.0.jog-scale in the above example in the scale line. I don't get movement.


That is a net line that creates a signal called "0.005_ axisui.jog.increment" and connects it to axis.0.jog-scale, which probably isn't exactly what you want.

Try "net gui_jog_increment axisui.jog.increment => axis.0.jog-scale axis.1.jog-scale axis.2.jog-scale"
Last edit: 19 Aug 2015 05:21 by andypugh.

Please Log in or Create an account to join the conversation.

Time to create page: 0.140 seconds
Powered by Kunena Forum