Using MDI to set position

I had asked a while ago about manually setting zero and the topic was closed, so starting a new topic.
(Using Carbide Motion)
I am trying to manually set the zero for repeat parts, so I turn on the machine, initialize it, then want to use the MDI screen to position to a set spot (zeroing after getting to that spot). Most of the forum stuff say to use the code in MDI like: G0X__Y__. However, when I attempted to do that, I couldn’t get it to move to the correct spot using the values I sent it. Could someone give me the exact code to use in MDI if my X is 29.4 and my Y is 30.75? Typing in those values did not work (G0X29.4Y30.75).

The positions are relative to where zero was set — if zero was already set at that point, then G0 X0 Y0 should work.

1 Like

By default, any motion uses your current work zero as it’s point of reference. You’re probably wanting to use MACHINE coordinates for this as they won’t adjust as you move your work coordinate system around (by changing the work origin, XY zero).
Machine coordinates are always negative, with your homing switches being the XY zero. To move to a specific machine location send
G53 G0 X-100 Y-100
G53 specifies that you are using your machine coordinate system.
G0 is a rapid move.
Replace the X & Y values with the coordinates of your choice. Remember the negative…any successful attempt to move to positive machine coordinates will result in a crash.

4 Likes

If I am understanding correctly, then my procedure should be:

  1. Initialize machine
  2. Clear Offsets
  3. Zero
  4. MDI code to jog
  5. Zero

This is for the situation where I re-zerod and want to go back.

Don’t clear offsets if you want the same zero.

1 Like

Ah! That helps a ton! So my specific code for the example would be G53 G0 X-29.4 Y-30.75? Using a value like -100 would send it off the board… are the numbers in millimeters?

yes milimeters normally
(G20/G21 let you flip between metric and empire units)

1 Like

Is there a way to get a readout of what the current MACHINE coordinates are? The display in CM is showing the relative and in inches.

click on the “Position” label in CM window and it will toggle between absolute and relative coords (if I recall correctly)

EDIT: extracted from the BitSetter instructions, for illustration:

3 Likes

So my code would be:
G20 G53 G0 X-29.4 Y-30.75
*not sure about the spaces… take them out? or ok to leave spaces in?
*looked it up and G20 tells it to use Imperial, G21 to use metric

eh normally I’d put the g20/21 on a separate line; it’s a sticky setting

1 Like

Ok, I am going to put this down for my own sake and for the sake of anyone that is trying to do the “repeatable zero” thing using Carbide Motion.

Here are the steps to take:

  1. Turn on your machine
  2. Initialize Machine
  3. Manually Jog to your X/Y zero position that you want to set
  4. Click on the Jog menu (if not already there),
  5. Click the Rapid Position button
  6. Toggle the coordinates by clicking on the “Position” label to view the MACHINE COORDINATES (not relative)
  7. Take note of the X & Y (noting that the values should be negative).
  8. Set this X & Y as your zeros

To Return to this Zero point (even after setting a new zero)

  1. Turn on your machine
  2. Initialize Machine
  3. Click on the MDI Menu
  4. Send “G20” if you are using Imperial, or send “G21” if you are using metric (VERY IMPORTANT)
  5. Send “G53 G0 X_ Y_” to jog to your recorded zero spot
    *** Example is “G53 G0 X-29.4 Y-30.75” if I am using inches
    *** G53 tells the machine to use Machine Coordinates
    *** G0 tells it to rapid position
  6. Zero my X/Y in Carbide Motion

I am not in front of my machine now, but I will test my own instructions and edit them as needed when I can get in front of the machine.

note that if you want to go where the mahcine remembers its zero is:

G0 X0 Y0

gets you there in much simpler steps :slight_smile:

Right… I know the part about the machine remembering it’s zero, but I am trying to be able to set a new zero (make something else), then come back to the zero I used for the first thing I made.

When I have to do that sort of thing, I try to use the same zero for all the parts — usually one of the rapid position points.

ah yes in that case, writing down the coordinates and go back to them … makes total sense

This isn’t working… I cannot for the life of me get this to move in imperial units. Best I can tell is that it is taking my inches and moving that number in mm.

hmmmm I do everything in mm

I wonder if the machine is reporting to you in mm always?

I have the settings as imperial… but could this be a config issue? I am sending the G20 code. I also looked at my generated G Code and basically copy/pasted it but it still didn’t work. It moves, just not to where I would expect it.

how comfortable are you that the coordinates you get in your step 6. are empire units?
GRBL I think defaults to metric and I wouldn’t be surprised if that is what it reports ?
(step 6 of the first part I mean)