Hello Guest it is April 23, 2024, 08:51:43 PM

Author Topic: Set G01 feedrate from a macro...  (Read 1045 times)

0 Members and 1 Guest are viewing this topic.

Set G01 feedrate from a macro...
« on: April 23, 2021, 06:48:06 PM »
Hello all,

It's been a long time. I hope everyone is well. I've got a question regarding setting feedrates (as I'm sure you gathered from the subject).
Here's what I've got going on:
I've got a Visual Studio program managing a database of feeds and speeds based on material selection.
From Mach3, you select the material you are cutting and the feedrate is served from the database (no problem here).

Let's paint a picture of what I'm trying to do:

-----------------------------------------
G Code example:

G00X0.Y0.
M03G04P0.5
G01X10.M801
Y10.
X0.
Y0.
M05
------------------------------------------

------------------------------------------
Here's what I've tried in the "M801.m1s" file:

Code ("F50.")   <---- No dice, feed doesn't change

SetFeedRate(50 / 60)   <---- No dice, feed doesn't change

SetOEMDRO(818, 50)   <---- No dice, feed doesn't change

SetParam("FeedRate", 50)   <---- Haven't tried this?
--------------------------------------------

Any thoughts on what I'm doing wrong? It's driving me nuts!

Thanks all,
Chris

Offline Graham Waterworth

*
  • *
  •  2,673 2,673
  • Yorkshire Dales, England
    • View Profile
Re: Set G01 feedrate from a macro...
« Reply #1 on: April 23, 2021, 07:47:10 PM »
Are you sure the M801.m1s is being run?
Without engineers the world stops
Re: Set G01 feedrate from a macro...
« Reply #2 on: April 23, 2021, 07:54:01 PM »
Hey Graham,

Thanks for the reply. Hmmm, I can't think of why it wouldn't? I guess I could try it from MDI? Any other way to test it?
The macro is definitely in the correct folder, checked that, like a million times  :)

Thanks for your thoughts,
Chris

Offline Graham Waterworth

*
  • *
  •  2,673 2,673
  • Yorkshire Dales, England
    • View Profile
Re: Set G01 feedrate from a macro...
« Reply #3 on: April 24, 2021, 11:30:46 AM »
What happens if you issue the M801 before the G01 line, I am not sure just when the M code is executed but I think its after the move commands.

You can do a message in the M801 that will show in the status line.

Message("In Here")
Sleep(50)


Without engineers the world stops
Re: Set G01 feedrate from a macro...
« Reply #4 on: April 24, 2021, 08:36:21 PM »
Sorry for the delay, I've been watching my Dogecoin instead of machining  ;D The message idea sounds awesome. I'll give it a run when I get a second.

Thanks a bunch,
Chris