Joypad hal_input problem

More
14 Jan 2011 23:53 #6691 by Andreas
Hi!

I searched for an answer in the forum but I did not find any, I'm sorry if I placed the thread wrong etc (I´m new), my english isn't very good either.
I would like to say thanks for the great software that EMC2 is!

Now here's my problem:

I wanted to job my machine using a joypad, and I found this:
wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Simple_Remote_Pendant

I followed the whole guide and it works!
My problem is that it does not jog in a horizontal plane, the z axis works like a charm, only x and y is my problem, and when I run them digitally (with buttons) it works, as soon as I send analog signals it jogs in a diagonal plane!
This is hard to explain with my poor english, so I took a couple of screenshots:

img522.imageshack.us/i/76025183.jpg/

img412.imageshack.us/i/92256336.jpg/

img42.imageshack.us/i/46279169.jpg/

img19.imageshack.us/i/36963304.jpg/

img214.imageshack.us/i/74243515.jpg/

I did not understand how to use the attached image solution, it could only attach one image?
Anyways, I'm very very thankful for any help, it's much appreciated!
Thanks in advance!

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

More
15 Jan 2011 00:25 #6694 by andypugh
Can you put your HAL file (The one with the pendant stuff in) at www.pastebin.ca or www.pastebin.com (just copy it from your machine, and paste it to the site)

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

More
15 Jan 2011 03:17 #6695 by Andreas
Replied by Andreas on topic Re:Joypad hal_input problem
" Can you put your HAL file (The one with the pendant stuff in) "

I don't know what the pendant means, but I assume you're talking about the custom_postgui.hal?

pastebin.com/m6e5vxbt

Thanks!

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

More
15 Jan 2011 07:06 #6698 by andypugh
That is wierd.

Nothing obviously wrongly connected there.

If you watch:
input.0.abs-x-position
input.0.abs-y-position
input.0.abs-z-position

In Halmeter or Machine->Show HAL configuration do you see the expected behaviour from the buttons?
It might be that the joystick acts strangely.

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

More
15 Jan 2011 11:48 #6704 by Rick G
Replied by Rick G on topic Re:Joypad hal_input problem
Depending on how sensitive the joy sticks are and how sensitive your fingers are you might be not moving the sticks perfectly in the direction you want to move them. You may need to look at adding a deadband component. Also make sure the red led on the joystick is off.

Rick G

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

More
15 Jan 2011 17:32 #6708 by Andreas
Replied by Andreas on topic Re:Joypad hal_input problem
Hi thanks for responding!

I open Hal Meter and select item to probe

input.0.abs-x-position
When I don't touch any button it says: -0,003921569
When I go up and down with analog, nothing happens (y axis) nothing happens (as expected, right?)
when I go left it says -1 and right +1

input.0.abs-y-position
When I don't touch any button it's same as x
When I go right and left nothing happens (x axis)
When I go up and down it says +1(down) -1(up)

input.0.abs-z-position
When I don't touch same as y
When I go left -1 right +1
When I go up/down nothing
When I use the other analog (the right one) it shows -0,372549(up) +0,3490196 (down)

Weird inputs here I think.
The x axis respond when I probe the z axis? Am I interpreting this right?



"Depending on how sensitive the joy sticks are and how sensitive your fingers are you might be not moving the sticks perfectly in the direction you want to move them. You may need to look at adding a deadband component. Also make sure the red led on the joystick is off."

Red led is off, but I don't know what this deadband component could be, it does not make sense in translation :/ Do you have a link or something?

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

More
16 Jan 2011 11:55 #6725 by Rick G
Replied by Rick G on topic Re:Joypad hal_input problem

I open Hal Meter and select item to probe

input.0.abs-x-position
When I don't touch any button it says: -0,003921569
When I go up and down with analog, nothing happens (y axis) nothing happens (as expected, right?)
when I go left it says -1 and right +1


O.K. that is good

input.0.abs-y-position
When I don't touch any button it's same as x
When I go right and left nothing happens (x axis)
When I go up and down it says +1(down) -1(up)


O.K. that is also good

input.0.abs-z-position
When I don't touch same as y
When I go left -1 right +1
When I go up/down nothing


O.K. that is good

The left stick is X and Y

The right stick is Z when you move the stick right and left, up and down does nothing, you can change this if you want to "input.0.abs-rz-position" for up and down on the right stick.
Sorry the comp is "deadzone"

Rick G

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

More
18 Jan 2011 19:21 #6767 by Andreas
Replied by Andreas on topic Re:Joypad hal_input problem
Thanks for your time Andy and Rick!

Because this was my main issue, I postponed my other issue, which was that a axis (y) was inverted, it went right when I turned the joystick to the left etc

Now that I still haven't solved the problem which this thread is about. I thought I'd address the small problem described above. In the guide was also a description about how to invert an axis, after I copied the guide, and changed it to y-axis inversion, I was amazed! Not only did the y-axis turn correctly, the main issue was also solved! I have no idea about why or how, but it works now!

img35.imageshack.us/i/screenshot1fj.png

So I thank you for your help!

Best regards //Andreas

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

More
21 Jan 2011 11:34 #6791 by Rick G
Replied by Rick G on topic Re:Joypad hal_input problem
Glad to hear you have it sorted out now.

Rick G

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

Time to create page: 0.289 seconds
Powered by Kunena Forum