CAD CAM EDM DRO - Yahoo Group Archive

XY joystick jogging

Posted by Doug Fortune
on 2001-04-03 17:34:37 UTC
Tom Eldredge wrote:

> Yes, the digital inputs on the game port are very usable.

agreed

> Have you experimented with fast PC's (over 600 mhz) and the potentiometer
> based control using the game port? I was not able to find jog sticks that
> would do what I wanted with fast PC's so I gave up on using that method of
> jogging. It worked fine, on some of my PC's and not on others.

As I understand the problem (fast PC's being unusable for the joy sticks)
is actually not a problem at all with the hardware - its the software
algorithm that is used in the particular program you are running.

There are two different algorithms, and the 2nd one is flawed (or at least,
the results are not comparable across machines - ie develop software
on a slow one, same code no longer works similarly on a fast one):

< This is On Topic, as the eventual result will be usable joysticks for
cnc control input >

good method:
- the resting state of the (four) potentiometer bits are 1
- write to port (say) 201h with anything to start off the 558 timer on
the game adapter, which flips the bits to 0
- keep reading port (say) 201h, and when the bit re-flips back to
1 note the time it took (various methods)
- wait until all four bits are 1 (and record their times)

Finally, the times are (almost) linearly proportional to the
resistance value of their respective potentiometers

bad? but easier method:
- trigger the port (write to port 201h)
- sit in a busy-loop, incrementing a counter every loop
- when the bit flips back to 1, record that counter value

As you can obviously see, the 2nd method is not machine-speed
independent, presumably leading to the sort of problems you are
seeing on a faster machine (especially if certain 'values' are hard-
coded into the program). However, its just the program, not the
hardware that is the problem.

Hope this clears up the issue.

> I was looking for something that could be standardized. The digital inputs
> on these ports are standard, however, and handy, I agree.

I must agree again!

Doug Fortune
http://www.cncKITS.com

Discussion Thread

Doug Fortune 2001-04-03 17:34:37 UTC XY joystick jogging Alan Marconett KM6VV 2001-04-03 18:31:21 UTC Re: [CAD_CAM_EDM_DRO] XY joystick jogging Tom Eldredge 2001-04-04 07:33:08 UTC Re: [CAD_CAM_EDM_DRO] XY joystick jogging Brian Pitt 2001-04-04 12:14:07 UTC Re: [CAD_CAM_EDM_DRO] XY joystick jogging Alan Marconett KM6VV 2001-04-04 15:44:08 UTC Re: [CAD_CAM_EDM_DRO] XY joystick jogging Tom Eldredge 2001-04-05 03:51:01 UTC Re: [CAD_CAM_EDM_DRO] XY joystick jogging