Maestro Scripting Language
Maestro Scripting Language
Maestro Scripting Language
Language
(MSL)
1 Introduction 8
2 Basic Concept 9
3 Project 11
3.1 Project management 11
3.1.1 Creating programs (.xcs) 11
3.2 Machining parameters 14
3.2.1 Reference parameters 14
3.2.2 Y position of workpiece referred to opposite side stop 15
3.2.3 Configuration default blocking options 15
3.2.4 Technological compatibility on mirror working fields 15
3.2.5 Automatic table set up on machine program loading 16
3.2.6 Workpiece side presser exclusion at program beginning 16
3.2.7 Maintaining the process sequence 17
3.2.8 Process sequence modification due to multiple drillings 17
3.2.9 Workpiece fall prevention 17
3.2.10 ToeKick scrap unload 18
3.2.11 Program optimization enable 18
3.2.12 Comment definition 18
3.2.13 Description definition 19
3.2.14 Dynamic working fields enable 19
3.2.15 Edge banding optimization 20
3.2.16 Workpiece machinings shift 20
3.2.17 Intermediate unloading 21
3.3 Parametrics 21
3.3.1 Parameter creation 21
3.3.2 Getting parameter value 22
3.4 WorkPiece 23
3.4.1 WorkPiece creation 23
3.4.1.1 Finished WorkPiece 23
3.4.1.1.1 Box WorkPiece 23
3.4.1.1.2 Extrusion WorkPiece 24
3.4.1.2 Raw WorkPiece 24
3.4.1.2.1 Over materials WorkPiece 24
3.4.1.2.2 Extrusion WorkPiece 25
3.4.2 WorkPiece positioning 26
3.4.2.1 Workpieces position on canonical areas 26
3.4.2.1.1 Lower left working field 26
3.4.2.1.2 Upper left working field 27
3.4.2.1.3 Lower right working field 28
3.4.2.1.4 Upper right working field 29
1
3.4.2.2 Workpieces position on non canonical working fields 30
3.4.2.2.1 Workpieces position in standard mode 30
3.4.2.2.1.1 Lower left working field 31
3.4.2.2.1.2 Upper left working field 32
3.4.2.2.1.3 Lower right working field 33
3.4.2.2.1.4 Upper right working field 33
3.4.2.2.2 Workpieces position in Layout mode 34
3.4.3 WorkPiece selection 35
3.4.4 WorkPiece deletion 35
3.4.5 WorkPiece X position detection 36
3.5 WorkPlan 36
3.5.1 WorkPlan creation 37
3.5.2 WorkPlan selection 37
3.5.3 WorkPlan deletion 38
3.5.4 WorkPlane rename 38
3.6 Planes 39
3.6.1 Standard planes 39
3.6.2 User plane 39
3.6.2.1 Parallel planes 39
3.6.2.2 Slanted plane 40
3.6.2.2.1 Plane by three points 40
3.6.2.2.2 Plane created by placement and rotations 40
3.6.2.2.3 Parametric plane created by placement and rotations 41
3.6.3 Plane selection 42
3.6.4 Plane deletion 43
3.7 2D Geometries 44
3.7.1 Creating geometries 44
3.7.1.1 Point 44
3.7.1.2 Parametric point 45
3.7.1.3 Segment 45
3.7.1.3.1 Segment by start point and end point 45
3.7.1.3.2 Parametric segment by start point and end point 46
3.7.1.4 Arc 46
3.7.1.4.1 Arc by 3 points 46
3.7.1.4.2 Parametric arc by 3 points 47
3.7.1.4.3 Arc by start point end point and radius 47
3.7.1.4.4 Parametric arc by start point end point and radius 48
3.7.1.4.5 Arc by start point end point and center point 49
3.7.1.4.6 Arc by start point center point and angle 50
3.7.1.5 Circle 50
3.7.1.5.1 Circle by center point and radius 50
3.7.1.5.2 Parametric circle by center and radius 51
3.7.1.5.3 Circle by center point and a point on circumference 52
3.7.1.6 Ellipse 53
2
3.7.1.6.1 Ellipse by center and axes 53
3.7.1.6.2 Parametric ellipse by center and axes 54
3.7.1.7 Polyline 54
3.7.1.7.1 Polyline creation 54
3.7.1.7.2 Parametric polyline creation 55
3.7.1.7.3 Add to polyline a segment 55
3.7.1.7.4 Add to polyline a parametric segment 56
3.7.1.7.5 Add to polyline an arc by 3 points 56
3.7.1.7.6 Add to polyline a parametric arc by 3 points 57
3.7.1.7.7 Add to polyline an arc by 2 points and center 57
3.7.1.7.8 Add to polyline a parametric arc by 2 points and center 58
3.7.1.7.9 Add to polyline an arc by 2 points and radius 59
3.7.1.7.10 Add to polyline a parametric arc by 2 points and radius 59
3.7.1.7.11 Add to polyline an arc by center and angle 60
3.7.1.7.12 Polyline closing 60
3.7.1.7.13 Fillet to polyline elements 61
3.7.1.7.14 Chamfer to polyline elements 61
3.7.2 Plane reference 62
3.7.3 Geometry deletion 63
3.8 Machining operations 63
3.8.1 Machining types 65
3.8.1.1 Drilling 65
3.8.1.2 Parametric Drilling 65
3.8.1.3 Through drilling 66
3.8.1.4 Parametric through drilling 67
3.8.1.5 Slanted drilling 68
3.8.1.6 Routing 69
3.8.1.7 Slanted routing 71
3.8.1.8 Parametric slanted routing 75
3.8.1.9 Chamfer 76
3.8.1.10 Slot 78
3.8.1.11 Saw cut 79
3.8.1.12 Contour 80
3.8.1.13 Pocket 81
3.8.1.14 Toekick pocket 82
3.8.1.15 Dowel 83
3.8.1.16 Parametric dowel 84
3.8.1.17 Dowel drilling 85
3.8.1.18 3D Routing 86
3.8.1.19 Pattern 87
3.8.1.19.1 Pattern creation 87
3.8.1.19.2 Pattern reset 88
3.8.1.20 Trimming 88
3.8.2 Lead in and lead out 89
3
3.8.2.1 Lead in 89
3.8.2.2 Lead out 90
3.8.3 Strategies 91
3.8.3.1 Drilling strategies 92
3.8.3.1.1 Single step drilling strategy 92
3.8.3.1.2 Multi step drilling strategy 92
3.8.3.2 Milling strategies 93
3.8.3.2.1 Unidirectional strategy 93
3.8.3.2.2 Bidirectional strategy 94
3.8.3.2.3 Helicoidal strategy 95
3.8.3.2.4 Zig zag strategy 95
3.8.3.3 Saw strategies 96
3.8.3.3.1 Sectioning strategy 96
3.8.3.4 Pocket strategies 97
3.8.3.4.1 Contour parallel pocket strategy 97
3.8.3.4.2 ToeKick strategy 98
3.8.4 Machine functions 99
3.8.4.1 Jerk machine function 100
3.8.4.2 Jerk 3D machine function 100
3.8.4.3 NC Auto speed machine function 101
3.8.4.4 Main Pneumatic hood machine function 102
3.8.4.5 Auxiliary pneumatic hood 102
3.8.4.6 Opposite pneumatic hood 103
3.8.4.7 Main Motorized hood machine function 104
3.8.4.8 Automatic motorized hood machine function 104
3.8.4.9 Generic hood machine function 105
3.8.4.10 Clean mode machine function 106
3.8.4.11 Pneumatic DustPan machine function 106
3.8.4.12 Motorized DustPan machine function 108
3.8.4.13 Five axis head unroll machine function 109
3.8.4.14 Axis brake machine function 110
3.8.4.15 ToolBlower machine function 111
3.8.4.16 Electronic zero prober machine function 111
3.8.4.17 Pressure rollers machine function 112
3.8.4.18 Mechanical pressure machine function 113
3.8.5 Machining attributes 113
3.8.5.1 Machine attributes types 113
3.8.5.1.1 Feed attribute (FEED) 113
3.8.5.1.2 Depth attribute (DEPTH) 115
3.8.5.1.3 Micro junction attribute (TAB) 116
3.8.5.1.4 Start point attribute 117
3.8.5.1.5 Start point position attribute 118
3.8.5.1.6 End point attribute 119
3.8.6 Correction reference 119
4
3.8.7 Machining inversion 120
3.8.8 Tool compensation 121
3.8.9 Toolpath generation mode 122
3.8.10 Breakeable machining 123
3.8.11 Machining lead in safety distance 123
3.8.12 Machining lead out safety distance 124
3.8.13 Machine selection 125
3.8.14 Drilling spindles selection 125
3.8.15 Machining priority 126
3.8.15.1 Working center machine 126
3.8.15.2 Clamps machine 128
3.8.16 Explicit toolpath 132
3.8.16.1 Explicit toolpath creation 132
3.8.16.1.1 Explicit toolpath first point 132
3.8.16.1.2 Adding a linear toolpath to explicit toolpath 133
3.8.16.1.3 Add an arc toolpath by 3 points to explicit toolpath 134
3.8.16.1.4 Add an arc toolpath by 2 points and center to explicit toolpath 135
3.8.16.1.5 Add an arc toolpath by 2 points and radius to explicit toolpath 135
3.8.16.1.6 Add an arc toolpath by center and angle 136
3.8.16.2 Explicit toolpath attributes 137
3.8.16.2.1 Explicit toolpath feed attribute (FEED) 137
3.8.16.2.2 Explicit toolpath depth attribute (DEPTH) 138
3.8.16.3 Explicit toolpath selection 139
3.8.16.4 Explicit toolpath deletion 140
3.8.17 Machining technologies 142
3.8.17.1 Machining technologies application 142
3.8.18 Feedrate profiles 143
3.8.18.1 Feedrate profile application 143
3.8.18.2 Feedrate profile reset 143
3.9 Macro 143
3.9.1 Macro usage 144
3.9.1.1 Macro inserting 144
3.9.1.2 Macro parameters passing 146
3.10 NC Functions 146
3.10.1 WorkPiece pressure 146
3.10.2 Machine parking 147
3.10.3 WorkPiece probing 147
3.10.4 Clean table 148
3.10.5 Tool length probing 148
3.10.6 WorkPiece translation and rotation probing 149
3.10.7 User message 149
3.10.8 Null operation 150
3.10.9 Iso operation 150
3.10.10 CombiFlex unload 151
5
3.10.11 Check Y dimension 151
3.10.12 Workpiece center 151
3.10.13 Workpiece lifting 152
3.10.14 Tool integrity check 152
3.11 Workpiece Blocking 153
3.11.1 Blocking profile 153
3.11.1.1 Blocking profile creation 153
3.11.1.2 Add to blocking profile a segment 154
3.11.1.3 Add to blocking profile an arc by 3 points 154
3.11.1.4 Add to blocking profile an arc by 2 points and center 154
3.11.1.5 Add to blocking profile an arc by 2 points and radius 155
3.11.1.6 Add to blocking profile an arc by center and angle 155
3.11.1.7 Add to blocking profile a tangent segment 156
3.11.1.8 Add to blocking profile a tangent arc 156
3.11.1.9 Blocking profile closing 156
3.11.2 Blocking devices positioning 156
3.11.2.1 Positioning reference definition 157
3.11.2.2 Blocking bar positioning 157
3.11.2.3 Mobile bar positioning 158
3.11.2.4 Support base positioning 158
3.11.2.5 Clamp positioning 159
3.11.2.6 Horizontal clamp positioning 160
3.11.2.7 Clamp for jamp positioning 160
3.11.2.8 Suction cup positioning 161
3.11.2.9 Hepod suction cup positioning 162
3.11.2.10 Suction cup positioning on multi functional table 163
3.12 Mathematical functions 163
3.13 Additional functions 164
4 Tools 165
6 Labeling 169
6.1 Label definition 169
6.2 WorkPiece label definition 170
6.3 Label parameters definition 170
7 Nesting 171
7.1 Part 171
7.1.1 Part creation 171
7.1.2 Part labeling 172
6
7.1.2.1 Part label definition 172
7.1.2.2 Part label parameters definition 173
7.1.3 Part selection 174
7.1.4 Part removal from machine table 175
7.2 Remnant 176
7.2.1 Remnant creation 176
7.2.2 Remnant labeling 177
7.2.2.1 Remnant label definition 177
7.2.2.2 Remnant label parameters definition 178
7.2.3 Remnant selection 178
7.2.4 Remnant removal from machine table 179
7.3 Scrap 180
7.3.1 Scrap creation 180
7.3.2 Scrap selection 181
7.3.3 Scrap removal from machine table 182
7.4 Full Examples 183
8 XConverter 192
8.1 Working modes 194
8.1.1 Mode 0 - Xcs Import 194
8.1.2 Mode 1 - WorkPiece Import 195
8.1.3 Mode 2 - Project optimization 195
8.1.4 Mode 3 - Xcs import, workpiece import and optimization 196
8.1.5 Mode 4 - Xxl import 196
8.1.6 Mode 5 - Pgm import 197
8.1.7 Mode 10 - Pgmx process and Xxl generation 198
8.1.8 Mode 11 - Mixx project creation 199
8.1.9 Mode 12 - Automatic clamps setup 201
8.1.10 Mode 13 - Automatic suction cups setup 202
8.1.11 Mode 14 - Import Pgm and automatic suction cups setup 202
8.1.12 Mode 16 - Project time execution estimation 203
8.1.13 Mode 18 - Advanced Dxf import 204
8.1.14 Mode 20 - Project check 204
8.1.15 Mode 21 - Build and check project to load on the machine 205
8.1.16 Mode 22 - Build project to load on the machine 206
8.1.17 Mode 23 - Xcs import build project to load on machine 207
8.1.18 Mode 24 - Global parameters file update from csv file 207
8.1.19 Mode 25 - Update project parametrics from csv file 208
9 Appendix 208
9.1 Canonical working fields 209
9.2 Non canonical working fields 210
7
1 Introduction
8
This manual provides a guide in using the Maestro Scripting Language.
1. Machining-macros
2. Machining programs
In particular, the second case applies to situations where the woodworking workshop
already has software to manage the production of door and window frames, stairs,
furniture or other products, and it needs to transfer the information to Maestro.
This manual describes how to transfer the geometric data and the data that
describes the entire machining process for a specific workpiece to Maestro.
2 Basic Concept
9
The main basic objects that can be managed with MSL and that can be defined and
created in a generic script are:
1. Machining parameters
2. Workpiece
3. Plane
4. Geometry
5. Machining operation
6. Workplan
The instructions of a generic scripting file are interpreted and executed in sequence.
During the scripting execution phase, when a new object part of one of the basic
types defined in the list is created, the object created automatically becomes the
active object for the specific type.
For every type of object listed, during the scripting execution an updated state is
maintained with the active object, the last one created during the interpretation.
The active object is used by the system to automatically associate the information
necessary to create new objects.
For the complete list of the instructions available to create scripting files in .XCS
format, see the XilogMaestroScripting.chm manual in the Languages folder found in
the folder that Xilog Maestro is installed in.
Many of the instructions require the Name and Description string type of parameters,
in order to associate a name and description to the instruction. The system checks
that a script does not contain more than one instruction with the same name. It is
therefore important to use different names for the Name parameter. The user can
also choose not to specify any value either for the Name or the Description, by
entering an empty string as the parameter value (e.g. “”). In this case the system will
associate a correct default name to the object created.
10
3 Project
Project refers to an object that can contain the definition of one or more workpieces
with 2D geometries and associated machining.
The project contains all the information needed to define a machining process.
The project must have one or more workpiece, where could be defined reference
geometries to create machinings.
11
The programs (XCS) are used to define a complete part program to machine one or
more workpieces in textual mode. They can be imported interactively in the Maestro
editor (see script import function) or they can be converted in pgmx programs, in
batch mode, with the XConverter tool that is distributed with the Maestro software.
The definition of machining programs with the scripting language is usually used so
that from an external environment to Maestro or with a generic post-processor, a
complete workpiece can be defined without using the interactive environment.
To create a program in .xcs format there is no specific help function. The program
must be created on a text file with .xcs extension and it must contain only
instructions recognized by Maestro, described in this manual and the basic
instructions of the language C#.
For the complete list of the instructions available to create scripting files in .XCS
format, see the XilogMaestroScripting.chm manual in the Languages folder found in
the folder that Xilog Maestro is installed in.
The program as well as containing recognized instructions and with the correct
syntax, it must also have a set of instructions compatible with each other and have
the definition of the finished workpiece.
12
See below for an example of a workpiece program defined with the scripting
language.
// definitions for the program header
SetMachiningParameters("AB", 1, 21, 1114112, false);
13
ResetAuxiliaryHood();
CreateRoughFinish("Frame External Routing2",0,"Frame External Routing", TypeOfProcess.GeneralRouting
,"E023","3",2,-1,-1.5,0);
Machining parameters are a set of parameters associated with the project that let to
load and execute it on machine.
Machining parameters definition is better to do as first instructions of the project,
before to create all necessary objects to create the project.
This instruction is used to configure the machine parameters used to execute the
program. Generally this function must be the first instruction in the script, because it
configures the main parameters for the correct execution of the program. This
instruction is not necessary for programs for PowerFlex machines.
The table below shows the input parameters for the instruction.
14
3.2.2 Y position of workpiece referred to opposite side stop
Esempio :
SetRelatedToOppositeSideStop(true);
15
Name Type Description
isTechnologicalMirror Bool true to maintain tool technology on X or Y
specular working fields, otherwise false.
SetTechnologicalMirror parameters
Example:
SetTechnologicalMirror(true);
Example:
SetWorkPieceSidePresserDisabledOnStart(true);
16
3.2.7 Maintaining the process sequence
17
Name Type Description
useWorkPieceFallPrevention Bool Enable anti-fall function
SetWorkPieceFallPrevention parameters
Example:
SetWorkPieceFallPrevention(true);
Example:
SetOptimization(true);
18
Defined with instruction SetComment.
The instruction is used to create a comment to the project.
SetComment parameters
Example:
SetComment(“Project comment”);
SetDescription parameters
Example:
SetDescription(“Project description”);
SetEnableDynamicAreas parameters
Example:
SetEnableDynamicAreas(true);
19
3.2.15 Edge banding optimization
Example:
20
workPieceShiftX double Manual shift along X. Valid only if
isAutomaticWorkPieceShiftEnabled is false.
workPieceShiftY double Manual shift along Y.Valid only if
isAutomaticWorkPieceShiftEnabled is false.
SetWorkPieceShift parameters
The example below set a manual shift of 2 along X and 3 along Y to machinings after
probing.
SetWorkPieceShift(false, 2, 3);
SetIntermediateUnloadingType parameters
3.3 Parametrics
21
The instruction creates a parameter that can be used to create parametric
objects or to create objects that can be parametric calculated.
The example below creates different types of parameters, length type, speed type,
angle type, conditional type and number type.
This allows during machine panel xcs loading (available only with Active), to specify
a different value than default value for parameters, and gives the possibility to create
objects with different values than default.
22
The example below shows how to get a parameter value in order to use it to create
other objects.
Two parameters are created with name X and Y and using the instruction
GetVariableTypedValue the value is assigned to the local variable of double type.
Those 2 local variables could be used as input parameters in instruction methods.
In this case, statically, x and y values are equal to default values 100 e 200 and
created point will have this coordinates, but if xcs file will be loaded in machine panel
(available only with Active), it is possible to pass different values to X and Y
(example 300, 400) and instruction returned values will be new passed values, so
the point will be created with coordinates 300, 400.
In this way, if the 2 parameters are used to create another object (example a point),
this object will be created with passed values instead of default values.
3.4 WorkPiece
The dimensions and the shape of the finished workpiece can be specified with
various instructions.
23
In the example below a workpiece called “Example workpiece” with dimensions
1800x800x18 is created:
See the example below for the definition of a finished and raw of an arch workpiece
The dimensions and the shape of the raw workpiece can be specified with various
primitives.
24
bx1 double Machining allowance in x-
bx2 double Machining allowance in x+
by1 double Machining allowance in y-
by2 double Machining allowance in y+
bz1 double Machining allowance in z-
bz2 double Machining allowance in z+
CreateRawWorkpiece Parameters
See the example below for the definition of a finished and raw of an arch workpiece
25
AddSegmentToPolyline(1310.7,593);
AddSegmentToPolyline(953.3,1211);
AddSegmentToPolyline(246.6,1211);
AddSegmentToPolyline(-110.7,593);
AddSegmentToPolyline(74,593);
CreateRawWorkpieceFromExtrusion("Telaio_Up",63);
Workpieces position on canonica areas (see appendix 9.1 Canonical working fields)
is always done referring to the workpiece corner closest to working area origin.
Workpiece positioning is made by the instruction described in the paragraph 3.4.2
WorkPiece positioning.
Workpiece position is defined by its lower left corner with respect to working field
origin.
26
The example below positions 3 workpieces (200, 100), (300,200), (400, 200) at
positions (200,100), (600,100), (1000,100) respect to working field origin.
SetMachiningParameters("A", 1, 0, 0, false);
CreateFinishedWorkpieceBox("WorkPiece1",200,200,18);
SetWorkpieceSetupPosition(200,100,0,0);
CreateFinishedWorkpieceBox("WorkPiece2",300,200,18);
SetWorkpieceSetupPosition(600,100,0,0);
CreateFinishedWorkpieceBox("WorkPiece3",400,200,18);
SetWorkpieceSetupPosition(1000,100,0,0);
Workpiece position is defined by its upper left corner with respect to working field
origin.
27
The example below positions 3 workpieces (200, 100), (300,200), (400, 200) at
positions (200,100), (600,100), (1000,100) respect to working field origin.
SetMachiningParameters("E", 1, 0, 0, false);
CreateFinishedWorkpieceBox("WorkPiece1",200,200,18);
SetWorkpieceSetupPosition(200,100,0,0);
CreateFinishedWorkpieceBox("WorkPiece2",300,200,18);
SetWorkpieceSetupPosition(600,100,0,0);
CreateFinishedWorkpieceBox("WorkPiece3",400,200,18);
SetWorkpieceSetupPosition(1000,100,0,0);
Workpiece position is defined by its lower right corner with respect to working field
origin.
28
The example below positions 3 workpieces (200, 100), (300,200), (400, 200) at
positions (200,100), (600,100), (1000,100) respect to working field origin.
SetMachiningParameters("D", 1, 0, 0, false);
CreateFinishedWorkpieceBox("WorkPiece1",200,200,18);
SetWorkpieceSetupPosition(200,100,0,0);
CreateFinishedWorkpieceBox("WorkPiece2",300,200,18);
SetWorkpieceSetupPosition(600,100,0,0);
CreateFinishedWorkpieceBox("WorkPiece3",400,200,18);
SetWorkpieceSetupPosition(1000,100,0,0);
Workpiece position is defined by its upper right corner with respect to working field
origin.
29
The example below positions 3 workpieces (200, 100), (300,200), (400, 200) at
positions (200,100), (600,100), (1000,100) respect to working field origin.
SetMachiningParameters("H", 1, 0, 0, false);
CreateFinishedWorkpieceBox("WorkPiece1",200,200,18);
SetWorkpieceSetupPosition(200,100,0,0);
CreateFinishedWorkpieceBox("WorkPiece2",300,200,18);
SetWorkpieceSetupPosition(600,100,0,0);
CreateFinishedWorkpieceBox("WorkPiece3",400,200,18);
SetWorkpieceSetupPosition(1000,100,0,0);
Workpieces position on non canonical areas (see appendix 9.2 Non canonical
working fields) could be done in standard mode or in Layout mode.
Workpiece positioning is made by the instruction described in the paragraph 3.4.2
WorkPiece positioning.
30
where the brown rectangles identify workpieces, blu rectangle identifies the
workpieces container and the black rectangle identifies the working field, it is defined
Workpieces positioning is made with reference to the lower left corner of the
rectangle that contains all workpieces.
31
X and Y position value to insert in the position instruction have to be calculated by
this formulas:
Workpieces positioning is made with reference to the upper left corner of the
rectangle that contains all workpieces.
32
WorkpieceXPositionInstruction = BoundaryLength - WorkpieceXPosition
-WorkpieceLength + BoundaryXOrigin
Workpieces positioning is made with reference to the lower right corner of the
rectangle that contains all workpieces.
Workpieces positioning is made with reference to the upper right corner of the
rectangle that contains all workpieces.
33
X and Y position value to insert in the position instruction have to be calculated by
this formulas:
Workpieces position on non canonical working fields in Layout mode could be done
by putting on positioning instruction the desired workpiece position values like in
Layout. It is applied in the same way in all kinds of working fields.
ConfigWorkpiecePositioningMode parameters
In the example below workpieces are positioned at (200,100), (600, 100), (1000,
100) referred to working field origin.
SetMachiningParameters("H", 1, 0, 0, false);
//Layout mode
ConfigWorkpiecePositioningMode(1);
34
CreateFinishedWorkpieceBox("WorkPiece1",200,200,18);
SetWorkpieceSetupPosition(200,100,0,0);
CreateFinishedWorkpieceBox("WorkPiece2",300,200,18);
SetWorkpieceSetupPosition(600,100,0,0);
CreateFinishedWorkpieceBox("WorkPiece3",400,200,18);
SetWorkpieceSetupPosition(1000,100,0,0);
or by name
WorkPiece can be deleted by an index that represents the position in the workpiece
list. The first sequence position is 0.
DeleteWorkpiece parameters
35
In the example below the workpiece in position 1 (“Piece2”) will be deleted.
CreateFinishedWorkpieceBox("Piece1", 1600, 1200, 18);
CreateFinishedWorkpieceBox("Piece2", 1600, 1200, 18);
DeleteWorkpiece(1);
DeleteWorkpiece parameters
Parametri SetWorkpieceNeedXPositionDetection
CreateFinishedWorkpieceBox("WorkPiece2",300,200,18);
SetWorkpieceSetupPosition(600,100,0,0);
SetWorkpieceNeedXPositionDetection(true);
CreateFinishedWorkpieceBox("WorkPiece3",400,200,18);
SetWorkpieceSetupPosition(1000,100,0,0);
3.5 WorkPlan
36
A WorkPlan defines the sequence of the executable to execute on the machine.
When a new project is generated a default workplan, called “Setup”, is created
automatically. This is also the case when executing a scripting project
CreateWorkplan parameters
or by name
37
3.5.3 WorkPlan deletion
WorkPlan can be deleted by an index that represents the position in the workplan
list. The first sequence position is 0.
DeleteWorkplan parameters
DeleteWorkplan parameters
Parametri RenameWorkplan
38
CreateFinishedWorkpieceBox("WorkPiece", 1600, 1200, 18);
CreateWorkplan("WorkPlan1");
RenameWorkplan("WorkPlanNew1");
3.6 Planes
Plane is associated to a finished workpiece and let to manage 2d objects creation.
Planes are of 2 types, standar and user.
Standard plane are always created by workpiece creation, the instruction to create a
workpiece automatically creates the box planes. User planes can be created and
associated to a workpiece.
In case of extrusion workpiece, standard planes are relative to the box that contains
the extrusion.
39
Name Type Description
name String Workplane name
offsetZ Double Plane translation value along Z
CreateWorkplane parameters
In the example below a plane called “Workplane” is created, parallel to the upper
side and a plane “Workplane2” parallel to the right side:
Defined with instruction CreateWorkplane. This instruction has more than one
prototype to create planes.
Used to create a plane starting from the identification of three points on the plane.
In the example below a plane called “Workplane” is created, starting from points (30,
40, 0), (100, 200, 5), (1000, 40, 0):
Used to create a plane by the origin of the plane and its rotation in relation to the
axes X and Z. Plane is created positioning it on specified origin and rotate it first
around Z axis and after X axis.
40
Name Type Description
Name String Workplane name.
X0 Double X coordinate of the origin.
Y0 Double Y coordinate of the origin.
Z0 Double Z coordinate of the origin.
ZRotation Double Angle of rotation around Z axis.
XRotation Double Angle of rotation around X axis.
CreateWorkplane parameters
In the example below a plane called “Workplane ” is created, with origin in point
(1000, 500, 0), rotation of 45° in relation to axis Z and 45° in relation to axis X:
Used to create a parametric plane by the origin of the plane and its rotation in
relation to the axes X and Z. Plane is created positioning it on specified origin and
rotate it first around Z axis and after X axis.
In the example below a plane called “Parametric plane” is created, with origin in point
(x, y, z), rotation of parameter “rotZ” in relation to axis Z and rotation of parameter
“rotX” in relation to axis X:
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
SetWorkpieceSetupPosition(0,0,0,0);
41
3.6.3 Plane selection
To specify the plane that will be used for the geometries and the machining
operations, the active plane must be specified.
Ii is used to select a plane as “active plane”. To do this the name of the workplane
being activated is required. The workplane can be a plane created by the user with
one of the previously described instructions or one of the standard machining sides
(top, bottom, right, left, front, back). If the user does not activate a plane, the top
plane is selected by default as the active workplane.
In the example below the left plane of the workpiece is selected as active plane, on
which the geometry of a rhombus is performed, then the bottom plane is selected on
which a cross is performed:
or by index
SelectWorkplane parameters
0- Top plane
1- Right plane
2- Left plane
42
3- Front plane
4- Back plane
5- Bottom plane
In the example below the left plane of the workpiece is selected as active plane, on
which the geometry of a rhombus is performed, then the bottom plane is selected on
which a cross is performed:
Plane can be deleted by an index that represents the position in the plane list. The
first sequence position is 0.
DeleteWorkplane parameters
In the example below the workpiece in position 6 (“User plane”) will be deleted.
Position value is equal to 6 because for each workpiece will always be added the 6
standard planes.
CreateFinishedWorkpieceBox("Piece", 1600, 1200, 18);
CreateWorkplane("User plane", 10);
DeleteWorkplane(6);
DeleteWorkplane parameters
In the example below the plane named “User plane” will be deleted.
43
CreateFinishedWorkpieceBox("Piece", 1600, 1200, 18);
CreateWorkplane(“Piano utente”, 10);
DeleteWorkplane(“Piano utente”);
3.7 2D Geometries
See below for the instructions available to create geometries available with MSL.
3.7.1.1 Point
CreatPoint parameters
In the example below, a cartesian point called “Point” will be created at coordinates
(10,10). Firstly the operation workpiece is defined. Furthermore as the plane for the
geometry has not been specified, the top side plane is considered as active by
default.
44
3.7.1.2 Parametric point
CreatePoint parameters
In the example below, a parametric cartesian point called “Point” will be created at
coordinates (“X”,”Y”). Firstly the operation workpiece is defined. Furthermore as the
plane for the geometry has not been specified, the top side plane is considered as
active by default.
3.7.1.3 Segment
In the example below a segment called “Example segment” is created with a start
point (30,70) and final point (650,500). Firstly the operation workpiece is defined.
Furthermore as the plane for the geometry has not been specified, the top side plane
is considered as active by default.
45
CreateFinishedWorkpieceBox("Workpiece",1800 800 18);
CreateSegment("Segment", 30, 70, 650, 500);
In the example below a segment called “Parametric segment” is created with a start
point (Xi,Yi) and final point (Xf,Yf). Firstly the operation workpiece is defined.
Furthermore as the plane for the geometry has not been specified, the top side plane
is considered as active by default.
3.7.1.4 Arc
46
In the example below an arc called “Arc” is created by instruction
CreateArc3Points with first point P1(0,0), second point P2(100,100) and third
point P3 (200, 0).Furthermore as the plane for the geometry has not been specified,
the top side plane is considered as active by default.
47
startY double Coordinate Y of start point
endX double Coordinate X of final point
endY double Coordinate Y of final point
radius double Arc radius
isClockwise bool Clockwise direction
isOver180 bool Arc angle greater than 180°
CreateArc2PointRadius parameters
48
3.7.1.4.5 Arc by start point end point and center point
49
CreateFinishedWorkpieceBox(“Workpiece", 1800, 800, 18);
AddVariable("Xi", 0, 0, 1, "", false, true);
AddVariable("Yi", 0, 0, 1, "", false, true);
AddVariable("Xf", 100, 0, 1, "", false, true);
AddVariable("Yf", 0, 0, 1, "", false, true);
AddVariable("Xc", 50, 0, 1, "", false, true);
AddVariable("Yc", 0, 0, 1, "", false, true);
3.7.1.5 Circle
50
In the example below a circle called “Circle” is created by instruction
CreateCircleCenterRadius with center point Pc(1000,400), radius 300 and
rotation anti clockwise. Furthermore as the plane for the geometry has not been
specified, the top side plane is considered as active by default.
The instruction creates a circle from center point and radius and rotation direction.
51
AddVariable("R", 10, 0, 1, "", false, true);
The instruction creates a parametric circle from center point and radius and rotation
direction.
In the example below an anti clockwise circle called “Cerchio esempio” is created by
instruction CreateCircleCenterPoint with center point Pc(1000,400), point on
circumference Pcf(900, 400). Furthermore as the plane for the geometry has not
been specified, the top side plane is considered as active by default.
52
The instruction creates a circle from the center point, a point on the circumference
and rotation direction.
3.7.1.6 Ellipse
In the example below an ellipse called “Example ellipse” is created with a centre
point (1000,500), major semi-axis 450, minor semi-axis 200, angle 30°.
53
3.7.1.6.2 Parametric ellipse by center and axes
In the example below an ellipse called “Example ellipse” is created with a centre
point (Xc,Yc), major semi-axis MR, minor semi-axis mr, angle A.
3.7.1.7 Polyline
54
The instruction creates the polyline with start point from which next elements will be
added
In the example below a polyline named “Polyline” is created with a start point (200,
550). This polyline is not consistent, because it defines only the start point to add
segments and arcs.
In the example below a polyline named “Parametric polyline” is created with a start
point (Xi, Yi). This polyline is not consistent, because it defines only the start point to
add segments and arcs.
55
Nome Tipo Descrizione
endX double X coordinate of the last point
endY double Y coordinate of the last point
nameElement string Name of added element
AddSegmentToPolyline parameters
In the example below a polyline named “Polyline” is created with a segment with a
start point (200, 500) and end point (300, 600).
56
p3X double X coordinate of point 3
p3Y double Y coordinate of point 3
nameElement string Name of added element
AddArc3PointsToPolyline parameters
In the example below a polyline named “Polyline” is created with an arc with a start
point (200, 500), second point (300, 600) and end point (400, 500).
57
Nome Tipo Descrizione
endX double X coordinate of final point
endY double Y coordinate of final point
centerX double X coordinate of centre point
centerY double Y coordinate of centre point
isClockwise bool true clockwise direction, false anti clockwise
nameElement string Name of added element
AddArc2PointCenterToPolyline parameters
In the example below a polyline named “Polilinea” is created with an arc with a start
point (200, 500), center point (300, 500) and end point (400, 500) and rotation
clockwise.
In the example below a polyline named “Parametric polyline” is created with an arc
with a start point (Xi, Yi), center point (Xc, Yc) and end point (Xf, Yf) and rotation
clockwise.
58
3.7.1.7.9 Add to polyline an arc by 2 points and radius
In the example below a polyline named “Polyline” is created with an arc with a start
point (200, 500), end point (400, 500) radius 100 and rotation clockwise.
In the example below a polyline named “Parametric polyline” is created with an arc
with a start point (Xi, Yi), end point (Xf, Yf) radius R and rotation clockwise.
59
CreatePolyline("Parametric polyline", "Xi", "Yi");
AddArc2PointRadiusToPolyline("Xf", "Yf", "R", true, true);
In the example below a polyline named “Polilinea” is created with an arc with a start
point (200, 500), center point (300, 500) and angle 45 degree.
The example below creates a polyline rectangle. The polyline is created with 3
rectangle sides and instruction creates the last rectangle side connecting the end
point of the third element with the first point of the polyline.
the same closed polyline can be created manually by adding the last segment
connecting the end point of the third element with the first point of the polyline.
60
CreatePolyline("Polilinea", 0, 0);
AddSegmentToPolyline(100, 0);
AddSegmentToPolyline(100, 100);
AddSegmentToPolyline(0, 100);
AddSegmentToPolyline(0, 0);
In case of parametric polyline the instruction adds automatically the parametric of the
last polyline element.
Parametri AddFilletToPolyline
The example below creates a polyline named “Polilinea”, with 2 elements connected
with an arc of radius 10.
61
Defined with instruction AddChamferToPolyline.
The instruction creates a chamfer between previous element and current element,
inserting a segment.
Parametri AddChamferToPolyline
The example below creates a polyline named “Polilinea”, with 2 elements connected
with a segment with length on first segment 10 and length on second segment 20.
SetReferencePosition parameters
In the example below will be created 4 cartesian points each one referred to the top
plane corner.All points have the same coordinates (10,10).
In this way created points will be at :
BottomLeft (10,10)
TopLeft (10,1190)
BottomRight (1590,10)
TopRight (1590,1190)
62
SetReferencePosition(0);
CreatPoint("TopLeft", 10, 10);
SetReferencePosition(1);
CreatPoint("BottomRight", 10, 10);
SetReferencePosition(2);
CreatPoint("TopRight", 10, 10);
Geometry can be deleted by an index that represents the position in the geometries
add sequence.
DeleteGeometry parameters
In the example below cartesian point with index 1, corresponding to “Point2” will be
deleted
CreateFinishedWorkpieceBox("Workpiece", 1600, 1200, 18);
CreatPoint("Point1", 10, 10);
CreatPoint("Point2", 10, 10);
DeleteGeometry(1);
DeleteGeometry parameters
63
type of tool, tool machining approach and retraction, infeed speed, tool rotation and
feed, type of head and other parameters specific to the machining operation
selected.
Machining operation definition is made by a set of mandatory parameters that have
to be always specified and a set of optional parameters that could be not specified.
Optional parameters can be not specified and in this case default values will be
used.
Optional parameters that can be not specified are always all parameters following
the last specified parameter.
The example below shows an instruction with two mandatory parameters and three
optional parameters
Instruction(10,10)
In this case unspecified optional parameters will use default values, in the example
10, 20, 30.
The example below shows the case where the optional parameter
“OptionalParameter2” will be passed with value 50
Instruction(10,10,10,50)
The example below shows the instruction with all optional parameters specified by
their default values.
Lavorazione(10,10,10,20,30)
About parameters that can be passed to instructions, be careful to use the tool name
parameter, it must be the same name used to define it in the ToolManager tools file
definition. If a tool is created with the name “Fresa D10 L20”, this will be the name to
use as a tool parameter in machining creation.
Machinings could be created in a way the toolpath generator generates the toolpath,
or it is possible to define an explicit toolpath to execute on the machine where the
toolpath generator does not generate anything.
See the Maestro manual for the specific meaning of the operations listed above. See
below for a description of the most common operations.
64
3.8.1 Machining types
3.8.1.1 Drilling
In the example below a drilling machining is created with mandatory parameters X,Y,
depth and diameter
CreateFinishedWorkpieceBox("Workpiece",1600,1200,18);
SelectWorkplane("Top");
CreateDrill("Drill",10,20,15,8, "",TypeOfProcess.Drilling);
In the example below a drilling machining is created with mandatory parameters X,Y,
depth and diameter and optional parameter rotSpeed.
CreateFinishedWorkpieceBox("Workpiece",1600,1200,18);
SelectWorkplane(“Top”);
CreateDrill(“Drill”,10,20,15,8, “”,TypeOfProcess.Drilling, “-1”, “-1”, 0 , 15000);
65
Defined with instruction CreateDrill.
The instruction creates a parametric drill in X,Y position and with specified diameter
and depth. Other parameters are optional.
CreateFinishedWorkpieceBox("Workpiece",1600,1200,18);
SelectWorkplane("Top");
CreateDrill("Drill",”X”,”Y”,”Depth”,”Diameter”, "",TypeOfProcess.Drilling);
66
y double Coordinate Y of the hole
diameter double Hole diameter
overcutLength double Hole overcut length
description string Descrizione della lavorazione
typeOfProcess TypeOfProcess Type of process (specify
TypeOfProcess.Drilling)
tool string (opt) Tool name ("-1" for automatic selection)
head string (opt) Work head number ("-1" for automatic
selection)
dischargeSteps int (opt def. 0) Discharge steps number
rotSpeed double (opt def -1) Tool rotation speed
boringSpeed double (opt def -1) Slow down speed
kindOfHole string (opt def -1) Type of hole (tool:P=flat, L=lance, S=taper.
The default value is P)
taperHeight double (opt def 0) Taper height
securityQuote double (opt def Safety quota
null)
holeTaperDiameter double (opt def 0) Hole diameter of taper or bliz (valid only
with taper or bliz).
CreateThroughDrill parameters
In the example below a through drill will is created with mandatory parameters X,Y,
diameter and overcut length.
CreateFinishedWorkpieceBox("Workpiece",1600,1200,18);
SelectWorkplane("Top");
CreateThroughDrill("Hole",10,20,8,14, "",TypeOfProcess.Drilling);
In the example below a through drill is created with mandatory parameters X,Y,
diameter and overcut length and optional parameter rotSpeed.
CreateFinishedWorkpieceBox("Pezzo",1600,1200,18);
SelectWorkplane(“Top”);
CreateThroughDrill(“Hole”,10,20,8,14, “”,TypeOfProcess.Drilling, “-1”, “-1”, 0 , 15000);
67
head string (opt) Work head number ("-1" for automatic
selection)
dischargeSteps int (opt def. 0) Discharge steps number
rotSpeed object (opt def -1) Tool rotation speed
boringSpeed object (opt def -1) Slow down speed
kindOfHole object (opt def -1) Type of hole (tool:P=flat, L=lance, S=taper.
The default value is P)
taperHeight object (opt def 0) Taper height
securityQuote object (opt def Safety quota
null)
holeTaperDiameter object (opt def 0) Hole diameter of taper or bliz (valid only
with taper or bliz).
CreateThroughDrill parameters
In the example below a through drill will is created with mandatory parameters X,Y,
diameter and overcut length defined by parameters.
CreateFinishedWorkpieceBox("Workpiece",1600,1200,18);
SelectWorkplane("Top");
CreateThroughDrill("Hole",10,20,8,14, "",TypeOfProcess.Drilling);
In the example below a through drill is created with mandatory parameters X,Y,
diameter and overcut length and optional parameter rotSpeed.
CreateFinishedWorkpieceBox("Pezzo",1600,1200,18);
SelectWorkplane(“Top”);
CreateThroughDrill(“Hole”,”X”,”Y”,”Diameter”,”OvercutLength”, "",TypeOfProcess.Drilling);
68
description string Operation description
typeOfProcess TypeOfProcess Type of process (specify
TypeOfProcess.Drilling)
tool String (opt) Tool name ("-1" for automatic selection)
head String (opt) Work head number ("-1" for automatic
selection)
dischargeSteps int (opt def. 0) Discharge steps number
rotSpeed double (opt def -1) Tool rotation speed
boringSpeed double (opt def -1) Slow down speed
kindOfHole string (opt def -1) Type of hole (tool:P=flat, L=lance, S=taper.
The default value is P)
taperHeight double (opt def 0) Taper height
securityQuote double (opt 0) Safety quote
holeTaperDiameter object (opt def 0) Hole diameter of taper or bliz (valid only
with taper or bliz).
CreateSlantedDrill parameters
The example below creates a slanted drilling located in (10,20,18) with 60 degree
Vector and 45 degree Tilting.
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
CreateSlantedDrill("Hole",10,20,18,45,60, "",TypeOfProcess.Drilling);
3.8.1.6 Routing
69
rotSpeed double (opt def -1) Rotation speed of tool (S in XG0 Xilog), if
not set the value programmed in the tooling
will be used (optional parameter).
Speed double (opt def -1) Milling speed, if not set the value
programmed in the tooling will be used
(optional parameter).
overMaterial double (opt def 0) Overmaterial, if not set 0 will be used
(optional parameter).
CreateRoughFinis parameters
The example below creates 2D routings width depth 10 and tool named “EndMill
D20” on the same geometry associated with the top plane. Created routings are on
center tool, left tool compensation and right tool compensation. With compensation is
possible to define an over material.
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
// Plane selection
SelectWorkplane("Top");
// Geometry creation
CreatePolyline("Geometry",0,0);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(100,100);
The example below creates 2D routings width depth 10 and tool named “EndMill
D20” on different geometries associated with the top plane. Each routing has is own
geometry. Created routings are on center tool, left tool compensation and right tool
compensation. With compensation is possible to define an over material.
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
// Plane selection
SelectWorkplane("Top");
// Geometry creation
CreatePolyline("Geometry1",0,0);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(100,100);
// Geometry creation
CreatePolyline("Geometry2",0,0);
70
AddSegmentToPolyline(0,200);
AddSegmentToPolyline(200,200);
// Geometry creation
CreatePolyline("Geometry3",0,0);
AddSegmentToPolyline(0,300);
AddSegmentToPolyline(300,300);
71
inputSpeed double (opt def -1) Input speed
rotSpeed double (opt def -1) Tool rotation speed
speed double (opt def -1) Feed speed
overMaterial double (opt def 0) Overmaterial (the default value is 0)
CreateSlantedRoughFinish parameters
The example below creates 2D slanted routings width depth 20 and tool named
“EndMill D20” on the same geometry associated with the top plane. Created routings
have different tool approaches.
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
// Plane selection
SelectWorkplane("Top");
// Geometry creation
CreateSegment("Segment1", 0, 0, 100, 0);
The example below creates 2D slanted routings width depth 20 and tool named
“EndMill D20” on different geometries associated with the top plane. Created
routings have different tool approaches.
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
// Plane selection
SelectWorkplane("Top");
// Geometry creation
CreateSegment("Segment1", 0, 0, 100, 0);
// Slanted routing creation with tool approach 0
CreateSlantedRoughFinish("SlantedRouting1", 60, 45, 1, 20, "Slanted Routing",
TypeOfProcess.GeneralRouting, "Fresa D20", "-1", -1, -1, -1, 0);
// Geometry creation
CreateSegment("Segment2", 0, 50, 100, 50);
// Slanted routing creation with tool approach 1
CreateSlantedRoughFinish("SlantedRouting2", 60, 45, 2, 20, "Slanted Routing",
TypeOfProcess.GeneralRouting, "Fresa D20", "-1", -1, -1, -1, 0);
72
// Geometry creation
CreateSegment("Segment3", 0, 100, 100, 100);
// Slanted routing creation with tool approach 2
CreateSlantedRoughFinish("SlantedRouting3", 60, 45, 3, 20, "Slanted Routing",
TypeOfProcess.GeneralRouting, "Fresa D20", "-1", -1, -1, -1, 0);
// Geometry creation
CreateSegment("Segment4", 0, 100, 100, 100);
// Slanted routing creation with tool approach 3
CreateSlantedRoughFinish("SlantedRouting4", 60, 45, 4, 20, "Slanted Routing",
TypeOfProcess.GeneralRouting, "Fresa D20", "-1", -1, -1, -1, 0);
// Geometry creation
CreateSegment("Segment5", 0, 100, 100, 100);
// Slanted routing creation with tool approach 4
CreateSlantedRoughFinish("SlantedRouting5", 60, 45, 5, 20, "Slanted Routing",
TypeOfProcess.GeneralRouting, "Fresa D20", "-1", -1, -1, -1, 0);
The example below creates 2D slanted routings width depth 20 and tool named
“EndMill D20” on the same geometry associated with a plane parallel to the top
plane. Created routings have different tool approaches.
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
// Geometry creation
CreateSegment("Segment1", 0, 0, 100, 0);
// Slanted routing creation with tool approach 0
CreateSlantedRoughFinish("SlantedRouting1", 60, 45, 0, 20, "Slanted Routing",
TypeOfProcess.GeneralRouting, "Fresa D20", "-1", -1, -1, -1, 0);
// Geometry creation
CreateSegment("Segment2", 0, 50, 100, 50);
// Slanted routing creation with tool approach 1
CreateSlantedRoughFinish("SlantedRouting2", 60, 45, 1, 20, "Slanted Routing",
TypeOfProcess.GeneralRouting, "Fresa D20", "-1", -1, -1, -1, 0);
// Geometry creation
CreateSegment("Segment3", 0, 100, 100, 100);
// Slanted routing creation with tool approach 2
CreateSlantedRoughFinish("SlantedRouting3", 60, 45, 2, 20, "Slanted Routing",
TypeOfProcess.GeneralRouting, "Fresa D20", "-1", -1, -1, -1, 0);
// Geometry creation
CreateSegment("Segment4", 0, 100, 100, 100);
// Slanted routing creation with tool approach 3
CreateSlantedRoughFinish("SlantedRouting4", 60, 45, 3, 20, "Slanted Routing",
TypeOfProcess.GeneralRouting, "Fresa D20", "-1", -1, -1, -1, 0);
// Geometry creation
CreateSegment("Segment5", 0, 100, 100, 100);
// Slanted routing creation with tool approach 4
CreateSlantedRoughFinish("SlantedRouting5", 60, 45, 4, 20, "Slanted Routing",
TypeOfProcess.GeneralRouting, "Fresa D20", "-1", -1, -1, -1, 0);
73
The instruction creates a slanted routing with tool compensation. The Z axis rotation
angle must be equal to 0 (angleA).
CreateSlantedRoughFinish parameters
The example below creates 2D slanted routings width depth 20 and tool named
“EndMill D20” on the same geometry associated with the top plane. Created routings
have different tool compensations.
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
// Plane selection
SelectWorkplane("Top");
// Geometry creation
CreateSegment("Segmento", 0, 0, 100, 0);
74
// Slanted routing creation in center tool
CreateSlantedRoughFinish("SlantedRouting1", 60, 45, 0, 20, "Slanted Routing",
TypeOfProcess.GeneralRouting, "Fresa D20", "-1", 0, -1, -1, -1, 0);
75
C = 13, left correction + in depth
correction C = 23, right correction + in
depth correction
inputSpeed object (opt def Input speed
null)
rotSpeed object (opt def Tool rotation speed
null)
speed object (opt def Feed speed
null)
overMaterial object (opt def Overmaterial
null)
isCnc bool (opt def true if Cnc compensation, false if Cad
false) compensation(optional parameter).
CreateSlantedRoughFinish parameters
The example below creates 2D slanted routings width depth 20 and tool named
“EndMill D20” on the same geometry associated with the top plane. Created routings
have angles and depth parametrized.
// WorkPiece creation
CreateFinishedWorkpieceBox("Pezzo",1600,1200,18);
// Parameter definition
AddVariable("A", 100, 0,0);
AddVariable("B", 100, 0,0);
AddVariable("Depth", 20, 0,1);
// Plane selection
SelectWorkplane("Top");
// Geometry creation
CreateSegment("Segment", 0, 0, 100, 0);
3.8.1.9 Chamfer
76
1 = tool on left of geometry on the bottom
plane ;
2 = tool on right of geometry on the top
plane ;
3 = tool on right of geometry on the bottom
plane ;
description string Operation description
typeOfProcess TypeOfProcess Type of process (specify TypeOfProcess.
GeneralRouting)
tool String (opt) Tool name ("-1" for automatic selection)
head String (opt) Work head number ("-1" for automatic
selection)
inputSpeed double (opt def -1) Input speed
rotSpeed double (opt def -1) Tool rotation speed
speed double (opt def -1) Feed speed
overMaterial double (opt def 0) Overmaterial (the default value is 0)
CreateChamfer parameters
The example below creates a chamfer with height and width 10 and a tool named
“EndMill D20” on a geometry associated with the top plane.
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
CreateSegment("Segment", 0, 0, 0, 800);
CreateChamfer("Chamfer", 10, 10, 0, 0, "Chamfer", TypeOfProcess.GeneralRouting, "Fresa
D20", "-1", -1, -1, -1, 0);
77
3.8.1.10 Slot
The example below creates slots with tool named “Fresa D20” depth 10 on geometry
defined on top plane with different tool compensation values
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
78
// Geometry creation
CreateSegment("Segment", 0, 0, 100, 0);
The example below creates slot with tool named “Fresa D20” start depth 10 and end
depth 20 on geometry defined on top plane in center tool
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
// Geometry creation
CreateSegment("Segment", 0, 0, 100, 0);
79
cutPositionUpper bool (opt def true) Blade cut reference position (true = upper
position reference)
materialPositionLeft bool (opt def true) Workpiece position for subsequent operation
(true = workpiece on the left of the cut)
referenceOffset double (opt def 0) Distance from the blade cut reference
position
extraDepth double (opt def 0) Extra cut depth
CreateBladeCut parameters
The example below creates saw cuts with saw tool named “Lama D300” with
different parameter combinations
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Geometry creation
CreateSegment("Segment", 0, 0, 100, 0);
//Saw Cut machining in center tool inclination 45 degree, top plane cut reference,
//left material
CreateBladeCut("SawCut4", "Saw Cut", TypeOfProcess.GeneralRouting, "Lama D300", "-1",
45, 0, -1, -1, -1, 0, true, true, 0, 0);
//Saw Cut machining in left tool compensation inclination 45 degree, top plane cut
//reference, left material
CreateBladeCut("SawCut5", "Saw Cut", TypeOfProcess.GeneralRouting, "Lama D300", "-1",
45, 1, -1, -1, -1, 0, true, true, 0, 0);
//Saw Cut machining in right tool compensation inclination 45 degree,top plane cut
//reference, left material
CreateBladeCut("SawCut6", "Saw Cut", TypeOfProcess.GeneralRouting, "Lama D300", "-1",
45, 2, -1, -1, -1, 0, true, true, 0, 0);
3.8.1.12 Contour
80
Name Type Description
name string Operation name
depth double Operation depth
typeOfContour int Type of contour (0 = workpiece, 1 = selected
geometry)
sideOfContour int Contour side (0 = internal, 1 = external)
description string Operation description
typeOfProcess TypeOfProcess Type of process (specify TypeOfProcess.
GeneralRouting)
tool String (opt) Tool name ("-1" for automatic selection)
head String (opt) Work head number ("-1" for automatic
selection)
correction int (opt def 0) Tool correction (0=central, 1=left, 2=right.
The default value is 0)
inputSpeed double (opt def -1) Input speed
rotSpeed double (opt def -1) Tool rotation speed
speed double (opt def -1) Feed speed
overMaterial double (opt def 0) Overmaterial (the default value is 0)
CreateContour parameters
The example below creates a contour on workpiece with a mill tool named “Fresa
D20”
CreateFinishedWorkpieceBox("Workpiece",1600,1200,18);
//Workpiece contour
CreateContour("Contour", 18, 0, 1, "Workpiece contour", TypeOfProcess.GeneralRouting,
"Fresa D20", "-1", 0, -1, -1, -1, 0);
The example below creates an external contour on the geometry used to create the
workpiece extrusion with a mill tool named “Fresa D20”
CreatePolyline("WorkPiece profile",0,0);
AddSegmentToPolyline(1600,0);
AddSegmentToPolyline(1600,1200);
AddSegmentToPolyline(0,1200);
ClosePolyline();
CreateFinishedWorkpieceFromExtrusion("WorkPiece",18);
//Contour on geometry
CreateContour("Contour", 18, 1, 1, "Contour on geometry",
TypeOfProcess.GeneralRouting, "Fresa D20", "-1", 0, -1, -1, -1, 0);
3.8.1.13 Pocket
81
Name Type Description
name string Operation name
depth double Operation depth
description string Operation description
typeOfProcess TypeOfProcess Type of process (specify TypeOfProcess.
ConcentricalPocket)
tool String (opt) Tool name ("-1" for automatic selection)
head String (opt) Work head number ("-1" for automatic
selection)
inputSpeed double (opt def -1) Input speed
rotSpeed double (opt def -1) Tool rotation speed
speed double (opt def -1) Feed speed
overlap double (opt def 50) Overlap percentage
finalPass bool (opt false) Final pass application
bossNames string[] Name of the geometries that define the
bosses
CreateContourPocket parameters
The example below creates a closed pocket on a circle with mill tool named “Fresa
D20”
CreateFinishedWorkpieceBox("Pezzo",1600,1200,18);
CreateCircleCenterRadius ("Cerchio", 25, 25, 10, false);
CreateContourPocket("Svuotatura", 10, "Svuotatura cerchio",
TypeOfProcess.ConcentricalPocket, "Fresa D20", "-1", -1, -1, -1, 50, false);
The example below creates a closed pocket on a circle containing a boss with mill
tool named “Fresa D20”
CreateFinishedWorkpieceBox("Pezzo",1600,1200,18);
CreateCircleCenterRadius ("Isola", 40, 40, 15, false);
CreateCircleCenterRadius ("Cerchio esterno", 40, 40, 30, false);
CreateContourPocket("Svuotatura", 10, "Svuotatura cerchio",
TypeOfProcess.ConcentricalPocket, "Fresa D20", "-1", -1, -1, -1, 50, false,
"Isola");
82
OvercutLength double (opt def 0) Overcut length.
inputSpeed double (opt def -1) Input speed
rotSpeed double (opt def -1) Tool rotation speed
speed double (opt def -1) Feed speed
Parametri CreateToeKickPocket
CreateFinishedWorkpieceBox("Workpiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
//Geometry
CreatePolyline("Geometry", 0,0);
AddSegmentToPolyline(100,0);
AddSegmentToPolyline(100,100);
AddSegmentToPolyline(0,100);
ClosePolyline();
3.8.1.15 Dowel
83
dowelReleaseDistanc double (opt 0) Distance on dowel realesing added to
e standard release distance (optional
parameter).
CreateDowelOperation parameters
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
SelectWorkplane("Left");
CreateDowelOperation("Dowel", 100, 100, 15, "Dowel", 0, -1,0, 8, 30);
CreateDowelOperation parameters
The example below creates a parametric dowel with outer length 15.
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
SelectWorkplane("Left");
84
//Dowel with X and Y parametrized
CreateDowelOperation("Dowel", "X", "Y", 15, "Dowel", 0, -1,0, 8, 30);
Drilling and doweling define a complex process, where there will be created an
association between doweling that is master machining and drilling that is dependent
machining.
In this way, after process building, modifying dowel operation, drilling will be modified
as a consequence
A complex process is defined by an initialization process instruction
InitializeComplexProcess and a create process instruction
CreateComplexProcess.
The example below creates a doweling process, made by drilling and doweling.
85
3.8.1.18 3D Routing
This kind of instruction defines an explicit toolpath, the toolpath will not be generated
by the toolpath generator and will be executed exactly as is defined.
Create3DRoughFinish parameters
86
startZ double Z coordinate of the first point of the
toolpath.
CreateToolpath3D parameters
Parametri AddSegmentToToolpath
The example below creates a 3D routing with a tool named “Fresa D20” with linear
elements with rotation change in each element
3.8.1.19 Pattern
87
CreatePattern parameters
The example below creates a rectangular pattern of holes with 3 rows, 2 columns,
rows distance 32, column distance 32
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
SelectWorkplane("Top");
CreatePattern(3,2,32,32,0,90);
CreateDrill("Drill",10,20,15,8, "",TypeOfProcess.Drilling, "-1", "-1", 0 , 15000);
The example below creates a rectangular pattern of dowels with 3 rows, 2 columns,
rows distance 32, column distance 32
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
SelectWorkplane("Left");
CreatePattern(3,2,32,32,0,90);
CreateDowelOperation("Dowel", 100, 100, 15, "Dowel", 0, -1,0, 8, 30);
The example below creates a rectangular repetition drill followed by a single drill
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
SelectWorkplane("Top");
CreatePattern(3,2,32,32,0,90);
CreateDrill("Drill1",10,20,15,8, "",TypeOfProcess.Drilling, "-1", "-1", 0 , 15000);
ResetPattern();
CreateDrill("Drill2",10,20,15,8, "",TypeOfProcess.Drilling, "-1", "-1", 0 , 15000);
3.8.1.20 Trimming
88
infeedAdvance double (opt def 0) Shifting of the start point of the
trajectory: negative value reduce of that
value the first segment of profile, positive
value (only per closed profile) extend of
that value the first segment of profile
outfeedDelay double (opt def 0) Shifting of the end point of the trajectory:
negative value reduce of that value the last
segment of profile, positive value (only per
closed profile) extend of that value the
last segment of profile
inputSpeed double (opt def -1) Input speed
rotSpeed double (opt def -1) Tool rotation speed
speed double (opt def -1) Feed speed
overMaterial double (opt def 0) Overmaterial
retractAngle double (opt def 0) Retract tool inclination Angle to the normal
to the path (degrees)
CreateTrimming parameters
CreateFinishedWorkpieceBox("Workpiece",1600,1200,18);
//Geometry creation
CreateSegment("Segment", 0, 0, 100, 0);
3.8.2.1 Lead in
89
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
// Plane selection
SelectWorkplane("Top");
// Geometry creation
CreatePolyline("Geometry",0,0);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(100,100);
//Fresatura
CreateRoughFinish("Routing1",10,"", TypeOfProcess.GeneralRouting,"Fresa
D20","-1",0,-1,-1,3,0);
//Fresatura
CreateRoughFinish("Routing2",10,"", TypeOfProcess.GeneralRouting,"Fresa
D20","-1",0,-1,-1,3,0);
//Fresatura
CreateRoughFinish("Routing3",10,"", TypeOfProcess.GeneralRouting,"Fresa
D20","-1",0,-1,-1,3,0);
//Fresatura
CreateRoughFinish("Routing4",10,"", TypeOfProcess.GeneralRouting,"Fresa
D20","-1",0,-1,-1,3,0);
90
distance double Radius multiplier for segment/retraction
arc segment (distance = tool radius
multiplier).
overlapLength double Profile overlap length
speed double (opt) Segment/ retraction arc speed
SetRetractStrategy parameters
The example below creates a machining with different kind of lead out
CreateFinishedWorkpieceBox("Pezzo",1600,1200,18);
// Plane selection
SelectWorkplane("Top");
// Creazione geometria
CreatePolyline("Geometria",0,0);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(100,100);
//Fresatura
CreateRoughFinish("Fresatura1",10,"", TypeOfProcess.GeneralRouting,"Fresa
D20","-1",0,-1,-1,3,0);
//Fresatura
CreateRoughFinish("Fresatura2",10,"", TypeOfProcess.GeneralRouting,"Fresa
D20","-1",0,-1,-1,3,0);
//Fresatura
CreateRoughFinish("Fresatura3",10,"", TypeOfProcess.GeneralRouting,"Fresa
D20","-1",0,-1,-1,3,0);
//Fresatura
CreateRoughFinish("Fresatura4",10,"", TypeOfProcess.GeneralRouting,"Fresa
D20","-1",0,-1,-1,3,0);
3.8.3 Strategies
Machining strategy defines the way a machining is executed to reach the machining depth
and are applied only to the first following machining.
91
3.8.3.1 Drilling strategies
isSafetyQuoteReturn bool (opt def false) true if each step return is at safety
quote, false if each step return is inside
piece.
CreateMultiStepDrillingStrategy parameters
The example below creates a drilling executed in 3 steps with return inside piece
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
CreateMultiStepDrillingStrategy(true, 0, 3);
CreateDrill("Drilling1",10,20,20,8, "",TypeOfProcess.Drilling, "-1", "-1", 0 , 15000);
The example below creates a drilling executed with step depth 4 with return inside
piece
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
CreateMultiStepDrillingStrategy(false, 4, 0);
CreateDrill("Drill2",10,20,20,8, "",TypeOfProcess.Drilling, "-1", "-1", 0 , 15000);
The example below creates a drilling executed in 3 steps with return at safety quote
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
CreateMultiStepDrillingStrategy(true, 0, 3, true);
CreateDrill("Drilling1",10,20,20,8, "",TypeOfProcess.Drilling, "-1", "-1", 0 , 15000);
The example below creates a drilling executed with step depth 4 with return at safety
quote
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
92
CreateMultiStepDrillingStrategy(false, 4, 0, true);
CreateDrill("Drill2",10,20,20,8, "",TypeOfProcess.Drilling, "-1", "-1", 0 , 15000);
The example below creates a routing with step depth 3, final depth 5, stroke
connection at safety quote, lead in lead out only on first pass.
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
93
//Geometry creation
CreateSegment("Geometry",0,0, 100, 0);
//Strategy creation
CreateUnidirectionalMillingStrategy(true, 3, 5, 1, false);
//Routing
CreateRoughFinish("Routing1",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","-1",0,-1,-1,3,0);
The example below creates a routing with step depth 3, final depth 5, stroke
connection at safety quote, lead in and lead out arc type at quote on each pass.
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
//Geometry creation
CreateSegment("Geometry",0,0, 100, 0);
//Lead in
SetApproachStrategy(false,true,1.5)
//Strategy creation
CreateUnidirectionalMillingStrategy(true, 3, 5, 1, true);
//Routing
CreateRoughFinish("Routing1",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","-1",0,-1,-1,3,0);
CreateBidirectionalMillingStrategy parameters
94
The example below creates a routing with step depth 3, final depth 5.
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
//Geometry creation
CreateSegment("Geometry",0,0, 100, 0);
//Strategy creation
CreateBidirectionalMillingStrategy(true, 3, 5, 1, false);
//Routing
CreateRoughFinish("Routing1",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","-1",0,-1,-1,3,0);
The example below creates a routing with step depth 3, final depth 5.
CreateFinishedWorkpieceBox("Pezzo",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
//Geometry creation
CreateSegment("Geometry",0,0, 100, 0);
//Strategy
CreateHelicMillingStrategy(3, 5, true);
//Routing
CreateRoughFinish("Routing",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","-1",0,-1,-1,3,0);
95
The instruction applies a strategy to the machining where the final depth is reached
with a zig zag toolpath.
CreateZigZagMillingStrategy parameters
The example below creates a routing with feed depth 3, return depth 4 and final
depth 5.
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
//Geometry creation
CreateSegment("Geometry",0,0, 100, 0);
//Strategy
CreateZigZagMillingStrategy(3, 4, 5);
//Routing
CreateRoughFinish("Routing",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","-1",0,-1,-1,3,0);
96
tool correction (positive value for
outside movement and negative for inside).
reateSectioningMillingStrategy parameters
The example below applies to a saw cut machining a sectioning strategy with first cut
depth 3 and out distance 10.
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
//Geometry creation
CreateSegment("Geometry",0,0, 100, 0);
//Strategy
CreateSectioningMillingStrategy(3, 10, 0);
//Saw cut machining
CreateBladeCut("SawCut", "Saw cut", TypeOfProcess.GeneralRouting, "Lama D300", "-1",
90, 0, -1, -1, -1, 0, true, true, 0, 0);
97
final pass, used to reach the final
programmed depth).
strokeConnectionType int (opt def 1) Tool movement between two passages:
0 = tool remains inside the workpiece and
moves to the start point of the next pass;
1 = tool exits the workpiece and moves
quickly to the start point of the next
pass;
isHelicStrategy bool (opt def false) Enables the helic strategy
CreateContourParallelStrategy parameters
The example below applies a contour parallel strategy to a closed pocket with multi
passes enabled, passes depth 5 and final pass 2
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Geometry creation
CreateCircleCenterRadius ("Circle", 25, 25, 200, false);
//Strategy
CreateContourParallelStrategy(true, 0 true, 5, 2);
//Pocket
CreateContourPocket("Pocket", 10, "Circle pocketing",
TypeOfProcess.ConcentricalPocket, "Fresa D20", "-1", -1, -1, -1, 50, false);
98
finishPassOutputDist double (opt def 0) Lead out distance to apply at first point
ance of radial finish pass.
finishPassSlowDistan double (opt def 0) Lead in distance slow speed to apply to
ce radial finish pass.
finishPassSlowSpeed double (opt def -1) Lead in slow speed to apply to radial
finish pass.
allowMultiplePasses bool (opt def false) If true, this is the standard roughing
operation with multiple passes, i. e.
several layers of material are removed
sequentially, taking into account the
maximum cutting depth, if false, this is
the special roughing operation for
pre-cast features with one pass.
axialCuttingDepth double (opt def 0) Depth pass along tool axis
axialFinishCuttingDe double (opt def 0) Finish depth pass along tool axis. It is
pth the pass to reach the machining final
depth
CreateContourParallelStrategy parameters
CreateFinishedWorkpieceBox("Workpiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
//Geometry
CreatePolyline("Geometry", 0,0);
AddSegmentToPolyline(100,0);
AddSegmentToPolyline(100,100);
AddSegmentToPolyline(0,100);
ClosePolyline();
//Strategy
CreateToekickMillingStrategy(10, false, 1, 20, 30, 5, 7, true, 4, 5);
CreateToeKickPocket("ToekickNoStrategy", "", TypeOfProcess.ToekickPocket, "Fresa D20",
"-1");
To program the machine and perform specific procedures during the operations the
user can use certain instructions called machine functions.
This category includes, for example, functions used to enable, disable and configure
the positioning of pneumatic hoods (PneumaticHood), the dustpan (Dustpan), etc....
Please note that this type of instructions are usually treated as “modal” functions
inside the scripting. This means that the configurations set with these functions
remain active for the subsequent operations, unless the settings are changed (reset
or new setting). The operations that use these configurations do not “consume” the
99
setting: the user must remember to reset or change the configuration set if he no
longer wants to use it in the subsequent operations, otherwise it remains active.
There are also functions called “non-modal”. These functions set configurations
whose validity is linked only to the first use: the first operation (after setting) uses and
“consumes” the configuration. In this case, after the operation, the configuration is no
longer available for the subsequent operations and it must be reset. By way of an
example, many instructions defined “operation strategies”, described later, are part of
this category.
See below for the main machine functions available to the user and the main input
parameters that they accept.
The example below shows an application of the Jerk instruction for a routing
operation
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
//Geometry creation
CreateSegment("Geometria",0,0, 100, 0);
//Jerk
SetJerk(100);
//Routing
CreateRoughFinish("Routing",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","-1",0,-1,-1,3,0);
100
Defined with instruction SetJerk3D.
The instruction sets jerk 3D.
The example below shows an application of the Jerk 3D instruction for a routing
operation
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
//Geometry creation
CreateSegment("Geometria",0,0, 100, 0);
//Jerk
SetJerk3D(100);
//Routing
CreateRoughFinish("Routing",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","-1",0,-1,-1,3,0);
The example below shows an application of the NC Auto Speed instruction for a
routing operation
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
//Geometry creation
CreateSegment("Geometria",0,0, 100, 0);
101
3.8.4.4 Main Pneumatic hood machine function
The example below shows an application of the instruction to set hood position for a
routing operation
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
//Geometry creation
CreateSegment("Geometria",0,0, 100, 0);
//Hood
SetPneumaticHoodPosition(3);
//Routing
CreateRoughFinish("Routing",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","-1",0,-1,-1,3,0);
102
5 = low hood in position 5
6 = low hood in position 6
7 = low hood in position 7
8 = low hood in position 8
SetAuxiliaryHoodPosition parameters
The example below shows an application of the instruction to set hood position for a
routing operation
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
//Geometry creation
CreateSegment("Geometria",0,0, 100, 0);
//Hood
SetAuxiliaryHoodPosition(3);
//Routing
CreateRoughFinish("Routing",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","-1",0,-1,-1,3,0);
The example below shows an application of the instruction to set hood position for a
routing operation
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
//Geometry creation
CreateSegment("Geometria",0,0, 100, 0);
103
//Hood
SetOppositePneumaticHood(3);
//Routing
CreateRoughFinish("Routing",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","-1",0,-1,-1,3,0);
SetMotorizedHoodPosition parameters
The example below shows an application of the instruction to set main hood position
for a routing operation
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
//Geometry creation
CreateSegment("Geometria",0,0, 100, 0);
//Hood
SetMotorizedHoodPosition(100);
//Routing
CreateRoughFinish("Routing",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","-1",0,-1,-1,3,0);
104
Name Type Description
isUpperReference bool (def null) true to refere the hood to upper reference,
false to refere the hood to lower reference.
The example below shows an application of the instruction to set main hood in
automatic mode for a routing operation
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
//Geometry creation
CreateSegment("Geometry",0,0, 100, 0);
//Hood
SetAutomaticMotorizedHood(true, 10, true, 5);
//Routing
CreateRoughFinish("Routing",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","-1",0,-1,-1,3,0);
SetHoodPosition parameters
105
The example below shows an application of the instruction to set main hood in
automatic mode for a routing operation
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
//Geometry creation
CreateSegment("Geometry",0,0, 100, 0);
//Hood
SetHoodPosition(null);
//Routing
CreateRoughFinish("Routing",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","-1",0,-1,-1,3,0);
The example below shows an application of the instruction to set clean mode for a
routing operation
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
//Geometry creation
CreateSegment("Geometria",0,0, 100, 0);
//Clean mode
SetCleaningMode();
//Routing
CreateRoughFinish("Routing",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","-1",0,-1,-1,3,0);
106
Name Type Description
offset double Dustpan distance (between dustpan and
measured net radius/net radius measured at
right angles to the tool path)
position int Dustpan position:
0 = off;
1 = on in position 1;
2 = on in position 2;
isInOutEnable bool (opt def null) true to enable approach and retract;
otherwise false
isTrajectoryForc bool (opt def null) true to force trajectory to avoid unexpected
ed movement due to discontinuity segments;
otherwise false
SetDustpanOffset parameters
The example below shows an application of the instruction to set dustpan for a
routing operation
CreateFinishedWorkpieceBox("Pezzo",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
//Geometry creation
CreateSegment("Geometry",0,0, 100, 0);
//DustPan
SetDustpanOffset(10, 1, false);
//Routing
CreateRoughFinish("Routing",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","-1",0,-1,-1,3,0);
There is another possibility to set the dustpan using both the instructions
SetDustpanOffset e SetDustpanPosition at the same time.
The instruction SetDustpanOffset sets the offset without enabling the device and
without setting the position.
The instruction SetDustpanPosition enables the device to set position and lead in
lead out.
107
Name Type Description
position int Dustpan position:
0 = off;
1 = on in position 1;
2 = on in position 2;
isInOutEnable bool (opt def null) true to enable approach and retract;
otherwise false
isTrajectoryForc bool (opt def null) true to force trajectory to avoid unexpected
ed movement due to discontinuity segments;
otherwise false
SetDustpanPosition parameters
The example below shows an application of the instruction to set dustpan for a
routing operation
CreateFinishedWorkpieceBox("Pezzo",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
//Geometry creation
CreateSegment("Geometry",0,0, 100, 0);
//DustPan
SetDustpanPosition(1, false);
SetDustpanOffset(10);
//Routing
CreateRoughFinish("Routing",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","-1",0,-1,-1,3,0);
The instruction below enables the dustpan device, setting the position and lead in
lead out.
108
SetMotorizedDustpanPosition parameters
The example below shows an application of the instruction to set dustpan for a
routing operation
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
//Geometry creation
CreateSegment("Geometry",0,0, 100, 0);
//DustPan
SetMotorizedDustpanPosition(100, false);
//Routing
CreateRoughFinish("Routing",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","-1",0,-1,-1,3,0);
SetMotorizedDustpanOffset parameters
The example below shows an application of the instruction to set dustpan for a
routing operation
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
//Geometry creation
CreateSegment("Geometry",0,0, 100, 0);
//DustPan
SetMotorizedDustpanPosition(100, false);
SetMotorizedDustpanOffset(10);
//Routing
CreateRoughFinish("Routing",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","-1",0,-1,-1,3,0);
109
The instruction enables the machine function to recover 5 axis angular recover.
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
//Geometry creation
CreateSegment("Geometry",0,0, 100, 0);
SetBrakes parameters
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
110
SelectWorkplane("Top");
//Geometry creation
CreateSegment("Geometry",0,0, 100, 0);
//Brake axis
SetBrakes("B,C");
//Routing
CreateRoughFinish("Routing",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
SetToolBlower parameters
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
//Geometry creation
CreateSegment("Geometry",0,0, 100, 0);
//Tool blowing
SetToolBlower(0);
//Routing
CreateRoughFinish("Routing",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
111
Nome Tipo Descrizione
gain double Gain
offset double Offset
compression double Compression
SetElectronicZeroProber parameters
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
//Geometry creation
CreateSegment("Geometry",0,0, 100, 0);
//Routing
CreateRoughFinish("Routing",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
SetPressureRollers parameters
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
//Geometry creation
CreateSegment("Geometry",0,0, 100, 0);
//Pressure rollers
112
SetPressureRollers(10);
//Routing
CreateRoughFinish("Routing",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
//Geometry creation
CreateSegment("Geometry",0,0, 100, 0);
//Mechanical pressure
SetMechanicalPresser();
//Routing
CreateRoughFinish("Routing",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
113
Feed attribute (FEED) modifies the machining feed in the specified position of the
geometry element or toolpath element.
The example below applies a feed attribute to a routing in the start point of the
second geometry element. Feed starts from this point.
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
CreatePolyline("Geometry",0,0);
AddSegmentToPolyline(0,100);
SetAttribute("FEED", 5);
AddSegmentToPolyline(100,100);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(0,0);
//Routing
CreateRoughFinish("Routing",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
The example below applies a feed attribute to a routing in the middle point of the
second geometry element. Feed starts from this point.
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
CreatePolyline("Geometry",0,0);
AddSegmentToPolyline(0,100);
SetParametricAttribute("FEED", 5, 0.5);
114
AddSegmentToPolyline(100,100);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(0,0);
//Routing
CreateRoughFinish("Routing",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
Depth attribute (FEED) modifies the machining depth in the specified position of the
geometry element or toolpath element.
The example below applies a depth attribute to a routing in the end point of the
second geometry element.
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
CreatePolyline("Geometry",0,0);
AddSegmentToPolyline(0,100);
SetAttribute("DEPTH", 5);
AddSegmentToPolyline(100,100);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(0,0);
//Routing
CreateRoughFinish("Routing",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
115
The example below applies a depth attribute to a routing in the middle point of the
second geometry element.
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
CreatePolyline("Geometry",0,0);
AddSegmentToPolyline(0,100);
SetAttribute("DEPTH", 5, 0.5);
AddSegmentToPolyline(100,100);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(0,0);
//Routing
CreateRoughFinish("Routing",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
Micro junction attribute (TAB) modifies the machining toolpath to leave a portion of
unmachined material.
The example below applies a micro junction attribute to a routing in the end point of
the second geometry element.
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
CreatePolyline("Geometry",0,0);
AddSegmentToPolyline(0,100);
SetAttribute("TAB", 5, 2);
AddSegmentToPolyline(100,100);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(0,0);
//Routing
116
CreateRoughFinish("Routing",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
The example below applies a micro junction attribute to a routing in the middle point
of the second geometry element.
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
CreatePolyline("Geometry",0,0);
AddSegmentToPolyline(0,100);
SetParametricAttribute2("TAB", 5, 2, 0.5);
AddSegmentToPolyline(100,100);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(0,0);
//Routing
CreateRoughFinish("Routing",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
SetStartPointAttribute parameters
The example below applies a start point on a routing in the middle point of the
second element.
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
117
//Plane selection
SelectWorkplane("Top");
CreatePolyline("Geometry",0,0);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(100,100);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(0,0);
SetStartPointAttribute(1, 50);
//Routing
CreateRoughFinish("Routing",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
Parametri SetStartMachiningPosition
The example below applies a start point position on a routing in the middle point of
the longest side.
.
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
CreatePolyline("Geometry",0,0);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(100,100);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(0,0);
SetStartMachiningPosition(1);
//Routing
CreateRoughFinish("Routing",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
118
3.8.5.1.6 End point attribute
SetEndPointAttribute parameters
The example below applies an end point on a routing in the middle point of the
second element.
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
CreatePolyline("Geometry",0,0);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(100,100);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(0,0);
SetEndPointAttribute(1, 50);
//Routing
CreateRoughFinish("Routing",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
The instruction allows you to specify the correction reference for machining
operations on PowerFlex machines. If part measurement is enabled on the machine,
the machining will be corrected, to keep its position unchanged from the reference
point. The method must be inserted into the script before any machining operation
on which it is intended to specify a reference correction that differs from the standard
119
one. Remember that on PowerFlex machines, the standard correction gives as a
reference point:
● the upper left corner for processing on the upper face:
● the left lower corner for processing on the left, front and bottom faces;
● the lower right corner for processing on the right and rear sides.
SetProbingReferenceReferencePoint parameters
The example below creates a routing with probing correction upper left.
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
CreatePolyline("Geometry",0,0);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(100,100);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(0,0);
SetProbingReferenceReferencePoint(1);
//Fresatura
CreateRoughFinish("Routing",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
120
false = machining in the opposite
direction of the geometry;
SetMachiningDirection parameters
The example below creates a routing with direction opposite to geometry. Toolpath
will be clockwise.
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
CreatePolyline("Geometry",0,0);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(100,100);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(0,0);
SetMachiningDirection(false);
//Routing
CreateRoughFinish("Routing",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
SetToolCorrection parameters
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
CreatePolyline("Geometry",0,0);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(100,100);
121
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(0,0);
SetCompensationMode parameters
The example below creates routings with different toolpath generation modes.
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
CreatePolyline("Geometria",0,0);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(100,100);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(0,0);
122
//Routing with NC toolpath generation
SetCompensationMode(true);
CreateRoughFinish("Fresatura1",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
SetBreakableMode parameters
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
CreatePolyline("Geometria",0,0);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(100,100);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(0,0);
//Breakable Routing
SetBreakableMode(true, false);
CreateRoughFinish("Fresatura1",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
123
SetApproachSecurityDistance parameters
The example below creates a routing with lead in safety distance 10..
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
CreatePolyline("Geometria",0,0);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(100,100);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(0,0);
//Breakable Routing
SetBreakableMode(true, false)
CreateRoughFinish("Fresatura1",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
SetRetractSecurityDistance parameters
The example below creates a routing with lead out safety distance 10.
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
CreatePolyline("Geometria",0,0);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(100,100);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(0,0);
//Breakable Routing
SetBreakableMode(true, false)
CreateRoughFinish("Fresatura1",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
124
CreateRoughFinish("Fresatura2",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
SetMachine parameters
The example below creates a routing with lead out safety distance 10.
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
CreatePolyline("Geometria",0,0);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(100,100);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(0,0);
//Breakable Routing
SetBreakableMode(true, false)
CreateRoughFinish("Fresatura1",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
SetMachine parameters
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
125
SetSpindles(1, 5, 7);
CreateDrill("Hole",10,20,15,8, "",TypeOfProcess.Drilling);
SetPriority parameters
In the working center machine case, priorities are used to indicate to the optimizers
which machinings have the same technology and must be executed on the same
group and the group execution sequence.
All machinings with the same technology must have the same priority value.
Priority value defines the sequence with 2 or more machinings have to be executed.
It is positively increasing and the execution sequence is from 1 to N.
Machining 1
Machining 2
Machining 3
Machining 4
Machining 5
Machining 6
where odd machinings have to be executed first and even machinings after
Machining 1
Machining 3
Machining 5
126
Machining 2
Machining 4
Machining 6
it is necessary to set odd machinings with same priority values and even machinings
with same priority value
Machining 1 - Priority 1
Machining 3 - Priority 1
Machining 5 - Priority 1
Machining 2 - Priority 2
Machining 4 - Priority 2
Machining 6 - Priority 2
In this way, odd machinings have priority 1 and even machinings have priority 2, the
optimizers must optimize all machinings with priority 1 in the same group and all
machinings with priority 2 in another group, respecting the group sequence.
Machining 5
Machining 1
Machining 3
Machining 6
Machining 2
Machining 4
where it is shown that inside the same group the machining sequence is changed,
but the priority sequence is respected, odd machinings before even machinings.
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
CreatePolyline("Geometry",0,0);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(100,100);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(0,0);
//Routing 1 priority 1
SetPriority(1);
CreateRoughFinish("Routing1",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
//Routing 2 priority 2
SetPriority(2);
CreateRoughFinish("Routing2",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
127
//Routing 3 priority 1
SetPriority(1);
CreateRoughFinish("Routing2",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
//Routing 4 priority 2
SetPriority(2);
CreateRoughFinish("Routing4",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
//Routing 5 priority 1
SetPriority(1);
CreateRoughFinish("Routing5",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
//Routing 6 priority 2
SetPriority(2);
CreateRoughFinish("Routing6",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
In the clamps machine case, priorities are used to indicate to optimizers which
machinings are to be inserted in the same clamping and which sequence they have
to respect.
To have machinings in the same clamping, it is necessary to create groups, groups
are created setting incremental values to priorities, the first next machining with a
priority value lower or equal to last priority defines a new group.
Machining with priority value equal to 0 could be in whatever clamping.
Machining 1
Machining 2
Machining 3
Machining 4
Machining 5
Machining 6
where odd machinings have to be executed in the same clamping and even
machinings have to be in another clamping
First clamping
Machining 1
Machining 3
Machining 5
Second clamping
Machining 2
Machining 4
128
Machining 6
it is necessary to set to odd machinings priority increasing starting from 1 and to set
to even machining priority increasing starting from 1
Machining 1 - Priority 1
Machining 3 - Priority 2
Machining 5 - Priority 3
Machining 2 - Priority 1
Machining 4 - Priority 2
Machining 6 - Priority 3
In this way, odd machinings will be inserted in the same clamping and executed in
the specified sequence,
Machining 1
Machining 3
Machining 5
and even machinings will be inserted in the next clamping and executed in the
specified sequence
Machining 2
Machining 4
Machining 6
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
CreatePolyline("Geometry",0,0);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(100,100);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(0,0);
//Routing 1 priorità 1
SetPriority(1);
CreateRoughFinish("Routing1",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
//Routing 3 priorità 2
SetPriority(2);
CreateRoughFinish("Routing3",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
//Routing 5 priorità 3
SetPriority(3);
CreateRoughFinish("Routing5",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
//Routing 2 priorità 1
129
SetPriority(1);
CreateRoughFinish("Routing2",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
//Routing 4 priorità 2
SetPriority(2);
CreateRoughFinish("Routing4",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
//Routing 6 priorità 3
SetPriority(3);
CreateRoughFinish("Routing6",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
Machining 1
Machining 2
Machining 3
Machining 4
Machining 5
Machining 6
where is necessary to have one clamping for odd machinings and one clamping for
even machinings
Machining 1 - Priority 1
Machining 3 - Priority 2
Machining 5 - Priority 3
Machining 2 - Priority 1
Machining 4 - Priority 2
Machining 6 - Priority 3
if the priority sequence is not respected the result will be very different.
For example changing the machining sequence definition
Machining 1 - Priority 1
Machining 2 - Priority 1
Machining 3 - Priority 2
Machining 4 - Priority 2
Machining 5 - Priority 3
Machining 6 - Priority 3
First clamping
130
Machining 1 - Priority 1
Secon clamping
Machining 2 - Priority 1
Machining 3 - Priority 2
Third clamping
Machining 4 - Priority 2
Machining 5 - Priority 3
Forth clamping
Machining 6 - Priority 3
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
CreatePolyline("Geometry",0,0);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(100,100);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(0,0);
//Routing 1 priority 1
SetPriority(1);
CreateRoughFinish("Routing1",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
//Routing 2 priority 1
SetPriority(1);
CreateRoughFinish("Routing2",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
//Routing 3 priority 2
SetPriority(2);
CreateRoughFinish("Routing3",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
//Routing 4 priority 2
SetPriority(2);
CreateRoughFinish("Routing4",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
//Routing 5 priority 3
SetPriority(3);
CreateRoughFinish("Routing5",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
//Routing 6 priority 3
SetPriority(3);
CreateRoughFinish("Routing6",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
131
3.8.16 Explicit toolpath
Explicit toolpath is a 2.5D toolpath that can be explicit defined and is not affected by
toolpath generation calculation. It can be executed directly on the machine as is
defined.
The toolpath is defined with a sequence of linear and arc elements with X,Y,Z
position relative to the associated machining plane system reference.
The explicit toolpath definition needs first to create a machining in the classic way
(plane, geometry, machining) and after assigning to it a toolpath.
It is important to define a machining to create the shape of machining (“what to do”)
and the toolpath to define the way to machine it (“how to do”).
In this case it is not allowed to use instructions to define lead in , lead out, strategies
etc.
The example below creates a routing with an explicit toolpath with first point
coordinates (0,0,-10).
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
//Geometry creation
CreatePolyline("Geometry",0,0);
AddSegmentToPolyline(100,0);
AddSegmentToPolyline(100,100);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(0,0);
//Routing
132
CreateRoughFinish("Routing",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
The instruction creates the toolpath start point from which will be inserted next
elements and lets you define if it is necessary to generate the tool compensation of
the toolpath. Start point coordinates are local to the machining plane. This instruction
must be always followed by instructions to insert linear and arc elements else the
toolpath is not consistent.
CreateToolpath parameters
The example below creates a routing with an explicit toolpath with first point
coordinates (0,0,-10).
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
//Geometry creation
CreatePolyline("Geometry",0,0);
AddSegmentToPolyline(100,0);
AddSegmentToPolyline(100,100);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(0,0);
//Routing
CreateRoughFinish("Routing",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
133
Name Type Description
endX Double Coordinate X of the last tool path point.
endY Double Coordinate Y of the last tool path point.
endZ Double Coordinate Z of the last tool path point.
AddSegmentToToolpath parameters
The example below creates a routing with an explicit toolpath made by a linear
toolpath with first point coordinates (0,0,-10) and end point coordinates (0,100,-20).
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
//Geometry creation
CreatePolyline("Geometry",0,0);
AddSegmentToPolyline(100,0);
AddSegmentToPolyline(100,100);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(0,0);
//Routing
CreateRoughFinish("Routing",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
The example below creates a routing with an explicit toolpath made by a 3 points arc
toolpath (0,0,-10), (100, 50), (0, 100, -30)
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
//Geometry creation
CreatePolyline("Geometry",0,0);
AddSegmentToPolyline(100,0);
AddSegmentToPolyline(100,100);
134
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(0,0);
//Routing
CreateRoughFinish("Routing",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
//Geometry creation
CreatePolyline("Geometry",0,0);
AddSegmentToPolyline(100,0);
AddSegmentToPolyline(100,100);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(0,0);
//Routing
CreateRoughFinish("Routing",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
135
The instruction adds to the active toolpath an arc by 2 points and radius. First point is
the last point of the current toolpath, the second point and radius are specified.
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
//Geometry creation
CreatePolyline("Geometry",0,0);
AddSegmentToPolyline(100,0);
AddSegmentToPolyline(100,100);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(0,0);
//Routing
CreateRoughFinish("Routing",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
136
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
//Geometry creation
CreatePolyline("Geometry",0,0);
AddSegmentToPolyline(100,0);
AddSegmentToPolyline(100,100);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(0,0);
//Routing
CreateRoughFinish("Routing",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
Feed attribute (FEED) modifies the toolpath feed in the specified position of the
toolpath element.
The example below applies a feed attribute to an explicit toolpath in the start point of
the second toolpath element.
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
//Geometry creation
CreatePolyline("Geometry",0,0);
AddSegmentToPolyline(100,0);
AddSegmentToPolyline(100,100);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(0,0);
//Routing
137
CreateRoughFinish("Routing",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
Depth attribute (DEPTH) modifies the toolpath depth in the specified position of the
toolpath element.
The example below applies a depth attribute to an explicit toolpath in the end point of
the second toolpath element.
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
//Geometry creation
CreatePolyline("Geometry",0,0);
AddSegmentToPolyline(100,0);
AddSegmentToPolyline(100,100);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(0,0);
//Routing
CreateRoughFinish("Routing",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
138
3.8.16.3 Explicit toolpath selection
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
//Geometry creation
CreatePolyline("Geometry1",0,0);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(100,100);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(0,0);
//Routing
CreateRoughFinish("Routing1",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
//Geometry creation
CreatePolyline("Geometry2",0,0);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(100,100);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(0,0);
//Fresatura
CreateRoughFinish("Routing2",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
or by name
139
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
//Geometry creation
CreatePolyline("Geometry1",0,0);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(100,100);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(0,0);
//Routing
CreateRoughFinish("Routing1",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
//Geometry creation
CreatePolyline("Geometry2",0,0);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(100,100);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(0,0);
//Routing
CreateRoughFinish("Routing2",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
//Geometry creation
CreatePolyline("Geometry1",0,0);
AddSegmentToPolyline(0,100);
140
AddSegmentToPolyline(100,100);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(0,0);
//Routing
CreateRoughFinish("Routing1",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
//Geometry creation
CreatePolyline("Geometry2",0,0);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(100,100);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(0,0);
//Fresatura
CreateRoughFinish("Routing2",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
or by name
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
//Geometry creation
CreatePolyline("Geometry1",0,0);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(100,100);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(0,0);
//Routing
CreateRoughFinish("Routing1",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
//Geometry creation
141
CreatePolyline("Geometry2",0,0);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(100,100);
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(0,0);
//Routing
CreateRoughFinish("Routing2",20,"", TypeOfProcess.GeneralRouting,"Fresa
D20","3",0,-1,-1,3,0);
Machining technologies let the user to create machinings applying to a reference geometry
one of available technologies in Maestro. Technologies are machining information
containers
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
//Geometry creation
CreatePolyline("Geometria",0,0);
AddSegmentToPolyline(100,0);
AddSegmentToPolyline(100,100);
142
AddSegmentToPolyline(0,100);
AddSegmentToPolyline(0,0);
//Technology application
ApplyTechnology("Fresatura D10");
Feedrate profiles are applicable to drilling machinings and are used to manage speeds to
execute the operation to lead in the material, to work inside the material and the lead out
from material.
The example below applies a feedrate profile named “Depth drill feedrate profile” to
drilling machining.
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
//Drilling
CreateDrill("Drilling",10,20,15,8, "",TypeOfProcess.Drilling);
143
3.9 Macro
Inside a MSL file is possible to use Macros installed on Maestro or Macro created by
the user.
CreateMacro parameters
The example below inserts a Macro with default values inside the project.
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
//Macro creation
CreateMacro("Macro", "Cerniera3");
Parametri CreateMacro
144
AddParameter("WorkpieceHeight", 18, typeof(Double), "WorkpieceHeightDescription",
ParameterType.WorkpieceHeight, false, FisicalUnitType.Lenght, false);
CreateFinishedWorkpieceBox("Pezzo",1600,1200,18);
AddParameter("WorkpieceLength", 1200, typeof(Double), "WorkpieceLengthDescription",
ParameterType.WorkpieceLength, false, FisicalUnitType.Lenght, false);
AddParameter("WorkpieceWidth", 800, typeof(Double), "WorkpieceWidthDescription",
ParameterType.WorkpieceWidth, false, FisicalUnitType.Lenght, false);
AddParameter("WorkpieceHeight", 18, typeof(Double), "WorkpieceHeightDescription",
ParameterType.WorkpieceHeight, false, FisicalUnitType.Lenght, false);
AddParameter("ReferencePosition", 0, typeof(Int32), "Spigolo di riferimento",
ParameterType.ReferencePosition, true, FisicalUnitType.UnitLess, false);
AddParameter("X", 126, typeof(Double), "Centro in X foratura cerniera",
ParameterType.UserDefined, true, FisicalUnitType.Lenght, false);
AddParameter("Y", 22.5, typeof(Double), "Centro in Y foratura cerniera",
ParameterType.UserDefined, true, FisicalUnitType.Lenght, false);
AddParameter("Z", 13, typeof(Double), "Profondità foratura cerniera",
ParameterType.UserDefined, true, FisicalUnitType.Lenght, false);
AddParameter("H", 13, typeof(Double), "Profondità foratura gruppo",
ParameterType.UserDefined, true, FisicalUnitType.Lenght, false);
AddParameter("J", 3, typeof(Double), "Diametro gruppo foratura", ParameterType.UserDefined,
true, FisicalUnitType.Lenght, false);
AddParameter("V", 2, typeof(Double), "Avanzamento cerniera", ParameterType.UserDefined,
true, FisicalUnitType.Speed, false);
AddParameter("X1", 48, typeof(Double), "Distanza foratura gruppo in X",
ParameterType.UserDefined, true, FisicalUnitType.Lenght, false);
AddParameter("Y1", 6, typeof(Double), "Distanza foratura gruppo in Y",
ParameterType.UserDefined, true, FisicalUnitType.Lenght, false);
AddParameter("D", 35, typeof(Double), "Diametro cerniera", ParameterType.UserDefined, true,
FisicalUnitType.Lenght, false);
AddParameter("V2", 2, typeof(Double), "Avanzamento gruppo foratura",
ParameterType.UserDefined, true, FisicalUnitType.Speed, false);
AddParameter("RotationAngle", 0, typeof(Double), "Angolo di rotazione",
ParameterType.UserDefined, true, FisicalUnitType.UnitLess, false);
AddParameter("Machine", 0, typeof(Int32), "Macchina", ParameterType.Machine, true,
FisicalUnitType.UnitLess, false);
AddParameter("HeadsGroupType", "0", typeof(String), "Tipo gruppo teste",
ParameterType.HeadsGroupType, true, FisicalUnitType.UnitLess, false);
AddParameter("HeadsGroupNumber", 0, typeof(Int32), "Numero gruppo teste",
ParameterType.HeadsGroupNumber, true, FisicalUnitType.UnitLess, false);
AddParameter("Head", "0", typeof(String), "Testa", ParameterType.Head, true,
FisicalUnitType.UnitLess, false);
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
145
//Plane selection
SelectWorkplane("Top");
//Macro creation
CreateMacro("Macro", "Cerniera3", 0, 200, 300);
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Plane selection
SelectWorkplane("Top");
//Macro creation
SetMacroParam("X", 100);
SetMacroParam("Y", 200);
CreateMacro("Macro", "Cerniera3");
3.10 NC Functions
146
Defined with instruction CreateWorkpiecePressureOperation.
The instruction creates the workpiece pressure operation.
CreateWorkpiecePressureOperation parameters
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
CreateWorkpiecePressureOperation("NC function", 10, 10, 20, 20, 1);
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
CreatePark("NC function", "Nothing", false);
147
Name Type Description
name string NC function Name.
X double Probing X quota
Y double Probing Y quota
tool string Tool for probing
head string Probing head
type int (opt def 0) Type of probing
0 = All faces
1 = Point
headReturnAfterPro int (opt def 0) Return mode after probing:
bing 0 = Parking quota
1 = Probing quota
2 = Skimming quota
CreateWorkPieceProbing parameters
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
SelectWorkplane("Top");
CreateWorkPieceProbing("NC function", 10, 10, "Probing tool", "3");
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
SelectWorkplane("Top");
CreateCleanPlaneHood("NC function", 25, 0, 100, 100);
148
Defined with instruction CreatePrismaProbing.
The instruction creates the tool length probing to correct the tool length.
The example below creates a tool length probing nc function to probe the tool “Fresa
D20” length.
CreateFinishedWorkpieceBox("Pezzo",1600,1200,18);
SelectWorkplane("Top");
CreatePrismaProbing("NC function", 100, 100, "Fresa D20");
The example below creates the probing of workpiece translation and rotation
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
SelectWorkplane("Top");
CreateWorkPieceTranslationRotationProbing("NC function", 100, 100, 10, 10, "Probing tool");
149
name string NC function name.
text string Text displayed for the operator
waitForUserInput bool = true Wait for operator
releaseWorkpiece bool = true workpiece release request
CreateMessage parameters
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
SelectWorkplane("Top");
CreateMessage("NC function", "Workpiece has to be overturned", true, true);
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
SelectWorkplane("Top");
CreateNullOperation("NC function", 100, 200, 0, 0, true, "Fresa D20");
150
isXiso bool Xiso instruction
false = it’s not a Xiso instruction
true = it is a Xiso instruction
CreateIso Parameters
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
SelectWorkplane("Top");
CreateIso("G0 X0 Y0","G0 X0 Y0","", true);
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
SelectWorkplane("Top");
CreateWorkPieceWidthProbing("NC function", 10, 10);
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
SelectWorkplane("Top");
CreateWorkPieceWidthProbing("NC function", 10);
151
The instruction can be used to place the workpiece on the machine table with a robot
loader.
.
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
SelectWorkplane("Top");
//Workpiece alignment
CreateCenterWorkpiece("Workpiece alignment", 900, 400);
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
SelectWorkplane("Top");
//Workpiece lifting
CreateLiftWorkpiece("Workpiece lifting", true, 900, 400);
152
Name Type Description
name string Nc function name.
tool string Name of the tool to check
The example below creates the integrity tool check for a tool named “Fresa D20”
with automatic head selection
CreateFinishedWorkpieceBox("Workpiece",1600,1200,18);
SelectWorkplane("Top");
//Tool integrity check
CreateToolIntegrityCheck("Tool integrity check", "-1", "Fresa D20");
Support blocking needs the definition of a blocking profile, a profile used to indicate
where is possible to put supports.
The blocking profile defines which side or sides are useful to block a specific
workpiece. It must be used in the case of calling the automatic blocking disposition.
Blocking profile must be created on each workplan inside the project to allow the
automatic support disposition.
153
CreateBlockingProfile parameters
The example below creates a blocking profile in the Setup workplan with start point
and a minimum clamping value 5. This profile is not consistent, it is just the first point
to insert segment and arcs.
CreateFinishedWorkpieceBox("FinishedWorkPiece",1200,70,70);
CreateRawWorkpiece("RawWorkPiece",10,10,2,0,0,0);
//Blocking profile creation
CreateBlockingProfile("SetupBlockingProfile", 1210, 70,-5);
AddSegmentToBlockingProfile parameters
The example below creates a segment blocking profile in the Setup workplan on the
back side of the workpiece with a minimum clamping value 5.
CreateFinishedWorkpieceBox("FinishedWorkPiece",1200,70,70);
CreateRawWorkpiece("RawWorkPiece",10,10,2,0,0,0);
//Blocking profile creation
CreateBlockingProfile("SetupBlockingProfile", 1210, 70,-5);
AddSegmentToBlockingProfile(-10, 70);
154
The instruction adds an arc by 2 points and center to the active blocking profile.
The example below creates an arc blocking profile in the Setup workplan.
CreatePolyline("WorkPieceGeometry",1000,1000);
AddArc2PointRadiusToPolyline(1000,0,566.667,true,false);
AddSegmentToPolyline(0,0);
AddSegmentToPolyline(0,1000);
AddSegmentToPolyline(1000,1000);
CreateFinishedWorkpieceFromExtrusion("FinishedWorkPiece",68,"");
//Blocking profile creation
CreateBlockingProfile("SetupBlockingProfile",979.1878,920,-42);
AddArc2PointRadiusToBlockingProfile(979.1878,80,486.667,true,false, "");
AddSegmentToBlockingProfile(80.,80, "");
AddSegmentToBlockingProfile(80,920, "");
AddSegmentToBlockingProfile(979.187,920, "");
155
3.11.1.7 Add to blocking profile a tangent segment
156
3.11.2.1 Positioning reference definition
ConfigFixtureSetupPositioningMode parameters
The example below shows the positioning of bars referring to workpiece origin
SetMachiningParameters("A", 1, 0, 0, false);
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
SetWorkpieceSetupPosition(100,0,0,0);
//Bar 1 at position 100 from workpiece origin
SetBarPosition(1, 100);
//Bar 2 at position 200 from workpiece origin
SetBarPosition(2, 200);
//Bar 3 at position 300 from workpiece origin
SetBarPosition(3, 300);
The example below shows the same previous positioning of bars referring to working
field origin
SetMachiningParameters("A", 1, 0, 0, false);
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
SetWorkpieceSetupPosition(100,0,0,0);
ConfigFixtureSetupPositioningMode(1);
//Bar 1 at position 200 from working field origin
SetBarPosition(1, 200);
//Bar 2 at position 300 from working field origin
SetBarPosition(2, 300);
//Bar 1 at position 400 from working field origin
SetBarPosition(3, 400);
157
xPosition double Bar position along axis X (referred to the selected
reference system for the workpiece being machined).
SetBarPosition parameters
The example below set up the bars on machine table referring to workpiece origin
SetMachiningParameters("A", 1, 0, 0, false);
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Bar 1 at position 100 to workpiece origin
SetBarPosition(1, 100);
//Bar 2 at position 200 to workpiece origin
SetBarPosition(2, 200);
//Bar 3 at position 300 to workpiece origin
SetBarPosition(3, 300);
SetMachiningParameters("A", 1, 0, 0, false);
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Bar 1 at position 100 to workpiece origin
SetBarPosition(1, 100);
//Mobile bar enable
SetMobileBarPosition(2, 1);
158
Name Type Description
id int Support base id (value between 1 and the max number
of support bases).
yPosition double Support base position along axis Y (referred to the
selected reference system for the workpiece being
machined).
SetSupportBasePosition parameters
SetMachiningParameters("A", 1, 0, 0, false);
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Bar 1 at position 100 to workpiece origin
SetBarPosition(1, 100);
//Support base 1
SetSupportBasePosition(1, 100);
//Support base 2
SetSupportBasePosition(2, 200);
//Support base 3
SetSupportBasePosition(3, 300);
SetMachiningParameters("A", 1, 0, 0, false);
159
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Bar 1 at position 100 to workpiece origin
SetBarPosition(1, 100);
//Clamp 1
SetClampPosition(1, 100, 2, "H110-A-145");
//Clamp 2
SetClampPosition(2, 200, 2, "H110-A-145");
//Clamp 3
SetClampPosition(3, 300, 2, "H110-A-145");
SetMachiningParameters("A", 1, 0, 0, false);
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Bar 1 at position 100 to workpiece origin
SetBarPosition(1, 100);
//Clamp 1
SetHorizontalClampPosition(1, 100, 2, "H110-MF-150x294");
//Clamp 2
SetHorizontalClampPosition(2, 200, 2, "H110-MF-150x294");
//Clamp 3
SetHorizontalClampPosition(3, 300, 2, "H110-MF-150x294");
160
The instruction sets up a clamp for jamb along the active blocking bar and defines
the blocking status.
Clamp is identified by a logical index from 1 to N and grows moving in the direction
of the active area's specularity.
SetMachiningParameters("A", 1, 0, 0, false);
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Bar 1 at position 100 to workpiece origin
SetBarPosition(1, 100);
//Clamp 1
SetClampForJambPosition(1, 100, 2, "H162-A-145-YM");
//Clamp 2
SetClampForJambPosition(2, 200, 2, "H162-A-145-YM");
//Clamp 3
SetClampForJambPosition(3, 300, 2, "H162-A-145-YM");
161
angle double Suction cup rotation angle (if it supports rotation).
code string Suction cup code
SetSuctionCupPosition parameters
SetMachiningParameters("A", 1, 0, 0, false);
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Bar 1 at position 100 to workpiece origin
SetBarPosition(1, 100);
//Suction cup 1
SetSuctionCupPosition(1, 100, 90, "H75-M-145x55");
//Suction cup 2
SetSuctionCupPosition(2, 200, 90, "H75-M-145x55");
//Suction cup 3
SetSuctionCupPosition(3, 300, 90, "H75-M-145x55");
SetMachiningParameters("A", 1, 0, 0, false);
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Bar 1 at position 100 to workpiece origin
SetBarPosition(1, 100);
//Suction cup 1
SetPopupSuctionCupPosition(1, 100, 90, true, "H75_165-M-145x230-XM");
//Suction 2
SetPopupSuctionCupPosition(2, 200, 90, true, "H75_165-M-145x230-XM");
//Suction 3
SetPopupSuctionCupPosition(3, 300, 90, true, "H75_165-M-145x230-XM");
162
3.11.2.10 Suction cup positioning on multi functional table
The example below set up suction cup on the multi functional table
SetMachiningParameters("A", 1, 0, 0, false);
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Suction cup 1
SetMLTFSuctionCupPosition(100, 100, 90, "H25-MF-S-90x90");
//Suction cup 2
SetMLTFSuctionCupPosition(200, 200, 90, "H25-MF-S-90x90");
//Suction cup 3
SetMLTFSuctionCupPosition(300, 300, 90, "H25-MF-S-90x90");
163
double exp(double value) Returns the exponential of a specific value.
double EXP(double value)
double sqrt(double value) Returns the square root of a specific value.
double SQRT(double value)
double pow(double x, double y) Returns the elevation to base power X and exponent Y.
double POW(double x, double y)
double rd(double value) Returns the rounding off by defect for a specific
double RD(double value)
decimal value.
double ru(double value) Returns the rounding off by excess for a specific
double RU(double value)
decimal value.
164
double V(double? par) Double type variable Returns the value in the variable
(if the variable is not defined it
returns zero).
double VALUE(double? par) Double type variable Returns the value in the variable
(if the variable is not defined it
returns zero).
4 Tools
In a MSL project it is possible to get tool properties.
Tool properties
165
The example below shows how to get tool properties.
CreateFinishedWorkpieceBox("WorkPiece",620,800,18);
SelectWorkplane("Top");
5 Edge banding
MSL lets you create the whole edge banding process using technologies.
Technologies must be created in the way each edge banding has to be associated
with all joined machinings and this is done defining colors in technology creation. For
example edge banding and end trimming must have the same color because they
are directly joined.
Technology application process is made by the definition of geometries where to
apply technology, technology selection and indication of geometry to apply and for
each geometry the definition of edge to apply.
166
The example below selects a technology named “EdgeBanding.tchx” to be applied
on rectangle sides.
CreateFinishedWorkpieceBox("WorkPiece",620,800,18);
SelectWorkplane("Top");
CreateFinishedWorkpieceBox("WorkPiece",620,800,18);
SelectWorkplane("Top");
167
SelectGeometryTechnology("Left", 255, 255, 0);//Yellow
CreateFinishedWorkpieceBox("WorkPiece",620,800,18);
SelectWorkplane("Top");
//Technology application
ApplyTechnology();
CreateFinishedWorkpieceBox("WorkPiece",620,800,18);
SelectWorkplane("Top");
//Technology application
ApplyTechnology();
168
The example below creates an edge banding process on a rectangle defined by 4
independent sides process. On side “Top” and “Right” is applied the edge
corresponding to red color, and on side “Left” and “Bottom“ the edge corresponding
to yellow color.
CreateFinishedWorkpieceBox("WorkPiece",620,800,18);
SelectWorkplane("Top");
//Technology application
ApplyTechnology();
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
SelectWorkplane("Top");
//Technology application
ApplyTechnology();
6 Labeling
In MSL it is possible to create a project applying a label to a workpiece.
Labeling needs the global definition of label name to use and for each workpiece
position and rotation of label.
169
6.1 Label definition
SetProjectLabel parameters
The example below defines the label to be used for workpieces inside the project.
SetMachiningParameters("A", 1, 0, 0, false);
SetProjectLabel("Label");
//Workpiece
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
SetWorkPieceLabel parameters
The example below defines the label position on the active workpiece
SetMachiningParameters("A", 1, 0, 0, false);
SetProjectLabel("Label");
//Workpiece
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Label positioning
SetWorkPieceLabel(200, 200, 0);
170
The instruction adds label parameter to active workpiece. Parameter must respect
the number of available parameters and their order. If a parameter is not necessary
pass empty.
AddLabelParams parameters
The example below defines the label position on the active workpiece
SetMachiningParameters("A", 1, 0, 0, false);
SetProjectLabel("Label");
//Workpiece
CreateFinishedWorkpieceBox("WorkPiece",1600,1200,18);
//Label positioning
SetWorkPieceLabel(200, 200, 0);
7 Nesting
In MSL it is possible to create a Nesting project that defines a cutting scheme and all
labeling information
In the project it is possible to define nested parts, remnants to recover and scraps to
remove. Parts and remnants can be labeled.
Parts, remnants and scrap can have associated machinings.
7.1 Part
Part creation needs the definition of process beginning, the definition of the part with
outer boundary and internal holes boundary, the process ending.
171
Name Type Description
name string Name of the part to create.
boundaryGeometryNa string Name of the boundary geometry of the part.
me
holeGeometryNames string[] (opt def Names of hole geometries of the parte
null)
CreatePart parameters
The example below creates a rectangular part with a circular hole inside.
SetMachiningParameters("A", 1, 0, 0, false);
//Sheet definition
CreateFinishedWorkpieceBox("Sheet",3000,1200,18);
//Part Boundary
CreatePolyline("PartBoundary", 10, 10);
AddSegmentToPolyline(200, 10);
AddSegmentToPolyline(200, 200);
AddSegmentToPolyline(10, 200);
ClosePolyline();
//Part hole
CreateCircleCenterRadius("PartHole", 50, 50, 30);
A label can be associated with a Part. Label must be previously defined in the sheet.
SetNestingPartLabel parameters
172
The example below creates a rectangular part with a circular hole inside and label
placed at (50,50)
SetMachiningParameters("A", 1, 0, 0, false);
//Sheet definition
CreateFinishedWorkpieceBox("Sheet",3000,1200,18);
SetProjectLabel("Label");
//Part Boundary
CreatePolyline("PartBoundary", 10, 10);
AddSegmentToPolyline(200, 10);
AddSegmentToPolyline(200, 200);
AddSegmentToPolyline(10, 200);
ClosePolyline();
//Part hole
CreateCircleCenterRadius("PartHole", 50, 50, 30);
AddNestingPartLabelParameter parameters
The example below creates a rectangular part with a circular hole inside and label
placed at (50,50) and 4 label parameters.
SetMachiningParameters("A", 1, 0, 0, false);
//Sheet definition
CreateFinishedWorkpieceBox("Sheet",3000,1200,18);
SetProjectLabel("Label");
//Part Boundary
CreatePolyline("PartBoundary", 10, 10);
AddSegmentToPolyline(200, 10);
173
AddSegmentToPolyline(200, 200);
AddSegmentToPolyline(10, 200);
ClosePolyline();
//Part hole
CreateCircleCenterRadius("PartHole", 50, 50, 30);
//Part label
SetNestingPartLabel(130, 100, 0);
//Label parameters
AddNestingPartLabelParameter("A");
AddNestingPartLabelParameter("B");
AddNestingPartLabelParameter("");
AddNestingPartLabelParameter("D");
SelectPart parameters
The example below creates a part named “Part1” and a part named “Part2” and
selects “Part1”
SetMachiningParameters("A", 1, 0, 0, false);
//Sheet definition
CreateFinishedWorkpieceBox("Sheet",3000,1200,18);
//Part 1 Boundary
CreatePolyline("Part1Boundary", 10, 10);
AddSegmentToPolyline(200, 10);
AddSegmentToPolyline(200, 200);
AddSegmentToPolyline(10, 200);
ClosePolyline();
//Part 2 Boundary
174
CreatePolyline("Part2Boundary", 500, 10);
AddSegmentToPolyline(700, 10);
AddSegmentToPolyline(700, 200);
AddSegmentToPolyline(500, 200);
ClosePolyline();
//Select part 1
SelectPart("Part1");
CreateRemovePart parameters
The instruction below remove the active part from machine table
SetMachiningParameters("A", 1, 0, 0, false);
//Sheet definition
CreateFinishedWorkpieceBox("Sheet",3000,1200,18);
//Part 1 Boundary
CreatePolyline("Part1Boundary", 10, 10);
AddSegmentToPolyline(200, 10);
AddSegmentToPolyline(200, 200);
AddSegmentToPolyline(10, 200);
ClosePolyline();
175
//Part 2 Boundary
CreatePolyline("Part2Boundary", 500, 10);
AddSegmentToPolyline(700, 10);
AddSegmentToPolyline(700, 200);
AddSegmentToPolyline(500, 200);
ClosePolyline();
//Select part 1
SelectPart("Part1");
//Remove part 1
CreateRemovePart("RemovePart1", 100, 100, 100, 100);
7.2 Remnant
Remnant is a rectangular closed profile inside the sheet that identifies a portion of
material to be recovered and placed in the material store.
Remnant creation needs the definition of process beginning, the definition of the
remnant with outer boundary, the process ending.
//Sheet definition
CreateFinishedWorkpieceBox("Sheet",3000,1200,18);
//Remnant Boundary
CreatePolyline("RemnantBoundary", 10, 10);
AddSegmentToPolyline(200, 10);
176
AddSegmentToPolyline(200, 200);
AddSegmentToPolyline(10, 200);
ClosePolyline();
A label can be associated with a Remnant. Label must be previously defined in the sheet.
SetNestingRemnantLabel parameters
The example below creates a rectangular remnant and label placed at (50,50)
SetMachiningParameters("A", 1, 0, 0, false);
//Sheet definition
CreateFinishedWorkpieceBox("Sheet",3000,1200,18);
SetProjectLabel("Label");
//Remnant Boundary
CreatePolyline("RemnantBoundary", 10, 10);
AddSegmentToPolyline(200, 10);
AddSegmentToPolyline(200, 200);
AddSegmentToPolyline(10, 200);
ClosePolyline();
//Remnant label
SetNestingRemnantLabel(50, 50, 0);
177
7.2.2.2 Remnant label parameters definition
AddNestingRemnantLabelParameter parameters
The example below creates a rectangular remnant and label placed at (50,50) and 4
label parameters.
SetMachiningParameters("A", 1, 0, 0, false);
//Sheet definition
CreateFinishedWorkpieceBox("Sheet",3000,1200,18);
SetProjectLabel("Label");
//Remnant Boundary
CreatePolyline("RemnantBoundary", 10, 10);
AddSegmentToPolyline(200, 10);
AddSegmentToPolyline(200, 200);
AddSegmentToPolyline(10, 200);
ClosePolyline();
//Remnant label
SetNestingPartLabel(50, 50, 0);
//Label parameters
AddNestingRemnantLabelParameter("A");
AddNestingRemnantLabelParameter("B");
AddNestingRemnantLabelParameter("");
AddNestingRemnantLabelParameter("D");
SelectRemnant parameters
178
The example below creates a remnant named “Remnant1” and a remnant named
“Remnant2” and selects “Remnant1”
SetMachiningParameters("A", 1, 0, 0, false);
//Sheet definition
CreateFinishedWorkpieceBox("Sheet",3000,1200,18);
//Remnant 1 Boundary
CreatePolyline("Remnant1Boundary", 10, 10);
AddSegmentToPolyline(200, 10);
AddSegmentToPolyline(200, 200);
AddSegmentToPolyline(10, 200);
ClosePolyline();
//Remnant 2 Boundary
CreatePolyline("Remnant2Boundary", 500, 10);
AddSegmentToPolyline(700, 10);
AddSegmentToPolyline(700, 200);
AddSegmentToPolyline(500, 200);
ClosePolyline();
//Select remnant 1
SelectRemnant("Remnant1");
179
pickingDimensionY double (default null) Y remnant rectangle picking dimension, if
null remnant length will be used.
CreateRemoveRemnant parameters
The instruction below remove the active remnant from machine table
SetMachiningParameters("A", 1, 0, 0, false);
//Sheet definition
CreateFinishedWorkpieceBox("Sheet",3000,1200,18);
//Remnant 1 Boundary
CreatePolyline("Remnant1Boundary", 10, 10);
AddSegmentToPolyline(200, 10);
AddSegmentToPolyline(200, 200);
AddSegmentToPolyline(10, 200);
ClosePolyline();
//Remnant 2 Boundary
CreatePolyline("Remnant2Boundary", 500, 10);
AddSegmentToPolyline(700, 10);
AddSegmentToPolyline(700, 200);
AddSegmentToPolyline(500, 200);
ClosePolyline();
//Select remnant 1
SelectRemnant("Remnant1");
//Remove remnant 1
CreateRemoveRemnant("RemoveRemnant1", 100, 100, 100, 100);
7.3 Scrap
Scrap is a closed profile inside the sheet that identifies a waste portion of material.
180
Scrap creation needs the definition of process beginning, the definition of the scrap
with outer boundary, the process ending.
//Sheet definition
CreateFinishedWorkpieceBox("Sheet",3000,1200,18);
//Scrap Boundary
CreatePolyline("ScrapBoundary", 10, 10);
AddSegmentToPolyline(200, 10);
AddSegmentToPolyline(200, 200);
AddSegmentToPolyline(10, 200);
ClosePolyline();
SelectScrap parameters
The example below creates a scrap named “Scrap1” and a scrap named “Scrap2”
and selects “Scrap1”
SetMachiningParameters("A", 1, 0, 0, false);
//Sheet definition
CreateFinishedWorkpieceBox("Sheet",3000,1200,18);
181
BeginScrapCreation();
//Scrap 1 Boundary
CreatePolyline("Scrap1Boundary", 10, 10);
AddSegmentToPolyline(200, 10);
AddSegmentToPolyline(200, 200);
AddSegmentToPolyline(10, 200);
ClosePolyline();
//Scrap 2 Boundary
CreatePolyline("Scrap2Boundary", 500, 10);
AddSegmentToPolyline(700, 10);
AddSegmentToPolyline(700, 200);
AddSegmentToPolyline(500, 200);
ClosePolyline();
//Select scrap 1
SelectScrap("Scrap1");
CreateRemoveScrap parameters
The instruction below remove the active Scrap from machine table
SetMachiningParameters("A", 1, 0, 0, false);
//Sheet definition
CreateFinishedWorkpieceBox("Sheet",3000,1200,18);
182
//Scrap 1 creation beginning
BeginScrapCreation();
//Scrap 1 Boundary
CreatePolyline("Scrap1Boundary", 10, 10);
AddSegmentToPolyline(200, 10);
AddSegmentToPolyline(200, 200);
AddSegmentToPolyline(10, 200);
ClosePolyline();
//Scrap 2 Boundary
CreatePolyline("Scrap2Boundary", 500, 10);
AddSegmentToPolyline(700, 10);
AddSegmentToPolyline(700, 200);
AddSegmentToPolyline(500, 200);
ClosePolyline();
//Select scrap 1
SelectScrap("Scrap1");
//Remove scrap 1
CreateRemoveScrap("RemoveScrap1", 100, 100, 100, 100);
The example below creates a cut scheme containing a part with outer profile
incision, hole incision, outer profile cut, hole cut, machinings, a remnant with outer
profile cut, a scrap with outer profile cut. Parts and remnants are labeled.
Machinings are always referred to sheet origin, labels are always referred to parts or
remnants origin.
In this example, all machinings relative to part, remnant or scrap are created inside
part, remnant, scrap block definition.
SetMachiningParameters("A", 1, 0, 0, false);
//Sheet definition
CreateFinishedWorkpieceBox("Foglio",3000,1200,18);
//Project label
SetProjectLabel("LabelNesting");
183
BeginPartCreation();
//Part Boundary
CreatePolyline("Part1Boundary", part1XCoordinate, part1YCoordinate);
AddSegmentToPolyline(part1XCoordinate + 200, part1YCoordinate);
AddSegmentToPolyline(part1XCoordinate + 200, part1YCoordinate + 200);
AddSegmentToPolyline(part1XCoordinate, part1YCoordinate + 200);
ClosePolyline("Part1Boundary");
//Part hole
CreateCircleCenterRadius("Part1Hole", part1XCoordinate + 50, part1YCoordinate + 50, 30);
//Part 1 machining
CreateSegment("Segment1", part1XCoordinate,part1YCoordinate, part1XCoordinate + 100,
part1YCoordinate + 100);
CreateRoughFinish("Segment1Machining",5,"Part1BoundaryCut", TypeOfProcess.GeneralRouting
,"E034","-1", 2);
//Part label
SetNestingPartLabel(50, 50, 0);
//Label parameters
AddNestingPartLabelParameter("A");
AddNestingPartLabelParameter("B");
AddNestingPartLabelParameter("");
AddNestingPartLabelParameter("D");
184
//Part creation beginning
BeginPartCreation();
//Part Boundary
CreatePolyline("Part2Boundary", part2XCoordinate, part2YCoordinate);
AddSegmentToPolyline(part2XCoordinate + 200, part2YCoordinate);
AddSegmentToPolyline(part2XCoordinate + 200, part2YCoordinate + 200);
AddSegmentToPolyline(part2XCoordinate, part2YCoordinate + 200);
ClosePolyline("Part2Boundary");
//Part 2 machining
CreateSegment("Segment2", 10,10,100,100);
CreateRoughFinish("Segment2Machining",5,"Part1BoundaryCut", TypeOfProcess.GeneralRouting
,"E034","-1", 2);
//Part label
SetNestingPartLabel(100, 100, 0);
//Label parameters
AddNestingPartLabelParameter("A");
AddNestingPartLabelParameter("");
AddNestingPartLabelParameter("B");
AddNestingPartLabelParameter("");
//Remnant Boundary
CreatePolyline("Remnant1Boundary", 800, 0);
AddSegmentToPolyline(3000, 0);
AddSegmentToPolyline(3000, 1200);
AddSegmentToPolyline(800, 1200);
ClosePolyline("Remnant1Boundary");
185
//Remnant label
SetNestingRemnantLabel(100, 100, 0);
//Label parameters
AddNestingPartLabelParameter("F");
AddNestingPartLabelParameter("");
AddNestingPartLabelParameter("G");
AddNestingPartLabelParameter("");
//Scrap Boundary
CreatePolyline("Scrap1Boundary", 0, 500);
AddSegmentToPolyline(500, 500);
AddSegmentToPolyline(700, 700);
AddSegmentToPolyline(0, 1200);
ClosePolyline("Scrap1Boundary");
The example below creates a cut scheme containing a part with outer profile
incision, hole incision, outer profile cut, hole cut, machinings, a remnant with outer
profile cut, a scrap with outer profile cut. Parts and remnants are labeled.
Machinings are always referred to sheet origin, labels are always referred to parts or
remnants origin.
In this example, first, parts, remnants and scraps are created with label information,
and after all machinings are created using selection instructions.
SetMachiningParameters("A", 1, 0, 0, false);
//Sheet definition
CreateFinishedWorkpieceBox("Foglio",3000,1200,18);
//Project label
SetProjectLabel("LabelNesting");
186
//Part Boundary
CreatePolyline("Part1Boundary", part1XCoordinate, part1YCoordinate);
AddSegmentToPolyline(part1XCoordinate + 200, part1YCoordinate);
AddSegmentToPolyline(part1XCoordinate + 200, part1YCoordinate + 200);
AddSegmentToPolyline(part1XCoordinate, part1YCoordinate + 200);
ClosePolyline("Part1Boundary");
//Part hole
CreateCircleCenterRadius("Part1Hole", part1XCoordinate + 50, part1YCoordinate + 50, 30);
//Part label
SetNestingPartLabel(50, 50, 0);
//Label parameters
AddNestingPartLabelParameter("A");
AddNestingPartLabelParameter("B");
AddNestingPartLabelParameter("");
AddNestingPartLabelParameter("D");
//Part Boundary
CreatePolyline("Part2Boundary", part2XCoordinate, part2YCoordinate);
AddSegmentToPolyline(part2XCoordinate + 200, part2YCoordinate);
AddSegmentToPolyline(part2XCoordinate + 200, part2YCoordinate + 200);
AddSegmentToPolyline(part2XCoordinate, part2YCoordinate + 200);
ClosePolyline("Part2Boundary");
//Part label
SetNestingPartLabel(100, 100, 0);
//Label parameters
AddNestingPartLabelParameter("A");
AddNestingPartLabelParameter("");
AddNestingPartLabelParameter("B");
AddNestingPartLabelParameter("");
187
//Remnant Boundary
CreatePolyline("Remnant1Boundary", 800, 0);
AddSegmentToPolyline(3000, 0);
AddSegmentToPolyline(3000, 1200);
AddSegmentToPolyline(800, 1200);
ClosePolyline("Remnant1Boundary");
//Remnant label
SetNestingRemnantLabel(100, 100, 0);
//Label parameters
AddNestingPartLabelParameter("F");
AddNestingPartLabelParameter("");
AddNestingPartLabelParameter("G");
AddNestingPartLabelParameter("");
//Scrap Boundary
CreatePolyline("Scrap1Boundary", 0, 500);
AddSegmentToPolyline(500, 500);
AddSegmentToPolyline(700, 700);
AddSegmentToPolyline(0, 1200);
ClosePolyline("Scrap1Boundary");
//Part 1 selection
SelectPart("Part1");
//Part 1 machining
CreateSegment("Segment1", part1XCoordinate,part1YCoordinate, part1XCoordinate + 100,
part1YCoordinate + 100);
CreateRoughFinish("Segment1Machining",5,"Part1BoundaryCut", TypeOfProcess.GeneralRouting
,"E034","-1", 2);
188
//Part 1 outer boundary cut
SelectGeometry("Part1Boundary");
CreateRoughFinish("Part1BoundaryCut",18,"Part1BoundaryCut", TypeOfProcess.GeneralRouting
,"E034","-1", 2);
//Part 2 selection
SelectPart("Part2");
//Part 2 machining
CreateSegment("Segment2", 10,10,100,100);
CreateRoughFinish("Segment2Machining",5,"Part1BoundaryCut", TypeOfProcess.GeneralRouting
,"E034","-1", 2);
//Remnant selection
SelectRemnant("Remnant1");
//Scrap selection
SelectScrap("Scrap1");
The example below creates a cut scheme containing a part with outer profile
incision, hole incision, outer profile cut, hole cut, machinings, a remnant with outer
profile cut, a scrap with outer profile cut. Parts and remnant are labeled.
Machinings are always referred to sheet origin, labels are always referred to parts or
remnants origin.
In this example, first, parts, remnants and scraps are created with label information,
and after all machinings are created using selection instructions to define an ordered
machining sequence.
SetMachiningParameters("A", 1, 0, 0, false);
//Sheet definition
CreateFinishedWorkpieceBox("Foglio",3000,1200,18);
189
//Project label
SetProjectLabel("LabelNesting");
//Part Boundary
CreatePolyline("Part1Boundary", part1XCoordinate, part1YCoordinate);
AddSegmentToPolyline(part1XCoordinate + 200, part1YCoordinate);
AddSegmentToPolyline(part1XCoordinate + 200, part1YCoordinate + 200);
AddSegmentToPolyline(part1XCoordinate, part1YCoordinate + 200);
ClosePolyline("Part1Boundary");
//Part hole
CreateCircleCenterRadius("Part1Hole", part1XCoordinate + 50, part1YCoordinate + 50, 30);
//Part label
SetNestingPartLabel(50, 50, 0);
//Label parameters
AddNestingPartLabelParameter("A");
AddNestingPartLabelParameter("B");
AddNestingPartLabelParameter("");
AddNestingPartLabelParameter("D");
//Part Boundary
CreatePolyline("Part2Boundary", part2XCoordinate, part2YCoordinate);
AddSegmentToPolyline(part2XCoordinate + 200, part2YCoordinate);
AddSegmentToPolyline(part2XCoordinate + 200, part2YCoordinate + 200);
AddSegmentToPolyline(part2XCoordinate, part2YCoordinate + 200);
ClosePolyline("Part2Boundary");
//Part label
SetNestingPartLabel(100, 100, 0);
//Label parameters
AddNestingPartLabelParameter("A");
190
AddNestingPartLabelParameter("");
AddNestingPartLabelParameter("B");
AddNestingPartLabelParameter("");
//Remnant Boundary
CreatePolyline("Remnant1Boundary", 800, 0);
AddSegmentToPolyline(3000, 0);
AddSegmentToPolyline(3000, 1200);
AddSegmentToPolyline(800, 1200);
ClosePolyline("Remnant1Boundary");
//Remnant label
SetNestingRemnantLabel(100, 100, 0);
//Label parameters
AddNestingPartLabelParameter("F");
AddNestingPartLabelParameter("");
AddNestingPartLabelParameter("G");
AddNestingPartLabelParameter("");
//Scrap Boundary
CreatePolyline("Scrap1Boundary", 0, 500);
AddSegmentToPolyline(500, 500);
AddSegmentToPolyline(700, 700);
AddSegmentToPolyline(0, 1200);
ClosePolyline("Scrap1Boundary");
//Part 1 selection
SelectPart("Part1");
//Part 1 machining
CreateSegment("Segment1", part1XCoordinate,part1YCoordinate, part1XCoordinate + 100,
part1YCoordinate + 100);
CreateRoughFinish("Segment1Machining",5,"Part1BoundaryCut", TypeOfProcess.GeneralRouting
,"E034","-1", 2);
191
//Part 2 selection
SelectPart("Part2");
//Part 2 machining
CreateSegment("Segment2", 10,10,100,100);
CreateRoughFinish("Segment2Machining",5,"Part1BoundaryCut", TypeOfProcess.GeneralRouting
,"E034","-1", 2);
//Part 1 selection
SelectPart("Part1");
//Part 2 selection
SelectPart("Part2");
//Remnant selection
SelectRemnant("Remnant1");
//Scrap selection
SelectScrap("Scrap1");
192
8 XConverter
XConverter is an application contained inside Maestro suite used to execute
operations by DOS command lines.
A good way to invoke the XConverter is to create a batch file (.bat) with inside all
DOS commands necessary to execute the operations.
32 bit -
Call "c:\Program files x86\Scm Group\MaestroXConverter.exe" ^
64 bit -
Call "c:\Program files\Scm Group\MaestroXConverter.exe" ^
speciale char ^ must be always put at the line ending and next line must be in a new
line.
Nella tabella sottostante sono indicati i comandi che possono essere inseriti
all’interno del file batch e possono essere utilizzati nei vari modi dsiponibili.
193
-supp string Nome del supporto di default da montare
sulle piastre
XConverter parameters
The example below shows a batch file with input and output explicitly defined
The example below shows a batch file with input explicitly defined and output with
folder
The example below shows a batch file with input and output defined with folder
194
-s -m 0 ^
-t "c:\Program Files (x86)\Scm Group\Maestro\Tlgx\Tools.tlgx" ^
-i "c:\Inputs" ^
-o "c:\Outputs" ^
This mode creates a new project where all workpieces contained in input pgmx files
will be imported.
Tools file (.tlgx) must be explicitly indicated.
Input files can be specified with file system path and output file must be specified.
The example below shows a batch file with 3 input pgmx files explicitly defined and
the output file.
The example below shows a batch file with 1 input pgmx file and the output
optimized file path.
195
8.1.4 Mode 3 - Xcs import, workpiece import and
optimization
This mode creates a new project where all workpieces contained in input xcs files
will be imported and optimized.
Tools file (.tlgx) must be explicitly indicated.
Input files can be specified with file system path and output file must be specified.
The example below shows a batch file with 3 input xcs files explicitly defined and the
output file.
The example below shows a batch file with input and output explicitly defined
The example below shows a batch file with input explicitly defined and output with
folder
196
-t "c:\Program Files (x86)\Scm Group\Maestro\Tlgx\Tools.tlgx" ^
-i "c:\Inputs\P1.xxl" ^
-o "c:\Outputs" ^
The example below shows a batch file with input and output defined with folder
The example below shows a batch file with input and output explicitly defined
The example below shows a batch file with input explicitly defined and output with
folder
The example below shows a batch file with input and output defined with folder
197
-t "c:\Program Files (x86)\Scm Group\Maestro\Tlgx\Tools.tlgx" ^
-i "c:\Inputs" ^
-o "c:\Outputs" ^
This mode processes a pgmx file, checks it and produces an xxl output file.
Tools file (.tlgx) must be explicitly indicated.
Input files can be specified with file system path and output files must be specified
with file system path or with an output folder.
Input files can be specified with an input folder and an output folder.
The example below shows a batch file with input and output explicitly defined
The example below shows a batch file with input explicitly defined and output with
folder
The example below shows a batch file with input and output defined with folder
198
8.1.8 Mode 11 - Mixx project creation
This mode creates a new mixx project from a list of projects defined in a csv file.
Tools file (.tlgx) must be explicitly indicated.
Input files can be specified with file system path and output file must be specified.
The example below shows a batch file with csv input files and the output mixx file.
The .csv file must contains a set of lines describing pgmx files and associated
informations to use to create the Mixx
199
[ORDER]=string; : Order
Key "[PRG]", name of PGMX, is mandatory, all other keys are optional. If not defined,
default values will be applied.
Line keys sequence is not fixed, keys can assume each position on line.
Project\List.csv
Project\P1.pgmx
Project\P2.pgmx
Project\P3.pgmx
The Tag [PRG] inside each line of the csv must have pgmx file local to folder,
example
[PRG]=P1.pgmx;
[PRG]=P2.pgmx;
[PRG]=P3.pgmx;
Project\List.csv
Project\PgmxFolder1\P1.pgmx
200
Project\PgmxFolder1\P2.pgmx
Project\PgmxFolder1\P3.pgmx
Project\PgmxFolder2\P1.pgmx
Project\PgmxFolder2\P2.pgmx
Project\PgmxFolder2\P3.pgmx
The Tag [PRG] inside each line of the csv must have pgmx file local to sub folder,
example
[PRG]=PgmxFolder1\P1.pgmx
[PRG]=PgmxFolder1\P2.pgmx
[PRG]=PgmxFolder1\P3.pgmx
[PRG]=PgmxFolder2\P1.pgmx
[PRG]=PgmxFolder2\P2.pgmx
[PRG]=PgmxFolder2\P3.pgmx
This mode creates a new project where all workpieces contained in input xcs files
will be imported, optimized, automatically setup executed, generated initial e/o final
setup and cycles generated.
Tools file (.tlgx) must be explicitly indicated.
Input files can be specified with file system path and output file must be specified.
The example below shows a batch file with 2 input xcs files explicitly defined and the
output file.
Easy loading values can be specified with ca command and it is possible to check
project with v command.
The example below shows a batch file with 2 input xcs files and the generated
output file
201
Call "c:\Program Files (x86)\Scm Group\Maestro\XConverter.exe" ^
-s -m 12 ^
-t "c:\Program Files (x86)\Scm Group\Maestro\Tlgx\Tools.tlgx" ^
-i "c:\Inputs\P1.xcs" "c:\Inputs\P2.xcs"^
-o "c:\Outputs\POut.pgmx" ^
The example below shows a batch file with 2 input xcs files with easy loading values
and the generated output file
This mode executes the suction cups automatic set up on input files.
Tools file (.tlgx) must be explicitly indicated.
Input files can be specified with file system path and output file must be specified.
The example below shows a batch file with pgmx input files to execute the
automatic suction cup set up and the output mixx file.
This mode imports a pgm and executes the suction cups automatic set up.
Tools file (.tlgx) must be explicitly indicated.
202
Input files can be specified with file system path and output file must be specified.
The example below shows a batch file with pgm input files to execute the automatic
suction cup set up and the output mixx file.
This mode imports a pgm and executes the suction cups automatic set up.
Tools file (.tlgx) must be explicitly indicated.
Input files can be specified with file system path and output file must be specified.
The example below shows a batch file with pgm input files to execute the automatic
suction cup set up and the output mixx file.
This mode executes the project time execution estimation on input files (pgmx, mixx)
and produces for each of them a csv file containing results.
The example below shows a batch file with pgmx input file to execute the time
execution estimation.
203
8.1.13 Mode 18 - Advanced Dxf import
This mode imports advanced dxf files and creates a pgmx file.
Tools file (.tlgx) must be explicitly indicated.
Input files can be specified with file system path and output files must be specified
with file system path or with an output folder.
Input files can be specified with an input folder and an output folder.
The example below shows a batch file with input and output explicitly defined
The example below shows a batch file with input explicitly defined and output with
folder
The example below shows a batch file with input and output defined with folder
204
This mode checks a pgmx file and produces the check results as output.Input files
can be specified with file system path and output files must be specified with file
system path or with an output folder.
Input files can be specified with an input folder and an output folder.
The example below shows a batch file with input and output explicitly defined
The example below shows a batch file with input explicitly defined and output with
folder
The example below shows a batch file with input and output defined with folder
This mode processes a pgmx file, checks machine loading and produces the check
results as output.Input files can be specified with file system path and output files
must be specified with file system path or with an output folder.
Input files can be specified with an input folder and an output folder.
The example below shows a batch file with input and output explicitly defined
205
The example below shows a batch file with input explicitly defined and output with
folder
The example below shows a batch file with input and output defined with folder
The example below shows a batch file with input and output explicitly defined
The example below shows a batch file with input explicitly defined and output with
folder
The example below shows a batch file with input and output defined with folder
206
-o "c:\Outputs" ^
This mode imports a xcs file, processes it, checks machine loading and produces the
check results as output.Input files can be specified with file system path and output
files must be specified with file system path or with an output folder.
Input files can be specified with an input folder and an output folder.
The example below shows a batch file with input and output explicitly defined
The example below shows a batch file with input explicitly defined and output with
folder
The example below shows a batch file with input and output defined with folder
This mode updates the global parameters file with parameters indicated in a csv file.
Input files can be specified with file system path and the csv file pah can be specified
with v command.
207
-s -m 24 ^
-v "c:\Inputs\Variable.csv" ^
-i "c:\Inputs\P1.evax" "c:\Inputs\P2.evax" ^
This mode updates a pgmx file parametrically from parameters contained in a csv
file.
Input files can be specified explicitly and if the output folder is missing it will be
directly updated, otherwise a copy will be created in the output folder.
Csv file has to be in the same folder of pgmx file and must have the same name.
For example, a P1.pgmx must have associated in the same folder a P1.csv file.
The example below shows a batch file with input explicitly defined
The example below shows a batch file with input explicitly defined and output with
folder
The example below shows a batch file with input and output defined with folder
9 Appendix
208
9.1 Canonical working fields
Canonical working fields are all working fields where the workpiece is always placed
in a quadrant defined by a system reference with positive X axis and positive Y axis.
209
9.2 Non canonical working fields
Non canonical working fields are all working fields where system reference is always
the cartesian system reference and the workpiece is placed in a quadrant different
from the quadrant relative to positive X axis and positive Y axis.
Upper left working field where the workpiece is placed in the quadrant defined by
positive X axis and negative Y axis (Q4).
Lower right working field where the workpiece is placed in the quadrant defined by
negative X axis and positive Y axis (Q2).
Upper right working field where the workpiece is placed in the quadrant defined by
negative X axis and negative Y axis (Q3).
210
211