CAD CAM EDM DRO - Yahoo Group Archive

Re: [CAD_CAM_EDM_DRO] Windows timing subroutines, how do they work?

Posted by Les Newell
on 2005-07-25 14:58:54 UTC
Hi Alan,

Yup that is the one. With the realtime control of a PIC or G101 I
wouldn't bother with the circular buffer setup. The buffer is a good
solution to the problems presented by PCs but it is memory hungry and
presents some awkward problems especially when jogging. Art used it in
the G2002 because his whole system is based on that principal already.

You can do a lot with serial. If you get your front end to predigest the
g-code so you end up with simple move instructions and then send them
down the link you don't need that much bandwidth. A while back I made up
a couple of Hitach H8 based controllers for some CNC drills. Admittedly
they are only 2 axis but the serial bandwidth is pretty low. They have
run pretty much flawlessly for the last 12 months being used roughly 4
days a week in a local factory.

The biggest problem with doing your maths in the time domain is that it
is non linear. With my H8 based controllers I stayed with velocity for
all of the calculations including the final pulse generation. This is
how I did the pulser code:

<ISR start>
get axis velocity word
if it is -ve then set direction low else set direction hi
add to axis accumulator
if axis accumulator overflows output a pulse and inc/dec current position.
repeat for next axis...
<ISR end>

The ISR runs at a fixed frequency. If I remember correctly I used
something like 50kHz. This method works well if you are running several
axes from the same interrupt. It is however a lot more processor
intensive than using one timer per axis (assuming you have enough
timers). I do some DSP development work and am often tempted to have a
go at using one for motion control. One that I use runs at about 90MIPS
and a 32 bit multiply takes only 10ns, all for just over 8UKP in small
quantities. I use one to produce 6 channels of realtime synthesized
audio at 44kHz so 6 axes of movement at 400kHz wouldn't even raise a
sweat :-). The 144 pin QFP package is a PITA to solder by hand though...

Les

Alan Marconett wrote:

>Hi Les,
>
>I just looked, is that the mainfirmware.c file? I didn't see any code in
>G101. Yes, looks like some nice information on the transmission blocks
>there. I'll give it a long look.
>
>USB is very interesting, I want to be able to use it as well. Currently I'm
>inclined to use old RS-232; and just made a PIC board with buffers to drive
>4 axis of step/dir. Some of the PICs have USB, but I think it takes up a
>lot of the process time. The Rabbit (or Rabbit board) has USB. But since
>I'm doing PICs at work...
>
>So short "groups" or time segments are sent to the G2002. I suppose I could
>start to think about it that way. I currently just walk up/down in a ramp
>table, changing the time interval between steps. Sounds like I should be
>calculating the velocity (1/interval) instead; and working with that.
>
>I still have to get my head around generating VELOCITIES and time segments
>instead of counting steps at various time intervals.
>
>Thanks,
>
>Alan KM6VV
>
>
>

Discussion Thread

ibewgypsie 2005-07-24 06:41:06 UTC Windows timing subroutines, how do they work? Jack Hudler 2005-07-24 12:59:51 UTC RE: [CAD_CAM_EDM_DRO] Windows timing subroutines, how do they work? Jon Elson 2005-07-24 13:00:59 UTC Re: [CAD_CAM_EDM_DRO] Windows timing subroutines, how do they work? KM6VV 2005-07-24 13:14:20 UTC Re: [CAD_CAM_EDM_DRO] Windows timing subroutines, how do they work? ibewgypsie 2005-07-24 13:30:22 UTC Re: Windows timing subroutines, how do they work? Jim Peck 2005-07-24 14:45:43 UTC Re: [CAD_CAM_EDM_DRO] Windows timing subroutines, how do they work? Les Newell 2005-07-24 15:04:21 UTC Re: [CAD_CAM_EDM_DRO] Windows timing subroutines, how do they work? KM6VV 2005-07-24 16:46:14 UTC Re: [CAD_CAM_EDM_DRO] Windows timing subroutines, how do they work? notoneleft 2005-07-24 17:20:45 UTC Re: Windows timing subroutines, how do they work? Jon Elson 2005-07-24 20:00:49 UTC Re: [CAD_CAM_EDM_DRO] Windows timing subroutines, how do they work? Jack Hudler 2005-07-24 21:17:33 UTC RE: [CAD_CAM_EDM_DRO] Windows timing subroutines, how do they work? ibewgypsie 2005-07-24 22:04:15 UTC Re: Windows timing subroutines, how do they work? Mariss Freimanis 2005-07-24 23:41:25 UTC Re: Windows timing subroutines, how do they work? Jack Hudler 2005-07-25 00:45:30 UTC RE: [CAD_CAM_EDM_DRO] Re: Windows timing subroutines, how do they work? caedave 2005-07-25 02:23:24 UTC Re: [CAD_CAM_EDM_DRO] Re: Windows timing subroutines, how do they work? Les Newell 2005-07-25 02:23:26 UTC Re: [CAD_CAM_EDM_DRO] Windows timing subroutines, how do they work? Les Newell 2005-07-25 02:34:10 UTC Re: [CAD_CAM_EDM_DRO] Windows timing subroutines, how do they work? Fred Smith 2005-07-25 07:47:13 UTC Re: Windows timing subroutines, how do they work? Alan Marconett 2005-07-25 08:44:15 UTC RE: [CAD_CAM_EDM_DRO] Windows timing subroutines, how do they work? Jon Elson 2005-07-25 09:30:49 UTC Re: [CAD_CAM_EDM_DRO] Windows timing subroutines, how do they work? ibewgypsie 2005-07-25 10:01:52 UTC Re: Windows timing subroutines, how do they work? Les Newell 2005-07-25 11:02:16 UTC Re: [CAD_CAM_EDM_DRO] Windows timing subroutines, how do they work? Alan Marconett 2005-07-25 13:22:42 UTC RE: [CAD_CAM_EDM_DRO] Windows timing subroutines, how do they work? Les Newell 2005-07-25 14:58:54 UTC Re: [CAD_CAM_EDM_DRO] Windows timing subroutines, how do they work? caudlet 2005-07-25 19:46:24 UTC Re: Windows timing subroutines, how do they work? ibewgypsie 2005-07-25 21:19:36 UTC Re: Windows timing subroutines, how do they work? Jymmm 2005-07-25 22:29:38 UTC Re: Windows timing subroutines, how do they work? yahoo@h... 2005-07-26 02:10:13 UTC RE: [CAD_CAM_EDM_DRO] Re: Windows timing subroutines, how do they work? Mariss Freimanis 2005-07-26 08:15:13 UTC Re: Windows timing subroutines, how do they work? Mariss Freimanis 2005-07-26 08:19:33 UTC Re: Windows timing subroutines, how do they work? ibewgypsie 2005-07-26 10:36:48 UTC Re: Windows timing subroutines, how do they work? JitteryMonkey pic ibewgypsie 2005-07-26 10:48:27 UTC Re: Windows timing subroutines, how do they work? JitteryMonkey pic ibewgypsie 2005-07-26 11:08:39 UTC Re: Windows timing subroutines, how do they work? Andrey Lipavsky 2005-07-27 06:05:52 UTC Converting a rotary table victorlorenzo 2005-07-27 07:02:24 UTC Re: Converting a rotary table David Micklethwaite 2005-07-27 16:36:34 UTC Re: [CAD_CAM_EDM_DRO] Converting a rotary table cutsgems 2005-07-27 18:38:06 UTC Re: Converting a rotary table Andrey Lipavsky 2005-07-27 20:24:07 UTC RE: [CAD_CAM_EDM_DRO] Re: Converting a rotary table cutsgems 2005-07-28 08:54:39 UTC Re: Converting a rotary table Les Newell 2005-07-28 09:23:43 UTC Re: [CAD_CAM_EDM_DRO] Re: Converting a rotary table Andrey Lipavsky 2005-07-31 16:43:28 UTC RE: [CAD_CAM_EDM_DRO] Re: Converting a rotary table