CAD CAM EDM DRO - Yahoo Group Archive

Re: [CAD_CAM_EDM_DRO] Quadrature Decoder - I asked for the wrong thing

on 2002-03-29 11:13:44 UTC
Hi Joe,

What controller software are you using? I believe Dave has recently
added it to his TurboCNC, or you could add the code (source available)!

I have posted several emails (pendant) on the connections of a 5V panel
shaft encoder (you don't need any other parts!) to the gameport
(joystick) interface of the PC, as well as sample code to read the
joystick. I have also posted pix of the one I made up and use with my
controller program.

BUT, that's not what you asked! I am not emulating key strokes, to do
that, one would need an "OR" gate, connected to the interrupt pin of a
parallel port. Then an ISR (interrupt service routine) could read the
changed status of the A & B lines, and "decode" the quadrature into
inc/dec steps. From the steps, "scan codes" are made up an inserted
into the keyboard buffer. *Software required* !

This hasn't been done yet, at least at the hobby level. Dan M's DRO
board (I bought one for some experiments) could lighten this effort,
although I don't recall it having the necessary (IMO) interrupt line.

In my software, I only "read" the shaft encoder when in a "Pendant mode"
(no switch to turn it on/off). A software state machine "walks" through
the states read from the encoder (CPS, not 4X). Every time I complete
a "cycle", I call my "relative move" routine to jog the selected axis in
the desired direction.

HTH

Alan KM6VV


onecooltoolfool wrote:
>
> I was in the middle of building Mariss' quadrature decoder with the
> 4077 chip when I realized that this won't do what I want.
> I really need to take the quadrature signals from the encoder and
> send them to the PC as jog signals from the keyboard.
> If I did what I wanted to initially, the controller would loose track
> of the machine coordinate system since I would be sending step/dir
> signals without the controller's knowledge.
>
> Can anyone point to the "way" to emulate keystrokes from quadrature
> signals? I plan on having a switch that will enable/disable the
> keyboard in favor of the pulse generator during jogging. This way
> the control stays "in control"
>
> Thanks for the help.
> Joe V.

Discussion Thread

onecooltoolfool 2002-03-29 07:52:27 UTC Quadrature Decoder - I asked for the wrong thing Jon Elson 2002-03-29 10:57:18 UTC Re: [CAD_CAM_EDM_DRO] Quadrature Decoder - I asked for the wrong thing Alan Marconett KM6VV 2002-03-29 11:13:44 UTC Re: [CAD_CAM_EDM_DRO] Quadrature Decoder - I asked for the wrong thing