contour shuttle pro as EMC pendant

More
18 Apr 2013 08:11 #32866 by m8298
Well, when I run the hidconfig, it found my device, loaded the table with the right number and style of controls. And when I push the buttons on the ShuttlePro, the corresponding led on the left side of the table lights up. And when I put "loadusr -w hidcomp INI my-mill.INI shuttlpro.hid"(the last two are my file names) in my hal file, EMC loads without error.

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

More
18 Apr 2013 12:50 #32869 by ArcEye
Can only suggest that you do as Andy suggested earlier

In a terminal run
$ halrun
At the halcmd prompt
halcmd: loadusr -w hidcomp INI my-mill.INI shuttlpro.hid
then
halcmd: show all

Then cut and paste the output.

regards
The following user(s) said Thank You: m8298

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

More
18 Apr 2013 15:50 #32875 by Rick G

If, (and only if) LinuxCNC is currently starting without an error, you can see them all in the Machine->Show Hal Config screen of Axis (Other GUIs will vary).

You may also select "watch" and confirm that pushing a button or moving a dial has the desired effect on a pin and which pin it is.

Rick G

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

More
19 Apr 2013 04:25 #32887 by m8298
Ok, so I tried that and apparently it's not loading hidcomp. I just don't understand why. See attached photo.
Attachments:

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

More
19 Apr 2013 06:15 #32893 by m8298
I am a little embarrassed, I figured out (with Franks help) why the pins weren't loading. I had EMC 2.4.6, and I had the latest hidcomp. Now that I updated to the latest version of LinuxCNC, it loads the pins just fine. Now I just need help understanding how to do the net commands in Hal to link the pins. I have attached photos of the pins in "Show Hal Configuration."
Attachments:

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

More
19 Apr 2013 17:35 #32906 by andypugh
Open a terminal window. With LinuxCNC open, type
halcmd show pin
Copy and paste the relevant part of the output.

Photos of the screen (rotated through 90 degrees) are not comfortable.

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

More
19 Apr 2013 21:06 #32923 by m8298
Sorry, originally this pc(with Linuxcnc) wasn't on my network. I took the photos with my phone and didn't realize they were turned. Anyway, here are the pins hidcomp generates:

12 bit OUT FALSE hidcomp.0.hidcomp.but.1.in
12 bit OUT TRUE hidcomp.0.hidcomp.but.1.in-not
12 bit OUT FALSE hidcomp.0.hidcomp.but.10.in
12 bit OUT TRUE hidcomp.0.hidcomp.but.10.in-not
12 bit OUT FALSE hidcomp.0.hidcomp.but.11.in
12 bit OUT TRUE hidcomp.0.hidcomp.but.11.in-not
12 bit OUT FALSE hidcomp.0.hidcomp.but.12.in
12 bit OUT TRUE hidcomp.0.hidcomp.but.12.in-not
12 bit OUT FALSE hidcomp.0.hidcomp.but.13.in
12 bit OUT TRUE hidcomp.0.hidcomp.but.13.in-not
12 bit OUT FALSE hidcomp.0.hidcomp.but.2.in
12 bit OUT TRUE hidcomp.0.hidcomp.but.2.in-not
12 bit OUT FALSE hidcomp.0.hidcomp.but.3.in
12 bit OUT TRUE hidcomp.0.hidcomp.but.3.in-not
12 bit OUT FALSE hidcomp.0.hidcomp.but.4.in
12 bit OUT TRUE hidcomp.0.hidcomp.but.4.in-not
12 bit OUT FALSE hidcomp.0.hidcomp.but.5.in
12 bit OUT TRUE hidcomp.0.hidcomp.but.5.in-not
12 bit OUT FALSE hidcomp.0.hidcomp.but.6.in
12 bit OUT TRUE hidcomp.0.hidcomp.but.6.in-not
12 bit OUT FALSE hidcomp.0.hidcomp.but.7.in
12 bit OUT TRUE hidcomp.0.hidcomp.but.7.in-not
12 bit OUT FALSE hidcomp.0.hidcomp.but.8.in
12 bit OUT TRUE hidcomp.0.hidcomp.but.8.in-not
12 bit OUT FALSE hidcomp.0.hidcomp.but.9.in
12 bit OUT TRUE hidcomp.0.hidcomp.but.9.in-not
12 s32 OUT 0 hidcomp.0.hidcomp.dial.count
12 float OUT 0 hidcomp.0.hidcomp.dial.position
12 s32 OUT 0 hidcomp.0.hidcomp.dial.raw
12 bit I/O FALSE hidcomp.0.hidcomp.dial.reset
12 float OUT 0.0038 hidcomp.0.hidcomp.wheel.fvalue
12 u32 OUT 0x0000139B hidcomp.0.hidcomp.wheel.ivalue
12 s32 OUT 0 hidcomp.0.hidcomp.wheel.raw

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

More
19 Apr 2013 21:30 #32925 by andypugh

12 bit OUT FALSE hidcomp.0.hidcomp.but.1.in
12 bit OUT TRUE hidcomp.0.hidcomp.but.1.in-not

This, and similar, are two versions, of each button, depending on whether you want the output to go low or high when the button is pressed.
It is unlikely that you want to use the -not versions for buttons.

If you wanted button 1 to select axis-1 for jogging, then you would use a HAL line like:

net jog-x-enable hidcomp.0.hidcomp.but.1.in => halui.joint.0.select
Most of the pins you will want to use are going to be in halui:
www.linuxcnc.org/docs/html/man/man1/halui.1.html
or motion
www.linuxcnc.org/docs/html/man/man9/motion.9.html

12 s32 OUT 0 hidcomp.0.hidcomp.dial.count
12 float OUT 0 hidcomp.0.hidcomp.dial.position
12 s32 OUT 0 hidcomp.0.hidcomp.dial.raw
12 bit I/O FALSE hidcomp.0.hidcomp.dial.reset
12 float OUT 0.0038 hidcomp.0.hidcomp.wheel.fvalue
12 u32 OUT 0x0000139B hidcomp.0.hidcomp.wheel.ivalue
12 s32 OUT 0 hidcomp.0.hidcomp.wheel.raw


One (or both) of these could be used for jogging. You will need to watch them (in the watch tab) to see how they behave when you operate them.
One may be appropriate for continuous jogging, and one for incremental, but you could also selectively use the dial for feed and spindle over-rides, I think.
The following user(s) said Thank You: m8298

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

More
19 Apr 2013 21:54 #32929 by m8298
Thanks Andy, that kinda helps. I found this thread:
www.linuxcnc.org/index.php/english/forum...express?limitstart=0

I would like to do what George did, just not sure of all the steps to get there, especially when it comes to the wheel and/or dial.

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

More
20 Apr 2013 01:20 #32935 by m8298
Andy, in the thread mentioned above, you made this example:

loadrt mux2 count=2
addf mux2.0 servo-thread
addf mux2.1 servo thread

net x-jog-enable shuttle.0.button1-out mux2.0.sel
net z-jog-enable shutttle.0.button2-out mux2.1.sel
net jog-speed shuttle.0.analog mux2.0.in1 mux2.1.in1
net x-jog mux2.0.out halui.jog.0.analog
net z-jog mux2.1.out halui.jog.2.analog

Would shuttle.0.analog be the wheel? Could I do the same thing with mux4, to use 4 buttons? And since the wheel has a .fvalue, a .I value, and .raw which do I use in my net statement?

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

Time to create page: 0.126 seconds
Powered by Kunena Forum