CAD CAM EDM DRO - Yahoo Group Archive

Re: sinusoidal movement in a stepper

Posted by hal_eckhart
on 2004-04-23 05:23:54 UTC
--- In CAD_CAM_EDM_DRO@yahoogroups.com, Alan Marconett KM6VV <KM6VV@a...>
wrote:

> Isn't rotating through an arc, or rolling a circle along a line a
> sinusoidal process, or something like that?
>
> Anyway, You could plot a sin function in a spread sheet, and output the
> points you need as well. These points can then easily be converted to
> Gcode.
>
> A program could also be written in 'C' or whatever to generate a set of
> coordinates to rotate the stepper to. Particularly easy if no
> acceleration/deceleration was needed.

Just to be completely geeky, here's how it might look in PHP with HPGL
output. It's probably possible to do the same thing more elegantly in G
code. And the only reason for plotting the forward movement would be
to trick the controller into slowing down at the top and bottom of the wave.

<?php
$rad = 1; // sine height
$seg = pi()/64; // segment resolution
$res = 1016; // steps per inch
$cyc = 8; // cycles

$c = 0;
for ($i = 0; $i <= $cyc*pi()+.001; $i += $seg)
{
print "PD$c " . round(sin($i)*$rad*$res) . ";\n";
$c += 24; // forward movement
}
?>

Hal Eckhart <http://www.casaforge.com> <http://www.metalgeek.com>

Discussion Thread

aksunavi 2004-04-21 09:56:25 UTC sinusoidal movement in a stepper theowyn 2004-04-21 11:12:42 UTC Re: sinusoidal movement in a stepper hal_eckhart 2004-04-21 16:02:34 UTC Re: sinusoidal movement in a stepper Jon Elson 2004-04-22 10:51:58 UTC Re: [CAD_CAM_EDM_DRO] sinusoidal movement in a stepper Alan Marconett KM6VV 2004-04-22 18:51:47 UTC Re: [CAD_CAM_EDM_DRO] sinusoidal movement in a stepper hal_eckhart 2004-04-23 05:23:54 UTC Re: sinusoidal movement in a stepper