Project

General

Profile

Lasercutter power calibration

Added by peteruithoven about 10 years ago

I was discussing calibrating the power of the lasercutter and I came up with an idea to check the result of the power setting using plexiglass. I understand that even the material itself is going to have it's impact and that the influence decreased with the distance from the focus point.

I made the following laserscript to experiment with:

var lineLength         = 3;
var numLines        = 20;
var startPower         = 1;
var endPower         = 100;
var speed             = 0.01;

var powerStep         = (endPower-startPower)/(numLines-1); // power over x-axis

echo('This is a test pattern writen in Laserscript. More info:');
echo('https://github.com/t-oster/VisiCut/wiki/LaserScript. ');
set("speed", speed);
for (var i = 0; i < numLines; i++)
{
    var power = (numLines == 1)? startPower : startPower+i*powerStep;

    set("power", power);
    var x = lineLength*i;
    var y = 0.1*i; // we vary this slightly to clarify lines and to circumvent a VisiCut bug
    move(x, y);
    line(x+lineLength, y);
    echo(leadingZeros(Math.round(power*100)/100,3));
}
echo('');
echo('SETTINGS: ');
echo('numLines: '+numLines);
echo('startPower: '+startPower);
echo('endPower: '+endPower);
echo('speed: '+speed);
echo(' ');

function leadingZeros(value, numZeros) {
    var s = value+"";
    while (s.length < numZeros) s = "0" + s;
    return s;
}

My result:

It also seems to show that the power decreased after it's start, which explains why a dot mode is useful.