Gampad in EMC2 Question (SOLVED)

More
14 Dec 2011 18:49 #15687 by cwebs
Replied by cwebs on topic Re:Gampad in EMC2 Question
Rick G wrote:

Did you have to add this?

If your system won't recognize the joypad you might have to look at hal_input man page and perhaps modify the permissions to access the device. Prepared a one line file as per the description in the man page.


SUBSYSTEM=="input", mode="0660", group="plugdev"

Name the file 51-plugdev.rules and save it in /etc/udev/rules.d


From the bottom of...

wiki.linuxcnc.org/emcinfo.pl?Simple_Remote_Pendant


Chris,

That is a neat idea, I will have to try that.

Rick G


I started out this day with only three hairs left and now I am down to two. When I hit zero hairs left I will hardwire my keyboard.

I made file 51-plugdev.rules but could not put it in the /etc/udev/rules.d . Could not make it in that folder so I tried making it on the desttop to move it in. Window comes up saying I don't have permission. So I TRY to log is as root and can't do that eather. When I installed 8.04 I only had one user for it is used only on the cnc machine. How do I get the file into the rules folder? Remember, only two hairs left.

I know when I started to install the joypad it said, "Simple_Remote_Pendent". I am glad I ain't trying the "Hard_Remote_Pendent"!!!! Carl

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

More
14 Dec 2011 19:00 #15689 by andypugh
Replied by andypugh on topic Re:Gampad in EMC2 Question
cwebs wrote:

I made file 51-plugdev.rules but could not put it in the /etc/udev/rules.d . Could not make it in that folder so I tried making it on the desttop to move it in.

You need to use "sudo". This gives you temporary administrator privileges.

The way I would have done it is to open a terminal window and type
sudo gedit
then create the file and save it where I want it to be.

As you have already created the file, there is no point re-creating it, so open a terminal window and type
sudo mv ~/Desktop/51-plugdev.rules /etc/udev/rules/d/
(You will be asked for your password, just use your normal one, and be aware that it won't echo to screen.

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

More
14 Dec 2011 20:10 #15691 by cwebs
Replied by cwebs on topic Re:Gampad in EMC2 Question
andypugh wrote:

cwebs wrote:

I made file 51-plugdev.rules but could not put it in the /etc/udev/rules.d . Could not make it in that folder so I tried making it on the desttop to move it in.

You need to use "sudo". This gives you temporary administrator privileges.

The way I would have done it is to open a terminal window and type
sudo gedit
then create the file and save it where I want it to be.

As you have already created the file, there is no point re-creating it, so open a terminal window and type
sudo mv ~/Desktop/51-plugdev.rules /etc/udev/rules/d/
(You will be asked for your password, just use your normal one, and be aware that it won't echo to screen.


Down to only one hair, BUT I can keep it. I copied and paste you line in your reply and File Not Found! After looking very close I removed the "/" between rules/d and replaced it with a ".". Worked!!!!!!! Then using the Simple_joypad instructions and got it to work only with the one line jog speed line. Thanks guys for staying with me and getting this thing working. Carl

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

More
15 Dec 2011 09:29 #15697 by Rick G
Replied by Rick G on topic Re:Gampad in EMC2 Question
Glad to hear you got it working!

Here are a couple of things to remember....

Jog will only work in manual mode.
Emc will not start if the joypad is not plugged in.

To find what button does what on your joypad I look for them with Hal Watch

Machine

Show Hal Configuration

Select WATCH Tab

Pins

Then select your input device

Select all the buttons/inputs you want to use and hit a button on your joypad one at a time to see which button changes which pin in hal

Rick G

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

More
15 Dec 2011 16:09 #15705 by cwebs
Replied by cwebs on topic Re:Gampad in EMC2 Question
Thanks for the info RIck. I did not know or see it anyware that EMC would not start if not pluged in. Can I assign buttons in Hal Configuration?

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

More
16 Dec 2011 09:30 #15720 by Rick G
Replied by Rick G on topic Re:Gampad in EMC2 Question
You will need to edit your postgui.hal file to assign the buttons to the functions.
Do you have everything on your gamepad working now?
If you need to make changes test your gamepad by trying the different buttons to see what their pin name are then edit your postgui.hal the way you want.

Rick G

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

More
16 Dec 2011 09:36 #15722 by cmorley
Replied by cmorley on topic Re:Gampad in EMC2 Question
Rick if you try the PNCconf way of adding rules /testing joystick let me know how it works for you.

Cwebs welcome to the chrome dome club :) hair is just a pain
glad you got it all worked out.

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

More
16 Dec 2011 09:49 #15724 by Rick G
Replied by Rick G on topic Re:Gampad in EMC2 Question
Hello Chris,

I will try that this weekend on a sim machine, It just never occurred to me to use PNCconf without a Mesa card.

PNCconf was a great help in setting up my mill with a 5i20 a while back and now that you have added joystick support it should be even better.

Rick G

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

More
16 Dec 2011 20:48 #15755 by cwebs
Replied by cwebs on topic Re:Gampad in EMC2 Question
cmorley wrote:

Rick if you try the PNCconf way of adding rules /testing joystick let me know how it works for you.

Cwebs welcome to the chrome dome club :) hair is just a pain
glad you got it all worked out.

Lost more hair today. While I have the Joypad working, it only works with the jog speed setting. When I remove that line and add the "Safer way" John shows, Having to hold down a number to start the jog. EMC will not start. I am not on the machine computer so I can't show the error. BUT it is working. Carl

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

More
16 Dec 2011 22:19 #15757 by andypugh
Replied by andypugh on topic Re:Gampad in EMC2 Question
cwebs wrote:

Lost more hair today. While I have the Joypad working, it only works with the jog speed setting. When I remove that line and add the "Safer way" John shows, Having to hold down a number to start the jog. EMC will not start.


EMC2 is quite good at telling you why it won't start. I very much suspect that there is a pin-name that you have wrong, probably because the button names are different on your device.

If you want a list of all the pins that you can use, then put the line
show pin
after your loadusr hal_input line. Then you can type dmesg in the terminal window to see the names of all the pins.

I find it best to start emc from the command prompt when debugging, you get to see a lot of useful information scrolling past.
Just open a terminal window, and type
emc

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

Time to create page: 0.180 seconds
Powered by Kunena Forum