Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: fpm007 on July 16, 2025, 07:39:21 AM
-
I have been using Mach 3 with a rotary setup for a while now. I am trying to fix one spot on my code where I am having some build up of weld because the rotary axis stops for a split second. I have several different ideas on how to fix this but I cannot get my code to function like I want it to. Is there a way to turn on a rotary for X amount of time rather than rotating to a degrees. Or is there a way to put a M3 in a line and have the rotary continue to move. I will post my code that I am using below. Between lines N7 and N8 there is a split second stall in the rotary. If there was a way to have that continuously move while the weld tapered out this setup would work perfectly.
N1 (USER 3)
N2 G91
N3 G0 A0.0
N4 M8 (GAS ON)
N5 G04 P1.5
N6 M3 (Start Weld)
N7 G01 A-400.0 F1500.00 (ROTATIONAL SPEED)
N8 A-60.0 M5 (Stop Weld)
N9 G04 P1.5 (DWELL FOR POST FLOW TIME)
N10 G0 A520.0 X-0.400 (MOVE TO NEXT START POSTION)
N11 M30
-
I've no real idea but my gut feeling is that I would call the F1500 parameter BEFORE N6.
Once executed, the 'F' parameter persists until the next 'F call'.
-
I've no real idea but my gut feeling is that I would call the F1500 parameter BEFORE N6.
Once executed, the 'F' parameter persists until the next 'F call'.
This does not change anything. The machine has to "think" when it sees the M5 and allows the rotary to stop for a split second. Its like it need to process the code faster.
-
I've no real idea but my gut feeling is that I would call the F1500 parameter BEFORE N6.
Once executed, the 'F' parameter persists until the next 'F call'.
This does not change anything. The machine has to "think" when it sees the M5 and allows the rotary to stop for a split second. Its like it need to process the code faster.
Surely the machine also has to 'think' when it sees the F1500 - and that is within the [Start] [Stop] 'loop' so simply moving that out of the loop ought to have some effect?
-
I've no real idea but my gut feeling is that I would call the F1500 parameter BEFORE N6.
Once executed, the 'F' parameter persists until the next 'F call'.
This does not change anything. The machine has to "think" when it sees the M5 and allows the rotary to stop for a split second. Its like it need to process the code faster.
Surely the machine also has to 'think' when it sees the F1500 - and that is within the [Start] [Stop] 'loop' so simply moving that out of the loop ought to have some effect?
I moved it after N5 and it still did not change anything.
-
At least you tried :D
-
i assume in Config -> Ports&Pins -> Spindle Setup -> General Parameters all Delay timers are
set to zero?
Just an idea.
maybe using M10/M11 might help.
-
i assume in Config -> Ports&Pins -> Spindle Setup -> General Parameters all Delay timers are
set to zero?
Just an idea.
maybe using M10/M11 might help.
Yes they are.
-
then M10/M11 might be the way to go, if your motioncontroller support's M10/M11 control?
-
then M10/M11 might be the way to go, if your motioncontroller support's M10/M11 control?
Briefly looking into this, this might be the way to go. How would I go about setting up M10 and M11 on my controler?
-
the program you posted would look like this:
N1 (USER 3)
N2 G91
N3 G0 A0.0
N4 M8 (GAS ON)
N5 G04 P1.5
N6 M11 P1 (Start Weld)
N7 G01 A-400.0 F1500.00 (ROTATIONAL SPEED)
N8 A-60.0
N9 M10 P1 (Stop Weld)
N10 G04 P1.5 (DWELL FOR POST FLOW TIME)
N11 G0 A520.0 X-0.400 (MOVE TO NEXT START POSTION)
N12 M30
M11 P1 will turn ON Output1 and the next GCode line must be
a axis move
M10 P1 will turn OFF Output1
-
the program you posted would look like this:
N1 (USER 3)
N2 G91
N3 G0 A0.0
N4 M8 (GAS ON)
N5 G04 P1.5
N6 M11 P1 (Start Weld)
N7 G01 A-400.0 F1500.00 (ROTATIONAL SPEED)
N8 A-60.0
N9 M10 P1 (Stop Weld)
N10 G04 P1.5 (DWELL FOR POST FLOW TIME)
N11 G0 A520.0 X-0.400 (MOVE TO NEXT START POSTION)
N12 M30
M11 P1 will turn ON Output1 and the next GCode line must be
a axis move
M10 P1 will turn OFF Output1
So in the settings I just need to turn on Output 1? Will I have to switch any wires around on the control board to make this work?
-
you can use any Output witch is configured in Config -> Ports&Pins -> Outputs normaly,
depends a bit on the motion controller.
-
you can use any Output witch is configured in Config -> Ports&Pins -> Outputs normaly,
depends a bit on the motion controller.
I do not think the controller is liking the M10/M11 codes. When I look up the M code list in the controller those are not listed. Is there a setting to turn those on? I searched google and the image that pops up I do not have the check box like what it is showing.
-
witch controller are you using?
-
witch controller are you using?
Mach 3 USB interface board. Its the red one. I am not for sure in the differences of controllers.
-
if you talk from such:
https://buildyourcnc.com/products/electronicsandmotors-electronic-component-breakout-mach3-usb-board
a thing, i think we reached the end of the road for using M10/M11.
-
i assume you have all 4 axis intefaces of the board in use?
otherwise it would be possible to use thr dir output of an unused axis.
-
if you talk from such:
https://buildyourcnc.com/products/electronicsandmotors-electronic-component-breakout-mach3-usb-board
a thing, i think we reached the end of the road for using M10/M11.
Yes this is the board that I am using. I could buy a different board and change stuff over.
-
i assume you have all 4 axis intefaces of the board in use?
otherwise it would be possible to use thr dir output of an unused axis.
I am only using two axis, the X axis and the A axis.
-
then you can use b-axis dir pin for example to switch weldin on without delay.
if you search for laser and dir pin you will find examples.
-
then you can use b-axis dir pin for example to switch weldin on without delay.
if you search for laser and dir pin you will find examples.
This sounds like it could work. Let me do some research on this and see what I can come up with.