diff --git a/modules/path/formats/g-code b/modules/path/formats/g-code index 008a386dd8a47847317c3bf05eff46f19ce04238..bad3af8d8cf9fb50dcecd6a57e66e080fb8b5bb9 100644 --- a/modules/path/formats/g-code +++ b/modules/path/formats/g-code @@ -7,6 +7,10 @@ // Updated: Steven Chew // Date: Feb 20 2019 // Comments: Added option to output in inch or mm +// Date:... Oct 28 2019 +// Comments: Corrected feedrate conversion +// - inch/s to inch/min +//...........- mm/s to mm/min // // This work may be reproduced, modified, distributed, performed, and // displayed for any purpose, but must acknowledge the mods @@ -206,7 +210,7 @@ function make_path() { str += "G90\n" // absolute coordinates str += "G94\n" // feed/minute units str += "T"+tool+"M06\n" // tool selection, tool change - str += "F"+cut_speed.toFixed(4)+"\n" // feed rate + str += "F"+cut_speed.toFixed(4)*60+"\n" // feed rate str += "S"+spindle_speed+"\n" // spindle speed if (mod.coolanton.checked) str += "M08\n" // coolant on @@ -228,8 +232,8 @@ function make_path() { // move down // z = scale*mod.path[seg][0][2] - str += "G01Z"+z.toFixed(4)+" F"+plunge_speed.toFixed(4)+"\n" - str += "F"+cut_speed.toFixed(4)+"\n" //restore xy feed rate + str += "G01Z"+z.toFixed(4)+" F"+plunge_speed.toFixed(4)*60+"\n" + str += "F"+cut_speed.toFixed(4)*60+"\n" //restore xy feed rate for (var pt = 1; pt < mod.path[seg].length; ++pt) { // // move to next point