i feel a trifle guilty posting here,as i’ve moved to using UGS. To my utter amazement, I can type commands in the middle of file execution and they are recognized. So I can change laser power on the fly.
I use code posted for the minigerbil test fire as a macro to make sure my alignment is good, then load a file of step and pause commands to draw the line. The proof of concept dot mode listed earlier in this thread got me going.
As was pointed out, the mini gerbil doesn’t do loops, so i wrote a short Octave (it’s free) program to write the gcode commands into a text file. Excel would work as well, I’m just not a fan of a thousand rows.
I’ve been assuming 320 micro steps /revolution and the ability to recognize a 4 micron (.004mm) step, and an 8-50 msec pause. i had expected 50microns/sec speed, but the file takes 90sec/2mm, (on UGS) which is about half that.
I had decreased the feed to F1, but still think the pause portions dominate the speed determination.
I am able to watch the melting of an alloy core silica fiber, and don’t see any obvious jerkiness, but the silica adds a thermal mass that slows things down.
The video was not an allowed format but i can send you a link if you’re really interested in strange mixtures melting inside a silica glass shell - way more limited interest than the code above, I’m guessing. 
==========
% program to create input for g-code dumb enough for K40
% with high res (320 microsteps per rotation stepper sticks)
% should be greater than .003 mm
% if stock K40, use steps greater than 6 microns
% input step length desired (deltax)
%step =input (" desired steplength, mm.“,“s”);
step =0.004
distance =0;
%fprint(“teststep”, step)
%Length=input (” desired scan length, mm.",“s”)
Length = 2.0
iter=int32(Length/step)
scantime=0.001
pause = 8 % pause length in milliseconds
junk=iterpause
velocity = 1000step/pause% microns/sec
scantime= junk/1000 % sec
%designate file to store output
filename = “K40scan.txt”;
fid = fopen (filename, “w”);
fprintf (fid, “$32=0 (allow firing while stationary) \n”);
fprintf (fid, “G91 (RELATIVE MOVES) \n”);
fprintf (fid, “F10 (Feedrate mm/s) \n”);
fprintf (fid, “M4 S150 (LASER ENABLED – power setting S is out of 1000) \n”);
for i= 1:iter;
distance = distance+step;
fprintf (fid, "G4 P0 ")
fprintf (fid, “%d “, pause);
fprintf (fid,”(PAUSE FOR P0 msec) \n”)
fprintf (fid, “G1 X +”);
fprintf (fid, “%d “, step);
fprintf (fid,”(leave laser on during translate) \n”);
endfor
fprintf (fid, “M5 (laser off) \n”)
fprintf (fid, “$32=1 (only allow firing while in motion)\n”);
fclose (fid);
=======
(output gcode looks like this:)
$32=0 (allow firing while stationary)
G91 (RELATIVE MOVES)
F10 (Feedrate mm/s)
M4 S150 (LASER ENABLED – power setting S is out of 1000)
G4 P0 8 (PAUSE FOR P0 msec)
G1 X +0.004 (leave laser on during translate)
G4 P0 8 (PAUSE FOR P0 msec)
G1 X +0.004 (leave laser on during translate)
…… hundreds of times
G4 P0 8 (PAUSE FOR P0 msec)
G1 X +0.004 (leave laser on during translate)
M5 (laser off)
$32=1 (only allow firing while in motion)