I’ve been meaning to write a simple program with variables and macros to run test cuts to find the ideal feed rate. But I have just been using feed rates that work up till this point.
It has been over a year since I have used variables, macros, or sub routines. And this was the first time I have tried any advanced programming in Mach3. Took me a little bit just to remember my M98/99 codes. Then took me a little bit to figure out how Mach3 wanted to see its Varibles, and Macros. And just when I thought I had everything figured out, I was still only getting 2 lines to cut. After some searching, someone said that the code file should start and end with a blank line, and the code must also end with a %
I ended up using 6 variables, but I labeled everything in brackets. You only need to alter 5 of those 6 variables to fit your needs. I mainly only adjust #100 (Base feed rate) and #105 (Number of test cuts). But feel free to change the others as you see fit.
Also the pierce dwell is in milliseconds, and the initial pierce is set to 1000 milliseconds, while the rest are set to 800 milliseconds. You can change this to seconds if you prefer, you may also need to increase or decrease the values depending on your machine, and material you are cutting.
The way the code is set now, it will cut 10 lines starting at 80 ipm, increasing each cut my 5 ipm. The lines are 5 inches long, spaced .25 apart. The final cut will be 125 ipm.
I could write one that cuts out the test cuts when finished as well if anyone would like that.
Here is the program.
(Langmuir CrossFire)
(This file is for testing cutting feed rates using variables in the values below.)
(You may need to adjust the pierce values to match your cutting machine and material thickness.)#100 = 80 (Starting Feed rate)
#101 = 5 (Feed Rate Increase per test cut)
#102 = 0 (Y Starting position)
#103 = .25 (Y axis incremental move per cut)
#104 = 5 (X axis length of test cut)
#105 = 10 (Number of test lines to cut)G90
G70(2D Profile1)
G0 X0 Y0
M3
G4 P1000 (Dwell in Milliseconds)
G1 X[#104] F[#100]
#100 = [#100 + #101] (Incremental Feedrate)
M5
#102 = [#102 + #103] (Incremental Y Move)
G90
G0 X0 Y[#102]
M98 P0001 L[#105-1]M30 (End Of Program)
(Sub Program)
O0001
M3
G4 P600 (Dwell in Milliseconds)
G1 X[#104] F[#100]
#100 = [#100 + #101] (Incremental Feedrate)
M5
#102 = [#102 + #103] (Incremental Y Move)
G90
G0 X0 Y[#102]
M99
%
And here is the results of my test cuts in 11 gauge steel at 55 amps, cutting about .125 off the surface. I first started at 50, then ran another starting at 80, stopping at 120 as I was running out of space. 85 ipm looks to be the sweet spot for this setup.