evil-mad / EggBot

Software for The Original EggBot
GNU General Public License v3.0
287 stars 140 forks source link

Add new "XM" command for mixed-axis stepper moves #29

Closed oskay closed 9 years ago

oskay commented 9 years ago

Feature request: Add a new command, that simplifies use of the EBB in machines that have mixed-axis geometry, such as H-Bot and CoreXY.

In machines with these and similar geometries, the rotation of a single stepper motor causes a translation of the machine's end effector in a direction diagonal to the machine's cartesian axes — i.e., in the ± (X + Y) or ± (X - Y) directions. This is a well-understood type system, and is usable as-is with the EBB. However there are certain circumstances, such as during initial setup and test, where it is convenient to be able to issue an EBB command to move the machine directly alone its cartesian axes.

I would propose to add the following command to the EBB command set: "XM,<move_duration>,<axisA>,<axisB><CR>"

Executing this command would be equivalent to executing: "SM,<move_duration>,<axis1>,<axis2><CR>", where <axis1> = <axisA> + <axisB> and <axis2> = <axisA> - <axisB>

@EmbeddedMan, I have assumed that this is straightforward, and could be done by (insert hand-waving here) having the XM command internally call the SM command. If it is not straightforward — for any reason — please say so. :)

EmbeddedMan commented 9 years ago

Windell - that seems very straightforward. I'll try to get it in this weekend. Do you have a way of immediately testing that the new command is working properly?

*Brian

On Fri, Aug 28, 2015 at 1:12 PM, Windell Oskay notifications@github.com wrote:

Feature request: Add a new command, that simplifies use of the EBB in machines that have mixed-axis geometry, such as H-Bot http://www.multimechatronics.com/build_a_h-bot.php and CoreXY http://corexy.com.

In machines with these and similar geometries, the rotation of a single stepper motor causes a translation of the machine's end effector in a direction diagonal to the machine's cartesian axes — i.e., in the ± (X

  • Y) or ± (X - Y) directions. This is a well-understood type system, and is usable as-is with the EBB. However there are certain circumstances, such as during initial setup and test, where it is convenient to be able to issue an EBB command to move the machine directly alone its cartesian axes.

I would propose to add the following command to the EBB command set http://www.schmalzhaus.com/EBB/EBBCommands.html: "XM,,,"

Executing this command would be equivalent to executing: "SM,,,", where = + and = -

@EmbeddedMan https://github.com/EmbeddedMan, I have assumed that this is straightforward, and could be done by (insert hand-waving here) having the XM command internally call the SM command. If it is not straightforward — for any reason — please say so. :)

— Reply to this email directly or view it on GitHub https://github.com/evil-mad/EggBot/issues/29.

oskay commented 9 years ago

We can certainly test it on a WaterColorBot, for example.

Also: Awesome, thanks!

EmbeddedMan commented 9 years ago

OK, new version of EBB Firmware is now up: https://github.com/evil-mad/EggBot/blob/master/EBB_firmware/Releases/app/EBF_v230.zip?raw=true

Give it a try, and see if the XM command works as you intend it. If so, let me know, and I'll close the issue.

*Brian

On Fri, Aug 28, 2015 at 1:37 PM, Windell Oskay notifications@github.com wrote:

We can certainly test it on a WaterColorBot, for example.

— Reply to this email directly or view it on GitHub https://github.com/evil-mad/EggBot/issues/29#issuecomment-135856144.

oskay commented 9 years ago

I've uploaded this firmware and tested it. So far as I can tell, everything is working correctly. The scaling is a bit counterintuitive on a traditional cartesian machine, but it's certainly good enough to go. I'd recommend closing this as complete.

I've noted that support for CoreXY (and similar geometries) has been a factor for people to choose between different controller boards-- so this is a very nice feature to have!

EmbeddedMan commented 9 years ago

Excellent!