
April 8th, 2012, 12:30 PM
|
|
Registered User
|
|
Join Date: Dec 2009
Posts: 20
Time spent in forums: 3 h 35 m 4 sec
Reputation Power: 0
|
|
|
Draw Circle
Hello All
I have designed an XY table with two stepper motors. One stepper motor controls the x -axis and the other controls the y –axis. I simply send a command to the parallel port which in turn sends the command to the stepper motors. Each command sends one step. One hundred steps will move the x or y axis 1mm. That is 100 steps per mm. I know how to send enough steps to draw straight lines. A line 50mm long will mean 50 x100 =5000 steps. Eg: …for 1 to 5000 do PORT[$78] := #4 . This will send 5000 steps to the X motor and so on. However I do not know any circle or ellipse algorithm. Could anyone help me with some Delphi code to send steps for a circle? I shall appreciate all help.

|