CAD CAM EDM DRO - Yahoo Group Archive

PC Control of Motion

Posted by Stan Krumme
on 2000-08-31 21:45:52 UTC
Hello, my name is Stan and am a new member to this board. I have
been reading the board off and on for past 6 months. I find myself
working on the design of a motion control system based on a PC (for
the fun of it), probbably PIII 450 Mhz or better. I read from this
site and others, and seen the shareware code like CNC979. There
seems quite a bit of discussion on controling stepper motors by
sending step / dir pulses out a PC parallel port to control "black
box" stepper motor controllers.

My background is computer hardware/software design. The CNC seems
like a lot of fun, and I am considering a retrofit to a Millrite
vertical milling machine on 3 axis. Purpose of this post is to get
any comments if others have implemented this or a similar approach,
and any pros or cons.

1) Will run motion control in a DOS environment. Windows would not
given enough contol in regards to timing, without much more expensive
plug-in boards. In DOS I own the machine, so to speak. In windows,
it tolerates me. I will run an RTC at, maybe 40 khz, providing 25 us
per motion increment (loose numbers, but in the ballpark). Main
program will compile in BAsic Pro 7 (considerable instrumentation
programming experience). Interrupt drivers will be MASM assembly
language.

My have windows on system, using dual boot option for DOS. Real time
clock interrupts from reprogramed RTC on PC motherboard or PIC RTC
board.

2) Will use all PCI cards in this system, so that I/O will not
SSSSLOW it down (at these interrupt rates), ISA is slow.

3) Stepper motors driven by 2 bipolar current amplifires, current
set by 2 D/A ladder circuits (per motor). D/A ladder circuits driven
by parallel input/output PCI interface board in PC. These boards are
easy to find, up to 96 bits out and not too expensive (Computer
Boards Inc or IoTech for instance) The program controls the bipolar
current to the stepper windings. I could use a Analog output card,
but its expensive and I do not need 12 or 16 bits resolution. 6 or 8
bits should really be enough here. These motor winding currents are
updated at 40 khz (or so). The steppers would be running more in a
microstep mode. I would expect little problem from mechanical
resonance.

3.5) CW and CCW Motion limits and home position switches run back to
the PC thru the parallel interface. Panic STOP also. Panic stop
also kills current to stepper motors (hardwired).

4) Should be able to easly maintain a VGA text screen with XYZ
positions and velocities, current program step. Would have to see if
graphic mode OK time wise.

5) Would avoid pesky IO devices when running these fast interrupt
rates. Keyboard keys like cap_lock and scroll_lock lock interrupts
out for 2ms (no no no!) The g code file to be loaded to EMS, XMS or
ram disk. Command lines to be preparsed when first loaded. Will not
run hard disk during motion control.

6) Program control during motion from small control panel run by
micro, propably a PIC F877. Will communicate with PC via serial
RS232 for such items as start/stop, xyz jogs, jog speed controls.

PANIC BUTTON SHUR DOWN, a big heavy switch I can hit without breaking
it (I can't imagine why)

7) The machine I am writing this on (slow PIII) peforms trig fuctions
rather quickly, (floating point ops like SIN or COS in ~1 us). This
puts me in the ball park to calculate and control machining ARCS on
the fly! Calculated for each 25 us motion update. The straight
lines are so much easier time wise.

I like this approach.

<A> It will be rigidly time locked by the RTC interrupts.

<B> It will provide smooth motion from the stepper motors.

<C> Ramp up /down & other fine points to be provided by
properly written code

<D> A Pentium III can do this, the horsepower is there.

Has this approach been implemented by anyone? What has been
their results?


Thanks for reading this long winded post,
Stan

Discussion Thread

Stan Krumme 2000-08-31 21:45:52 UTC PC Control of Motion ballendo@y... 2000-09-01 02:15:29 UTC PC Control of Motion ballendo@y... 2000-09-01 12:01:35 UTC Re: PC Control of Motion