[Emc-users] Joypad pendant, hal_input errors

2011-10-05 Thread John A. Stewart
Hi all;

After reading some of the messages on this list, I went out and  
purchased a wired joypad; it is giving me the following messages when  
I run:

halcmd
loadusr hal_input -KRAL GASIA

Unexpected event EV_ABS ABS_48
Unexpected event EV_ABS ABS_49
Unexpected event EV_ABS ABS_50
Unexpected event EV_ABS ABS_51
Unexpected event EV_ABS ABS_52
Unexpected event EV_ABS ABS_53
Unexpected event EV_ABS ABS_54
Unexpected event EV_ABS ABS_55
Unexpected event EV_ABS ABS_56
Unexpected event EV_ABS ABS_57
Unexpected event EV_ABS ABS_58

Any idea what's happening here?

I got a wired joypad because I'm always finding batteries dead when I  
come to use things - maybe I shoulda got the bluetooth one!

Thanks; JohnS




--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad pendant, hal_input errors

2011-10-05 Thread Sebastian Kuzminsky
On Oct 5, 2011, at 16:18 , John A. Stewart wrote:

 Hi all;
 
 After reading some of the messages on this list, I went out and  
 purchased a wired joypad; it is giving me the following messages when  
 I run:
 
 halcmd
 loadusr hal_input -KRAL GASIA
 
 Unexpected event EV_ABS ABS_48
 Unexpected event EV_ABS ABS_49
 Unexpected event EV_ABS ABS_50
 Unexpected event EV_ABS ABS_51
 Unexpected event EV_ABS ABS_52
 Unexpected event EV_ABS ABS_53
 Unexpected event EV_ABS ABS_54
 Unexpected event EV_ABS ABS_55
 Unexpected event EV_ABS ABS_56
 Unexpected event EV_ABS ABS_57
 Unexpected event EV_ABS ABS_58
 
 Any idea what's happening here?


What device is this, exactly?

My first guess is that the device reports fewer ABS components than it actually 
has, and hal_input is rejecting events from the extra ones.  Does the device 
seem to be working (you can look at its pins with halmeter or 'halcmd show')?

What do you see if you install the input-utils package and inspect the device 
with lsinput and input-events?  Maybe also try the evtest program, from the 
package by the same name.


-- 
Sebastian Kuzminsky


--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad pendant, hal_input errors

2011-10-05 Thread John A. Stewart
Hi Sebastian;

Thanks for the reply, and the ideas. I'm new to EMC, so there is a lot  
to figure out still.

 What device is this, exactly?

lsinput:

/dev/input/event3
bustype : BUS_USB
vendor  : 0x54c
product : 0x268
version : 273
name: GASIA CORP. PLAYSTATION(R)3 Cont
phys: usb-:00:1d.2-2/input0
uniq: 
bits ev : EV_SYN EV_KEY EV_ABS EV_MSC

Here is the URL for the product:
http://www.futureshop.ca/en-CA/product/intec-inc-intec-2-pack-wired-controller-playstation-3-g7884/10156935.aspx?path=c2baa19281ba991ddb5a5d020e17ab9ben02

(if that does not work, it is the Intec 2 pack wired controller,   
WebID:  10156935)

 Does the device seem to be working (you can look at its pins with  
 halmeter or 'halcmd show')?

Yes, the halmeter did work for at least one button input - I'm still  
figuring out how best to run these programs so I know what to look for.

I have modified the hal_input program to just not print out the  
error message; but, if I have this issue, I wonder how many others  
might, too?

I'll report back on progress; maybe it will help others. Also, any  
debugging you (or anyone else) wants me to do, just ask.

Thanks;

JohnS.



--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad pendant, hal_input errors

2011-10-05 Thread Przemek Klosowski
On Wed, Oct 5, 2011 at 6:45 PM, Sebastian Kuzminsky s...@highlab.com wrote:

 Unexpected event EV_ABS ABS_48
 Unexpected event EV_ABS ABS_49

That's because the EMC HID driver hal_input doesn't handle all data
from your USB device.

The regular kernel HID driver defines the EV_ABS events with codes
(ABS_xxx) up to 63 (0x3f), but hal_input only handles what is defined
in lib/python/linux_event.py, where the highest event is ABS_MISC
(0x28 or decimal 40), and throws an error when your USB device sends
ABS_MT_TOUCH_MAJOR (code 0x30 or decimal 48) and higher.

The Linux kernel driver uses codes defined in
/usr/include/linux/input.h, so linux_event.py should be modified to
match it; I enclose a patch that Sebastian can apply directly. I don't
have the check-in privileges in the EMC2 git repo, so perhaps the
original author of linux_event.py (Jeff Epler) or someone else could
apply it there.


emc-linux_event.py-patch
Description: Binary data
--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad pendant, hal_input errors

2011-10-05 Thread Sebastian Kuzminsky
On 10/05/2011 10:39 PM, Przemek Klosowski wrote:
 On Wed, Oct 5, 2011 at 6:45 PM, Sebastian Kuzminskys...@highlab.com  wrote:

 Unexpected event EV_ABS ABS_48
 Unexpected event EV_ABS ABS_49
 That's because the EMC HID driver hal_input doesn't handle all data
 from your USB device.

 The regular kernel HID driver defines the EV_ABS events with codes
 (ABS_xxx) up to 63 (0x3f), but hal_input only handles what is defined
 in lib/python/linux_event.py, where the highest event is ABS_MISC
 (0x28 or decimal 40), and throws an error when your USB device sends
 ABS_MT_TOUCH_MAJOR (code 0x30 or decimal 48) and higher.

 The Linux kernel driver uses codes defined in
 /usr/include/linux/input.h, so linux_event.py should be modified to
 match it; I enclose a patch that Sebastian can apply directly. I don't
 have the check-in privileges in the EMC2 git repo, so perhaps the
 original author of linux_event.py (Jeff Epler) or someone else could
 apply it there.

Thank you Przemek!

Wow, that's a lot of happy trigger buttons!

I applied it, but reordered BTN_TOOL_QUADTAP to be in sequential order 
with the rest of the BTNs.

My USB jogpad works fine after the patch (it also worked fine before the 
patch).

John, if you pull the 2.4 branch now you should get Przemek's fix.  Or 
if you wait 30 minutes and install the buildbot debs.

I'll try to merge this into the 2.5 branch and master tonight.


Oh yeah, one more thing: the evtest program is super handy for debugging 
these kinds of devices.


-- 
Sebastian Kuzminsky


--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[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


Re: [Emc-users] Joypad question.

2010-12-16 Thread Spiderdab
Il 16/12/2010 08:26, Alex Joni ha scritto:
 You can prevent the joystick links to reach halui when you are not in world
 mode. (with some simple and2 components).
 I'm not sure if you can do anything about keyboard jogging though - what
 kind of GUI are you using?

 Regards,
 Alex

 - Original Message -
 From: Spiderdab77...@tiscali.it
 To:Emc-users@lists.sourceforge.net
 Sent: Thursday, December 16, 2010 1:23 AM
 Subject: [Emc-users] Joypad question.


 Hallo list.
 Is there a way to jog the axis in joint mode only with keyboard, while
 jog in world mode with the joystick?
i'm using axis.
something like a logical expression which read if the state of world 
mode is false or true? is there a pin for that?
what do you mean about :  I'm not sure if you can do anything about 
keyboard jogging though ?

--
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad question.

2010-12-16 Thread andy pugh
On 16 December 2010 11:42, Spiderdab 77...@tiscali.it wrote:

 something like a logical expression which read if the state of world
 mode is false or true? is there a pin for that?

http://www.linuxcnc.org/docs/2.4/html/man/man1/halui.1.html
(Look at the halui.mode pins)

 what do you mean about :  I'm not sure if you can do anything about
 keyboard jogging though ?

I think keyboard jogging occurs at a level where we can't interfere with it.

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

--
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad question.

2010-12-16 Thread Spiderdab
Il 16/12/2010 13:07, andy pugh ha scritto:
 On 16 December 2010 11:42, Spiderdab77...@tiscali.it  wrote:

 something like a logical expression which read if the state of world
 mode is false or true? is there a pin for that?
 http://www.linuxcnc.org/docs/2.4/html/man/man1/halui.1.html
 (Look at the halui.mode pins)

 what do you mean about :  I'm not sure if you can do anything about
 keyboard jogging though ?
 I think keyboard jogging occurs at a level where we can't interfere with it.

thanks!
  i can read this:

*mode*

/halui.mode.is_auto/

pin for auto mode is on

/halui.mode.is_joint/

pin showing joint by joint jog mode is on

/halui.mode.is_manual/

pin for manual mode is on

/halui.mode.is_mdi/

pin for mdi mode is on

/halui.mode.is_teleop/

pin showing coordinated jog mode is on


the on e wich should interest me is _teleop? right?
than i'm not sure if the joint mode is _joint or _manual. what's the 
difference?
--
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad question.

2010-12-16 Thread andy pugh
On 16 December 2010 13:00, Spiderdab 77...@tiscali.it wrote:

 the on e wich should interest me is _teleop? right?
 than i'm not sure if the joint mode is _joint or _manual. what's the
 difference?

It might be easiest to watch them in Show HAL Config and see what they do.

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

--
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad question.

2010-12-16 Thread Spiderdab
Il 16/12/2010 14:35, andy pugh ha scritto:
 On 16 December 2010 13:00, Spiderdab77...@tiscali.it  wrote:

 the on e wich should interest me is _teleop? right?
 than i'm not sure if the joint mode is _joint or _manual. what's the
 difference?
 It might be easiest to watch them in Show HAL Config and see what they do.

ok, you're right. i'll do.

ciao, thanks.

--
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad question.

2010-12-16 Thread Spiderdab
Alex, i've a question for you, since, if i'm not wrong, you wrote down 
the tripodkins.c .
have you ever tried to jog into world mode the tripod with a joystick? 
did it work?

i'm asking about this thing everywhere, but nobody can tell me if it 
work or not with a non-trivial kinematics.

thanks davide.

--
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad question.

2010-12-16 Thread Alex Joni
Hi Davide,

that's a question that's a bit hard to answer.
I remember doing it, but that was around emc2 - 2.1 or even older.
In the current versions (due to some bugfixes), I think this is prevented. 
Can't remember the reason though.
I know it should work on the joints_axes3 branch, but that one is still in 
development/testing phase, so use with caution.

Regards,
Alex



- Original Message - 
From: Spiderdab 77...@tiscali.it
To: Enhanced Machine Controller (EMC) emc-users@lists.sourceforge.net
Sent: Thursday, December 16, 2010 5:04 PM
Subject: Re: [Emc-users] Joypad question.


 Alex, i've a question for you, since, if i'm not wrong, you wrote down
 the tripodkins.c .
 have you ever tried to jog into world mode the tripod with a joystick?
 did it work?

 i'm asking about this thing everywhere, but nobody can tell me if it
 work or not with a non-trivial kinematics.

 thanks davide.

 --
 Lotusphere 2011
 Register now for Lotusphere 2011 and learn how
 to connect the dots, take your collaborative environment
 to the next level, and enter the era of Social Business.
 http://p.sf.net/sfu/lotusphere-d2d
 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users
 


--
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad question.

2010-12-16 Thread Spiderdab
Il 16/12/2010 16:21, Alex Joni ha scritto:
 Hi Davide,

 that's a question that's a bit hard to answer.
 I remember doing it, but that was around emc2 - 2.1 or even older.
 In the current versions (due to some bugfixes), I think this is prevented.
 Can't remember the reason though.
 I know it should work on the joints_axes3 branch, but that one is still in
 development/testing phase, so use with caution.

 Regards,
 Alex
ok i want to try to compile that branch, but since i've never done, i 
just have to ask to check if i'm doing right.

i downloaded the git:
..$ git clone git://git.linuxcnc.org/git/emc2.git emc2-dev

then, entered emc2-dev directory and wrote:
..$ git checkout -b joints_axes3
Switched to a new branch 'joints_axes3'

now what?
do i have to clone the new branch, or it is already inside the directory?
sorry, it's just the first time i have to do with branches...
and then? should i compile from here? standard way?
./configure
make
make install

thank for attention. you've gained a new tester for this branch..

--
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] Joypad question.

2010-12-15 Thread Spiderdab
Hallo list.
Is there a way to jog the axis in joint mode only with keyboard, while 
jog in world mode with the joystick?

--
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad question.

2010-12-15 Thread Alex Joni
You can prevent the joystick links to reach halui when you are not in world 
mode. (with some simple and2 components).
I'm not sure if you can do anything about keyboard jogging though - what 
kind of GUI are you using?

Regards,
Alex

- Original Message - 
From: Spiderdab 77...@tiscali.it
To: Emc-users@lists.sourceforge.net
Sent: Thursday, December 16, 2010 1:23 AM
Subject: [Emc-users] Joypad question.


 Hallo list.
 Is there a way to jog the axis in joint mode only with keyboard, while
 jog in world mode with the joystick?

 --
 Lotusphere 2011
 Register now for Lotusphere 2011 and learn how
 to connect the dots, take your collaborative environment
 to the next level, and enter the era of Social Business.
 http://p.sf.net/sfu/lotusphere-d2d
 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users
 


--
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] joypad quit working when upgrading from 2.3.5 to 2.4

2010-05-19 Thread Mark Wendt
Looks like this is your problem:

 Debug file information:
 Can not find -sec EMC -var NML_FILE -num 1
 Unrecognized line skipped: POC FMS LEN DIAMCOMMENT
 standard_pinout.hal:22: Warning: linkpp command is deprecated, use 'net'
 HAL: ERROR: pin_new called after hal_ready
 joypad.hal:19: Pin 'joypad.axis.0' does not exist

Looks like you've got a bunch of deprecated stuff.  How many versions 
ago are those files from?  Looks like a comment line isn't commented out 
for the Unrecognized line skipped: stuff.

can you call out the new pin in line 19 before hal_ready is called out?

Mark


On 05/18/2010 11:39 PM, kirk wrote:
 I upgraded my system from 2.3 to 2.4.  I read on the wiki to take out
 the line: NML_FILE = emc.nml. I did this and started emc2.

 The errors located in the file emc23_error_nonml were observed.

 I then included the line with NML_FILE and the errors in the
 emc24_error.txt were observed.

 If I comment out the HALFILE = joypad.hal ecm2.4 runs ok.

 I am including my ini file with this post. The joypad ran fine before
 the upgrade.

 Any ideas?

 Kirk

--

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] joypad quit working when upgrading from 2.3.5 to 2.4

2010-05-19 Thread Jeff Epler
The hal_joystick component was deprecated in emc 2.2[1] and was intended
to be removed in emc 2.4.  Instead, use hal_input[2], which will require
additional modifications to joypad.hal due to different pin names.

hal_input, which has existed since emc2.2, supports more devices than
hal_joystick, and also does not suffer from the race condition bug
that led us to deprecate hal_joystick.

Since in emc 2.4 hal_joystick will never succesfully load, it will be
removed for the upcoming 2.4.1 release.

Jeff
[1] http://linuxcnc.org/docs/2.2/html/man/man1/hal_joystick.1.html
[2] http://linuxcnc.org/docs/html/man/man1/hal_input.1.html

--

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] joypad quit working when upgrading from 2.3.5 to 2.4

2010-05-19 Thread kirk
On 05/19/2010 10:15 AM, Jeff Epler wrote:
 The hal_joystick component was deprecated in emc 2.2[1] and was intended
 to be removed in emc 2.4.  Instead, use hal_input[2], which will require
 additional modifications to joypad.hal due to different pin names.

 hal_input, which has existed since emc2.2, supports more devices than
 hal_joystick, and also does not suffer from the race condition bug
 that led us to deprecate hal_joystick.

 Since in emc 2.4 hal_joystick will never succesfully load, it will be
 removed for the upcoming 2.4.1 release.

 Jeff
 [1] http://linuxcnc.org/docs/2.2/html/man/man1/hal_joystick.1.html
 [2] http://linuxcnc.org/docs/html/man/man1/hal_input.1.html

 --

 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users


Thanks for the info. I'll try using hal_input.

--

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] joypad quit working when upgrading from 2.3.5 to 2.4

2010-05-19 Thread kirk
On 05/19/2010 03:52 AM, Mark Wendt wrote:
 Looks like this is your problem:


 Debug file information:
 Can not find -sec EMC -var NML_FILE -num 1
 Unrecognized line skipped: POC FMS LEN DIAMCOMMENT
 standard_pinout.hal:22: Warning: linkpp command is deprecated, use 'net'
 HAL: ERROR: pin_new called after hal_ready
 joypad.hal:19: Pin 'joypad.axis.0' does not exist
  
 Looks like you've got a bunch of deprecated stuff.  How many versions
 ago are those files from?  Looks like a comment line isn't commented out
 for the Unrecognized line skipped: stuff.

 can you call out the new pin in line 19 before hal_ready is called out?

 Mark


 On 05/18/2010 11:39 PM, kirk wrote:

 I upgraded my system from 2.3 to 2.4.  I read on the wiki to take out
 the line: NML_FILE = emc.nml. I did this and started emc2.

 The errors located in the file emc23_error_nonml were observed.

 I then included the line with NML_FILE and the errors in the
 emc24_error.txt were observed.

 If I comment out the HALFILE = joypad.hal ecm2.4 runs ok.

 I am including my ini file with this post. The joypad ran fine before
 the upgrade.

 Any ideas?

 Kirk
  
 --

 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users


I've been using a joypad for at least three years.  I have kept up with 
all versions of emc2. Thanks for the help.

Kirk


--

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad ?

2009-07-07 Thread Brian Mihulka
Chris,
I followed the wiki at 
http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?A_New_Approach_For_Using_Joypads_With_EMC2
and I couldn't get the joystick to be found by any name I tried.  Then I 
found that HALUI = halui must be before the HALFILE directive in the ini 
file and everything worked great.  It should be something simple just 
keep trying and explain your results and multiple people will help on 
this list.

Brian

sani.broy...@free.fr wrote:
 I'm trying hard :-)
 Thanks for your advices.
 Too late (1.28 AM) to go on tonight, I'll experience debug modes tomorrow.
 Regards, Chris


 Le mardi 7 juillet 2009 01:12:00, Frank Tkalcevic a écrit :
   
 Everything was neat and clear until I tried the proposed .hal
 file to integrate the Joypad in axis. Nothing appends, or
 tombstone sometimes.
   
 I found that out the hard way too.  It only takes a small change in your
 .ini file or .hal file and you can no longer use shared hal files.  It's an
 unfortunate side-effect of EMC's flexiblity.  You do need to learn the .hal
 file syntax to get the most out of it.


 ---
 --- ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users
 


 --
 Enter the BlackBerry Developer Challenge  
 This is your chance to win up to $100,000 in prizes! For a limited time, 
 vendors submitting new applications to BlackBerry App World(TM) will have 
 the opportunity to enter the BlackBerry Developer Challenge. See full prize 
 details at: http://p.sf.net/sfu/blackberry
 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users
   

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have 
the opportunity to enter the BlackBerry Developer Challenge. See full prize 
details at: http://p.sf.net/sfu/blackberry
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] Joypad ?

2009-07-06 Thread sani.broy...@free.fr
Hi all.
Anybody using a USB joypad that works ?
Regards.


--
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad ?

2009-07-06 Thread Rainer Schmidt
I use the one from the picture on the wiki... I followed the
installation procedure and it worked of the bat. I got mine from ebay
for $7...
I edited the wrong hal file and it got overridden again with a
reconfig lol I was to lazy to set it up again...

As I recall it was not a big deal to get it going.
Rainer


On Mon, Jul 6, 2009 at 12:34 PM,
sani.broy...@free.frsani.broy...@free.fr wrote:
 Hi all.
 Anybody using a USB joypad that works ?
 Regards.


 --
 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users




-- 
_
Rainer M. Schmidt
Complex Consulting LLC
b...@complexllc.com
Mob (646)-275-0296
VoIP (646)-233-1002
FAX (646)-435-9216

--
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad ?

2009-07-06 Thread sani.broy...@free.fr
It doesn't work at all, despite I followed the procedure line by line.

Pins are not named the same, hal_joystick or hal input doesn't work despite 
this joypad is the same as pictured and is perfectely used by all probe progs 
using /dev/input/js0.

I can't believe you when you say It worked out of the wiki, sorry.

Chris

Le lundi 6 juillet 2009 18:43:34, Rainer Schmidt a écrit :
 I use the one from the picture on the wiki... I followed the
 installation procedure and it worked of the bat. I got mine from ebay
 for $7...
 I edited the wrong hal file and it got overridden again with a
 reconfig lol I was to lazy to set it up again...

 As I recall it was not a big deal to get it going.
 Rainer


 On Mon, Jul 6, 2009 at 12:34 PM,

 sani.broy...@free.frsani.broy...@free.fr wrote:
  Hi all.
  Anybody using a USB joypad that works ?
  Regards.
 
 
  -
 - ___
  Emc-users mailing list
  Emc-users@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/emc-users


--
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad ?

2009-07-06 Thread Stephen Wille Padnos
sani.broy...@free.fr wrote:

It doesn't work at all, despite I followed the procedure line by line.
  

What does not work?

You need to tell us step by step what you are doing, what you expect to 
see, and what you actually see.

Pins are not named the same, 

Then change the names of the pins on the lines that connect the pins to 
signals.  There is no guarantee that the two devices are the same, even 
if they look identical.

hal_joystick or hal input doesn't work 

How don't they work?  You said above that the pin names aren't the same 
- that tells me that the driver is working, but you see something you 
don't expect.

despite 
this joypad is the same as pictured and is perfectely used by all probe progs 
using /dev/input/js0.
  

What probe programs?

I can't believe you when you say It worked out of the wiki, sorry.
  

This is rude.
Obviously, what's in the wiki worked for someone, so it may also work 
for others.  The fact that it doesn't work for you does not mean that it 
can't work for anyone else.

Note also that you are using 6.06, which may be a critical difference.
- Steve


--
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad ?

2009-07-06 Thread Eric H. Johnson
Sani,

I used the instructions below to get both a Logitech and Sony gamepad to
work. The only real trick as far as I remember was making sure to use a
recognizable portion of the name (i.e. replacing SAITEK from the
instructions).

http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?A_New_Approach_For_Using_Joypads
_With_EMC2

Regards,
Eric

Anybody using a USB joypad that works ?


--
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad ?

2009-07-06 Thread Rainer Schmidt
Then I am a happy liar who jogs his machine with his JoyPad
When I get to the shop later I'll post my hal file edits and the
message from Linux when it finds my pad.
I might shoot a quick movie how it jogs so you have to stop calling me
a liar and I can start calling you dumbass!

Why should I lie dude?

Rainer

On Mon, Jul 6, 2009 at 1:03 PM,
sani.broy...@free.frsani.broy...@free.fr wrote:
 It doesn't work at all, despite I followed the procedure line by line.

 Pins are not named the same, hal_joystick or hal input doesn't work despite
 this joypad is the same as pictured and is perfectely used by all probe progs
 using /dev/input/js0.

 I can't believe you when you say It worked out of the wiki, sorry.

 Chris

 Le lundi 6 juillet 2009 18:43:34, Rainer Schmidt a écrit :
 I use the one from the picture on the wiki... I followed the
 installation procedure and it worked of the bat. I got mine from ebay
 for $7...
 I edited the wrong hal file and it got overridden again with a
 reconfig lol I was to lazy to set it up again...

 As I recall it was not a big deal to get it going.
 Rainer


 On Mon, Jul 6, 2009 at 12:34 PM,

 sani.broy...@free.frsani.broy...@free.fr wrote:
  Hi all.
  Anybody using a USB joypad that works ?
  Regards.
 
 
  -
 - ___
  Emc-users mailing list
  Emc-users@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/emc-users


 --
 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users




-- 
_
Rainer M. Schmidt
Complex Consulting LLC
b...@complexllc.com
Mob (646)-275-0296
VoIP (646)-233-1002
FAX (646)-435-9216

--
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad ?

2009-07-06 Thread sani.broy...@free.fr
I wasn't saying that, sorry Rainer.

I copied/pasted the file, got a ton of errors :-)

So the example given in the wiki was not, for sure, usable as is :-)

Dumbass is not in my translator. Could you explain ? ;-)

Regards, Chris.

Le lundi 6 juillet 2009 19:19:51, Rainer Schmidt a écrit :
 Then I am a happy liar who jogs his machine with his JoyPad
 When I get to the shop later I'll post my hal file edits and the
 message from Linux when it finds my pad.
 I might shoot a quick movie how it jogs so you have to stop calling me
 a liar and I can start calling you dumbass!

 Why should I lie dude?

 Rainer

 On Mon, Jul 6, 2009 at 1:03 PM,

 sani.broy...@free.frsani.broy...@free.fr wrote:
  It doesn't work at all, despite I followed the procedure line by line.
 
  Pins are not named the same, hal_joystick or hal input doesn't work
  despite this joypad is the same as pictured and is perfectely used by all
  probe progs using /dev/input/js0.
 
  I can't believe you when you say It worked out of the wiki, sorry.
 
  Chris
 
  Le lundi 6 juillet 2009 18:43:34, Rainer Schmidt a écrit :
  I use the one from the picture on the wiki... I followed the
  installation procedure and it worked of the bat. I got mine from ebay
  for $7...
  I edited the wrong hal file and it got overridden again with a
  reconfig lol I was to lazy to set it up again...
 
  As I recall it was not a big deal to get it going.
  Rainer
 
 
  On Mon, Jul 6, 2009 at 12:34 PM,
 
  sani.broy...@free.frsani.broy...@free.fr wrote:
   Hi all.
   Anybody using a USB joypad that works ?
   Regards.
  
  
   --
  --- - ___
   Emc-users mailing list
   Emc-users@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/emc-users
 
  -
 - ___
  Emc-users mailing list
  Emc-users@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/emc-users


--
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad ?

2009-07-06 Thread Rainer Schmidt
No, cut and paste does not work
But following the steps works. I did not attempt cut and paste.

Dumbass: Si je suis un menteur, alors vous êtes un con haha 8)

I'll send the files later Have to deal with many 'Con' today on
the phone

On Mon, Jul 6, 2009 at 3:06 PM,
sani.broy...@free.frsani.broy...@free.fr wrote:
 I wasn't saying that, sorry Rainer.

 I copied/pasted the file, got a ton of errors :-)

 So the example given in the wiki was not, for sure, usable as is :-)

 Dumbass is not in my translator. Could you explain ? ;-)

 Regards, Chris.

 Le lundi 6 juillet 2009 19:19:51, Rainer Schmidt a écrit :
 Then I am a happy liar who jogs his machine with his JoyPad
 When I get to the shop later I'll post my hal file edits and the
 message from Linux when it finds my pad.
 I might shoot a quick movie how it jogs so you have to stop calling me
 a liar and I can start calling you dumbass!

 Why should I lie dude?

 Rainer

 On Mon, Jul 6, 2009 at 1:03 PM,

 sani.broy...@free.frsani.broy...@free.fr wrote:
  It doesn't work at all, despite I followed the procedure line by line.
 
  Pins are not named the same, hal_joystick or hal input doesn't work
  despite this joypad is the same as pictured and is perfectely used by all
  probe progs using /dev/input/js0.
 
  I can't believe you when you say It worked out of the wiki, sorry.
 
  Chris
 
  Le lundi 6 juillet 2009 18:43:34, Rainer Schmidt a écrit :
  I use the one from the picture on the wiki... I followed the
  installation procedure and it worked of the bat. I got mine from ebay
  for $7...
  I edited the wrong hal file and it got overridden again with a
  reconfig lol I was to lazy to set it up again...
 
  As I recall it was not a big deal to get it going.
  Rainer
 
 
  On Mon, Jul 6, 2009 at 12:34 PM,
 
  sani.broy...@free.frsani.broy...@free.fr wrote:
   Hi all.
   Anybody using a USB joypad that works ?
   Regards.
  
  
   --
  --- - ___
   Emc-users mailing list
   Emc-users@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/emc-users
 
  -
 - ___
  Emc-users mailing list
  Emc-users@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/emc-users


 --
 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users




-- 
_
Rainer M. Schmidt
Complex Consulting LLC
b...@complexllc.com
Mob (646)-275-0296
VoIP (646)-233-1002
FAX (646)-435-9216

--
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad ?

2009-07-06 Thread John Thornton
Mine works flawlessly... 

John

On 6 Jul 2009 at 18:34, sani.broy...@free.fr wrote:

 Hi all.
 Anybody using a USB joypad that works ?
 Regards.
 
 
 
 --
 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users



--
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad ?

2009-07-06 Thread sani.broy...@free.fr
Lucky you :-)
Regards, Chris.

Le mardi 7 juillet 2009 00:17:16, John Thornton a écrit :
 Mine works flawlessly...

 John

 On 6 Jul 2009 at 18:34, sani.broy...@free.fr wrote:
  Hi all.
  Anybody using a USB joypad that works ?
  Regards.
 
 
  
  --
  ___
  Emc-users mailing list
  Emc-users@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/emc-users

 ---
--- ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users


--
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad ?

2009-07-06 Thread Frank Tkalcevic
 Everything was neat and clear until I tried the proposed .hal 
 file to integrate the Joypad in axis. Nothing appends, or 
 tombstone sometimes.

I found that out the hard way too.  It only takes a small change in your
.ini file or .hal file and you can no longer use shared hal files.  It's an
unfortunate side-effect of EMC's flexiblity.  You do need to learn the .hal
file syntax to get the most out of it.


--
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad ?

2009-07-06 Thread sani.broy...@free.fr
I'm trying hard :-)
Thanks for your advices.
Too late (1.28 AM) to go on tonight, I'll experience debug modes tomorrow.
Regards, Chris


Le mardi 7 juillet 2009 01:12:00, Frank Tkalcevic a écrit :
  Everything was neat and clear until I tried the proposed .hal
  file to integrate the Joypad in axis. Nothing appends, or
  tombstone sometimes.

 I found that out the hard way too.  It only takes a small change in your
 .ini file or .hal file and you can no longer use shared hal files.  It's an
 unfortunate side-effect of EMC's flexiblity.  You do need to learn the .hal
 file syntax to get the most out of it.


 ---
--- ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users


--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have 
the opportunity to enter the BlackBerry Developer Challenge. See full prize 
details at: http://p.sf.net/sfu/blackberry
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad as a pendant - help?

2009-04-18 Thread Peter blodow


Hello John,
please look at the time setting of your PC. I received this mail with 
sending date 17.04.2004!
Peter Blodow


At 14:25 17.04.2004, you wrote:


On 17 Apr 2009 at 1:06, Michael Jones wrote:

  Does anyone have a good example of a HAL file for a joypad that I
  can
  build on.

This should get you going.

http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Simple_Remote_Pendant

John

--
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] Joypad as a pendant - help?

2009-04-17 Thread Michael Jones
Does anyone have a good example of a HAL file for a joypad that I can  
build on.

Here's what I want to do with a basic Logitech usb gamepad..

Use the left stick to control x axis, the right stick to control the y  
axis,  and the Hat to control the z axis.  (I want one stick, one  
axis, 'cause it's too easy to get 2 moving when you don't want them to)

Use the various buttons to control how fast the axes jog when the  
appropriate stick is moved.

Program the 4 buttons on the right to enable certain functions like  
spindle start/stop, coolant on/off, Home All, go to a predefined  
position (i.e. 0,0,0) etc..


I've used the first script in the knowledgebase as a initial attempt,  
but am having a slight problem.  When I let go of the stick on the pad  
the axis keeps going.. UHOH! ;-)

I've looked at the other scripts in the knowledgebase and noticed a  
setting called a deadzone.  Would this solve my problem?

Any useful tips?

Thanks

- Micahel

--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad as a pendant - help?

2009-04-17 Thread John Thornton


On 17 Apr 2009 at 1:06, Michael Jones wrote:

 Does anyone have a good example of a HAL file for a joypad that I
 can  
 build on.

This should get you going.

http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Simple_Remote_Pendant

John

--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad as a pendant - help?

2009-04-17 Thread Kirk Wallace
On Fri, 2009-04-17 at 01:06 -0700, Michael Jones wrote:
... snip
 I've used the first script in the knowledgebase as a initial attempt,  
 but am having a slight problem.  When I let go of the stick on the pad  
 the axis keeps going.. UHOH! ;-)
 
 I've looked at the other scripts in the knowledgebase and noticed a  
 setting called a deadzone.  Would this solve my problem?
 
 Any useful tips?
 
 Thanks
 
 - Micahel

I seem to recall that there was either a loadrt parameter or component
parameter that let you set the jog mode to either follow the commanded
position or follow the input activity. In other words, when the joystick
is held the position commands build up, when you release the joystick,
EMC2 continues to try to move to the commanded position causing a
run-on. In the other mode, when you release the joystick, the motion
stops at the release and cancels the position command. I did a brief
search and couldn't find the parameter information, maybe you came
across something like this in your research? Maybe someone else
remembers where it is.

-- 
Kirk Wallace
http://www.wallacecompany.com/machine_shop/
http://www.wallacecompany.com/E45/index.html
California, USA


--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad as a pendant - help?

2009-04-17 Thread Kirk Wallace
On Fri, 2009-04-17 at 10:48 -0700, Kirk Wallace wrote:
 On Fri, 2009-04-17 at 01:06 -0700, Michael Jones wrote:
 ... snip
  I've used the first script in the knowledgebase as a initial attempt,  
  but am having a slight problem.  When I let go of the stick on the pad  
  the axis keeps going.. UHOH! ;-)
  
  I've looked at the other scripts in the knowledgebase and noticed a  
  setting called a deadzone.  Would this solve my problem?
  
  Any useful tips?
  
  Thanks
  
  - Micahel
 
 I seem to recall that there was either a loadrt parameter or component
 parameter that let you set the jog mode to either follow the commanded
 position or follow the input activity. In other words, when the joystick
 is held the position commands build up, when you release the joystick,
 EMC2 continues to try to move to the commanded position causing a
 run-on. In the other mode, when you release the joystick, the motion
 stops at the release and cancels the position command. I did a brief
 search and couldn't find the parameter information, maybe you came
 across something like this in your research? Maybe someone else
 remembers where it is.

I think I found more:

axis.N.jog-vel-mode IN bit
When FALSE (the default), the jog wheel operates in position
mode. The axis will move exactly jog-scale units for each count,
regardless of how long that might take. When TRUE, the wheel
operates in velocity mode - motion stops when the wheel stops,
even if that means the commanded motion is not completed.

in:
http://www.linuxcnc.org/docs/html/config_emc2hal.html

-- 
Kirk Wallace
http://www.wallacecompany.com/machine_shop/
http://www.wallacecompany.com/E45/index.html
California, USA


--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad as a pendant - help?

2009-04-17 Thread Michael Jones
When I use this setup, I get a response to the command:

loadusr -W hal_input -KRAL name

I've replaced the name with everything I can think of.. including  
various permutations of quotes and the like and get this every  
time.Somehow the hal stuff isn't recognizing the name of the device

Traceback (most recent call last):
   File /usr/bin/hal_input, line 189, in module
 d.append(HalInputDevice(w, i, f, parts))
   File /usr/bin/hal_input, line 52, in __init__
 self.device = linux_event.InputDevice(name)
   File debian/tmp/usr/lib/python2.5/site-packages/linux_event.py,  
line 700, in __init__
   File debian/tmp/usr/lib/python2.5/site-packages/linux_event.py,  
line 685, in find
LookupError: No input device matching 'Action' was found 
--- This time I used Action in place of name
stdin:0: hal_input exited without becoming ready

Suggestions? Fixes?

Thanks,

- Michael

On Apr 17, 2004, at 5:25 AM, John Thornton wrote:



 On 17 Apr 2009 at 1:06, Michael Jones wrote:

 Does anyone have a good example of a HAL file for a joypad that I
 can
 build on.

 This should get you going.

 http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Simple_Remote_Pendant

 John

 --
 Stay on top of everything new and different, both inside and
 around Java (TM) technology - register by April 22, and save
 $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
 300 plus technical and hands-on sessions. Register today.
 Use priority code J9JMT32. http://p.sf.net/sfu/p
 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users


--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad as a pendant - help?

2009-04-17 Thread Alex Joni
 On Fri, 2009-04-17 at 01:06 -0700, Michael Jones wrote:
 ... snip
 I've used the first script in the knowledgebase as a initial attempt,
 but am having a slight problem.  When I let go of the stick on the pad
 the axis keeps going.. UHOH! ;-)

 I've looked at the other scripts in the knowledgebase and noticed a
 setting called a deadzone.  Would this solve my problem?

 Any useful tips?

 Thanks

 - Micahel

 I seem to recall that there was either a loadrt parameter or component
 parameter that let you set the jog mode to either follow the commanded
 position or follow the input activity. In other words, when the joystick
 is held the position commands build up, when you release the joystick,
 EMC2 continues to try to move to the commanded position causing a
 run-on. In the other mode, when you release the joystick, the motion
 stops at the release and cancels the position command.

What you are reffering to is valid for MPGs, not for joysticks.
(there counts are remembered, and if you stop spinning, the machine might 
still move to get to the count you intended).

For joysticks you need to see what each axis outputs.
There are joysticks which output (-value .. 0 .. value), and others that go 
(0 .. value).
The first kind you can easily connecto to halui jogging with speed 
presetting. (then based on how far you move the stick, halui will command 
the speed of the jog move).
Deadband is used so the axis doesn't slowly creep away if your joystick 
doesn't output quite 0 when in the neutral position.

Before you start hooking the joystick up to halui for jogging, I would first 
load the joystick component (just like in the HAL file), then use a halmeter 
and look for the values it outputs for +max, neutral and -max. Also see how 
linear the values are.
Based on these numbers, we'll try to suggest you the best way to hook it up.

Regards,
Alex


--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad as a pendant - help?

2009-04-17 Thread Michael Jones
Kirk,

That looks promising.. I'll try inserting that into the Hal.

Thanks,

- Michael
On Apr 17, 2009, at 11:13 AM, Kirk Wallace wrote:

 On Fri, 2009-04-17 at 10:48 -0700, Kirk Wallace wrote:
 On Fri, 2009-04-17 at 01:06 -0700, Michael Jones wrote:
 ... snip
 I've used the first script in the knowledgebase as a initial  
 attempt,
 but am having a slight problem.  When I let go of the stick on the  
 pad
 the axis keeps going.. UHOH! ;-)

 I've looked at the other scripts in the knowledgebase and noticed a
 setting called a deadzone.  Would this solve my problem?

 Any useful tips?

 Thanks

 - Micahel

 I seem to recall that there was either a loadrt parameter or  
 component
 parameter that let you set the jog mode to either follow the  
 commanded
 position or follow the input activity. In other words, when the  
 joystick
 is held the position commands build up, when you release the  
 joystick,
 EMC2 continues to try to move to the commanded position causing a
 run-on. In the other mode, when you release the joystick, the motion
 stops at the release and cancels the position command. I did a brief
 search and couldn't find the parameter information, maybe you came
 across something like this in your research? Maybe someone else
 remembers where it is.

 I think I found more:
 
 axis.N.jog-vel-mode IN bit
When FALSE (the default), the jog wheel operates in position
mode. The axis will move exactly jog-scale units for each  
 count,
regardless of how long that might take. When TRUE, the wheel
operates in velocity mode - motion stops when the wheel stops,
even if that means the commanded motion is not completed.
 
 in:
 http://www.linuxcnc.org/docs/html/config_emc2hal.html

 -- 
 Kirk Wallace
 http://www.wallacecompany.com/machine_shop/
 http://www.wallacecompany.com/E45/index.html
 California, USA


 --
 Stay on top of everything new and different, both inside and
 around Java (TM) technology - register by April 22, and save
 $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
 300 plus technical and hands-on sessions. Register today.
 Use priority code J9JMT32. http://p.sf.net/sfu/p
 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users


--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad as a pendant - help?

2009-04-17 Thread Michael Jones
When I  use:

http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?HereIsHowToCheck

I get the (-value...0...value) sequence when I move the sticks.


On Apr 17, 2009, at 11:17 AM, Alex Joni wrote:

 On Fri, 2009-04-17 at 01:06 -0700, Michael Jones wrote:
 ... snip
 I've used the first script in the knowledgebase as a initial  
 attempt,
 but am having a slight problem.  When I let go of the stick on the  
 pad
 the axis keeps going.. UHOH! ;-)

 I've looked at the other scripts in the knowledgebase and noticed a
 setting called a deadzone.  Would this solve my problem?

 Any useful tips?

 Thanks

 - Micahel

 I seem to recall that there was either a loadrt parameter or  
 component
 parameter that let you set the jog mode to either follow the  
 commanded
 position or follow the input activity. In other words, when the  
 joystick
 is held the position commands build up, when you release the  
 joystick,
 EMC2 continues to try to move to the commanded position causing a
 run-on. In the other mode, when you release the joystick, the motion
 stops at the release and cancels the position command.

 What you are reffering to is valid for MPGs, not for joysticks.
 (there counts are remembered, and if you stop spinning, the machine  
 might
 still move to get to the count you intended).

 For joysticks you need to see what each axis outputs.
 There are joysticks which output (-value .. 0 .. value), and others  
 that go
 (0 .. value).
 The first kind you can easily connecto to halui jogging with speed
 presetting. (then based on how far you move the stick, halui will  
 command
 the speed of the jog move).
 Deadband is used so the axis doesn't slowly creep away if your  
 joystick
 doesn't output quite 0 when in the neutral position.

 Before you start hooking the joystick up to halui for jogging, I  
 would first
 load the joystick component (just like in the HAL file), then use a  
 halmeter
 and look for the values it outputs for +max, neutral and -max. Also  
 see how
 linear the values are.
 Based on these numbers, we'll try to suggest you the best way to  
 hook it up.

 Regards,
 Alex


 --
 Stay on top of everything new and different, both inside and
 around Java (TM) technology - register by April 22, and save
 $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
 300 plus technical and hands-on sessions. Register today.
 Use priority code J9JMT32. http://p.sf.net/sfu/p
 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users


--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad as a pendant - help?

2009-04-17 Thread Michael Jones
Kirk,

Hey!  That worked perfectly!  Thanks!

I inserted:

setp axis.0.jog-vel-mode TRUE
setp axis.1.jog-vel-mode TRUE
setp axis.2.jog-vel-mode TRUE

into the hal file right after the:

setp axis.0.jog-enable TRUE
setp axis.1.jog-enable TRUE
setp axis.2.jog-enable TRUE

commands and now when I let go of the stick, the axis stops moving.

Now I have to figure out how to map the buttons the way I want.

- Michael

On Apr 17, 2009, at 11:30 AM, Michael Jones wrote:

 Kirk,

 That looks promising.. I'll try inserting that into the Hal.

 Thanks,

 - Michael
 On Apr 17, 2009, at 11:13 AM, Kirk Wallace wrote:

 On Fri, 2009-04-17 at 10:48 -0700, Kirk Wallace wrote:
 On Fri, 2009-04-17 at 01:06 -0700, Michael Jones wrote:
 ... snip
 I've used the first script in the knowledgebase as a initial
 attempt,
 but am having a slight problem.  When I let go of the stick on the
 pad
 the axis keeps going.. UHOH! ;-)

 I've looked at the other scripts in the knowledgebase and noticed a
 setting called a deadzone.  Would this solve my problem?

 Any useful tips?

 Thanks

 - Micahel

 I seem to recall that there was either a loadrt parameter or
 component
 parameter that let you set the jog mode to either follow the
 commanded
 position or follow the input activity. In other words, when the
 joystick
 is held the position commands build up, when you release the
 joystick,
 EMC2 continues to try to move to the commanded position causing a
 run-on. In the other mode, when you release the joystick, the motion
 stops at the release and cancels the position command. I did a brief
 search and couldn't find the parameter information, maybe you came
 across something like this in your research? Maybe someone else
 remembers where it is.

 I think I found more:
 
 axis.N.jog-vel-mode IN bit
   When FALSE (the default), the jog wheel operates in position
   mode. The axis will move exactly jog-scale units for each
 count,
   regardless of how long that might take. When TRUE, the wheel
   operates in velocity mode - motion stops when the wheel stops,
   even if that means the commanded motion is not completed.
 
 in:
 http://www.linuxcnc.org/docs/html/config_emc2hal.html

 -- 
 Kirk Wallace
 http://www.wallacecompany.com/machine_shop/
 http://www.wallacecompany.com/E45/index.html
 California, USA


 --
 Stay on top of everything new and different, both inside and
 around Java (TM) technology - register by April 22, and save
 $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
 300 plus technical and hands-on sessions. Register today.
 Use priority code J9JMT32. http://p.sf.net/sfu/p
 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users


 --
 Stay on top of everything new and different, both inside and
 around Java (TM) technology - register by April 22, and save
 $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
 300 plus technical and hands-on sessions. Register today.
 Use priority code J9JMT32. http://p.sf.net/sfu/p
 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users


--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad as a pendant - help?

2009-04-17 Thread Kirk Wallace
On Fri, 2009-04-17 at 21:17 +0300, Alex Joni wrote:
... snip
 What you are reffering to is valid for MPGs, not for joysticks.
 (there counts are remembered, and if you stop spinning, the machine might 
 still move to get to the count you intended).
 
 For joysticks you need to see what each axis outputs.
 There are joysticks which output (-value .. 0 .. value), and others that go 
 (0 .. value).
 The first kind you can easily connecto to halui jogging with speed 
 presetting. (then based on how far you move the stick, halui will command 
 the speed of the jog move).
 Deadband is used so the axis doesn't slowly creep away if your joystick 
 doesn't output quite 0 when in the neutral position.

Oops, that makes more sense. So it's more like an ADC interface. I guess
I need to actually install one sometime.

-- 
Kirk Wallace
http://www.wallacecompany.com/machine_shop/
http://www.wallacecompany.com/E45/index.html
California, USA


--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad as a pendant - help?

2009-04-17 Thread Alex Joni
 Oops, that makes more sense. So it's more like an ADC interface. I guess
 I need to actually install one sometime.

Well, there are 2 ways of interfacing the joystick.
The older one, (which I don't think is that good) is taking the output 
from the joystick, using a stepgen to generate quadrature, and feeding that 
to the MPG input to the appropriate axis.
The newer one, ( which I think is cleaner, better) is taking the value 
from the joystick and driving halui velocity jogging with it.
Both are in the wiki.
For the first one your suggestion actually makes sense, and probably fixes 
things.

Regards,
Alex


--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad as a pendant - help?

2009-04-17 Thread Michael Jones
When I:

cat /proc/bus/input/devices

it returns:

  I: Bus=0003 Vendor=046d Product=c216 Version=0110
N: Name=Logitech Logitech Dual Action
P: Phys=usb-:02:00.0-1/input0
S: Sysfs=/devices/pci:00/:00:11.0/:02:00.0/ 
usb1/1-1/1-1:1.0/input/input5
U: Uniq=
H: Handlers=event4 js0
B: EV=1b
B: KEY=fff 0 0 0 0 0 0 0 0 0
B: ABS=30027
B: MSC=10

when I go into Halrun or try to enter this into my hal file:

loadusr -W hal_input -KRAL c216

or

loadusr -W hal_input -KRAL Product=c216

I get:

Traceback (most recent call last):
   File /usr/bin/hal_input, line 189, in module
 d.append(HalInputDevice(w, i, f, parts))
   File /usr/bin/hal_input, line 52, in __init__
 self.device = linux_event.InputDevice(name)
   File debian/tmp/usr/lib/python2.5/site-packages/linux_event.py,  
line 700, in __init__
   File debian/tmp/usr/lib/python2.5/site-packages/linux_event.py,  
line 685, in find
LookupError: No input device matching 'Product=c216' was found
stdin:1: hal_input exited without becoming ready

Now, I do have a different method working..

loadusr hal_joystick -d /dev/input/js0 -p joypad

can this method be interchanged? Does it make a difference?

- Michael

On Apr 17, 2009, at 11:47 AM, Lars Andersson wrote:

 Look up your device in the output of
 cat /proc/bus/input/devices
 Select any string you like from any of the properties
 Bus=
 Vendor=
 Product=
 Version=

 No quotes needed, it does not have to be the whole string either.

 Unfortunately the property Uniq= cannot be used

 //
 Lars

 -Original Message-
 From: Michael Jones [mailto:ma...@michaelandholly.com]
 Sent: den 17 april 2009 20:17
 To: Enhanced Machine Controller (EMC)
 Subject: Re: [Emc-users] Joypad as a pendant - help?

 When I use this setup, I get a response to the command:

 loadusr -W hal_input -KRAL name

 I've replaced the name with everything I can think of.. including
 various permutations of quotes and the like and get this every
 time.Somehow the hal stuff isn't recognizing the name of the  
 device

 Traceback (most recent call last):
   File /usr/bin/hal_input, line 189, in module
 d.append(HalInputDevice(w, i, f, parts))
   File /usr/bin/hal_input, line 52, in __init__
 self.device = linux_event.InputDevice(name)
   File debian/tmp/usr/lib/python2.5/site-packages/linux_event.py,
 line 700, in __init__
   File debian/tmp/usr/lib/python2.5/site-packages/linux_event.py,
 line 685, in find
 LookupError: No input device matching 'Action' was found
 --- This time I used Action in place of name
 stdin:0: hal_input exited without becoming ready

 Suggestions? Fixes?

 Thanks,

 - Michael

 On Apr 17, 2004, at 5:25 AM, John Thornton wrote:



 On 17 Apr 2009 at 1:06, Michael Jones wrote:

 Does anyone have a good example of a HAL file for a joypad that I
 can
 build on.

 This should get you going.

 http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Simple_Remote_Pendant

 John

 -
 -
 Stay on top of everything new and different, both inside and
 around Java (TM) technology - register by April 22, and save
 $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
 300 plus technical and hands-on sessions. Register today.
 Use priority code J9JMT32. http://p.sf.net/sfu/p
 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users


 ---
 ---
 Stay on top of everything new and different, both inside and
 around Java (TM) technology - register by April 22, and save
 $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
 300 plus technical and hands-on sessions. Register today.
 Use priority code J9JMT32. http://p.sf.net/sfu/p
 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users


 --
 Stay on top of everything new and different, both inside and
 around Java (TM) technology - register by April 22, and save
 $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
 300 plus technical and hands-on sessions. Register today.
 Use priority code J9JMT32. http://p.sf.net/sfu/p
 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users


--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p

Re: [Emc-users] Joypad as a pendant - help?

2009-04-17 Thread Alexey Starikovskiy
Alex Joni wrote:
 Oops, that makes more sense. So it's more like an ADC interface. I guess
 I need to actually install one sometime.
 

 Well, there are 2 ways of interfacing the joystick.
   
Well, there are 3 ways... :) Third is with X driver and remapping events 
into AXIS.


--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad as a pendant - help?

2009-04-17 Thread Lars Andersson
Probably
loadusr -W hal_input -KRAL Action
would work also.

Any text fragment from the selected properties seems to work.

 -Original Message-
 From: Michael Jones [mailto:ma...@michaelandholly.com]
 Sent: den 17 april 2009 21:27
 To: Enhanced Machine Controller (EMC)
 Subject: Re: [Emc-users] Joypad as a pendant - help?
 
 When I:
 
 cat /proc/bus/input/devices
 
 it returns:
 
   I: Bus=0003 Vendor=046d Product=c216 Version=0110
 N: Name=Logitech Logitech Dual Action
 P: Phys=usb-:02:00.0-1/input0
 S: Sysfs=/devices/pci:00/:00:11.0/:02:00.0/
 usb1/1-1/1-1:1.0/input/input5
 U: Uniq=
 H: Handlers=event4 js0
 B: EV=1b
 B: KEY=fff 0 0 0 0 0 0 0 0 0
 B: ABS=30027
 B: MSC=10
 
 when I go into Halrun or try to enter this into my hal file:
 
 loadusr -W hal_input -KRAL c216
 
 or
 
 loadusr -W hal_input -KRAL Product=c216
 
 I get:
 
 Traceback (most recent call last):
File /usr/bin/hal_input, line 189, in module
  d.append(HalInputDevice(w, i, f, parts))
File /usr/bin/hal_input, line 52, in __init__
  self.device = linux_event.InputDevice(name)
File debian/tmp/usr/lib/python2.5/site-packages/linux_event.py,
 line 700, in __init__
File debian/tmp/usr/lib/python2.5/site-packages/linux_event.py,
 line 685, in find
 LookupError: No input device matching 'Product=c216' was found
 stdin:1: hal_input exited without becoming ready
 
 Now, I do have a different method working..
 
 loadusr hal_joystick -d /dev/input/js0 -p joypad
 
 can this method be interchanged? Does it make a difference?
 
 - Michael
 
 On Apr 17, 2009, at 11:47 AM, Lars Andersson wrote:
 
  Look up your device in the output of
  cat /proc/bus/input/devices
  Select any string you like from any of the properties
  Bus=
  Vendor=
  Product=
  Version=
 
  No quotes needed, it does not have to be the whole string either.
 
  Unfortunately the property Uniq= cannot be used
 
  //
  Lars
 
  -Original Message-
  From: Michael Jones [mailto:ma...@michaelandholly.com]
  Sent: den 17 april 2009 20:17
  To: Enhanced Machine Controller (EMC)
  Subject: Re: [Emc-users] Joypad as a pendant - help?
 
  When I use this setup, I get a response to the command:
 
  loadusr -W hal_input -KRAL name
 
  I've replaced the name with everything I can think of.. including
  various permutations of quotes and the like and get this every
  time.Somehow the hal stuff isn't recognizing the name of the
  device
 
  Traceback (most recent call last):
File /usr/bin/hal_input, line 189, in module
  d.append(HalInputDevice(w, i, f, parts))
File /usr/bin/hal_input, line 52, in __init__
  self.device = linux_event.InputDevice(name)
File debian/tmp/usr/lib/python2.5/site-packages/linux_event.py,
  line 700, in __init__
File debian/tmp/usr/lib/python2.5/site-packages/linux_event.py,
  line 685, in find
  LookupError: No input device matching 'Action' was found
  --- This time I used Action in place of name
  stdin:0: hal_input exited without becoming ready
 
  Suggestions? Fixes?
 
  Thanks,
 
  - Michael
 
  On Apr 17, 2004, at 5:25 AM, John Thornton wrote:
 
 
 
  On 17 Apr 2009 at 1:06, Michael Jones wrote:
 
  Does anyone have a good example of a HAL file for a joypad that I
  can
  build on.
 
  This should get you going.
 
  http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Simple_Remote_Pendant
 
  John
 
  ---
 --
  -
  Stay on top of everything new and different, both inside and
  around Java (TM) technology - register by April 22, and save
  $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
  300 plus technical and hands-on sessions. Register today.
  Use priority code J9JMT32. http://p.sf.net/sfu/p
  ___
  Emc-users mailing list
  Emc-users@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/emc-users
 
 
  
 ---
  ---
  Stay on top of everything new and different, both inside and
  around Java (TM) technology - register by April 22, and save
  $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
  300 plus technical and hands-on sessions. Register today.
  Use priority code J9JMT32. http://p.sf.net/sfu/p
  ___
  Emc-users mailing list
  Emc-users@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/emc-users
 
 
  -
 -
  Stay on top of everything new and different, both inside and
  around Java (TM) technology - register by April 22, and save
  $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
  300 plus technical and hands-on sessions. Register today.
  Use priority code J9JMT32. http://p.sf.net/sfu/p
  ___
  Emc-users mailing list
  Emc-users@lists.sourceforge.net

Re: [Emc-users] Joypad as a pendant - help?

2009-04-17 Thread Michael Jones

On Apr 17, 2009, at 1:11 PM, Lars Andersson wrote:

 Probably
 loadusr -W hal_input -KRAL Action

this doesn't seem to work no matter what text fragment I use..
Loading by the /dev/input/js0 seems to work though..



 would work also.

 Any text fragment from the selected properties seems to work.


..snip...


--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad as a pendant - help?

2009-04-17 Thread Stephen Wille Padnos
Michael Jones wrote:

On Apr 17, 2009, at 1:11 PM, Lars Andersson wrote:
  

Probably
loadusr -W hal_input -KRAL Action



this doesn't seem to work no matter what text fragment I use..
Loading by the /dev/input/js0 seems to work though..
  

One thing I noticed in your /proc/bus/input/devices file, the number on 
the S: Sysfs ... line is different from the number on the H: Handlers= 
line.  Your Sysfs node is input5, but the Handlers line shows event4.  
On my system, the two numbers match, and the driver loads just fine.  (I 
didn't use c216, I only tried Dual and Action)

I don't know how to get the numbers to be the same, or if that's the 
problem, but it did seem interesting.
- Steve

--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad as a pendant - help?

2009-04-17 Thread Kirk Wallace
On Sat, 2004-04-17 at 06:25 -0600, John Thornton wrote:
 
 On 17 Apr 2009 at 1:06, Michael Jones wrote:
 
  Does anyone have a good example of a HAL file for a joypad that I
  can  
  build on.
 
 This should get you going.
 
 http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Simple_Remote_Pendant
 
 John

John, I just noticed this message. My inbox sorts by date, so it was at
the beginning of my +1k message inbox. I think your computer timestamps
your message, so having the correct date may be better. I have ntpdate
running on my computers to avoid that issue. Of course ideally, I should
not have any stale messages in my inbox. Just FYI.
-- 
Kirk Wallace
http://www.wallacecompany.com/machine_shop/
http://www.wallacecompany.com/E45/index.html
California, USA


--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad Example

2008-03-02 Thread Jeff Epler
On Sun, Mar 02, 2008 at 10:34:28PM -0500, Stephen Wille Padnos wrote:
 The reason is that there's no way to get a complete list of all joystick
 devices (axes and buttons) before you get the first event.  If you try
 to enumerate all the axes first, and the joystick gets moved while
 you're doing it, then there will be a motion event thrown in the middle
 of the capabilities enumeration.  Also, there's no that's it, those are
 all the buttons I've got message.  You can get notified of a new button
 or axis at any time.  So, the best thing to do is to just start the
 event loop, and if you receive an event that says this is analog axis
 #7, just export a HAL pin.  If it's a button or motion event, then
 change the appropriate HAL pin.
 
 (at least that's my recollection of the issues jmkasunich had to deal
 with when writing the driver in the first place)

And for this reason, the driver is broken (strictly speaking) -- all
userspace drivers must call hal_ready() after creating all pins.  This
is what allows halcmd 'loadusr -W' to wait the proper amount of time
before executing the following commands.

Jeff

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad Example

2008-02-23 Thread ben lipkowitz
On Fri, 22 Feb 2008, Kirk Wallace wrote:
 Another bit I don't understand:

/* STEP 3: allocate shared memory for joystick data */
js_data = (hal_js_t *) hal_malloc(sizeof(hal_js_t));
if (js_data == 0) {
   printf( ERROR: hal_malloc() failed\n);
   hal_exit(comp_id);
   return -1;
}

 hal_js_t is a defined variable type.
 sizeof(hal_js_t) is the memory size of this type.
 hal_malloc(sizeof(hal_js_t)) returns the memory location of this
 variable.
 I don't understand what (hal_js_t *) does. hal_js_t is a type so it is
 similar to (int *)?

hal_malloc returns a (void *) pointer; this would presumably make 
subsequent code complain about pointer mismatches, and the compiler 
wouldn't know where to look in the data structure for variables like 
(js_data-axis[n]). the (hal_js_t *) casts the returned pointer to the 
correct pointer type.

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad Example

2008-02-23 Thread Kirk Wallace
On Sat, 2008-02-23 at 07:52 +, ben lipkowitz wrote:
 On Fri, 22 Feb 2008, Kirk Wallace wrote:
  Another bit I don't understand:
 
 /* STEP 3: allocate shared memory for joystick data */
 js_data = (hal_js_t *) hal_malloc(sizeof(hal_js_t));
 if (js_data == 0) {
  printf( ERROR: hal_malloc() failed\n);
  hal_exit(comp_id);
  return -1;
 }
 
  hal_js_t is a defined variable type.
  sizeof(hal_js_t) is the memory size of this type.
  hal_malloc(sizeof(hal_js_t)) returns the memory location of this
  variable.
  I don't understand what (hal_js_t *) does. hal_js_t is a type so it is
  similar to (int *)?
 
 hal_malloc returns a (void *) pointer; this would presumably make 
 subsequent code complain about pointer mismatches, and the compiler 
 wouldn't know where to look in the data structure for variables like 
 (js_data-axis[n]). the (hal_js_t *) casts the returned pointer to the 
 correct pointer type.

Thanks Ben. The cast makes sense. I think of void as being an invention
to allow functions that return nothing, so the function return type
(void *) tells me that a pointer is returned that points to a
nonexistent variable. Is the (void *) just a reminder to always cast the
return pointer to the variable type we happen to need?

-- 
Kirk Wallace (California, USA
http://www.wallacecompany.com/machine_shop/ 
Hardinge HNC lathe,
Bridgeport mill conversion, doing XY now,
Zubal lathe conversion pending)


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] Joypad Example

2008-02-22 Thread Kirk Wallace
I think hal_joystick.c:

http://cvs.linuxcnc.org/cgi-bin/cvsweb.cgi/emc2/src/hal/user_comps/devices/hal_joystick.c?rev=1.2;content-type=text%2Fplain

might be a good model to follow for making my modbus user-land
component. My guess would be that one would setup HAL and the the HAL
pins and then loop to update the inputs and outputs, but the joystick
pins are set up in the main loop. Why is that?

There is a prefix parameter used to name the pins and buttons but not
the component itself:
...
snprintf(name, HAL_NAME_LEN-1, hal_joystick-%d, getpid());
comp_id = hal_init(name);
...
Is there a reason not to use the prefix here?

Thanks.

-- 
Kirk Wallace (California, USA
http://www.wallacecompany.com/machine_shop/ 
Hardinge HNC lathe,
Bridgeport mill conversion, doing XY now,
Zubal lathe conversion pending)


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad Example

2008-02-22 Thread Kirk Wallace
On Fri, 2008-02-22 at 17:51 -0800, Kirk Wallace wrote:
 I think hal_joystick.c:
 
 http://cvs.linuxcnc.org/cgi-bin/cvsweb.cgi/emc2/src/hal/user_comps/devices/hal_joystick.c?rev=1.2;content-type=text%2Fplain
 
 might be a good model to follow for making my modbus user-land
 component. My guess would be that one would setup HAL and the the HAL
 pins and then loop to update the inputs and outputs, but the joystick
 pins are set up in the main loop. Why is that?
 
 There is a prefix parameter used to name the pins and buttons but not
 the component itself:
 ...
 snprintf(name, HAL_NAME_LEN-1, hal_joystick-%d, getpid());
 comp_id = hal_init(name);
 ...
 Is there a reason not to use the prefix here?
 
 Thanks.
 

Another bit I don't understand:

/* STEP 3: allocate shared memory for joystick data */
js_data = (hal_js_t *) hal_malloc(sizeof(hal_js_t));
if (js_data == 0) {
printf( ERROR: hal_malloc() failed\n);
hal_exit(comp_id);
return -1;
}

hal_js_t is a defined variable type.
sizeof(hal_js_t) is the memory size of this type.
hal_malloc(sizeof(hal_js_t)) returns the memory location of this
variable.
I don't understand what (hal_js_t *) does. hal_js_t is a type so it is
similar to (int *)?

-- 
Kirk Wallace (California, USA
http://www.wallacecompany.com/machine_shop/ 
Hardinge HNC lathe,
Bridgeport mill conversion, doing XY now,
Zubal lathe conversion pending)


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad

2007-10-23 Thread John Thornton
That was the example that I was looking at. So will the HALUI be out 
when 2.2 is released?

Thanks
John


On 22 Oct 2007 at 14:38, [EMAIL PROTECTED] wrote:

 Hello, 
 
 here is a slightly out of date example:
 
 http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Using_A_Joypad_To_Move_You
 r_CNC_Machine
 
 I think now (but I don't remember if they are in the official version
 or only in the trunk) there are new HALUI pins that allows you to do
 the same in a very easy way.
 
 Regards, 
 
 Manfredi



-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad

2007-10-22 Thread Manfredi Leto

Hello, 

here is a slightly out of date example:

http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Using_A_Joypad_To_Move_Your_CNC_Machine

I think now (but I don't remember if they are in the official version or only 
in the trunk) there are new HALUI pins that allows you to do the same in a very 
easy way.

Regards, 

Manfredi

My websites: www.m24-pro.com
www.emc2cnc.altervista.org  From: 
[EMAIL PROTECTED] To: emc-users@lists.sourceforge.net Date: Sun, 21 Oct 2007 
14:08:16 -0500 Subject: [Emc-users] Joypad Can you take a joypad apart and 
put into a more solid container and use industrial buttons so you can label 
the functions for input into EMC. The USB input for a remote would be just too 
easy... Thanks John 
- This 
SF.net email is sponsored by: Splunk Inc. Still grepping through log files to 
find problems? Stop. Now Search log events and configuration files using AJAX 
and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ 
___ Emc-users mailing list 
Emc-users@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/emc-users

_
Connect to the next generation of MSN Messenger 
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-ussource=wlmailtagline
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] Joypad

2007-10-21 Thread John Thornton
Can you take a joypad apart and put into a more solid container and use 
industrial 
buttons so you can label the functions for input into EMC. The USB input for a 
remote would be just too easy...

Thanks
John

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad problem with version 2.1.4

2007-03-28 Thread John Kasunich
kirk wrote:
 John,
 
 Thanks for all the help.  The scaling factors did the trick.  On the
 previous version of EMC 2.1.3 I had to increase the counts per second
 just to get the thing to move.
 
 This new version works considerably better.  There is much better
 control over the velocity.

Good to hear that.

There was a bug in 2.1.3 that made wheel jogs end short.  You cranked up 
the scale to make it work, then we fixed the bug in 2.1.4 and suddenly 
your scale was way too high.

It's always something isn't it?

Glad I could help.

Regards,

John Kasunich

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad problem with version 2.1.4

2007-03-27 Thread John Kasunich
Kirk wrote:
 I am using the joypad.hal file located on the wiki.  I have of course
 modified it for my machine.  I am loading halui and using it to control
 various functions via buttons on the joypad.  The previous version of
 EMC was 2.1.3 which I obtained via Ubuntu Synaptic Package Manager.  I
 also updated to 2.1.4 the same way.

There are 246 pages on the wiki.  You could make it easier for us to
help you by posting the URL of the one you used.

You could also post your hal file, as two different people have
asked.

At least we know you are using halui now.  But unless this page:
http://cvs.linuxcnc.org/cgi-bin/cvsweb.cgi/emc2/src/emc/usr_intf/halui.cc?graph=1
is lying to me, halui.cc did NOT change from 2.1.3 to 2.1.4, and more
importantly, it did not support analog until version 1.39, which
is NOT included in the 2.1.4 release.

You are going to have to give some details!

Regards,

John Kasunich

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad problem with version 2.1.4

2007-03-27 Thread Kirk
I attached the hal file on the last message.  I am also attaching it
again here.  The link to the file on the wiki is
http://wiki.linuxcnc.org/uploads/joypad.hal

Kirk

On Tue, 2007-03-27 at 19:57 -0400, John Kasunich wrote:
 Kirk wrote:
  I am using the joypad.hal file located on the wiki.  I have of course
  modified it for my machine.  I am loading halui and using it to control
  various functions via buttons on the joypad.  The previous version of
  EMC was 2.1.3 which I obtained via Ubuntu Synaptic Package Manager.  I
  also updated to 2.1.4 the same way.
 
 There are 246 pages on the wiki.  You could make it easier for us to
 help you by posting the URL of the one you used.
 
 You could also post your hal file, as two different people have
 asked.
 
 At least we know you are using halui now.  But unless this page:
 http://cvs.linuxcnc.org/cgi-bin/cvsweb.cgi/emc2/src/emc/usr_intf/halui.cc?graph=1
 is lying to me, halui.cc did NOT change from 2.1.3 to 2.1.4, and more
 importantly, it did not support analog until version 1.39, which
 is NOT included in the 2.1.4 release.
 
 You are going to have to give some details!
 
 Regards,
 
 John Kasunich
 
 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share your
 opinions on IT  business topics through brief surveys-and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users
 
# joypad.hal -- hal configuration file to move a cnc machine using a joypad

# [JOG]
# Components 

# We will use hal_joystick to read the axis value (float) for X Y Z, we will 
send these values to the 
# speed pin of a sim-encoder component, for X Y Z, this component outputs 
Phase-A and Phase-B signal, 
# just like a real quadrature rotary encoder. We will decode those signals with 
an encoder component for X Y Z
# and will send the result counts value to the axis jog pin for X Y Z.

# Load the hal_joystick component that creates joypad.axis.n and 
joypad.button.n pins
loadusr hal_joystick -d /dev/input/js0 -p joypad

# Load three encoder and three sim_encoder components
loadrt encoder num_chan=3 
loadrt sim_encoder num_chan=3 

# Create links between the axis pins and the speed pin of the sim-encoder for X 
Y Z
net velX joypad.axis.0 = sim-encoder.0.speed
net velY joypad.axis.1 = sim-encoder.1.speed
net velZ joypad.axis.3 = sim-encoder.2.speed

# Create links between sim-encoder Phase-A and Phase-B and encoder Phase-A and 
Phase-B for X Y Z
net XA sim-encoder.0.phase-A = encoder.0.phase-A
net XB sim-encoder.0.phase-B = encoder.0.phase-B
net YA sim-encoder.1.phase-A = encoder.1.phase-A
net YB sim-encoder.1.phase-B = encoder.1.phase-B
net ZA sim-encoder.2.phase-A = encoder.2.phase-A
net ZB sim-encoder.2.phase-B = encoder.2.phase-B

# Create links between encoder counts and jog counts for X Y Z
net countX encoder.0.counts = axis.0.jog-counts
net countY encoder.1.counts = axis.1.jog-counts
net countZ encoder.2.counts = axis.2.jog-counts

# Set parameter values
setp encoder.0.position-scale1
setp encoder.0.x4-mode TRUE
setp encoder.1.position-scale1
setp encoder.1.x4-mode TRUE
setp encoder.2.position-scale1
setp encoder.2.x4-mode TRUE
setp encoder.capture-position.tmax0
setp encoder.update-counters.tmax0
setp sim-encoder.0.ppr 0500
setp sim-encoder.0.scale1
setp sim-encoder.1.ppr 0500
setp sim-encoder.1.scale-1
setp sim-encoder.2.ppr 0500
setp sim-encoder.2.scale-1
setp sim-encoder.make-pulses.tmax0
setp sim-encoder.update-speed.tmax0

# Enable jog for X Y Z
setp axis.0.jog-enable TRUE
setp axis.1.jog-enable TRUE
setp axis.2.jog-enable TRUE

# Attach realtime functions to threads
addf encoder.capture-position servo-thread
addf sim-encoder.update-speed servo-thread
addf encoder.update-counters base-thread
addf sim-encoder.make-pulses base-thread



# [BUTTON-SAMPLES]

# Here are two examples on how to attach some functions to joypad buttons. We 
will use Halui pins for the 
# second example.

# Scale button 

# we set two buttons (1 and 0) to choose the jogscale value. Pressing button 1 
will set the scale to 0.01 
# while pressing button 0 will set it to 0.1.

# Components
# We will use a two values selector and a flipflop component 

loadrt mux2 
loadrt flipflop 

# Link between buttons and flipflop, flipflop will output TRUE when rising edge 
is detected on set pin, FALSE 
# when rising edge is on reset pin.
net button0 joypad.button.0 = flipflop.0.reset
net button1 joypad.button.1 = flipflop.0.set

# Link between flipflop and mux2, mux2 will output value mux2.0.in0 when 
mux2.0.sel is FALSE 

Re: [Emc-users] Joypad problem with version 2.1.4

2007-03-27 Thread John Kasunich
John Kasunich wrote:

I should proofread before I hit send, not after:

 If countX looks OK, then its time to look at the motion controller.
 show pin axis.0.jog will show you the jogging related pins.
 jog-counts should have the same value as countX.  jog-enable should
 be TRUE.  jog-vel-mode should be FALSE, and should be whatever you
 have set as the jog distance per count. 

The last sentence should read:

jog-vel-mode should be FALSE, and jog-scale should be whatever
you have set as the jog distance per count.

Regards,

John Kasunich

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] Joypad problem with version 2.1.4

2007-03-26 Thread Kirk
I just updated my system with the latest EMC 2.1.4.  Prior to that I had
installed a USB joystick controller and it worked fine.  After the
upgrade, the analog axes joysticks no longer work properly.  If I jog an
axis it continues in the same direction as started and does not stop
when the control is released.  Also the axis velocity is not
proportional to the joystick movement. It runs at the current programmed
manual velocity scaled by the override.

I ran the test specified in the wiki for checking out the joystick
controller using Hal Meter.  The Joypad works the same as it did before.
The analog controls output a zero in the neutral position and vary
between 0..1 as a joystick is moved.

Does anybody know what I am missing?  The joypad.hal file is the same
file that I used in version 2.1.3.

Thanks,
Kirk



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users