halui analog jog (ref interfacing a shuttleXpress)

More
29 Apr 2012 14:37 #19620 by gmouer
I just came over to linuxcnc (from mach3) recently and have begun the learning curve. To get aquainted , I installed it on a little 7x10 stepper lathe I have. After I pay my dues and learn, the goal is to implement it on my 14x40 servo lathe. (Mach3 just does not cut it on a lathe!)

I have always used a shuttleXpress for jogging in mach3 and have been working for days to implement it into linuxcnc. I read everything I could find on external jogging and the recent shuttleXpress component but there is no info on anyone actually accomplishing the interface. I have experimented with the common method of setting it up using sim-encoder / encoder tied to axis's count input but was not real happy with the results, it is very rough and jerky without fine control.

I also experimented with using the analog jog input in halui. This gave MUCH better performance and control. BUT..... I ran into one BIG issue that I have not found a way around. The shuttleXpress also has 5 momentary pushbutton bit inputs, two of them I have always used for select-X and select-Z for jogging and hoped to do the same with linuxcnc. There is only one analog jog output from the shuttleXpress, so the need to SELECTIVELY tie that to either the X or Z axis is necessary. The halui analog jog input for each axis does not have any enable/disable capability that I have seen. I have also not found a way to "switch" analog signals on/off.

Any suggestions on how to selectively tie the analog shuttle jog pin to the X and Z halui-analog jog inputs selectively? (toggle between X and Z?)

Any help would be most appreciated. I am loving the power of linuxcnc so far.

George

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

More
29 Apr 2012 17:59 - 29 Apr 2012 18:02 #19623 by Rick G
Hello,

You might look here...
wiki.linuxcnc.org/cgi-bin/wiki.pl?HAL_Components
and an example here...
wiki.linuxcnc.org/cgi-bin/wiki.pl?Simple_Remote_Pendant
and here...
wiki.linuxcnc.org/cgi-bin/wiki.pl?Using_...ove_Your_CNC_Machine

It seems like you need to take the signal and connect it to a component to select which pin to output the signal depending on which button you have pressed, instead of connecting directly to the pin.

Rick G
Last edit: 29 Apr 2012 18:02 by Rick G.

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

More
29 Apr 2012 19:31 - 29 Apr 2012 19:38 #19625 by gmouer
I have read all that you suggested several times and many more before I made the post. None make any mention of a component or method for toggling a analog (floating point) signal between two or more pins. "Halui.jog.N.analog" does not have any "enable/disable" pin similar in function to axis.n.jog-enable (which has no effect on the haui analog jog input). Mux functionality is used in some of the examples but NOT for manipulating ANALOG signals.

"It seems like you need to take the signal and connect it to a component to select which pin to output the signal depending on which button you have pressed, instead of connecting directly to the pin" EXACTLY!!! , is there a component that will handle such things with ANALOG signals????????

The ShuttleXpress has been mentioned in a few documents and there is a new component for the Hal added specifically for it BUT no information on handling the problem I describe. This makes me wonder if anyone has actually ever completed interfacing a shuttle. Frank W. mentions the shuttle in his HidComp component (which I used) but I contacted him, he never actually tried it with a shuttles single analog output and had no suggestions.
Last edit: 29 Apr 2012 19:38 by gmouer.

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

More
29 Apr 2012 21:32 #19626 by andypugh
gmouer wrote:

I also experimented with using the analog jog input in halui. This gave MUCH better performance and control. BUT..... I ran into one BIG issue that I have not found a way around. The shuttleXpress also has 5 momentary pushbutton bit inputs, two of them I have always used for select-X and select-Z for jogging and hoped to do the same with linuxcnc. There is only one analog jog output from the shuttleXpress, so the need to SELECTIVELY tie that to either the X or Z axis is necessary. The halui analog jog input for each axis does not have any enable/disable capability that I have seen. I have also not found a way to "switch" analog signals on/off.


The "Touchy" interface uses a single jog wheel to jog all axes, so that might be one approach. However I am not sure how suitable Touchy is for a lathe.

To redirect the analogue value to a chosen halui.jog.N.analog pin you can probably use two mux2 components.
www.linuxcnc.org/docs/devel/html/man/man9/mux2.9.html
Connect one momentary button to each mux2, the analog value from the jogwheel to the in1 inputs, and then the mux2 outputs to each halui.jog pin.

I think you can leave the in0 pins unconnected and they will default to 0.

If you press both buttons with this scheme, both axes will move..

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

(Or something rather like that, I guessed the pin names)

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

More
29 Apr 2012 21:40 #19627 by PCW
I dont see why MUX2 or MUX4 would not work, since they select floating point values,
there nothing special about "analog" values, they are just numbers and what the MUX comps switch.

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

More
29 Apr 2012 21:41 #19628 by gmouer
Thanks much Andy !!!!! I didn't realize that a mux could handle analog signals!!! I think your suggestion will work nicely. I will give it a try today and am optimistic.

Thanks much again!

George

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

More
29 Apr 2012 21:51 #19630 by gmouer
PCW wrote:

I dont see why MUX2 or MUX4 would not work, since they select floating point values,
there nothing special about "analog" values, they are just numbers and what the MUX comps switch.


I totally missed the fact that mux functionality handles analog signals!!! I am very gratefull for the help. I have done a lot of reading and hands on with emc in the last week. Linux and EMC are a lot different than Mach3 that I am used to. The learning curve is steep but appears to be more than worth the effort.

I ordered and received a 5i25 and 7i76 mesa combo this week for switching my 14x40 lathe retrofit from Mach to Linuxcnc. Learning my way around first though with the little 7x10 lathe with a Gecko g540.


Thanks again!
George

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

More
29 Apr 2012 23:05 #19631 by Rick G
Glad to hear you are getting it sorted out!
If you have not already be sure to check out the ngcgui for the lathe, real time saver.

Rick G

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

More
30 Apr 2012 01:43 #19632 by gmouer
ShuttleXpress working fantastic !! Mux2 did the trick interfacing the pins. I tailored the response curve in hidcomp a bit too.

Rick, yes, I have scoped out NgcGui and have that in my plans for the near future. They seem to be functionally equal to Mach3's wizards (only better)

Thanks everyone for the help! I am learning.

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

More
19 Apr 2013 07:27 - 19 Apr 2013 07:32 #32894 by m8298
George, would you mind posting a copy of your hal file? I am in the process of setting up my 4 axis router in Linuxcnc. I've been using the Shuttle Pro in Mach3, and I'm currently working on setting it up in Linuxcnc. I was using 4 buttons to select which axis to jog with the wheel in Mach.

What are you using the center dial for?
Last edit: 19 Apr 2013 07:32 by m8298.

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

Time to create page: 0.089 seconds
Powered by Kunena Forum