DIY Pendant configuration question

More
29 Jul 2015 23:42 #61019 by Delron
Hi All,

I've been searching the forums and web for info about a project I'm interested in taking on, and I hope someone smarter than me can point me in the right direction.

I'm building a Pendant and trying to find info for hooking it up electrically and configuring LinuxCNC to utilize it.

I'm open to Parallel port or USB connection wise. I have a Quadrature encoded hand wheel as well as 16 buttons on my pendant. I need to decide what functions I'm interested in having each button perform. I'm expecting to hook up the buttons as a 4X4 array requiring 8 inputs and the MPG encoder requiring x-number of inputs.

I'm not looking to re-invent the wheel here, so no C++ or other programming etc. I can work with HAL to get it all up and running, but need advise on the details.

Can anyone help or point me in a solid working direction?

Cheers!

Dale

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

More
31 Jul 2015 01:43 #61053 by andypugh

HI'm not looking to re-invent the wheel here, so no C++ or other programming etc. I can work with HAL to get it all up and running, but need advise on the details.


All the HAL pins you need exist in motion or halui.
you probably want an encoder component for the mpg.
www.linuxcnc.org/docs/html/man/man9/motion.9.html
www.linuxcnc.org/docs/html/man/man1/halui.1.html
www.linuxcnc.org/docs/html/man/man9/encoder.9.html
The following user(s) said Thank You: Delron

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

More
31 Jul 2015 22:19 #61067 by Delron
Hi Andy,
Thanks so much for assisting me.
I'm aware that HAL has all the pins I need, where I'm stuck is with the electrical connections.

I know I can use a USB interface (Joypad example) and have lots of inputs that I could tie the keypad to, but I cannot find if it's possible to connect a Quadrature encoder (Hand wheel) to the USB inputs.

I also know I can tie the encoder in using the parallel port and have a few inputs left over for some buttons, but not 14 or 15 buttons unless I can use matrix keypad scanning on the parallel port, but I cannot find any info to do that.

So my problem is, I do not know how to connect an encoder AND 14 keys to one or the other ports.

Cheers!

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

More
31 Jul 2015 22:27 #61068 by andypugh

I know I can use a USB interface (Joypad example) and have lots of inputs that I could tie the keypad to, but I cannot find if it's possible to connect a Quadrature encoder (Hand wheel) to the USB inputs.

You would need to connect the two quadrature channels to two general purpose IO pins on the USB interface, then use a software encoder counter in HAL to count the pulses.
Alternatively you could use emergent.unpythonic.net/01198594294 and modify the Arduino-side code to count encoder pulses.

The ideal interface for a remote pendant is: store.mesanet.com/index.php?route=produc...83_88&product_id=116 but that only works with the Mesa FPGA cards.

I also know I can tie the encoder in using the parallel port and have a few inputs left over for some buttons, but not 14 or 15 buttons unless I can use matrix keypad scanning on the parallel port, but I cannot find any info to do that.


There is a HAL component for that: www.linuxcnc.org/docs/html/man/man9/matrix_kb.9.html
The following user(s) said Thank You: Delron

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

More
31 Jul 2015 23:12 #61069 by Delron
I saw the Matrix_kb HAL component, but concluded it was for the Mesa FPGA boards only. Is that correct? Or would it work for inputs from the parallel port as well?

The Arduino application has been on the back of my mind as well, but I'm not a programmer and afraid of getting into to much complexity. The emergent link you gave me seems to handle only 6 digital inputs, but still interesting.

If the matrix_kb works with the parport, i'm inclined to pursure that route, otherwise, I'm glad you said it's possible to use the USB interface with the encoder after all. That sounds easiest although less noise immune.

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

More
31 Jul 2015 23:39 #61072 by andypugh

I saw the Matrix_kb HAL component, but concluded it was for the Mesa FPGA boards only. Is that correct? Or would it work for inputs from the parallel port as well?

In scan mode it will work with the parallel port too.

I'm glad you said it's possible to use the USB interface with the encoder after all. That sounds easiest although less noise immune.

Actually it should be more noise-immune as the USB interface has error-checking, but I am not sure what hardware you intend to use to connect your MPG to USB.
The following user(s) said Thank You: Delron

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

More
31 Jul 2015 23:47 #61073 by Delron
I was looking at the Teensy ++2.0 USB Dev board. I've seen other HID boards on the net as well that I have not spent enough time researching yet as I was unsure that I could use the encoder with them. But now that I know I can, I will need to figure out what would be the simplest to work with. I do like the idea of possibly adding a LCD DRO to the pendant in the future, which the Teensy seems to be able to handle.

Your help is so much appreciated!

Cheers!

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

More
31 Jul 2015 23:56 #61074 by andypugh

I do like the idea of possibly adding a LCD DRO to the pendant in the future, which the Teensy seems to be able to handle.


It might actually be easier, and even cheaper, to buy an XHC pendant from eBay, which has a LinuxCNC driver: www.ebay.co.uk/itm/171854630609 as an example.

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

More
01 Aug 2015 20:42 #61099 by lerman

I do like the idea of possibly adding a LCD DRO to the pendant in the future, which the Teensy seems to be able to handle.


It might actually be easier, and even cheaper, to buy an XHC pendant from eBay, which has a LinuxCNC driver: www.ebay.co.uk/itm/171854630609 as an example.


Easier -- definitely
Cheaper -- probably

Better -- unlikely

Issues I have with the XHC pendant
1 -- the display is terrible
A -- When you change the axis knob there is a long delay where the display turns off then on
B -- there is a big space between the digits and the minus sign
C -- everything is canned -- I'd like a display where I could put what I want where I want it
2 -- the labels don't match the functions I use for them (sure, I could put stick on labels over the existing ones
3 -- I had to change the driver to provide more info

On the plus side though:
1 -- its cheap
2 -- the mechanical shape is handy -- If I wanted a better pendant, I would probably try ripping out the guts, add a different display, reprogram it to do what I wanted...
3 -- the magnets on the back let me stick it on the front of my machine in a convenient spot

My pendant and probe play nicely together and make setup and manual operation a pleasure.

Ken

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

More
01 Aug 2015 21:38 - 01 Aug 2015 21:41 #61102 by Delron
Thanks again for everybody's help/ideas.

I think I'm going to go the parport way and drop the idea of a display for now. Now that I know the matrix.kb module will work, I like the idea of zero lag on the parport.

A config idea that was offered on another forum I like is;

"Its certainly doable with a single parallel port and the matrix_kb component.
For example if you set the parallel port to "in" mode you have 13 inputs and 4 outputs
This would allow for example 16 keys (8 in x 2 out matrix) and leave 2 outputs for LEDs etc
2 inputs for MPG encoder and 3 spare individual inputs for mode switches etc.
This setup has some advantages over USB interfaces in that it has basically 0 jitter (all real time)
so response is excellent (USB will always have variable delays up to the 50 or more ms region)"

Cheers!
Last edit: 01 Aug 2015 21:41 by Delron. Reason: Spelling

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

Time to create page: 0.091 seconds
Powered by Kunena Forum