#XYUV configuration - is distance between carriages known to Marlin?

1 messages · Page 1 of 1 (latest)

mighty fjord
#

I have XYUV cutter driven by marlin. All fine - i feed g-code from SD, or directly stream from PC, all is working.
But i also regulate output power (using heated bed pins, aka "spindle power") using G-code.
Problem arrives when carriages go in very different ways and power is set statically in g-code - at maximum distance power is not enough, at minimum - it's too much.

G-code uses relative (G91) coords (with absolute coords could write script to calculating power coefficients and rewrite g-code).
Idea - if current absolute coords are known to Marlin (i think yes - because i can "go home" without any endpoints after cut) - then maybe Marlin can manipulate preset spindle power using distance between them as multiplier?
In other words, if minimum distance is 1m and maximum 2m - then at minimum distance it will use "M3 S50" preset in g-code, but at maximum distance it should use "M3 S100" instead.

I doubt that such multiplier is already in code, but maybe someone can point me to easy method to get (absolute) coordinates at runtime and i could try to modify spindle power. Thanks

near lichen
#

It sounds like this should be handled by the G-code, setting the power needed for the given situation, assuming the cutting program is planned and known in advance. Adding such logic to Marlin would entail a relatively complex new feature.