Send random command through carbide motion to move to point?


(Ryan Detzel) #1

Maybe there is a way to do this already. I’m putting a square corner where zero is that I’ll align every piece and probe but right now I have to boot up the machine, home it (top right) then job it all the way to that corner and try to line it up with that probe. Ideally, since the square and probe will always be in the same position I save this position and have a button or command automatically move there to speed up setup. Is there a way to do this with motion, basically tell it to goto x,y,z? Is there a way I can “send” this command in from an external app so I can make a physical button do this?


(Nathaniel Klumb) #2

Assuming you’ll already have your (0,0,0) point set, it sounds like you’re talking about something that in g-code would be:

G0X0Y0Z_

G0: Rapid positioning (i.e. quick moves, not cutting)
X0Y0Z_: Coordinates of where to move, fill in the blank for Z with something safe.

Personally, I’d likely just do “G0X0Y0”, leaving the Z axis untouched. If you do use a non-zero Z, it obviously would depend on what units you’re using (millimeters, G21, or inches, G20), and I’ve not checked to see whether that’s sticky/stored or needing to be sent each time. (You’ll see it at the top of g-code files for the obvious reason.) If you’re just going to X0Y0, zero is zero regardless of units. :smile:

You should be able to simply click to the the MDI tab and enter that one line.

If manually entering one line is easy enough, that should do it. As far as sending it to Carbide Motion from an external app (or a nice big zero button configured as a USB HID and backed by an AutoHotKey script), I’m not confident that is possible without excessive bodging. To do something similar with most well-behaved Windows apps, I’d send hotkeys to interact with the UI to get to the right spot and input widget, then send the keystrokes to type in my input, but I don’t think Carbide Motion’s UI is designed and implemented to the level that would require. (I say that because I’ve found myself forced to use the mouse. The mouse!) While it’s always possible to bodge something together in spite of an incomplete UI (e.g. via mouse moves and clicks), it inevitably makes things brittle and will glitch at the most annoying moments. One six or eight character line of g-code manually entered is what I’d suggest as the best option with Carbide Motion.

( In the desktop PC applications I write, every menu, field, option, button, or other UI widget must always have hotkeys defined. As a design constraint, my UIs must be 100% usable by keyboard without any mouse input at all and without any counting of how many times you hit tab or whatever. That makes them much easier to manipulate with tools like AutoHotKey, and it also makes them much more compatible with accessibility in mind. Alas, I have yet to become emperor of the world, so not everything in life complies with my design constraints. :joy: )


(Ryan Detzel) #3

Awesome, I guess pasting in one line isn’t bad or I can use something like textexpander. I do want a button though, one step at a time. :slight_smile:

Since motion and create are free they should considering opening sourcing them, I think they would turn into some amazing tools if they did that. I wonder if it’s worth trying out different gcode senders…


(Nathaniel Klumb) #4

Now that I think about it (not having had breakfast or lunch today), doesn’t the Current Offset (X and Y) option on the Rapid Positioning tab go to the defined (0,0)? (I use the MDI tab to go to other-than-(0,0) all the time, hence it being in front of a pages-deep button in my mind.)

I’m going to end up SSHing to my Shapeoko and just doing everything in vi… emacs… pico… mc? :rofl:


(Ryan Detzel) #5

I’m unclear what that does, it sounds like it should do what I want but I have yet to try it. Will try tonight.

If it’s running on a mac it would probably be easier enough to write javascript to control everything from command line.


(Kyle Hardin) #6

Yes that is what Current Offset does in my experience. Very handy!


(Stephen Gullage) #7

When I set up multiple jigs on the wasteboard (currently have two) I record the absolute positions on a post-it. Then when I need to go to those positions again, I use G53. for example, to go to my two current jigs, I use either

G53 X-820 Y-355 Z0
or
G53 x-738 Y-668 Z0

This moves the router to the exact spot I created my jig, plus moves the router to the top of the Z so it doesn’t hit anything on the way.


(Chris) #8

once you set your 0,0 in x & y cM will remember it relative to the home position. Start CM, home the machine, open JOG, Open rapid Position, click on go to current offset.

if using MDI I input

G1 X0 Y0 F2000

I dont rapid when just starting. ialways have something in the way.


(Ryan Detzel) #9

okay, that works, just horrible documentation. :-/ . Thanks, this will work for now as long as I’m using the corner jig.


(Neil Ferreri) #10

It’s standard gcode.
Most of what grbl handles is explained here.
Exceptions, additions, and clarifications can be found here.
I don’t use CM, but looks like this button will do what you want (source):


This explains it further.


(Ryan Detzel) #11

Yeah, the gcode I get, I’m saying CM doesn’t have great docs on what that button does. Even reading it now it’s unclear what current offset means, even the docs say “last know X & Y offset from home position” where offset means last known zero position. Maybe I’m just not up with the terminology yet. :slight_smile:


(Neil Ferreri) #12

When you set zero, grbl stores that location as a distance from home (limit switches). That is the offset. You can see the offsets that are stored is you send $# to the controller.
I agree that button could be named something clearer, though. “Go to Work Zero (X & Y)”