MDI Custom Commands issues

Hi! I haven’t used my router in a little while due to some house renos and I’m getting back into it. While making a bathroom vanity i thought it would have been nice to be able to use the router to route some straight grooves. I never got into the custom MDI commands stuff but I decided it was a bit too much work to build my drawer pieces in Fusion and create toolpaths and whatnot and it was easier to just clamp and use a router bit, lol.

Anyways, I fired up my HDM today and reinstalled Carbide Motion to the current version and set it up. It seems to be installed correctly, I’m jogging it around and the numbers seem correct. I checked the MDI box and sure enough that popped up into my motion.

So I need to type / before any commands, and i can type multiple commands in a row and itll do them as if they’re separate lines, or do i need to hit enter on it all as a single continuous command? Because I’m running into issues.

Here’s what I tried.

/g91

it says Busy for a second then stops, nothing happens. Apparently this is supposed to set it to relative mode and ignore my current zero and just base future commands off the spindles current actual position.

/g1 x50 f1500

My motions set in mm, and i did this, and it started moving to the right but it kept going. I assumed it thought i meant inches, but it definitely wasnt moving at 1500 inches per minute lol. After 10 inches i hit stop cause it shouldnt have gone that far.

Then I did

/g1 x2 f60

It started moving to the right again and definitely didnt go only 2mm, and at about 20 inches i hit stop again.

I typed to an AI bot to try and figure this out and it told me to type /$$ to print out some settings, it said busy and nothing happened.

Anyone have any idea at all?

MDI isn’t really very good for extended sequences of commands. There appears to be extra commands that CM sends around the stuff you type in.

I think you are better off creating a Custom Action. It fully supports multi-line, extended command sequences.

1 Like

Settings are output to the Log window — was it open?

My understanding is that state is reset once a command is compleat, so you would instead want to enter:

g91 g1 x50 f1500

to move a positive 50mm at 1500mm/min.

As @mhotchin suggested a better approach would be to write a User Custom Action.

1 Like

Thanks both! I threw it all in a custom action and it worked perfectly. And since I’d be repeating this function, that’s probably the smart way to do it anyhow.

Since my settings are in mm, do I need to do G21 at the start too, or does it automatically do whatever the machines set to?

Side question: My under-gantry lighting flickers quite a bit, is this common with the HDM? I’ve only ran it a total of like 5 hours so far in it’s lifetime but it sat unused so it could be something loose. If I wiggle the strip it doesn’t seem to help or not help, just as the spindle moves around it seems to go to almost random lighting strengths. Lol. If it keeps up I might just disconnect the light, as the space has good lighting anyways. Just curious if that’s a common issue.

Other than that, looks like I’m ready to go! Ty for the fast responses!

I believe it is best to include G21 — even if it doesn’t do anything it serves to make obvious that the measurements will be in metric.

For the flickering, please check in w/ support@carbide3d.com

I agree MDI seems to wrap the input with unseen commands. I use it frequently to move to pre-determined coordinates. On a non-touchscreen with a physical keyboard, I find it faster to type in MDI than multiple click and scroll to Quick Actions.

I use these on a machine set to Imperial with CM 651 or 659. I have found it defaults to Absolute mode without inputting G90.

Rapid to user coordinate: G20 G0 Xn Yn

Incremental rapid : G91 G20 G0Xn Yn
G91 is non-modal must specify G90 on the next command to return to Absolute

Rapid to machine coordinates : /G53 G20 G0 Xn Yn
Haven’t used this one in a while IIRC the G53 is modal as expected.

G1 with a feedrate specified also works in all of the above

1 Like

Don’t put the slash in front of it- that bypasses the G-code parser in Motion, which is probably not what anyone wants for movement.

2 Likes

On my system the G53 command I posted works with or without the slash before. I just double-checked.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.