[Emc-users] Joypad button to tell axis to move?

2011-02-17 Thread Igor Chudov
I have a Saitek P880 joypad. It works REALLY great to do the following:

1) Control X, Y and Z with joyhandles (little levers sticking out of the
joypad)
2) Make some buttons like input.0.btn-pinkie to control HAL pins to give HAL
pause and resume commands.

The nice thing is that depending on how much I deflect joyhandles, the speed
of movement is selected accordingly.

Unfortunately, I used both joyhandles and have no more of them available.

For two more axis, I would like to use regular joypad buttons (not
joyhandles) to tell the axis to move forward or back with predetermined
speed.

kind of like (incorrect)

net moveAAxisLeft input.0.btn-top2 = halui.move-axis-A-left

In other words: when I press a certain button, I want a given axis to start
moving in a given direction at a predetermined speed. When I release that
button, I want movement to stop.

How can I set that up.

thanks
--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad button to tell axis to move?

2011-02-17 Thread andy pugh
On 17 February 2011 21:39, Igor Chudov ichu...@gmail.com wrote:

 In other words: when I press a certain button, I want a given axis to start
 moving in a given direction at a predetermined speed. When I release that
 button, I want movement to stop.

 How can I set that up.

Look at the mux4 component. define states 00 and 11 to be 0 output, 01
to be +speed and 10 to be -speed. Then link the buttons to the sel0
and sel1 pins: http://www.linuxcnc.org/docview/html/man/man9/mux4.9.html

-- 
atp
Torque wrenches are for the obedience of fools and the guidance of wise men

--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad button to tell axis to move?

2011-02-17 Thread Ed Nisley
On Thu, 2011-02-17 at 13:39 -0600, Igor Chudov wrote:
 I would like to use regular joypad buttons

I did that with my Logitech gamepad: the joysticks do gradual motion and
the buttons do on-off motion.

This should get you started:

http://softsolder.com/2010/10/23/logitech-gamepad-as-emc2-pendant-eagle-schematics-for-the-joggy-thing/

I wrote up a somewhat more elaborate version  for Digital Machinist
magazine. You can fetch the files (but not the article itself) from:

http://www.digitalmachinist.net/files/downloads/2010Winter/DM%205.4%
20Nisley.zip

There's a bit of trickery in that version to avoid some race conditions,
but the overall logic is straightforward.

As soon as I got it set up, there was no going back!

-- 
Ed
http://softsolder.com



--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users