400 DPI is overkill, and not likely possible with the diode you’re using. 318 is possible, but that’s assuming really good clean optics.
One of the larger limiting factors with GCode based machines is the way the firmware handles the code and motion planning.
GCode controllers have settings for acceleration and max speed. If you tell the controller to run at 9000 mm/min (150 mm/sec) it takes it some amount of time to get up to that speed, and the same amount of time to slow back down again.
If you draw a simple rectangle, there are basically 5 GCode instructions:
- Move to the first point
- Laser to the second point
- Laser to the third point
- Laser to the fourth point
- Laser back to the first point
Each of those points is a sharp corner, so the laser has to slow down basically to a full stop, change direction, speed up again on the next line, and so on. The speed curve for one of those sides might look like the blue line shown here:
Internally, the controller puts all the GCode moves into a buffer called the plan buffer, so it knows what’s coming and can move accordingly.
If you’re driving on a flat highway in broad daylight with great visibility, you’d probably drive much faster than if it was pitch black out and raining, because you can see a lot further, and can see upcoming turns and hazards more easily. You usually drive at a speed that gives you time to stop if something pops into view.
The laser works the same way, and the planning buffer is how it does it. That buffer contains a bunch of upcoming moves, and the controller goes through them to figure out when the corners are coming, so it doesn’t go so fast it can’t stop in time.
Images end up being lots of very short moves in the planning buffer, and the buffer is not very long - usually about 32 moves, maybe a bit more depending on the controller.
400 DPI means each GCode instruction could be as short as 0.0635mm. 32 of those back to back is just a touch over 2mm. It’s very likely that your laser will need more than 2mm to get up to 150 mm/sec, but since that’s as far ahead as it can “see”, it has to limit the speed to however fast it ends up after 2mm of acceleration.
If it goes any faster, and the next move added to the buffer is a full stop, it wouldn’t be able to stop in time.
In practice, the shading ends up giving some spots that have longer dots or spaces, so in those parts the laser can see a little further ahead, and will run faster, but when you hit parts of the GCode that are just lots of tiny little dots, it has to slow down again.
If you can post your $$ settings for the controller you have, and post what it says when you type $I (info), I could tell you how big a planning buffer you have, and how far ahead your machine can see.