CAD CAM EDM DRO - Yahoo Group Archive

Re: Writing G code to stepper software

Posted by James Eckman
on 1999-07-02 00:10:00 UTC
Been there, done that.

1. OS
For the simpliest possible program use DOS. Windows 3.1 as an add on is
sort of OK if you really want a graphics environment to display stuff
in. Avoid 95, 98 and NT unless you're a guru or a masochist. If your
good at programming in Linux, you probably don't need this information.

2. Minimum hardware
Parallel port and an AT computer, sorry XT and PC fans! For timing I
recommend hijacking the 1kHz timer on the second timer that all ATs
have, though in reality any consistent method of sending timing pulses
will work so long as you can tweak it easily. Some stepper drivers
capable of running your rig with HARDWARE limit switches. You can do OK
running steppers open loop if you don't go too crazy with speeds or
feeds.

3. Steppers
Understand the uglies of steppers. As you send faster step rates to your
system there will be ranges where you might lose steps. I seem to
remember a site that explained all this.

4. Math
You can get all the formulas that show you how to determine XYZ
coordinates from a good computer graphics book. It's probably also on
the web somewhere.

5. G codes
You don't have to program them all initially, start out with the
straight moves and setting feed speeds first and add the other goodies
in later.

If I had some free time for this I wouldn't mind hacking on this but I'd
rather be in the shop since this is too much like work!

Last but not least, don't strain your eyes! Plagiarize! I suspect big
chunks of the EMC project could be extracted for this purpose and it is
a valuble public resource. Also the current writer of Stepster has
generously put his code up so that you can see it. These are two
examples of mostly working code that you can examine.

Jim Eckman
Designer of laser machining gear, robotics and also embedded systems
programmer. Also an amateur machinist and woodworker.

Discussion Thread

James Eckman 1999-07-02 00:10:00 UTC Re: Writing G code to stepper software