Polarsandtisch

https://github.com/V1EngineeringInc/MarlinBuilder/suites/1728007278/artifacts/32713996

This version should home X and Y. You may need a github account to see it (it is from our nightly builds).

This is the post where I worked out how to convert a thetarho (thr) file into the X, Y gcode for a scara table:

In that post, there is a link to a website, repl.it where I posted some code that will run in the web browser. You can take a thr file from sandify.org and upload it to that site, run the code, and download a gcode file that should work for your machine. It assumes 0,0 is fully extended, and up.

repl.it

The other arbitrary part is how many motor rotations is one “Unit” in Marlin. Marlin thinks everything is in mm, but we are moving a motor in an angle. In the script, I set MOTOR_X_UNITS_PER_ROTATION for each motor to 6. What this means is that in the gcode output, if I send the motor from 0 to 6, it will do one full rotation. For the elbow, I should stay between 0 and 3, since it only goes one half of a rotation.

Marlin will convert that arbitrary unit into a count of steps to send to the motor driver. This is accomplished with the configuration variable DEFAULT_STEPS_PER_MM. You can change this on a running system by sending M92 X<xsteps/unit> Y<ysteps/unit>.

I’m going to make some guesses here:

  • I’m assuming a 1:1 ratio from the motor shaft to the arm angle.
  • I’m assuming you have drv8825s in the RAMPS
  • I’m assuming you have all the jumpers installed underneath them (1/32nd microstepping)
  • I’m assuming you have 1.8deg steppers, or 200 whole steps/rotation.

200 steps/rotation * 32 microsteps/step * 1rotation/6units = 1066microsteps/unit

So the command to set that would be: M92 X1066.7 Y1066.7. To save that, you would send M500.

Once that is set, a command like: G1 X3.00 F60 should move from 0 to 180 degrees in 3 seconds.

If we get that far, we are doing really good. At that point, you should be able to run this file.