CAD CAM EDM DRO - Yahoo Group Archive

Re: [CAD_CAM_EDM_DRO] delay time

on 2001-11-13 11:11:45 UTC
Hi S.,

Alan here. You didn't mention your programming language ('C'?), but
'C', Pascal or BASIC should work similarly in this regard. is "delay()"
a language function? then it should be constant. If it is your own
function, then you need to "calibrate" it:

If you know how to "read" the DOS or BIOS time in your program, then
read the time before and after a "delay(10000) statement, and re-compute
the delay count needed. Your program can "ask" you what count you need.


ADVANCED:
Can you access the DOS clock:

mov bl, es:[0x46C] // Low byte of system timer
mov si, es:[0x46D] // Mid word of system timer

And combine with Timer value:

mov dl, 0x40 // Data port for timer
in al, dx // Timer chip LSB
mov cl, al // Save in CL
in al, dx // Timer chip MSB
mov ch, al // Move in CH

These code fragments are in assembly, they can often also be done from
the high level language. The idea is to get a "clock" of high
resolution, combining them to make a 5-byte "time" value. Then you get
the first time, calculate the "terminal time", and watch for it. No
calibration necessary.

I think Dave Kowalczyk came up with the original (HITIME.ZIP) in Pascal.

Hope this helps!

Alan KM6VV
P.S. Thanks for the kind words on N.Y.


sdiken@... wrote:
>
> I have a small problem. I am sending signals to parallel port
> 1010101 and step motor is turning due to signals. I write a program
> and the motor is turning normaly. But if I use the computer of my
> lecturer in university, motor is turning app. 10 times speed. I thing
> frequency of pulses are in my computer lower than computer of the
> lecturer. It mieans "delay(1000)" by my PC = "delay(10000)" by other
> PC. How can I regulate it? Thanks
>

Discussion Thread

sdiken@r... 2001-11-13 00:44:02 UTC delay time Sven Peter 2001-11-13 06:16:10 UTC Re: [CAD_CAM_EDM_DRO] delay time ccs@m... 2001-11-13 07:44:13 UTC Re: [CAD_CAM_EDM_DRO] delay time Alan Marconett KM6VV 2001-11-13 11:11:45 UTC Re: [CAD_CAM_EDM_DRO] delay time ballendo@y... 2001-11-13 16:13:59 UTC Re: delay time