contour shuttle pro as EMC pendant

More
13 years 6 months ago #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."

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

More
13 years 6 months ago #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
13 years 6 months ago #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
13 years 6 months ago #32925 by andypugh

m8298 wrote: 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
13 years 6 months ago #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
13 years 6 months ago #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.167 seconds
Powered by Kunena Forum