CAD CAM EDM DRO - Yahoo Group Archive

Re: [CAD_CAM_EDM_DRO] Re: Repost: Re: Lost Steps => time for microprocessors!

Posted by Jon Elson
on 2000-08-31 15:36:16 UTC
Ian Wright wrote:

> Hi,
>
> Is the problem also one of 'key memory'? - the way PCs remember the
> number
> of key presses and execute them all sequentially. If the jog button is
> held
> down, the keyboard will auto-repeat an unknown number of times and
> continue
> to execute these repeats after the key is released (unless it is
> somehow
> told otherwise). This will then give an almost arbitrary additional
> movement
> to the stepper (or presumable servo as well).

No, in fact, the IBM PC keyboard does not work that way, at all!
That behavior is SIMULATED by the driver in the operating system,
and is completely different behavior from the actual functions of
the keyboard and the motherboard hardware below the 'surface'.
What actually happens is that any time a key is moved (down OR
up) a message is sent that key # 123 was just (pressed or released).
Then, software in the OS interprets this message, and converts it to
some more useful response, depending on what the application software
tells the OS it wants. The EMC GUI code puts the driver in a very low
state, so it can get both the key presses and the releases. It does
not use the auto-repeat mechanism, so a continuous jog is caused
when the key is pressed, and stops when the key is released.
This behavior is quite distinct from getting a stream of apparent
key presses, which would lead to mayhem in incremental jog with
a 15 Hz key repeat rate and a large jog increment.

So, in EMC, the auto repeat has no effect at all. What is going on is
that
the GUI only picks up the keyboard state so many times a second.
If it is set to 5 Hz (.2 sec), then all continuous jogs will be in units

of .2 seconds of motion, roughly. And, that is TOO rough! So, I
turn it up a bit. .1 second is a lot better, and on a 100 MHz Pentium,
I worry about overloading the system.

If you look at the GUI code (either in Xemc or TkEMC), you will see
all this stuff about handling key up events in the jog code.

Jon

Discussion Thread

Jon Elson 2000-08-31 15:36:16 UTC Re: [CAD_CAM_EDM_DRO] Re: Repost: Re: Lost Steps => time for microprocessors! Ian Wright 2000-09-01 01:23:32 UTC Re: [CAD_CAM_EDM_DRO] Re: Repost: Re: Lost Steps => time for microprocessors!