Newer
Older
$Revision: 44079 7098e6d148aa6ea195b42597d82fe2f00d0115bb $
$Date: 2023-07-17 12:38:58 $
FORKID {8B1FC740-38BD-4cb2-9CD5-94A55CBE87A5}
*/
description = "NUM";
vendor = "NUM";
vendorUrl = "http://www.num.com";
longDescription = "Generic milling post for NUM.";
extension = "nc";
programNameIsInteger = true;
setCodePage("ascii");
capabilities = CAPABILITY_MILLING | CAPABILITY_MACHINE_SIMULATION;
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
tolerance = spatial(0.002, MM);
minimumChordLength = spatial(0.25, MM);
minimumCircularRadius = spatial(0.01, MM);
maximumCircularRadius = spatial(1000, MM);
minimumCircularSweep = toRad(0.01);
maximumCircularSweep = toRad(5400);
allowHelicalMoves = true;
allowedCircularPlanes = undefined; // allow any circular motion
// user-defined properties
properties = {
writeMachine: {
title : "Write machine",
description: "Output the machine settings in the header of the code.",
group : "formats",
type : "boolean",
value : true,
scope : "post"
},
writeTools: {
title : "Write tool list",
description: "Output a tool list in the header of the code.",
group : "formats",
type : "boolean",
value : true,
scope : "post"
},
preloadTool: {
title : "Preload tool",
description: "Preloads the next tool at a tool change (if any).",
group : "preferences",
type : "boolean",
value : true,
scope : "post"
},
showSequenceNumbers: {
title : "Use sequence numbers",
description: "'Yes' outputs sequence numbers on each block, 'Only on tool change' outputs sequence numbers on tool change blocks only, and 'No' disables the output of sequence numbers.",
group : "formats",
type : "enum",
values : [
{title:"Yes", id:"true"},
{title:"No", id:"false"},
{title:"Only on tool change", id:"toolChange"}
],
value: "true",
scope: "post"
},
sequenceNumberStart: {
title : "Start sequence number",
description: "The number at which to start the sequence numbers.",
group : "formats",
type : "integer",
value : 10,
scope : "post"
},
sequenceNumberIncrement: {
title : "Sequence number increment",
description: "The amount by which the sequence number is incremented by in each block.",
group : "formats",
type : "integer",
value : 5,
scope : "post"
},
optionalStop: {
title : "Optional stop",
description: "Outputs optional stop code during when necessary in the code.",
group : "preferences",
type : "boolean",
value : true,
scope : "post"
},
separateWordsWithSpace: {
title : "Separate words with space",
description: "Adds spaces between words if 'yes' is selected.",
group : "formats",
type : "boolean",
value : true,
scope : "post"
},
useRadius: {
title : "Radius arcs",
description: "If yes is selected, arcs are outputted using radius values rather than IJK.",
group : "preferences",
type : "boolean",
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
scope : "post"
},
showNotes: {
title : "Show notes",
description: "Writes operation notes as comments in the outputted code.",
group : "formats",
type : "boolean",
value : false,
scope : "post"
},
safePositionMethod: {
title : "Safe Retracts",
description: "Select your desired retract option. 'Clearance Height' retracts to the operation clearance height.",
group : "homePositions",
type : "enum",
values : [
{title:"Clearance Height", id:"clearanceHeight"},
{title:"G52", id:"G52"}
],
value: "G52",
scope: "post"
},
controllerType: {
title : "Controller version",
description: "Select the family of controller.",
group : "configuration",
type : "enum",
values : [
{title:"NUM 7xx", id:"NUM7x0"},
{title:"NUM 10xx", id:"NUM10x0"}
],
value: "NUM7x0",
scope: "post"
}
};
// wcs definiton
wcsDefinitions = {
useZeroOffset: false,
wcs : [
{name:"Standard", format:"#", range:[1, 1]}
]
};
var gFormat = createFormat({prefix:"G", width:2, zeropad:true, decimals:0});
var mFormat = createFormat({prefix:"M", width:2, zeropad:true, decimals:0});
var hFormat = createFormat({prefix:"H", width:2, zeropad:true, decimals:0});
var diameterOffsetFormat = createFormat({prefix:"D", width:2, zeropad:true, decimals:0});
var xyzFormat = createFormat({decimals:(unit == MM ? 3 : 4), forceDecimal:true});
var rFormat = xyzFormat; // radius
var abcFormat = createFormat({decimals:3, forceDecimal:true, scale:DEG});
var feedFormat = createFormat({decimals:(unit == MM ? 0 : 1), forceDecimal:true});
var pitchFormat = createFormat({decimals:(unit == MM ? 3 : 4), forceDecimal:true});
var toolFormat = createFormat({width:2, zeropad:true, decimals:0});
var rpmFormat = createFormat({decimals:0});
var secFormat = createFormat({decimals:2, forceDecimal:true}); // seconds - range 0.01-99.99
var taperFormat = createFormat({decimals:1, scale:DEG});
var xOutput = createVariable({prefix:"X"}, xyzFormat);
var yOutput = createVariable({prefix:"Y"}, xyzFormat);
var zOutput = createVariable({onchange:function () {retracted = false;}, prefix:"Z"}, xyzFormat);
var aOutput = createVariable({prefix:"A"}, abcFormat);
var bOutput = createVariable({prefix:"B"}, abcFormat);
var cOutput = createVariable({prefix:"C"}, abcFormat);
var feedOutput = createVariable({prefix:"F"}, feedFormat);
var pitchOutput = createVariable({prefix:"K", force:true}, pitchFormat);
var sOutput = createVariable({prefix:"S", force:true}, rpmFormat);
// circular output
var iOutput = createVariable({prefix:"I", force:true}, xyzFormat);
var jOutput = createVariable({prefix:"J", force:true}, xyzFormat);
var kOutput = createVariable({prefix:"K", force:true}, xyzFormat);
var gMotionModal = createModal({}, gFormat); // modal group 1 // G0-G3, ...
var gPlaneModal = createModal({onchange:function () {gMotionModal.reset();}}, gFormat); // modal group 2 // G17-19
var gAbsIncModal = createModal({}, gFormat); // modal group 3 // G90-91
var gFeedModeModal = createModal({}, gFormat); // modal group 5 // G93-94
var gUnitModal = createModal({}, gFormat); // modal group 6 // G70-71
var gCycleModal = createModal({}, gFormat); // modal group 9 // G81, ...
var gRetractModal = createModal({}, gFormat); // modal group 10 // G98-99
Loading full blame...