To further reiterate what Bernd and Alex said - and to add, you can’t go wrong doing a power/speed test on any new material, especially on a new machine with a non-standard configuration.
‘K40’ is a general type, not a make or a spec, in the same way ‘3D printer’ is. Typically an A4 bed with a 40W tube, but can have smaller or larger bed and lesser or more powerful tube (but rarely more powerful), a wide range of mirror, lens, air, stepper, drive setups, but all have the same basic PSU and panel - depending on variant. Some are assembled well and with good alignment and tolerances, some aren’t. Treat it like you were doing a QC check. Everything - screws, pinions, earth straps, connectors, belts, gantry, rails (especially those 'shower door white nylon in an aluminium channel).
Assume 30W at the outside for real world power.
Update grbl, if thats what you are running. If you are up to it, completely recompile it on your machine after you have it up and running properly. Use Awesome Tech’s source for a compiled version, not one off the net.
.
Smoothieware on the Mini Gerbil is a sound option, but doesn’t, to my knowledge, support ‘cluster mode’ of LB, which is a pity. It is the best non-DSP firmware for the K40 on STM. It also has the advantage of inline firmware changes, real-time parameter changes right down to pin level.
Great website for this subject: Testing Mini Gerbil Firmware – Jim's Embeddedtronics
Jim has a great site with real-world problems and solutions on replacement firmware on K40s.
But, walk first - if you’re happy that the machine is working fine - stops, slop, mirrors, motors, LPSU, earthing, supply, signal wires and that you’ve calibrated your PWM to set the maximum power you want to reach - then make a materials test file.
@Rick has written a thorough how-to.
Start somewhere in the ballpark - look at some posts of K40s engraving acrylic - and work your way adjusting until you have an acceptable image.
For your machine have only a very little air power, and start with a speed of 100mm/sec.