You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: OpenbuildsFusion360PostGrbl.cps
+81-79
Original file line number
Diff line number
Diff line change
@@ -37,8 +37,9 @@ Changelog
37
37
16 Jan 2021 - V1.0.23 : Remove endoffile marker '%' from endof output, arcs smaller than toolRadius will be linearized
38
38
25 Jan 2021 - V1.0.24 : Improve coolant codes
39
39
26 Jan 2021 - V1.0.25 : Plasma pierce height, and probe
40
+
29 Aug 2021 - V1.0.26 : Regroup properties for display, Z height check options
40
41
*/
41
-
obversion = 'V1.0.25';
42
+
obversion = 'V1.0.26';
42
43
description = "OpenBuilds CNC : GRBL/BlackBox"; // cannot have brackets in comments
43
44
vendor = "OpenBuilds";
44
45
vendorUrl = "https://openbuilds.com";
@@ -74,11 +75,6 @@ properties =
74
75
machineHomeX : -10, // always in millimeters
75
76
machineHomeY : -10,
76
77
gotoMCSatend : false, // true will do G53 G0 x{machinehomeX} y{machinehomeY}, false will do G0 x{machinehomeX} y{machinehomeY} at endofprogram
77
-
_Section2: "******", // used to break up properties into sections for clarity
78
-
_Section3: "******", // used to break up properties into sections for clarity
79
-
_Section4: "******", // used to break up properties into sections for clarity
80
-
_Section5: "******", // used to break up properties into sections for clarity - laser options
81
-
_Section6: "******", // used to break up properties into sections for clarity
82
78
PowerVaporise : 100, // cutting power in percent
83
79
PowerThrough : 50,
84
80
PowerEtch : 2,
@@ -91,21 +87,18 @@ properties =
91
87
machineVendor : "OpenBuilds",
92
88
machineModel : "Generic",
93
89
machineControl : "Grbl 1.1 / BlackBox",
90
+
91
+
checkZ : false, // true for a PS tool height checkmove at start of every file
92
+
checkFeed : 200// always MM/min
94
93
};
95
94
96
95
// user-defined property definitions - note, do not skip any group numbers
97
96
propertyDefinitions = {
98
-
_Section2: {
99
-
title:"--- SPINDLE INFO ---",
100
-
description:"Informational only. Not used for any computation.",
101
-
type:"string",
102
-
group: 2
103
-
},
104
97
routerType: {
105
-
title: "Spindle/Router type",
98
+
group: 1,
99
+
title: "SPINDLE: Spindle/Router type",
106
100
description: "Select the type of spindle you have.",
107
101
type: "enum",
108
-
group: 2,
109
102
values:[
110
103
{title:"Other", id:"other"},
111
104
{title:"Router11", id:"Router11"},
@@ -114,103 +107,98 @@ propertyDefinitions = {
114
107
]
115
108
},
116
109
spindleTwoDirections: {
117
-
title: "Spindle can rotate clockwise and counterclockwise?",
110
+
group: 1,
111
+
title: "SPINDLE: Spindle can rotate clockwise and counterclockwise?",
118
112
description: "Yes : spindle can rotate clockwise and counterclockwise, will send M3 and M4. No : spindle can only go clockwise, will only send M3",
119
113
type: "boolean",
120
-
group: 2
121
114
},
122
115
spindleOnOffDelay: {
123
-
title: "Spindle on/off delay",
116
+
group: 1,
117
+
title: "SPINDLE: Spindle on/off delay",
124
118
description: "Time (in seconds) the spindle needs to get up to speed or stop, also used for plasma pierce delay",
125
119
type: "number",
126
-
group: 2
127
120
},
128
121
hasCoolant: {
129
-
title: "Has coolant?",
122
+
group: 1,
123
+
title: "SPINDLE: Has coolant?",
130
124
description: "Yes: machine uses the coolant output, M8 M9 will be sent. No : coolant output not connected, so no M8 M9 will be sent",
131
125
type: "boolean",
132
-
group: 3
133
126
},
134
-
_Section3: {
135
-
title:"--- TOOL CHANGE HANDLING ---",
136
-
description:"Informational only. Not used for any computation.",
137
-
type:"string",
138
-
group: 4
139
-
},
127
+
checkFeed: {
128
+
group: 2,
129
+
title: "SAFETY: Check tool feedrate",
130
+
description: "Feedrate to be used for the tool length check, always millimeters.",
131
+
type: "spatial",
132
+
},
133
+
checkZ: {
134
+
group: 2,
135
+
title: "SAFETY: Check tool Z length?",
136
+
description: "Insert a safe move and program pause M0 to check for tool length, tool will lower to clearanceHeight set in the Heights tab.",
137
+
type: "boolean",
138
+
},
139
+
140
140
generateMultiple: {
141
-
title:"Generate muliple files for tool changes?",
141
+
group: 3,
142
+
title:"TOOLCHANGE: Generate muliple files for tool changes?",
142
143
description: "Generate multiple files. One for each tool change.",
143
144
type:"boolean",
144
-
group: 4
145
145
},
146
-
_Section4: {
147
-
title:"--- END OF JOB COORDINATES ---",
148
-
description:"Informational only. Not used for any computation.",
149
-
type:"string",
150
-
group: 5
151
-
},
146
+
147
+
152
148
gotoMCSatend: {
153
-
title:"Use Machine Coordinates (G53) at end of job?",
149
+
group: 4,
150
+
title:"JOBEND: Use Machine Coordinates (G53) at end of job?",
154
151
description: "Yes will do G53 G0 x{machinehomeX} y(machinehomeY) (Machine Coordinates), No will do G0 x(machinehomeX) y(machinehomeY) (Work Coordinates) at endofprogram",
155
152
type:"boolean",
156
-
group: 5
157
153
},
158
154
machineHomeX: {
159
-
title:"Endof job X position (MM).",
155
+
group: 4,
156
+
title:"JOBEND: Endof job X position (MM).",
160
157
description: "(G53 or G54) X position to move toin Millimeters",
161
158
type:"spatial",
162
-
group: 6
163
159
},
164
160
machineHomeY: {
165
-
title:"Endof job Y position (MM).",
161
+
group: 4,
162
+
title:"JOBEND: Endof job Y position (MM).",
166
163
description: "(G53 or G54) Y position to move toin Millimeters.",
167
164
type:"spatial",
168
-
group: 6
169
165
},
170
166
machineHomeZ: {
171
-
title:"Endof job Z position (MCS Only) (MM)",
172
-
description: "G53 Z position to move toin Millimeters, normally negative.",
167
+
group: 4,
168
+
title:"JOBEND: START andEndof job Z position (MCS Only) (MM)",
169
+
description: "G53 Z position to move toin Millimeters, normally negative. Moves to this distance below Z home.",
173
170
type:"spatial",
174
-
group: 6
175
171
},
172
+
173
+
176
174
linearizeSmallArcs: {
177
-
title:"Linearize Small Arcs",
178
-
description: "Arcs with radius < toolRadius can have mismatched radii, set this to Yes to linearize them.",
175
+
group: 5,
176
+
title:"ARCS: Linearize Small Arcs",
177
+
description: "Arcs with radius < toolRadius can have mismatched radii, set this to Yes to linearize them. This solves G2/G3 radius mismatch errors.",
179
178
type:"boolean",
180
-
group: 6
181
179
},
182
180
183
-
_Section5: {title:"--- LASER/PLASMA CUTTING OPTIONS ---", description:"Informational only. Not used for any computation.", type:"string", group: 7},
184
-
PowerVaporise: {title:"Power for Vaporizing", description:"Scary power VAPORIZE power setting, in percent.", group:8, type:"integer"},
185
-
PowerThrough: {title:"Power for Through Cutting", description:"Normal Through cutting power, in percent.", group:8, type:"integer"},
186
-
PowerEtch: {title:"Power for Etching", description:"Just enough power to Etch the surface, in percent.", group:8, type:"integer"},
187
-
UseZ: {title:"Use Z motions at start and end.", description:"Use True if you have a laser on a router with Z motion, or a PLASMA cutter.", group:8, type:"boolean"},
188
-
plasma_usetouchoff: {title:"Use Z touchoff probe routine", description:"Set to true if have a touchoff probe for Plasma.", group:8, type:"boolean"},
189
-
plasma_touchoffOffset:{title:"Plasma touch probe offset", description:"Offset in Z at which the probe triggers, always Millimeters, always positive.", group:8, type:"spatial"},
190
-
191
-
_Section6: {
192
-
title:"--- MACHINE INFO ---",
193
-
description:"Informational only. Not used for any computation.",
194
-
type:"string",
195
-
group: 9
196
-
},
181
+
PowerVaporise: {title:"LASER: Power for Vaporizing", description:"Scary power VAPORIZE power setting, in percent.", group:6, type:"integer"},
182
+
PowerThrough: {title:"LASER: Power for Through Cutting", description:"Normal Through cutting power, in percent.", group:6, type:"integer"},
183
+
PowerEtch: {title:"LASER: Power for Etching", description:"Just enough power to Etch the surface, in percent.", group:6, type:"integer"},
184
+
UseZ: {title:"LASER: Use Z motions at start andend.", description:"Use True if you have a laser on a router with Z motion, or a PLASMA cutter.", group:6, type:"boolean"},
185
+
plasma_usetouchoff: {title:"PLASMA: Use Z touchoff probe routine", description:"Setto true if have a touchoff probe for Plasma.", group:6, type:"boolean"},
186
+
plasma_touchoffOffset:{title:"PLASMA: Plasma touch probe offset", description:"Offset in Z at which the probe triggers, always Millimeters, always positive.", group:6, type:"spatial"},
187
+
197
188
machineVendor: {
198
189
title:"Machine Vendor",
199
190
description: "Machine vendor defined here will be displayed in header if machine config notset.",
200
191
type:"string",
201
-
group: 9
202
192
},
203
193
machineModel: {
204
194
title:"Machine Model",
205
195
description: "Machine model defined here will be displayed in header if machine config notset.",
206
196
type:"string",
207
-
group: 9
208
197
},
209
198
machineControl: {
210
199
title:"Machine Control",
211
200
description: "Machine control defined here will be displayed in header if machine config notset.",
212
201
type:"string",
213
-
group: 9
214
202
}
215
203
};
216
204
@@ -219,7 +207,7 @@ plasma_probedistance = 30; // distance to probe down in Z, always in millimete
219
207
plasma_proberate = 100; // feedrate for probing, in mm/minute
220
208
// END OF USER ADJUSTMENTS
221
209
222
-
var debug = true;
210
+
var debug = false;
223
211
// creation of all kinds of G-code formats - controls the amount of decimals used in the generated G-Code
224
212
var gFormat = createFormat({prefix:"G", decimals:0});
225
213
var mFormat = createFormat({prefix:"M", decimals:0});
@@ -271,6 +259,7 @@ var workOffset = 0;
271
259
var haveRapid = false; // assume no rapid moves
272
260
var powerOn = false; // is the laser power on? used for laser when haveRapid=false
273
261
var retractHeight = 1; // will be set by onParameter and used in onLinear to detect rapids
262
+
var clearanceHeight = 10; // will be set by onParameter
274
263
var topHeight = 1; // set by onParameter
275
264
var leadinRate = 314; // set by onParameter: the lead-in feedrate,plasma
0 commit comments