Help 'jogging' two axis at once

More
12 Jun 2011 09:15 - 12 Jun 2011 09:37 #10443 by eszyman
I have a very unusual setup on my machine in which the joints (axis) are setup to be Y,Z in parallel to V,W forming basically two independent towers with a expandable rail running an X gantry joining the two. In one mode of operation the setup will act as a basic 3 axis mill, however I do not want to create separate configs, and would rather write g-code to include x,y,v,z,w.

Onto my questions…
I want to create a button to jog both Y,V and X,W at the same times.
PYVCP (XML file) seems to be one way to go.
The option of incremental jogs would be even better still.

I have successfully implemented a custom_hal XML PYVCP but ran into these issues:

Largest problem (also an issue when using a usb joypad) is that the W and Z axis will move a different rates and more importantly stop at different locations. I believe I am doing something incorrectly.

In reference to the wiki:
wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Simple_Remote_Pendant
Here is how I am linking the two joints together:

net joy-z-jog halui.jog.2.analog halui.jog.8.analog <= input.0.abs-rz-position

or with a PyVCP panel
Reference: wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Jog...Buttons_On_A_Pendant
My line would look like this:
net remote-jog-z-plus halui.jog.2.plus halui.jog.8.plus <= pyvcp.jog-x-plus


Is there any way to get around this issue?

Following the more advanced example using interval jogging I run into another problem all together. For some reason the normal jog of a single axis (using Axis GUI) gets interrupted and the axis that is moving just stops at a random distance. The same happens when trying to home these axis that are using the net string to as the advanced example shows.

Is the problem with the ‘near’?
Please reference:
wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Add...imple_Remote_Pendant

net joy-z-jog halui.jog.2.analog near.0.in2 near.1.in2 <= input.0.abs-rz-position

Thanks in advance for any help that can be given!
Last edit: 12 Jun 2011 09:37 by eszyman.

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

More
12 Jun 2011 10:40 #10445 by Rick G
The incremental move from the joypad works by using a MDI command, so if you use
MDI_COMMAND = G91 G0 z.001 y.001 M102
Both axis should move the same distance and end the same.

However the AXIS gui will only allow jogging when in Manual mode.
You may need to check what mode Axis is running after you issue a MDI command this way.

The Axis gui may not correctly display what mode it is in after you issue the MDI command.
You may need to switch back to Manual mode, I believe there is a button to do that in the example.

Do the different axis have the same speed acceleration etc. settings?

Rick G

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

More
15 Jun 2011 01:13 #10515 by andypugh
How are you getting on with this?

I wonder if gantrykins is any help for what you want?

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

More
15 Jun 2011 06:08 - 15 Jun 2011 09:26 #10522 by eszyman

The incremental move from the joypad works by using a MDI command, so if you use
MDI_COMMAND = G91 G0 z.001 y.001 M102
Both axis should move the same distance and end the same.

This does indeed work, however, it will only work if I can get the axis to accept MDI commands, ie, all axis must be homed, and for whatever reason, the home (or jog) command will not work entirely... the thing just stops moving in the process first thing after strating up axis!

Do the different axis have the same speed acceleration etc. settings?

Good question and I double checked now, they are identical.

I've put the project on pause for a few days here, and hope to get back at it tomorrow.
I will need to look into gantrykins for more information.
EDIT
For my own reference here:
gantrykins:
www.linuxcnc.org/docview/html/man/man9/gantrykins.9.html

I'm not sure this is what I want, as in some cases I want independent movement of the Zs and Ys, Ie: I want W/Z and V/Y
Is there a possibility of some type of switch back and forth between the two with a custom M command?
Last edit: 15 Jun 2011 09:26 by eszyman.

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

More
15 Jun 2011 10:23 #10525 by Rick G
Well to get things going you might want to try NO_FORCE_ HOMING


Take a look here...

EMC V2.4 Integrator Manual Chapter 4. INI File

NO_FORCE_HOMING = 1 The default behavior is for EMC to force the user to home the machine
before any MDI command or a program is run. Normally jogging only is allowed before homing.
Setting NO_FORCE_HOMING = 1 allows the user to make MDI moves and run programs without
homing the machine first. Interfaces without homing ability will need to have this option
set to 1.
Warning: Using this will allow the machine to run past soft limits while in operation and is not
generally desirable to allow this.


In the Traj section of the ini file set NO-FORCE-HOMING = 1

Rick G

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

More
12 Jul 2011 14:29 #11458 by btvpimill
progress has been made on this using the MDI g0g91 some distance approch, but it is not too pretty. seperate buttons for each direction at different distances for each axis. so for 3 "speeds" of 2 axis, its 12 buttons. There must be a pin or signal somewhere to tell 2 axis to jog at the same time, but where? and be able to use the rate from the regular jog button stuff

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

More
12 Jul 2011 16:00 #11463 by andypugh
btvpimill wrote:

There must be a pin or signal somewhere to tell 2 axis to jog at the same time, but where? and be able to use the rate from the regular jog button stuff


Do you have halui loaded?

linuxcnc.org/docs/html/gui_halui.html

Then you can use
net jogger pyvcp.jogbutton1 => halui.jog.1.plus halui.jog.7.plus

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

More
12 Jul 2011 22:47 #11475 by eszyman
First off, Andy you have been a huge help...
but I do not understand your line
"net remote-jog-y-plus halui.jog.1.plus halui.jog.7.plus <= pyvcp.jog-x-plus"
Maybe I am missing something basic here?

in my custom post gui hal file I have the following lines linked to "jogger" or in my case, "jogbutton1" assigned by <halpin>jogbutton1</halpin> in the Pyvcp xml file...

setp halui.jog-speed 2 (which is very slow)
net jogbutton1 halui.jog.1.plus <= pyvcp.jogbutton1
net jogbutton1 halui.jog.7.plus <= pyvcp.jogbutton1


Now this DOES WORK... but it's buggy!
Here is the deal...
If one is to quickly click and release the mouse button it is possible for the joints to move out of sync.
However, if a looooong press is held in, the joints do stop at the same numbers.

Do we need to filter out short presses? Seems kinda hookey =)

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

More
12 Jul 2011 23:07 #11476 by andypugh
eszyman wrote:

First off, Andy you have been a huge help...
but I do not understand your line
"net remote-jog-y-plus halui.jog.1.plus halui.jog.7.plus <= pyvcp.jog-x-plus"
Maybe I am missing something basic here?

Well, that isn't actually my line, but is close enough.
A net command needs a signal name and can have 0 or 1 source pins and 0 or more destination pins. The signal and all the destination pins will take on the value of the source pin.
I like to put everything on the same line, but that is just a matter of style.

net jogbutton1 halui.jog.1.plus <= pyvcp.jogbutton1
net jogbutton1 halui.jog.7.plus <= pyvcp.jogbutton1


You set the value of the signal to the value of the pyvcp button twice there. It is just possible that the value changes between the lines.
Now, I don't actually think that is how HAL works, I think it runs all the functions in the thread sequence, and propagates their outputs immediately, and once.
But it would be interesting to see if it is less buggy written like this:

net jogbutton1 halui.jog.1.plus <= pyvcp.jogbutton1
net jogbutton1 halui.jog.7.plus

Or even

net jogbutton1 halui.jog.1.plus halui.jog.7.plus <= pyvcp.jogbutton1

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

More
12 Jul 2011 23:15 #11477 by BigJohnT
I think what Andy is getting at is having both on the same line so they are executed as one.

net jogbutton1 halui.jog.1.plus <= pyvcp.jogbutton1
net jogbutton1 halui.jog.7.plus <= pyvcp.jogbutton1

change to

net jogbutton1 halui.jog.1.plus halui.jog.7.plus <= pyvcp.jogbutton1

some good reading here

www.linuxcnc.org/docview/html/hal_basic_hal.html

John

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

Time to create page: 0.110 seconds
Powered by Kunena Forum