Maestro Scripting Language PDF
Maestro Scripting Language PDF
Language
(MSL)
Rev. 6 of 19-03-2018
CONTENTS
1 INTRODUCTION....................................................................................................................................... 5
2 BASIC CONCEPTS .................................................................................................................................. 6
3 PROJECT ................................................................................................................................................. 7
3.1 PROJECT MANAGEMENT ...................................................................................................................... 8
3.1.1 Creating programs (.xcs) ............................................................................................................. 8
definitions for the program header ............................................................................................................ 9
3.1.2 Project creation from command line .......................................................................................... 10
3.1.2.1 Create projects from .XCS files ........................................................................................................ 10
3.1.2.2 Create project from other .pgmx ...................................................................................................... 11
3.1.2.3 Create projects optimised from other .pgmx .................................................................................... 12
3.1.2.4 Create projects optimised from .XCS files ....................................................................................... 13
3.1.2.5 Create projects from .xxl files ........................................................................................................... 14
3.1.2.6 Create projects from .pgm files ........................................................................................................ 15
3.1.2.7 Create project complete with supports from .XCS ........................................................................... 16
3.1.2.8 Create an entire project from a dxf file ............................................................................................. 17
3.2 W ORKPIECE ..................................................................................................................................... 18
3.2.1 Raw workpiece ........................................................................................................................... 18
3.2.2 Finished workpiece .................................................................................................................... 19
3.2.2.1 Parallelepipedal shaped workpiece ................................................................................................. 19
3.2.2.2 Workpiece from extrusion ................................................................................................................ 20
3.3 W ORKPLANES .................................................................................................................................. 21
3.3.1 Standard Face ........................................................................................................................... 21
3.3.2 Workplane Parallel ..................................................................................................................... 22
3.3.3 Tilting Plane ............................................................................................................................... 23
3.3.3.1 Workplane with three points............................................................................................................. 23
3.3.3.2 Workplane, with origin and rotation in relation to X and Y................................................................ 24
3.3.4 Selecting workplane ................................................................................................................... 25
3.4 2D GEOMETRY.................................................................................................................................. 26
3.4.1 Insert of new geometry .............................................................................................................. 26
3.4.1.1 Segment .......................................................................................................................................... 27
3.4.1.2 Arc ................................................................................................................................................... 28
3.4.1.3 Circle................................................................................................................................................ 30
3.4.1.4 2D polyline (segments and circle arcs) ............................................................................................ 32
3.4.1.5 Ellipse .............................................................................................................................................. 36
3.5 MACHINING OPERATIONS................................................................................................................... 37
3.5.1 Drilling (CreateDrill) .................................................................................................................... 38
3.5.2 Through Drilling (CreateThroughDrill) ........................................................................................ 40
3.5.2.1 Hole Matrix (CreatePattern) ............................................................................................................. 41
3.5.3 Slanted drilling (CreateSlantedDrill) ........................................................................................... 42
3.5.4 Routing (CreateRoughFinish) .................................................................................................... 44
3.5.5 Slanted routing (CreateSlantedRoughFinish) ............................................................................ 46
3.5.6 Chamfer (CreateChamfer) ......................................................................................................... 49
3.5.7 Routing 3D (Create3DRoughFinish) .......................................................................................... 51
3.5.8 Slot (CreateSlot) ........................................................................................................................ 53
3.5.9 Blade cut (CreateBladeCut) ....................................................................................................... 55
3.5.10 Contour (CreateContour) ....................................................................................................... 57
3.5.11 Pocket (CreateContourPocket).............................................................................................. 59
3.5.12 Machining mode .................................................................................................................... 62
3.5.12.1 Drilling strategies ............................................................................................................................. 62
3.5.12.2 Routing strategies ............................................................................................................................ 64
3.5.12.3 3D routing strategies ........................................................................................................................ 69
3.5.12.4 Blade cut strategies ......................................................................................................................... 71
3.5.12.5 Pocket strategies ............................................................................................................................. 73
3.5.12.6 Approach/Retraction ........................................................................................................................ 75
3.5.12.7 Machining inversion ......................................................................................................................... 80
3.5.13 Machine functions .................................................................................................................. 82
3.5.13.1 Jerk control functions ....................................................................................................................... 82
3.5.13.2 Hood control functions ..................................................................................................................... 84
3.5.13.3 Dustpan control functions ................................................................................................................ 87
2
3.5.13.4 Rotating axes control functions ........................................................................................................ 89
3.5.14 Tool path ................................................................................................................................ 91
3.5.15 Machining technologies ......................................................................................................... 95
3.5.15.1 EdgeBanding work technology ........................................................................................................ 96
3.5.15.1.1 Technology ................................................................................................................................ 96
3.5.15.1.2 Geometry Definition ................................................................................................................... 96
3.5.15.1.3 Technology Selection................................................................................................................. 97
3.5.15.1.4 Geometry Technology Selection ................................................................................................ 97
3.5.15.1.5 Technology Application .............................................................................................................. 98
3.5.16 Machining attributes .............................................................................................................. 99
3.5.16.1 Attributes FEED,ROT,DEPTH ......................................................................................................... 99
3.5.16.2 TAB Attributes (Bridges) ................................................................................................................ 102
3.5.17 Maintain Technological Sequence (SetPriority) .................................................................. 104
3.5.18 Geometric reference on the active work plane (SetReferencePosition) ............................. 106
3.5.19 Correction reference on the active work plane (SetProbingReferenceReferencePoint) ..... 107
3.6 MACROS AND SUBPROGRAMS .......................................................................................................... 108
3.6.1 Creating machining-macros (.xsp) ........................................................................................... 108
3.6.1.1 Creation of the macro basic structure ( wizard); ............................................................................ 108
3.6.1.2 Implementation of the functions in the macro. ............................................................................... 108
3.6.1.3 Debug of a macro .......................................................................................................................... 112
3.6.1.4 Structure of a file .xsp .................................................................................................................... 112
3.6.2 Use of .XSP macros (CreateMacro) ........................................................................................ 114
3.6.2.1 Use of macros. XSP using SetMacroParam .................................................................................. 115
3.6.3 Import Script ............................................................................................................................. 116
3.7 DEFINE THE PARAMETERS ............................................................................................................... 116
3.8 NC FUNCTIONS............................................................................................................................... 117
3.8.1 Enter an ISO instruction ........................................................................................................... 118
3.8.2 Machine parking ....................................................................................................................... 119
3.8.3 Null operation ........................................................................................................................... 120
3.8.4 Workpiece probing ................................................................................................................... 121
3.8.4.1 Probing with side position correction.............................................................................................. 121
3.8.4.2 Probing with tool length correction ................................................................................................. 122
3.8.4.3 Probing with workpiece roto-translation ......................................................................................... 123
3.8.5 Display an operator message .................................................................................................. 124
3.9 W ORKPLANS .................................................................................................................................. 125
3.10 W ORKPIECE SETUP IN MACHINE ....................................................................................................... 127
3.10.1 The SetMachiningParameters instruction ....................................................................... 127
3.10.1.1 Setting the machine parameters .................................................................................................... 128
3.10.1.1.1 Refer part to the opposite stop ................................................................................................. 129
3.10.1.1.2 Position of stop on Y ................................................................................................................ 129
3.10.1.1.3 Exclusion of the aligner at the start of the program .................................................................. 129
3.10.1.1.4 Maintaining the processing sequence ...................................................................................... 130
3.10.1.1.5 Program alteration optimised due to multiple drill holes ........................................................... 130
3.10.1.1.6 Panel anti-fall ........................................................................................................................... 130
3.10.1.1.7 Default locking ......................................................................................................................... 131
3.10.1.1.8 Technological compatibility on mirrored areas ......................................................................... 131
3.10.1.1.9 Automatic assembly of the suction cups during the execution phase ...................................... 131
3.10.1.1.10 Waste Toekick Exhaust ......................................................................................................... 132
3.10.1.2 Reading machine parameters with GetMachiningParameters ....................................................... 132
3.10.1.2.1 Continuous cycle...................................................................................................................... 132
3.10.1.2.2 Work area ................................................................................................................................ 133
3.10.1.2.3 Mechanical options .................................................................................................................. 133
3.10.1.2.4 Locking options ........................................................................................................................ 133
3.10.1.2.5 Technology on mirrored areas ................................................................................................. 133
3.10.1.3 Reading of Work area parameter with GetWorkingField ................................................................ 134
3.10.1.3.1 Work Area symmetry ............................................................................................................... 134
3.10.1.3.2 Work area origin....................................................................................................................... 134
3.10.1.3.3 Work Area Dimensions ............................................................................................................ 134
3.10.1.3.4 Number of the first bar of the Area ........................................................................................... 135
3.10.1.3.5 Work area bar number ............................................................................................................. 135
3.10.1.3.6 Area quadrant .......................................................................................................................... 135
3.10.1.3.7 Reference bar code ................................................................................................................. 135
3.10.2 Workpieces positioning on machine plane .......................................................................... 136
3.11 DEFINITION OF THE BLOCKING SYSTEM ............................................................................................. 138
3.11.1 Clamps blocking .................................................................................................................. 138
3.11.1.1 Clamps positioning on the workpiece............................................................................................. 138
3
3.11.1.1.1 Manual clamps positioning ....................................................................................................... 138
3.11.1.1.2 Position clamps with Blocking profile ....................................................................................... 143
3.11.2 Workpiece blocking with suction cups ................................................................................. 147
3.12 DEFINITION OF WORKPIECES MACHINED CONTEMPORANEOUSLY ........................................................ 150
3.12.1 Number of workpieces machined contemporaneously........................................................ 150
3.13 OPTIMIZATION PROJECT .................................................................................................................. 152
3.13.1 Creating pgmx with various optimized workpieces .............................................................. 152
3.14 MATHEMATICAL FUNCTIONS............................................................................................................. 153
3.15 ACCESSORIAL FUNCTIONS ............................................................................................................... 154
4 NESTING PROJECT MANAGEMENT ................................................................................................. 155
4.1 CREATE NEW NESTING PROJECT ..................................................................................................... 155
4.1.1 Nesting parts ............................................................................................................................ 155
4.1.1.1 .CSV file structure (for Nesting) ..................................................................................................... 155
5 .MIXX PROJECT CREATION FROM COMMAND LINE ..................................................................... 156
5.1 .CSV FILE STRUCTURE (FOR MIX) .................................................................................................... 156
5.2 CREATE .MIXX PROJECT FROM .CSV FILE .......................................................................................... 157
6 CREATION OF NESTING PROJECT FROM THE COMMAND LINE ................................................. 158
6.1 NESTING PROJECT CREATION EXECUTION FROM THE COMMAND LINE ................................................. 158
6.2 FILE STRUCTURE ,CSV OF THE OPTIONS .......................................................................................... 159
6.3 FILE STRUCTURE ,CSV OF THE SHEETS ........................................................................................... 163
6.4 FILE STRUCTURE ,.CSV OF THE PARTS ............................................................................................ 164
6.5 NESTING REPORT ........................................................................................................................... 165
7 EXECUTION OF THE CYCLE TIME ESTIMATE FROM COMMAND LINE ....................................... 169
8 TOOLS DATA-BASE ........................................................................................................................... 172
9 POST-PROCESSOR FROM COMMAND LINE ................................................................................... 173
9.1 CREATE .XXL FILE FROM A .PGMX FILE .............................................................................................. 173
4
1 Introduction
This manual provides a guide in using the Maestro Scripting Language.
Maestro scripting language (MSL) is a programming language that, through the Maestro
platform primitives, is used to create scripting in textual format to create:
1. Machining-macros
2. Machining programs
MSL is based on Microsoft’s C# programming language; therefore all its instructions and
constructs can be used. For the language syntax see the C# programming language
reference manuals (an extensive literature on the subject can be found in the internet).
In particular, the second case applies to situations where the woodworking workshop
already has a 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.
5
2 Basic concepts
The main basic objects that can be managed with MSL and that can be defined and
created in a generic script are:
1. Workpiece
2. Workplane
3. Geometry
4. Machining operation
5. 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.
6
3 Project
Project refers 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.
This process will be illustrated in the following chapters:
1) Project management
2) Workpiece
3) Worktables
4) 2D geometries
5) Machining operations
7) NC functions
8) Work phases
10)Blocking system
12)Projects optimisation
13)Mathematical functions
14)Accessorial functions
7
3.1 Project management
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.
8
See below for an example of a workpiece program defined with the scripting language.
9
3.1.2 Project creation from command line
A program (.pgmx) can be created from a command line with the XConverter command.
The XConverter command is launched from the command line with the PC “commands
prompt” function.
The most effective way is to create a bach file (.bat) where the complete instruction to be
executed is written.
This creates output files with the suffix “(n)” where n is a progressive.
When wanting to maintain the original name overwriting the output file at each execution
use the “-ow” option.
This mode lets you convert one or more .XCS file in .PGMX.
To do this use the Xconverter command with the m 0 option.
Example:
Call "D:\projects\XCam\UI00\bin\Debug\XConverter.exe" ^
-s -m 0 ^
-i "D:\Documents\SCM\SW\Maestro\Projects\Post MaestroWD\0\Frame\1_MSX.xcs" ^
-i "D:\Documents\SCM\SW\Maestro\Projects\Post MaestroWD\0\Frame\1_MDX.xcs" ^
-t "D:\Documents\SCM\SW\Maestro\Tlgx\SerrSCM_R1.tlgx"
10
3.1.2.2Create project from other .pgmx
This mode lets you import in a single .PGMX all the workpieces in the input .PGMX.
To do this use the Xconverter command with the m 1 option.
Example:
Call "D:\projects\XCam\UI00\bin\Debug\XConverter.exe" ^
-s -m 1 ^
-i "D:\Documents\SCM\SW\Maestro\Projects\Post MaestroWD\0\Frame\1_MSX.pgmx" ^
-i "D:\Documents\SCM\SW\Maestro\Projects\Post MaestroWD\0\Frame\1_MDX.pgmx" ^
-t "D:\Documents\SCM\SW\Maestro\Tlgx\SerrSCM_R1.tlgx" ^
-o "D:\Documents\SCM\SW\Maestro\Projects\Post MaestroWD\0\Frame\1_MSX-
MDX.pgmx"
11
3.1.2.3Create projects optimised from other .pgmx
This mode lets you create .PGMX by minimising the tool path from one machining
operation to another.
To do this use the Xconverter command with the m 2 option.
Example:
Call "D:\projects\XCam\UI00\bin\Debug\XConverter.exe" ^
-s -m 2 ^
-i "D:\Documents\SCM\SW\Maestro\Projects\Post MaestroWD\0\Frame\1_MSX.pgmx" ^
-i "D:\Documents\SCM\SW\Maestro\Projects\Post MaestroWD\0\Frame\1_MDX.pgmx" ^
-t "D:\Documents\SCM\SW\Maestro\Tlgx\SerrSCM_R1.tlgx"
12
3.1.2.4Create projects optimised from .XCS files
This mode is used to import one or more workpieces described in the XCS files in a single
project .PGMX minimising the number of tool changes and the tool path between
machining operations.
To do this use the Xconverter command with the m 3 option.
Example:
Call "D:\projects\XCam\UI00\bin\Debug\XConverter.exe" ^
-s -m 3 ^
-i "D:\Documents\SCM\SW\Maestro\Projects\Post MaestroWD\0\Frame\1_MSX.xcs" ^
"D:\Documents\SCM\SW\Maestro\Projects\Post MaestroWD\0\Frame\1_MDX.xcs" ^
"D:\Documents\SCM\SW\Maestro\Projects\Post MaestroWD\0\Frame\1_TRUP_1.xcs" ^
-t "D:\Documents\SCM\SW\Maestro\Tlgx\SerrSCM_R1.tlgx" ^
-o "D:\Documents\SCM\SW\Maestro\Projects\Post MaestroWD\0\Frame\MSX-MDX-
TRSUP.pgmx"
With this example the following file is created and optimised: MSX-MDX-TRSUP.pgmx
13
3.1.2.5Create projects from .xxl files
Example:
Call "D:\projects\XCam\UI00\bin\Debug\XConverter.exe" ^
-s -m 4 ^
-i "D:\Documents\SCM\SW\Maestro\Projects\Post MaestroWD\0\Frame\MSX.xxl" ^
-i "D:\Documents\SCM\SW\Maestro\Projects\Post MaestroWD\0\Frame\MDX.xxl" ^
-t "D:\Documents\SCM\SW\Maestro\Tlgx\SerrSCM_R1.tlgx"
14
3.1.2.6Create projects from .pgm files
Example:
Call "D:\projects\XCam\UI00\bin\Debug\XConverter.exe" ^
-s -m 5 ^
-i "D:\Documents\SCM\SW\Maestro\Projects\Post MaestroWD\0\Frame\MSX.pgm" ^
-i "D:\Documents\SCM\SW\Maestro\Projects\Post MaestroWD\0\Frame\MDX.pgm" ^
-t "D:\Documents\SCM\SW\Maestro\Tlgx\SerrSCM_R1.tlgx"
15
3.1.2.7Create project complete with supports from .XCS
This mode is used to import one or more workpieces described in the XCS files in a single
project .PGMX minimising the number of tool changes and the tool path between
machining operations.
The project also includes the clamps and any loading assistance. The project is completed
of all the phases necessary for the machining operations in the machine with the automatic
setup function and the cycles generation.
To do this use the Xconverter command with the m 12 option.
This function requires the previous maestro configuration with the necessary machine
configuration and the selection of the clamp to fit on all the supports.
Example:
Call "D:\projects\XCam\UI00\bin\Debug\XConverter.exe" ^
-s -m 12 ^
-i "D:\Documents\SCM\SW\Maestro\Projects\Post MaestroWD\0\Frame\MSX.xcs" ^
"D:\Documents\SCM\SW\Maestro\Projects\Post MaestroWD\0\Frame\MDX.xcs" ^
-t "D:\Documents\SCM\SW\Maestro\Tlgx\SerrSCM_R1.tlgx" ^
-ca 200 300 150 250 ^
-o "D:\Documents\SCM\SW\Maestro\Projects\Post MaestroWD\0\Frame\1_MSX-
MDX.pgmx"
The clamps used to block the workpieces will be those configured in maestro.
The “–ca” function is used to define the loading assistance that includes a movement in
positive Y in the loading phase and a movement in negative Y in the unloading phase.
Therefore in the example in the loading phase MSX and MDX rise in Y respectively by 200
and 150 mm, whilst in the unloading phase they drop in Y respectively by 300 and 250
mm.
At the end of this function the MSX-MDX.pgmx project is ready to be executed in the
machine.
16
3.1.2.8Create an entire project from a dxf file
This mode allows you to create one or more .PGMX projects starting from a dxf file
The projects created can be enriched with information about tools or boards.
To do this use the Xconverter command with the option m 18.
This function requires the previous maestro configuration with the necessary machine
configuration and the selection of the clamp to fit on all the supports.
Example 1:
Call "D:\Progetti\Xcam\UI00\bin\Debug\XConverter.exe" ^
-s -m 18 ^
-i "D:\Documenti\SCM\SW\Maestro\Progetti\DXF\Telaio.dxf" ^
"D:\Documenti\SCM\SW\Maestro\Progetti\DXF\Anta.dxf" ^
-t "D:\Documenti\SCM\SW\Maestro\Tlgx\SerrSCM_R1.tlgx" ^
-o "D:\Documenti\SCM\SW\Maestro\Progetti\Da DXF"
-e "D:\Documenti\SCM\SW\Maestro\Edgx\def.edgx"
With this example, the following files are created: Telaio.pgmx and Anta pgmx in the folder
D:\Documenti\SCM\SW\Maestro\Progetti\Da DXF
And using the fixturing file SerrSCM_R1.tlgx
and the border file def.edgx
Example 2:
Call "D:\Progetti\Xcam\UI00\bin\Debug\XConverter.exe" ^
-s -m 18 ^
-i "D:\Documenti\SCM\SW\Maestro\Progetti\DXF\
-t "D:\Documenti\SCM\SW\Maestro\Tlgx\SerrSCM_R1.tlgx" ^
-o "D:\Documenti\SCM\SW\Maestro\Progetti\Da DXF"
-e "D:\Documenti\SCM\SW\Maestro\Edgx\def.edgx"
With this example, many .pgmx files can be created for each .dxf file in the folder D:\My
Documents\SCM\SW\Maestro\Projects\DXF
And using the fixturing file SerrSCM_R1.tlgx
and the border file def.edgx
17
3.2 Workpiece
The workpiece must be defined as either “finished workpiece” or “raw workpiece”. More
than one workpiece can be entered in a project.
In the example below a workpiece called “Example workpiece” is created with dimensions
1600x800x18 and associated to a raw with machining allowance in x- and x+ equal to
10mm, in y- 6mm, in y+ 2 mm, in z 0mm.
To specify the geometry of the raw for a complex shaped workpiece obtained via
extrusion, the following instruction is used CreateRawWorkpieceFromExtrusion.
18
3.2.2 Finished workpiece
MSL can be used to define two workpieces with the following geometric shapes:
19
3.2.2.2Workpiece from extrusion
See the example below for the definition of a finished and raw of an arch workpiece
20
3.3 Workplanes
To create a workplane, MSL provides three CreateWorkplane instructions.
These instructions differ from each other in terms of number and type of parameters that
they accept in input. Once created, the workplace becomes an “active workplane”, that is,
it becomes the plane on which the subsequent geometries and machining operations will
be performed. MSL provides also the SelectWorkplane instruction to change the active
plane in the script, changing therefore the plane on which the geometries and operations
will be performed.
21
3.3.2 Workplane Parallel
Used to create a workplane parallel to the active plane. Remember that the exit versor
from the active plane is always the versor corresponding to axis Z, the new workplane is
created by performing a translation of the active plane by an offset along Z.
In the example below a workplane called “Workplane” is created, parallel to the upper side
and a plane “Workplane2” parallel to the right side:
22
3.3.3 Tilting Plane
The tilting plane can be defined in two ways:
1) Workplane with three points
2) Workplane with origin and rotation X Y
Used to create a workplane starting from the identification of three points on the plane.
In the example below a workplane called “Workplane” is created, starting from points (30,
40, 0), (100, 200, 5), (1000, 40, 0):
23
3.3.3.2Workplane, with origin and rotation in relation to X and Y
Used to create a workplane starting from the origin of the plane and its rotation in relation
to the axes X and Y.
In the example below a workplane called “Workplane ” is created, with origin in point
(1000, 500, 0), rotation of 45° in relation to axis X and 45° in relation to axis Y:
24
3.3.4 Selecting workplane
To specify the plane that will be used for the geometries and the machining operations, the
active plane must be specified.
SelectWorkplane is used to select a workplane 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 side of the workpiece is selected as active workplane, on
which the geometry of a rhombus is performed, then the bottom side is selected on which
a cross is performed:
25
3.4 2D geometry
LIST OF GEOMETRIES:
1. Segment
2. Arc
3. Circle
4. 2D Polyline
5. Ellipse
See below for the instructions available to create geometries available with MSL.
26
3.4.1.1Segment
The CreateSegment instructions is used to create a segment. The parameters defined for
the function are described out below.
In the example below a segment called “Example segment” is created with start point
(30,70) and final point (650,500). Firstly the operation workpiece is defined. Furthermore
as the workplane for the geometry has not been specified, the top side plane is considered
as active by default.
27
3.4.1.2Arc
Four functions are defined to perform an arc, that differ in terms of the input parameters
provided during the arc creation phase:
See below for the tables describing the input parameters of the four previous instructions.
28
Name Type Description
name string Geometry name
startX double Coordinate X of start point
startY double Coordinate Y of start point
centerX double Coordinate X of centre point
centerY double Coordinate Y of centre point
angle double Arc angle
Table 13: CreateArcCenterAngle parameters
In the example below an arc called “Example arc” is created with the
CreateArcCenterAngle function with start point Pi (1000,500), centre Pc(1500,200) and
45° angle.
29
3.4.1.3Circle
Four instructions are available to perform a circle, that differ in terms of the input
parameters provided during the circle creation phase:
See below for the tables describing the input parameters of the four previous instructions.
In the example below a circle called “Example circle” is created with the
CreateCircleCenterRadius function, with centre point Pc (1000,400), radius 300 and
counterclockwise direction. This circle is created on the top side of the workpiece, as no
30
workplane is specified for the geometry. In the same script a second circle called “Example
circle2” is then created, using the CreateCircleCenterPoint , function with centre
Pc(400,20) and circumference point P(420,20).
This circle is performed on the left side of the workpiece.
31
3.4.1.42D polyline (segments and circle arcs)
32
See below for the input parameters of every instruction described.
33
Name Type Description
radius double Fillet radius
option int O = straight direct; 1 = indirect fillet
2 = clockwise fillet; 3 = counterclockwise fillet
nameElement string Name of added element
Table 24: AddFilletToPolyline parameters
In the example below a closed polyline called “Example polyline” is created, using some of
the instructions listed above.
34
Please note that open polylines can also be created. In this case simply don’t specify the
ClosePolyline instruction. In the example below an open polyline is added on the right
side of the previous workpiece, with the following instructions:
35
3.4.1.5Ellipse
In the example below an ellipse called “Example ellipse” is created with centre point
(1000,500), greater semi-axis 450, lesser semi-axis 200, angle 30°.
36
3.5 Machining operations
Type of machining operations that can be defined:
1. Drilling (CreateDrill)
2. Through Drilling (CreateThroughDrill)
3. Slanted drilling (CreateSlantedDrill)
4. Routing 2.5D (CreateRoughFinish)
5. Routing 3D (Create3DRoughFinish)
6. Slanted routing (CreateSlantedRoughFinish)
7. Slot (CreateSlot)
8. Blade cut (CreateBladeCut)
9. Contour (CreateContour)
10. Pocket (CreateContourPocket)
11. Chamfer (CreateChamfer)
12. Machining-macro defined by the user (CreateMacro)
As a rule for every type of operation a series of parameters can be defined to describe the
mode used for the operation. For example the following can be defined: 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.
The operation can therefore be customized according to the user’s requirements and the
type of machining required. If the user does not need to customize all the machining
parameters, he can use the default values for some of them, letting the software select the
values based on the active fixturing and the specific machine configuration that the
operation will be performed on. To recall the “default values” the user can choose not to
specify any value for the corresponding input parameter or specify the default value.
See the Maestro manual for the specific meaning of the operations listed above. See
below for a description of the most common operations.
37
3.5.1 Drilling (CreateDrill)
To create a drilling use the CreateDrill instruction. The operation is performed at the
coordinates assigned to the hole. The coordinates refer to the active workplane.
See below, by way of an example, the drilling operation in a machining procedure for a
door frame.
CreateFinishedWorkpieceBox("Internal Frame_Right",1490,92,46.5);
CreateRawWorkpiece("Internal Frame_Right ",0,0,1,1,0,0);
SelectWorkplane("Top");
CreateDrill("Frame Drilling_6",1466.75 ,67 ,26,12, "",TypeOfProcess.Drilling,"E011","3",0,0, 6);
SelectWorkplane("Top");
CreateDrill("Frame Drilling_7",1466.75 ,25 ,26,12, "",TypeOfProcess.Drilling,"E011","3",0,0, 6);
SelectWorkplane("Top");
In the first of the script the finished and raw workpiece specifications are configured. The
instructions are described in detail in their specific chapters of the manual.
In the second part two drilling operations are performed on the top workplane, with the
CreateDrill instruction
In the example the instruction is used without specifying the value of all the input
parameters: the parameters not entered use the instruction’s default values. For example
for the kindOfHole parameter the flat type is used, for taperHeight a zero value height is
used, whilst the safety quota is taken from the default configuration.
38
39
3.5.2 Through Drilling (CreateThroughDrill)
To create a through drill, use the CreateThroughDrill command.
The processing will be carried out at the coordinates assigned to the hole.
The coordinates refer to the active plane of work.
SelectWorkplane ("Top");
CreateThroughDrill ("Through Hole Drilling", 100, 35, 10.3, "Top Drilling",
TypeOfProcess.Drilling, "E011", "3", 0, 0, 6);
The characteristics of the finished piece are configured in the first part of the script.
In the second part, a drilling through the upper working plane is carried out by means of
the instruction called CreateThroughDrill.
40
3.5.2.1Hole Matrix (CreatePattern)
SelectWorkplane("Top");
The characteristics of the finished piece are configured in the first part of the script.
In the second part, a matrix of 2 x 4 = 8 holes is defined at step X = 100 and Y = 50.
In the second part, a drilling through the upper working plane is carried out by means of
the instruction called CreateThroughDrill.
To reset the Pattern, use the ResetPattern instruction that has no parameters.
Example:
CreatePattern( 2, 4, 50, 100, 0, 70);
CreateThroughDrill("Fori",50 ,10 ,10,3, "8 Fori", TypeOfProcess.Drilling,"E011","3",0,0, 6);
ResetPattern();
41
3.5.3 Slanted drilling (CreateSlantedDrill)
To create a slanted drilling use the CreateSlantedDrill instruction. Please note that the
coordinates associated to the hole refer to the absolute reference system.
42
By way of an example we use the same drilling procedure used in the previous section,
replacing the simple drilling with a slanted drilling. For the “Frame Drilling_6” an angleA
equal to 45° and an angleB equal to 30° are fixed, whilst for “Frame Drilling_7” an angleA
equal to 90° and an angleB equal to 45° are fixed:
43
3.5.4 Routing (CreateRoughFinish)
To create a routing use the CreateRoughFinish instruction . The routing is always
applied to the active geometry.
44
The example below shows a routing operation applied on a geometry defined on the top
side of the workpiece.
// Plane selection
SelectWorkplane("Top");
// Geometry creation
CreatePolyline("",0,0);
AddSegmentToPolyline(0,70);
AddSegmentToPolyline(70,70);
// Operation creation
CreateRoughFinish("Op1",65,"", TypeOfProcess.GeneralRouting ,"E030","-1",1,-1,-1,3,0);
45
3.5.5 Slanted routing (CreateSlantedRoughFinish)
To create a slanted routing on a standard plane or a plane defined by the user use the
CreateSlantedRoughFinish instruction. The routing is always applied to the active
geometry.
See below for a few examples of slanted routing. On the top side of the workpiece three
segment geometries have been drawn and a different slanted routing has been applied to
each one. In particular, for each routing a tool slant angle in relation to axis X equal to 20°
and 45° in relation to the vertical plane have been selected, whilst the tool approaches to
the geometry have been changed. For “Segment1” the tool approach is perpendicular to
the geometry, with tool on the right side of the geometry, for “Segment2” the approach is
perpendicular to the geometry, but with tool on the left side of the geometry and finally for
“Segment3” the tool approach is parallel to the tangent to the trajectory at the start point.
46
See below for the example code and subsequently the operations are displayed:
// Plane selection
CreateFinishedWorkpieceBox("Example workpiece",1800 800 40);
// Geometry creation
CreateSegment("Segment1", 450, 50, 450, 750);
// Operation creation
CreateSlantedRoughFinish("Slanted routing1", 20, 45, 1, 20, "Slanted routing",
TypeOfProcess.GeneralRouting, "E032", "-1", -1, -1, -1, 0);
// Geometry creation
CreateSegment("Segment2", 900, 50, 900, 750);
// Operation creation
CreateSlantedRoughFinish("Slanted routing2", 20, 45, 2, 20, "Slanted routing",
TypeOfProcess.GeneralRouting, "E032", "-1", -1, -1, -1, 0);
// Geometry creation
CreateSegment("Segment3", 1350, 50, 1350, 750);
// Operation creation
CreateSlantedRoughFinish("Slanted routing3", 20, 45, 3, 20, "Slanted routing",
TypeOfProcess.GeneralRouting, "E032", "-1", -1, -1, -1, 0);
47
48
3.5.6 Chamfer (CreateChamfer)
To create a chamfer use the CreateChamfer instruction. The chamfer is always applied to
the active geometry.
49
See below for a simple chamfer example on the left of the top side of a workpiece. To
chamfer the side a segment geometry must be associated. To this geometry the chamfer
operation is applied with the CreateChamfer instruction. In the example the corner is
chamfered for a width and height equal t0 18mm. Please note that for this operation the
tool must be on the left of the corner (material being chamfered on the right of the tool).
50
3.5.7 Routing 3D (Create3DRoughFinish)
To create a 3D routing use the Create3DRoughFinish instruction. As opposed to the
other operations the 3D routing does not require the definition of an active geometry that it
must be applied to, but it requires the definition of the 3D tool path. For the instructions on
how to create a tool path see chapter 3.5.14, whilst the input parameters for the
Create3DRoughFinish function are described below.
The example below shows a 3D routing operation with rotation angle around axis Z equal
to 90° and rotation angle around axis X equal to 45°. Note that the tool path that the
operation needs to follow must be defined after the Create3DRoughFinish instruction.
51
See below for a graphic representation of the tool path:
52
3.5.8 Slot (CreateSlot)
To create a slot operation use the CreateSlot instruction. The operation is always
applied to the active geometry that must be a segment type.
See below for a slot application example. A segment geometry, active geometry for the
next operation, is created on the top side of the workpiece. In particular, for the slot
operation the following are selected: tool with circular blade, slot depth of 58.5 mm, a tool
correction to the right of the geometry, a feed speed of 4 m/min and overmaterial equal to
zero. The default values are used for the rotation speed, the input speed and the operation
angle.
ResetApproachStrategy();
ResetRetractStrategy();
SetApproachStrategy(true, true, .5);
ResetDustpan();
CreateSegment("Blade Cut at 0 mm_14", 1887, 0, 1887, 92);
SetRetractStrategy(true, true, .5, 0);
SetPneumaticHoodPosition(4);
ResetAuxiliaryHood();
CreateSlot("Blade Cut at 0 mm_15",58.5,"Blade Cut at 0 mm", TypeOfProcess.GeneralRouting
,"E001","3",2,-1,-1,4,0);
53
54
3.5.9 Blade cut (CreateBladeCut)
To create a blade cut use the CreateBladeCut instruction. The cut operation is always
applied to the active geometry that must be a segment type. Please note that the blade
cuts can only be applied to segment geometries and on the top side of the workpiece.
The example below shows a cube with dimensions 100mmx100mmx100mm and two
blade cuts have been performed along the median directions of the top side of the cube.
As the blade cut is always through, remember to use a circular blade tool with radius
greater than the workpiece thickness (in this case the circular blade has a diameter of
300mm). Furthermore every blade cut operation is always associated to the creation of a
new plane corresponding to the new side created on the workpiece. In the example below
the first cut is perpendicular to the operation side (top side), whilst the second cut is
slanted by an angle of 45° (slanted blade cut).
55
56
3.5.10 Contour (CreateContour)
To create a contour use the CreateContour instruction. The contour can be performed
on a workpiece or on an active geometry.
The example below shows the application of a contour operation on a workpiece from
extrusion:
CreatePolyline("",70,600);
AddArc2PointRadiusToPolyline(1130,600,530,true,false);
AddSegmentToPolyline(1200,600);
AddArc2PointRadiusToPolyline(0,600,600,false,false);
AddSegmentToPolyline(70.600);
CreateFinishedWorkpieceFromExtrusion("Frame_Up",63);
57
58
3.5.11 Pocket (CreateContourPocket)
To create a pocket use the CreateContourPocket instruction. The pocket is always
applied to the active geometry.
The example below shows the application of pocket operation on a circular geometry
defined on the left side of a cube with dimensions 100mmX100mmx100mm.
59
In the example the pocket depth is of 50 mm, with an overlap percentage of 30%. The
default values have been used for the remaining parameters. To perform the pocket
correctly the tool diameter must be less than the geometry of the pocket.
60
See below for another pocket example, with a boss inside the pocket geometry (a circle in
this case):
61
3.5.12 Machining mode
The machining mode is set with the Strategy, the approach/retraction and any machining
inversion.
As the first instruction does not include input parameters. The parameters for the second
function are listed in the table below.
The example below shows the application of the drilling strategy in the production of a
frame for doors:
… (continue)
SetPneumaticHoodPosition(0);
ResetAuxiliaryHood();
CreateWorkplane("Frame Drilling 63_13",17,0,0,0,90);
CreateMultiStepDrillingStrategy( true, 1, 44);
62
CreateDrill("Frame Drilling 63_14",0 ,50 ,44,10, "Frame Drilling 63",
TypeOfProcess.Drilling,"E011","3",0,0, 6);
CreateWorkplane("Frame Drilling 63_15",35,0,0,0,90);
CreateMultiStepDrillingStrategy( true, 1, 32);
CreateDrill("Frame Drilling 63_16",0 ,31.5 ,32,10, "Frame Drilling 63",
TypeOfProcess.Drilling,"E011","3",0,0, 6);
CreateWorkplane("Frame Drilling 63_17",17,0,0,0,90);
CreateMultiStepDrillingStrategy( true, 1, 32);
CreateDrill("Frame Drilling 63_18",0 ,13 ,32,10, "Frame Drilling 63",
TypeOfProcess.Drilling,"E011","3",0,0, 6);
CreateWorkplane("Frame Drilling 63_19",55,0,0,0,90);
CreateMultiStepDrillingStrategy( true, 1, 32);
CreateDrill("Frame Drilling 63_20",0 ,13 ,32,10, "Frame Drilling 63",
TypeOfProcess.Drilling,"E011","3",0,0, 6);
SelectWorkplane("Top");
… (continue)
Four drilling operations are performed in the example. All the operations use a multiple
step drilling strategy, with step depth as active parameter. Note that even though three
holes have the same strategy, the same configuration is repeated for each hole. This is
because the strategy definition in the script is “non-modal” and therefore the instruction is
valid only for the first operation after the setting. Once the configuration is used it is no
longer available for the subsequent drilling. The instruction must be repeated to use the
same strategy again.
63
3.5.12.2 Routing strategies
The following instructions can be used to apply a strategy to the routing operation:
• CreateBidirectionalMillingStrategy: configures the strategy for routing with
bidirectional multiple passages;
• CreateUnidirectionalMillingStrategy: configures the strategy for routing with
unidirectional multiple passes;
• CreateHelicMillingStrategy: configures the strategy for routing with helic tool
path;
Please note that for all the instructions, the strategy created is valid only for the first
operation performed after it is created.
See below for the descriptions of the input parameters for the three instructions.
64
Name Type Description
cuttingDepth double Passage depth in the tool axial direction.
allowsFinishCutting bool Enables the execution of the final pass
finishCuttingDepth double Final passage depth in the tool axial
direction (if used corresponds to the
final pass, used to reach the final
programmed depth).
Table 43: CreateHelicMillingStrategy parameters
CreatePolyline("Squad_36",1323.5,878.5);
AddSegmentToPolyline(1323.5,105);
AddSegmentToPolyline(105.105);
AddSegmentToPolyline(105,878.5);
AddSegmentToPolyline(1323.5,878.5);
CreatePolyline("Squad_37",1428.5,983.5);
AddSegmentToPolyline(1428.50.0);
AddSegmentToPolyline(0.0);
AddSegmentToPolyline(983.5);
AddSegmentToPolyline(1428.50.983.5);
CreateFinishedWorkpieceFromExtrusion("Squad_40",78,"Squad_36");
… (continue)
ResetApproachStrategy();
ResetRetractStrategy();
SetApproachStrategy(false, true, 1.5);
ResetDustpan();
CreatePolyline("Slot Profile 60 Door_53",1422.5,0);
AddSegmentToPolyline(1422.50.983.5);
SetRetractStrategy(false, true, 1.5, 0);
SetPneumaticHoodPosition(4);
ResetAuxiliaryHood();
CreateUnidirectionalMillingStrategy(true, 30, 0, 1);
CreateRoughFinish("Slot Profile 60 Door_54", 60,"Slot Profile 60 Door",
TypeOfProcess.GeneralRouting ,"E039","3",2,-1,-1,5,0);
… (continue)
In the routing example a unidirectional strategy has been selected with multiple passes,
pass depth of 30mm (with final pass of 0mm) and with tool exit from workpiece for the
movement between the final point of the previous pass and the start point of the next pass.
As the routing depth is of 60mm, the strategy of 30mm per pass will achieve the desired
depth with two passes.
65
See below for the images of the operation with views of the top and right sides.
66
In order to repeat the previous operation with a different strategy, for example by using a
bidirectional approach, replace the unidirectional instruction with the bidirectional one,
CreateBidirectionalMillingStrategy, keeping the same input parameters, to
achieve:
See below for the CAM view of the right side, for the new strategy.
As can be seen in the image, in this case the tool does not exit the workpiece for the
repositioning on the left side. With a bidirectional operation strategy, after the first pass the
tool performs the second pass along the trajectory in reverse.
67
See below for the CAM view of the right side of the workpiece, and the helic path used by
the tool for the desired operation.
68
3.5.12.3 3D routing strategies
CreateToolpath3D("3DToolPath", 0, 0, 20);
AddSegmentToToolpath(1800, 0, 20, 45, 30);
AddSegmentToToolpath(1800, 800, 20, 45, 30);
AddSegmentToToolpath(0, 800, 20, 45, 30);
AddSegmentToToolpath(0, 0, 20, 45, 30);
Comparing the post-process files generated without and with the strategy, we can see that
the tool rotation information in relation to axes X and Z are present in the ISO only in the
former case. When the strategy is applied, the operation is performed with the vertical tool
axis (3-axes operation).
H DX=1810.000 DY=1235.000 DZ=40.000 -AB C=0 T=1114112 R=1 *MM /"SerrSCM" BX=0.000 BY=0.000
BZ=0.000 V=0
;**********************************************************
; >> Post P. Release...
;Version : 1.00.006.1006;
; >> Program description...
; Creation date: 4/18/2013 3:28:34 PM
;
; >> Tools used...
;
; >> Program Start...
;**********************************************************
;Workpiece setup Example workpiece on Setup phase
REF DX=1800.000 DY=800.000 DZ=40.000 FLD=AB BX=10.000 BY=435.000 BZ=0.000
;**********************************************************
;**********************************************************
.OP1 ;Routing 3D
;**********************************************************
SET ZFAST=20.000
XG03D X=0.000 Y=0.000 H=20.000 T=130 F=1 C=0 Q=0.000 R=0.000 E=0 ;Example Routing 3D
XG13D X=1800.000 Y=0.000 H=20.000 Q=45.000 R=30.000 ;Example Routing 3D
XG13D X=1800.000 Y=800.000 H=20.000 Q=45.000 R=30.000 ;Example Routing 3D
XG13D X=0.000 Y=800.000 H=20.000 Q=45.000 R=30.000 ;Example Routing 3D
69
XG13D X=0.000 Y=0.000 H=20.000 Q=45.000 R=30.000 ;Example Routing 3D
PARK S=0
;**********************************************************
.END
;**********************************************************
F=1
O X=0 Y=0 Z=0 F=1 ;ChangePlane
;FINEPROG
H DX=1810.000 DY=1235.000 DZ=40.000 -AB C=0 T=1114112 R=1 *MM /"SerrSCM" BX=0.000 BY=0.000
BZ=0.000 V=0
;**********************************************************
; >> Post P. Release...
;Version : 1.00.006.1006;
; >> Program description...
; Creation date: 4/18/2013 3:26:28 PM
;
; >> Tools used...
;
; >> Program Start...
;**********************************************************
;Workpiece setup Example workpiece on Setup phase
REF DX=1800.000 DY=800.000 DZ=40.000 FLD=AB BX=10.000 BY=435.000 BZ=0.000
;**********************************************************
;**********************************************************
.OP1 ;Routing 3D
;**********************************************************
SET ZFAST=20.000
XG0 X=0.000 Y=0.000 Z=0.000 T=130 P=0 D=20 C=0 E=0 ;Example Routing 3D
XL2P X=1690.292 Y=-7.559 Z=-619.076 ;Example Routing 3D
XL2P X=1797.197 Y=733.097 Z=-336.233 ;Example Routing 3D
XL2P X=113.451 Y=733.097 Z=300.163 ;Example Routing 3D
XL2P X=6.547 Y=-7.559 Z=17.321 ;Example Routing 3D
PARK S=0
;**********************************************************
.END
;**********************************************************
F=1
O X=0 Y=0 Z=0 F=1 ;ChangePlane
;FINEPROG
70
3.5.12.4 Blade cut strategies
The example below shows the strategy application to a blade cut operation. For the
operation a first cut depth of 10mm is used, with workpiece edge out distance of 30mm
and a blade movement for the tool correction equal to 0.4. Please note that the edge out
distance refers to the blade centre and not the blade edge.
71
See below for the relative CAM views of the top and right sides of the workpiece. In the
first we can see the tool correction, whilst in the second we can see the blade path. In the
latter we can see the first cut and the blade exit from the workpiece edge, as specified in
the configured strategy.
72
3.5.12.5 Pocket strategies
The example below shows the application of a pocket strategy for a slot:
//Strategy application
CreateContourParallelStrategy(true, 0, true, 5, 0, 0);
//Creation of the pocket strategy
CreateContourPocket("Slot", 30, "slot creation operation", TypeOfProcess.ConcentricalPocket,
"E037", "-1", -1, -1, -1, 30);
73
In the example the geometry pocket is performed from inside to outside, with clockwise
rotation direction. The pocket mode is also performed in multiple passes, with pass depth
of 5 mm. The tool is not lifted for the connection between the passes. The default values
are used for the other parameters.
See below for the tool operation path, in CAM view.
74
3.5.12.6 Approach/Retraction
To apply a tool approach and retraction to the workpiece for routing operations, MSL
provides the following instructions:
To disable the approach and retraction modes, use the following instructions:
As opposed to the strategies described previously, these instructions are not linked to
specific operations, but are more general as they describe the approach and retraction
modes to the workpiece for generic routing operations.
See below for the descriptions of the input parameters for the two instructions. The disable
functions do not require any input parameter.
75
The example below shows the application of the approach and retraction to the workpiece
in the production of a frame for doors: In particular, the approach and retraction strategies
are configured for four operations: two slot and two generic routing operations. To create
the slots a linear type of approach has been set, in quota on the operation start point and
with radius multiplier value of 0.5 (approach segment distance = radius * multiplier). The
same specifications have been set for the retraction, with a null overlap on the profile. For
the routings an arc approach has been set, in quota on the operation start point, with
radius multiplier of 3. The same specifications have been used for the retraction with null
overlap on the profile.
The instructions concerned are highlighted in bold:
ResetApproachStrategy();
ResetRetractStrategy();
SetApproachStrategy(true, true, .5);
ResetDustpan();
CreateSegment("Blade Cut at 0 mm_30", 1200, 0, 1200, 70);
SetRetractStrategy(true, true, .5, 0);
SetPneumaticHoodPosition(4);
ResetAuxiliaryHood();
CreateSlot("Blade Cut at 0 mm_31",65,"Blade Cut at 0 mm", TypeOfProcess.GeneralRouting
,"E001","3",2,-1,-1.6,0);
ResetApproachStrategy();
ResetRetractStrategy();
SetApproachStrategy(true, true, .5);
ResetDustpan();
CreateSegment("Blade Cut at 0 mm_34", 0, 70, 0, 0);
SetRetractStrategy(true, true, .5, 0);
SetPneumaticHoodPosition(4);
ResetAuxiliaryHood();
CreateSlot("Blade Cut at 0 mm_35",65,"Blade Cut at 0 mm", TypeOfProcess.GeneralRouting
,"E001","3",2,-1,-1.6,0);
… (continue)
ResetApproachStrategy();
ResetRetractStrategy();
SetApproachStrategy(false, true, 1.5);
SetDustpanOffset(10, 1, false);
CreatePolyline("Door Housing Routing_4",0,0);
AddSegmentToPolyline(1200.0);
SetRetractStrategy(false, true, 1.5, 0);
SetPneumaticHoodPosition(1);
ResetAuxiliaryHood();
CreateRoughFinish("Door Housing Routing_5",63,"Door Housing Routing",
TypeOfProcess.GeneralRouting ,"E152","3",2,-1,-1,6,0);
CreateWorkplan("Swap");
SetWorkpieceSetupPosition(10,435,0, 0);
//internal blocking profile
CreateBlockingProfile("Frame_Left_3",0,0, -17);
AddSegmentToBlockingProfile(1200.0, "");
76
ResetApproachStrategy();
ResetRetractStrategy();
SetApproachStrategy(false, true, 3);
SetDustpanOffset(10, 1, false);
CreatePolyline("Frame External Routing_32",1200,70);
AddSegmentToPolyline(0.70);
SetRetractStrategy(false, true, 3, 0);
SetPneumaticHoodPosition(1);
ResetAuxiliaryHood();
CreateRoughFinish("Frame External Routing_33",65,"Frame External Routing",
TypeOfProcess.GeneralRouting ,"E200","3",2,-1,-1,6,0);
See below for the CAM views for the workpiece approach and retraction modes. In
particular, for the slot creation the images show the top and right sides of just one
operation. The view of the second operation is similar to the first. For the routing operation
the views show both operations to highlight how the tool radius affects the calculation of
the approach/retraction distance to the workpiece, with the same radius multiplier.
77
See below for the routing operation views:
78
79
3.5.12.7 Machining inversion
The direction of geometry can be inverted, so that it starts from the end point and ends at
the start point. The following instructions are available in MSL:
Clearly this option can be used for all machining operations that have a segment or a
broken line as geometric primitive, but not a point like drilling.
The function is not a mode and will therefore only affect the subsequent machining
operation.
See below for a description of the only parameter necessary for the function.
See below for an example in which the SetMachiningDirection instruction has been
inserted.
The instruction is highlighted in bold:
ResetApproachStrategy();
ResetRetractStrategy();
SetApproachStrategy(false, true, 1.5);
SetMachiningDirection(false);
ResetDustpan();
CreatePolyline("Controprofilo Anta Porta_14",0,-50);
AddSegmentToPolyline(0,-29);
SetAttribute("FEED", 1);
AddSegmentToPolyline(0,171);
SetAttribute("FEED", 3);
SetRetractStrategy(false, true, 1.5, 0);
SetPneumaticHoodPosition(4);
ResetAuxiliaryHood();
CreateRoughFinish("Controprofilo Anta Porta_15",44,"Controprofilo Anta Porta",
TypeOfProcess.GeneralRouting ,"E110","3",1,-1,-1,3,0);
80
The effect of the instruction is shown in the
image at the side, where the geometry
(Blue) rises, whilst the machining (Green)
drops.
81
3.5.13 Machine functions
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 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 input parameters of the first two functions are described below. The last two do not
accept parameters.
82
Name Type Description
gain double Jerk3D value:
0 = disabled;
1 = roughing;
2 = intermediate;
3 = finish.
Table 51: SetJerk3D parameters
The example below shows an application of the Jerk instructions for a routing operation:
//setJerk
SetJerk(160);
The Jerk configured for the operations can be seen in Maestro in the Machine data menu
associated to the operation.
Please note that the setting used remains active for the subsequent operations, as this is a
“modal” type of instruction. It is therefore good practice to use the ResetJerk instruction
after the operation, if you don’t want the instruction to affect subsequent operations.
For the 3D routing operations use the SetJerk3D and ResetJerk3D instructions similarly
to the example in 2.5D.
83
3.5.13.2 Hood control functions
See below for the description of the input parameters for the functions that allow them. The
reset functions do not allow the input parameters.
84
The example below shows the application of machine functions for the pneumatic and
auxiliary hoods control in the operation of a frame:
ResetApproachStrategy();
ResetRetractStrategy();
SetApproachStrategy(true, true, .5);
ResetDustpan();
CreateSegment("Blade Cut at 0 mm_30", 1200, 0, 1200, 70);
SetRetractStrategy(true, true, .5, 0);
SetPneumaticHoodPosition(4);
ResetAuxiliaryHood();
SetAuxiliaryHood(2);
CreateSlot("Blade Cut at 0 mm_31",65,"Blade Cut at 0 mm", TypeOfProcess.GeneralRouting
,"E001","3",2,-1,-1.6,0);
… (continue)
ResetApproachStrategy();
ResetRetractStrategy();
SetApproachStrategy(false, true, 3);
SetDustpanOffset(10, 1, false);
CreatePolyline("Frame External Routing_32",1200,70);
AddSegmentToPolyline(0.70);
SetRetractStrategy(false, true, 3, 0);
ResetPneumaticHoodPosition();
ResetAuxiliaryHood();
CreateRoughFinish("Frame External Routing_33",65,"Frame External Routing",
TypeOfProcess.GeneralRouting ,"E200","3",2,-1,-1,6,0);
As can be seen, the script contains various operations; for example there is a slot
operation “Blade Cut at 0 mm_31” with previous activation of the pneumatic hood at
position 4 and the auxiliary hood in position 2. Then a routing is performed, “Frame
External Routing_33”, that requires a type 1 automatic pneumatic hood and disabling the
auxiliary hood. As can be seen in the example, it is good practice enable or disable the
settings that are not required for the current operation. In fact they may have been
activated in previous operations and as they are modal, they would still be active. Similarly
the settings required must be activated and changed before the operation.
85
The settings configured with the hood control functions can be seen in Maestro, by
displaying the operation properties, in the “Machine Functions” category: “Pneumatic
hood”, “Auxiliary hood”.
86
3.5.13.3 Dustpan control functions
See below for the description of the input parameters for the functions that allow them.
The example below shows the application of the machine functions to control the dustpan.
As always the example uses the operation of a frame:
ResetApproachStrategy();
ResetRetractStrategy();
SetApproachStrategy(true, true, .5);
ResetDustpan();
CreateSegment("Blade Cut at 0 mm_30", 1200, 0, 1200, 70);
87
SetRetractStrategy(true, true, .5, 0);
SetPneumaticHoodPosition(4);
ResetAuxiliaryHood();
CreateSlot("Blade Cut at 0 mm_31",65,"Blade Cut at 0 mm", TypeOfProcess.GeneralRouting
,"E001","3",2,-1,-1.6,0);
… (continue)
ResetApproachStrategy();
ResetRetractStrategy();
SetApproachStrategy(false, true, 1.5);
SetDustpanOffset(10, 1, false);
CreatePolyline("Door Housing Routing_4",0,0);
AddSegmentToPolyline(1200.0);
SetRetractStrategy(false, true, 1.5, 0);
SetPneumaticHoodPosition(1);
ResetAuxiliaryHood();
CreateRoughFinish("Door Housing Routing_5",63,"Door Housing Routing",
TypeOfProcess.GeneralRouting ,"E152","3",2,-1,-1,6,0);
… (continue)
As can be seen the script contains various operations. Before the slot creation “Blade Cut
at 0 mm_31” operation the dustpan is disabled: this operation is performed without
dustpan. In the second operation, the routing “Door Housing Routing_5”, the dustpan is
enabled and applied to the operation with the SetDustpanOffset instruction. The
operation activates the dustpan and configures it at a distance of 10, position 1, without
the workpiece approach and retraction function.
The configured settings can be seen in Maestro, by selecting the operation properties, in
the “Machine functions”:” Dustpan” category.
88
3.5.13.4 Rotating axes control functions
The following instructions are available for the control of the machine rotating axes:
• SetUnrollHeadMode: configures the 5-axes “unroll head” mode;
• SetUnrollHeadRadiusMultiplier: configures the 5-axes “unroll head” mode
radius multiplier;
• SetBrakes: activates the rotating axes brakes (only for the subsequent operation).
See below for the descriptions of the input parameters for the instructions.
The application example shows a 3D routing operation with the configuration of the axes
“unrolling” and the control of the axis brakes:
// Axes control
SetUnrollHeadMode(1,1.0);
SetUnrollHeadRadiusMultiplier(1.0);
SetBrakes("B,C");
// Operation: 3D routing
Create3DRoughFinish("3D Routing", "3D Routing", TypeOfProcess.GeneralRouting, "E031", "-1",
-1, -1, -1, 45, 45);
// 3D Tool path
CreateToolpath3D("3DToolPath", 0, 0, 20);
AddSegmentToToolpath(1800, 0, 20, 45, 45);
AddSegmentToToolpath(1800, 800, 20, 45, 45);
AddSegmentToToolpath(0, 800, 20, 45, 45);
AddSegmentToToolpath(0, 0, 20, 45, 45);
89
The parameters set with the rotating axes control instructions can
be seen in Maestro in the operation properties, in the “Machine
functions”:” Rotating axes brakes”, “5-axes head unroll” category.
90
3.5.14 Tool path
To set a tool path use the CreateToolpath instruction The start point is used as the start
point for the subsequent arc and segment geometries. The input parameters for the
instruction are described in the table.
To set a tool path in 3D use the CreateToolpath3D instruction. The start point is used as
the start point for the subsequent arc and segment geometries. The rotation angles
ZRotation and XRotation, that define the rotation of the tool axes at the start point are
specified in the operation creation instruction Create3DRoughFinish. The input
parameters for the instruction are described in the table.
To add a segment to the tool path use the AddSegmentToToolpath instruction. The start
point of the segment is the point specified in the previous instruction, similarly to the
definition of the polyline geometry. MSL defines two different implementation for the
function, based on the type of parameters, either 2D or 3D. The input parameters for the
two implementations are described in the table.
91
The following instructions are available to add an arc to the tool path:
• AddArc3PointsToToolpath: adds an arc with three points of the arc and the centre
point
• AddArc2PointCenterToToolpath: adds an arc with two points of the arc and the
centre point
• AddArc2PointRadiusToToolpath: adds an arc with two points of the arc and the
radius
• AddArcCenterAngleToToolpath: adds an arc with the arc centre point and the arc
angle
The arc start point is the final point of the tool path (point specified in the previous
instruction).
See below for the descriptions of the input parameters for the four functions.
92
Note that the CreateToolpath, AddSegmentToToolpath, etc… instructions used to
specify the tool path can be used with all the routing operations 2.5D
(CreateRoughFinish, CreateContourPocket, etc…). If the tool path is specified, the
machining will be performed solely as specified by the user and no strategies will be
considered by the system.
For an example of the application of the instructions described above see chapter 3.5.7,
where a tool path was created for the 3D routing.
Note that the instructions that describe the tool path must always be positioned in the
script after the instruction that indicates the type of machining.
Another example is provided with an extract of code used for the “Clamex” macro. We can
see how the instructions for the tool path are defined after the definition of the machining
geometry and the actual machining.
… (continue)
CreateWorkplane("", -(Prof-Spes/2));
double x1,y1,z1,y2,z3,z4;
x1 = PosX;
y1 = -F-tool.Radius;
z1 = -Spes/2;
y2 = PosY+15-tool.Radius;
z3 = z1 + (Spes-SpFr)/2;
z4 = z1 - (Spes-SpFr)/2;
93
|| (Face == 4 & Side == 2) // Rear Left
|| (Face == 4 & Side == 4) // Front Left
|| (Face == 5 & Side == 2) // Rear Left
|| (Face == 5 & Side == 4) // Rear Right
{
CreateToolpath("Clamex path", y1, x1, z1);
AddSegmentToToolpath(y2, x1, z1);
AddSegmentToToolpath(y2, x1, z3);
AddSegmentToToolpath(y2, x1, z4);
AddSegmentToToolpath(y2, x1, z1);
AddSegmentToToolpath(y1, x1, z1);
} else {
CreateToolpath("Clamex Path", x1, y1, z1);
AddSegmentToToolpath(x1, y2, z1);
AddSegmentToToolpath(x1, y2, z3);
AddSegmentToToolpath(x1, y2, z4);
AddSegmentToToolpath(x1, y2, z1);
AddSegmentToToolpath(x1, y1, z1);
}
94
3.5.15 Machining technologies
For the specific documentation of the specifications and the creation method of the
machining technologies refer to the Xilog-Maestro manual.
The input parameters for the instruction are described in the table.
All the technologies available to the user are in Maestro in the Technologies folder, in the
folder that Maestro is installed in (e.g.: C:\Program Files\Scm
Group\Maestro\Technologies).
The user can create and save new technologies starting from single machining, with the
procedure described in the Maestro manual.
See below for the application of the “Profiling” technology to the segment geometry, along
the edge of the workpiece .
CreatePolyline("External Profiling",1200,70);
AddSegmentToPolyline(0.70);
ApplyTechnology("Profiling");
The image below shows the application of the technology with the CAM view of the
workpiece machining.
95
3.5.15.1 EdgeBanding work technology
The edge banding process can be done by Scripting from a technology and the geometry
defining the profile to edge.
3.5.15.1.1 Technology
Upon technology definition on Xcs file the first step is the geometry definition that identifies
the profile to edge.
Two cases are possible :
1) Closed Geometry where the same Edge is applied on each geometry elements: it is
necessary to create a closed geometry, es polyline or circle, and the whole process will be
applied over it with 1 Edge following standard edge banding process rules.
Example :
CreatePolyline("Geometria", 0, 800);
AddSegmentToPolyline(800, 1200, "");
AddSegmentToPolyline(800, 0, "");
AddSegmentToPolyline(0, 0, "");
AddSegmentToPolyline(0, 800, "");
96
3.5.15.1.3 Technology Selection
Exsample :
SelectTechnology("Bordatura", "Sopra", "Sotto", "Destro" , "Sinistro");
In this case "Bordatura.tchx" will be selected and are specified the segments that describe
the profile to edge.
Upon initialization og Technology and Profile is necessary to define how the whole
geometry will be machined.
Command :
SelectGeometryTechnology("Nome", R, G, B);
in this way to the polyline previosly created will be applied the edgebandind process
relative to Bordatura and depending machinings with Red color on technology.
In this case one edge will be used and applied to all geometry elements respecting
edgebanding process rules.
All other machinings with same color will be created, excepted for Milling and
EndTrimming that will be automatic performed.
97
in this way the calls sequence defines the order of edge application:
ApplyTechnology();
The command analyzes defined geometries, colors and machinings, and with this
informations optimize some machinings like milling, trimming, sraping.
complete example:
// Application of Technology
ApplyTechnology();
98
3.5.16 Machining attributes
The attributes are properties that can be associated to sections of geometry or tool path.
MSL defines three types of attributes: “FEED”, “ROT”, “DEPTH”. The first attribute
(“FEED”) is used to specify the tool feed speed, the second (“ROT”) the rotation of the
edge bander head and the third (“DEPTH”) the application depth of machining. As the user
can specify these attributes for each section of the tool path (or geometry) he can change
the behaviour of the generic machining it is associated to, in specific section of the path,
based on his requirements.
To apply the attributes to a geometry or a tool path, the following instructions are defined:
• SetAttribute: sets an attribute for the current active geometry (this instruction is
usually used during the creation of the geometry, before an operation);
• SetParametricAttribute: identical to the SetAttribute with the possibility to determine
its position in percentage
• SetToolpathAttribute: sets an attribute for the current tool path.
• SetAttribute2: inserts a bridge at the end of the segment
• SetParametricAttribute2: identical to the SetAttribute2 with the possibility to
determine its position in percentage.
99
The example below shows the application of attributes for the geometries. Similar
observations can be performed for the attributes for a tool path.
The first example shows the application of attributes to change the feed speed along a
geometry. In this case the segment is divided in three parts and an attribute is associated
to each one to slow down the feed speed in the initial and final section of the geometry.
double V1 = 0.5;
double V2 = 4;
CreateFinishedWorkpieceBox("Frame_Left",1200,70,63);
CreateRawWorkpiece("Frame_Left",10,10,2,0,0,0);
ResetApproachStrategy();
ResetRetractStrategy();
SetApproachStrategy(false, true, 3);
SetDustpanOffset(10, 1, false);
AddSegmentToPolyline(1190.70);
SetAttribute("FEED", V1);
AddSegmentToPolyline(10.70);
SetAttribute("FEED", V2);
AddSegmentToPolyline(0.70);
SetAttribute("FEED", V1);
In the post-process file, containing the ISO commands, we can see that the first and last
section have a feed speed of 1000*0.5 = 500 mm/min, whilst the central section has a
speed of 1000*4 = 4000mm/min.
H DX=1200.000 DY=70.000 DZ=63.000 -AB C=0 T=1114112 R=1 *MM /"SerrSCM" BX=0.000 BY=0.000
BZ=0.000 V=0
;**********************************************************
; >> Post P. Release...
;Version : 1.00.006.1006;
; >> Program description...
; Creation date: 4/18/2013 1:44:01 PM
;
; >> Tools used...
;
; >> Program Start...
;**********************************************************
;Workpiece setup Frame_Left on Setup phase
REF DX=1200.000 DY=70.000 DZ=63.000 FLD=AB BX=0.000 BY=0.000 BZ=0.000
;**********************************************************
;**********************************************************
.OP1 ;Frame External Routing
;**********************************************************
SET DUSTPAN=1
100
SET DUSTPANINOUTOFF=1
SET DUSTPANOFFSET=10
F=1
O X=0.000 Y=0.000 Z=0.000 F=1 ;ChangePlane
SET ZFAST=20.000
XGIN G=2 R=3 Q=0
XG0 X=1200.000 Y=70.000 Z=-65.000 T=300 P=0 D=20 C=1 E=1 s=0 ;Frame External Routing
XL2P X=1190.000 Y=70.000 Z=-65.000 V=500
XL2P X=10.000 Y=70.000 Z=-65.000 V=4000
XL2P X=0.000 Y=70.000 Z=-65.000 V=500
XGOUT G=2 R=3 Q=0 L=0
PARK S=0
;**********************************************************
.END
;**********************************************************
;FINEPROG
Similarly the depth applied to the geometry can be changed with the SetAttribute
instruction. For example by changing the machining depth of the previous example the
relevant script section becomes:
double V1 = 0.5;
double V2 = 4;
double deep1 = 65;
double deep2 = 30;
…(continue)…)
…(continue)…)
XG0 X=1200.000 Y=70.000 Z=-65.000 T=300 P=0 D=20 C=1 E=1 s=0 ;Frame External Routing
XL2P X=1190.000 Y=70.000 Z=-65.000 V=500
XL2P X=10.000 Y=70.000 Z=-30,000 V=4000
XL2P X=0.000 Y=70.000 Z=-65.000 V=500
101
3.5.16.2 TAB Attributes (Bridges)
These attributes are used to keep the scrap in the panels, application used in nesting or in
machines where the scrap is a problem (Cyflex)
Example 1 :
CreatePolyline("Polilinea",-10,556);
AddSegmentToPolyline(94,556);
SetAttribute2("TAB", 3, 10);
AddSegmentToPolyline(94.610);
Iso Product
;**********************************************************
.OP1 ;Toekick
;**********************************************************
F=1
O X=0.000 Y=0.000 Z=0.000 F=1 ;ChangePlane
SET ZFAST=20.000
XG0 X=-10.000 Y=556.000 Z=20.000 T=101 P=0 D=20 C=0 V=5000 E=0 s=0 ;Toekick
XL2P X=-10.000 Y=556.000 Z=-15.000 V=5000
XL2P X=71.900 Y=556.000 Z=-15.000 V=5000
XL2P X=71.900 Y=556.000 Z=-9.000 V=5000
XL2P X=93.900 Y=556.000 Z=-9.000 V=5000
XL2P X=93.900 Y=556.000 Z=-15.000 V=5000
XL2P X=94.000 Y=556.000 Z=-15.000 V=5000
XL2P X=94.000 Y=610.000 Z=-15.000 V=5000
XL2P X=94.000 Y=610.000 Z=20.000 V=5000
102
Example 2:
Creation of three bridges thickness 3 and long 10 segments on 2 broken segments
CreatePolyline("Polilinea",-10.556);
AddSegmentToPolyline(94.556);
AddSegmentToPolyline(94.610);
Machining obtained:
Iso Product
;**********************************************************
.OP1 ;Toekick
;**********************************************************
F=1
O X=0.000 Y=0.000 Z=0.000 F=1 ;ChangePlane
SET ZFAST=20.000
XG0 X=-10.000 Y=556.000 Z=20.000 T=101 P=0 D=20 C=0 V=5000 E=0 s=0 ;Toekick
XL2P X=-10.000 Y=556.000 Z=-15.000 V=5000
XL2P X=10.002 Y=556.000 Z=-15.000 V=5000
XL2P X=10.002 Y=556.000 Z=-9.000 V=5000
XL2P X=32.002 Y=556.000 Z=-9.000 V=5000
XL2P X=32.002 Y=556.000 Z=-15.000 V=5000
XL2P X=51.998 Y=556.000 Z=-15.000 V=5000
XL2P X=51.998 Y=556.000 Z=-9.000 V=5000
XL2P X=73.998 Y=556.000 Z=-9.000 V=5000
XL2P X=73.998 Y=556.000 Z=-15.000 V=5000
XL2P X=94.000 Y=556.000 Z=-15.000 V=5000
XL2P X=94.000 Y=572.000 Z=-15.000 V=5000
XL2P X=94.000 Y=572.000 Z=-9.000 V=5000
XL2P X=94.000 Y=594.000 Z=-9.000 V=5000
XL2P X=94.000 Y=594.000 Z=-15.000 V=5000
XL2P X=94.000 Y=610.000 Z=-15.000 V=5000
XL2P X=94.000 Y=610.000 Z=20.000 V=5000
103
3.5.17 Maintain Technological Sequence (SetPriority)
This method allows you to group project work maintaining their technological sequence
being optimized.
The optimization is done in these cases:
1. When you intend to work 2 or more pieces on the floor
2. When operating a piece of machinery CYFLEX
When machining 2 or more workpieces on the plane by minimising the number of tool
changes with the Maestro optimiser, the programmed technological sequence may be
changed.
In fact in such cases the Maestro paths optimiser probably changes the technological
sequence, as it can change the order of the machining operations carried out with the
same tool.
To maintain the desired technological sequence even when using the optimiser, use the
SetPriority instruction.
The SetPriority must be entered in the script before each machining operation that you
want to maintain the technological sequence defined in the script.
A value that represents the priority is the only parameter entered in the SetPriority.
The priority values must be positive but they do not necessarily have to be progressive,
the machining operations that can be done with the same tool will maintain the sequence
of the priority from the lowest to the highest value, whilst the ones without the SetPriority
can be changed by the optimiser.
Example:
SetPriority(1);
ResetApproachStrategy();
ResetRetractStrategy();
SetApproachStrategy(false, true, 1.3);
CreatePolyline("Controprofilo Telaio 20_18",-20,-20);
AddSegmentToPolyline(-20,1);
SetAttribute("FEED", 1);
AddSegmentToPolyline(-20,70);
SetAttribute("FEED", 3);
SetRetractStrategy(false, true, 1.3, 0);
SetPneumaticHoodPosition(4);
CreateRoughFinish("Controprofilo Telaio 20_19",63,"Controprofilo Telaio 20",
TypeOfProcess.GeneralRouting ,"E140","3",1,-1,-1,3,0);
SetPriority(2);
ResetApproachStrategy();
ResetRetractStrategy();
SetApproachStrategy(false, true, 1.3);
CreatePolyline("Controprofilo Telaio 10_20",-10,-20);
AddSegmentToPolyline(-10,1);
SetAttribute("FEED", 1);
AddSegmentToPolyline(-10,70);
104
SetAttribute("FEED", 3);
SetRetractStrategy(false, true, 1.3, 0);
SetPneumaticHoodPosition(4);
CreateRoughFinish("Controprofilo Telaio 10_21",63,"Controprofilo Telaio 10",
TypeOfProcess.GeneralRouting ,"E140","3",1,-1,-1,3,0);
By adding the SetPriority(1); and SetPriority(2); instructions, you are certain that the 1-2
sequence will be maintained with these two operations, even when the programs will be
optimised.
Whilst any other operations that do not have the SetPriority can be moved by the
optimiser.
When working on CYFLEX machine, the related processes with increasing values of
SetPriority will be built at the same stage.
The necessity of this method is kind to precision problems in the CYFLEX machines where
the workpiece is moved between one phase and another.
The machining tools consist of multiple paths, such as a counterbore hole made with two
different tools if it is realized in two different phases might be inaccurate.
How you use the SetPriority plans to place a growing value in all the processes that must
be performed at the same stage.
When the value is set to zero or to a value lower than the last value entered will stop the
series of processes to be performed in the same phase.
Example pgmx
CreateDrill("Foratura" , 20, 20, 13, 8, "Foratura", TypeOfProcess.Drilling);
CreateDrill("Foraturaa" , 20, 60, 13, 8, "Foratura", TypeOfProcess.Drilling);
SetPriority(1);
CreateDrill("Foratura(1)" ,880, 20, 13, 8, "Foratura", TypeOfProcess.Drilling);
SetPriority(2);
CreateDrill("Foratura(1a)" ,880, 60, 13, 8, "Foratura", TypeOfProcess.Drilling);
SetPriority(3);
CreateDrill("Foratura(1-1)" ,880, 250,13, 8, "Foratura", TypeOfProcess.Drilling);
SetPriority(4);
CreateDrill("Foratura(1-1a)" ,880, 290,13, 8, "Foratura", TypeOfProcess.Drilling);
SetPriority(5);
CreateDrill("Foratura(2-1)" ,880, 30, 13, 5, "Foratura", TypeOfProcess.Drilling);
SetPriority(6);
CreateDrill("Foratura(2-1a)" ,740, 30, 13, 5, "Foratura", TypeOfProcess.Drilling);
When this program will be optimized with the holes SetPriority 1 to 6 will be performed in
the same phase, while those without SetPriority may be performed at any stage
105
3.5.18 Geometric reference on the active work plane
(SetReferencePosition)
This method allows you to specify the geometric reference for machining operations on the
active work plane. The method must be inserted into the script before every process on
which you intend to specify a geometric reference that differs from the standard one.
Remember that for the work plane corresponding to the face of a part, the standard
geometric reference point is the left lower edge of the face.
The input parameters for the instruction are described in the following table.
106
3.5.19 Correction reference on the active work plane
(SetProbingReferenceReferencePoint)
This method 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 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.
The input parameters for the instruction are described in the following table.
107
3.6 Macros and subprograms
The macros (XSP) realised with Maestro are used to group together a sequence of various
instructions/machinings. When the macro is inserted in a program the instructions it
contains are executed in sequence.
The first phase can be created by executing the wizard supplied in Maestro.
See the Maestro manual for the details.
The second, on the other hand, requires a basic knowledge of the C# programming
language and of the scripting primitives in Maestro and described in this manual.
The interactive mode described in the Maestro manual can be used as the macro editor or
any other editor can be used to change the .cs file.
108
The representation in the Microsoft Visual Studio development environment is as follows:
The source code of the macro in question has the following general structure:
1. import of the libraries necessary to the development (System libraries and Maestro
Scripting libraries);
2. declaration of the namespace;
3. definition of the class that externs the UserScript basic class and implements the
following methods:
• constructor: defines the parameters and the values supplied with the
wizard procedure. This method must not be edited by the user;
• Execute: this is the method that executes the operations associated to
the macro, when it is applied. The body of this method is not
implemented. The wizard provides only the method signature: the
implementation of the method is left up to the user. The method presents
in input the input parameters set for the macro in the wizard procedure.
To implement the desired functions the user must use the primitives
supplied by the Maestro scripting language. The main functions available
are the ones described in this manual, in the chapters on the geometry,
machining, etc.;
109
• Validate: this method, similarly to the Execute method, must be
implemented by the user. As opposed to the previous one, is
implementation is optional. It is used to create validation tests of the
values of the parameters in input to the macro.
See below for a source example, as it appears to the user, before being implemented:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using ScmGroup.XCam.Scripting;
using ScmGroup.XCam.MachiningDataModel;
namespace ScmGroup.XCam.ScriptingMacros
{
/// <summary>
/// Class that implements the behaviour of the Macro Test_TwoHoles.
/// </summary>
[DataContract]
public class Test_TwoHoles : UserScript
{
/// <summary>
/// Creates a new instance of the class Test_TwoHoles copying the initialization
information passed from the script caller.
/// </summary>
public Test_TwoHoles() : base()
{
Name = "Test_TwoHoles";
/// <summary>
/// Script Execute Method.
/// </summary>
/// <param name="WorkpieceLength">WorkpieceLengthDescription.</param>
/// <param name="WorkpieceWidth">WorkpieceWidthDescription.</param>
/// <param name="WorkpieceHeight">WorkpieceHeightDescription.</param>
/// <param name="axisX">axisXDescription.</param>
/// <param name="axisY">axisYDescription.</param>
/// <param name="Distance">DistanceDescription.</param>
public Object Execute(Double WorkpieceLength, Double WorkpieceWidth, Double
WorkpieceHeight, Double axisX, Double axisY, Double Distance)
{
return null;
}
/// <summary>
/// Script Validate Method.
/// </summary>
/// <param name="WorkpieceLength">WorkpieceLengthDescription.</param>
/// <param name="WorkpieceWidth">WorkpieceWidthDescription.</param>
/// <param name="WorkpieceHeight">WorkpieceHeightDescription.</param>
/// <param name="axisX">axisXDescription.</param>
/// <param name="axisY">axisYDescription.</param>
/// <param name="Distance">DistanceDescription.</param>
public Object Validate(Double WorkpieceLength, Double WorkpieceWidth, Double
WorkpieceHeight, Double axisX, Double axisY, Double Distance)
{
}
}
}
110
See below for the implementation of the Execute method:
public Object Execute(Double WorkpieceLength, Double WorkpieceWidth, Double WorkpieceHeight, Double RifX,
Double RifY, Double D, Double Diam, String Testa, String Tool)
{
if (D > 0)
{
CreateDrill("Hole 1", RifX - D / 2, RifY, 10, Diam, "", TypeOfProcess.Drilling, Tool, Head, 0, -1,
-1, "-1", 0);
CreateDrill("Hole 2", RifX + D / 2, RifY, 10, Diam, "", TypeOfProcess.Drilling, Tool, Head, 0, -1,
-1, "-1", 0);
}
else
{
CreateDrill("Hole ", RifX, RifY, 10, Diam, "", TypeOfProcess.Drilling, Tool, Head, 0, -1, -1, "-1",
0);
}
return null;
}
For more examples we recommend editing one of the macros supplied in Maestro.
111
3.6.1.3Debug of a macro
After having implemented the desired behaviour for the macro, its correct operation can be
checked with the code debug operation.
The debug the macro created proceed as follows:
2. Open the macro source file .cs with Visual Studio.NET, in the runtime folder (this folder
is in the Maestro installation path);
3. Place a breakpoint in the line that the macro source debug must start;
4. From the debug menu of the VS.NET, select "attach to process" and from the active
processes select the Maestro UI00.exe
5. Apply the macro in the project in Maestro; when "Apply" is pressed the macro is
executed and the debug can be performed starting from the point at the breakpoint
inserted.
NOTE: the "attach to process" function is not available in the VE.NET Express version,
and therefore it cannot be used to debug the macro.
1. Images
2. Location of the macro in the menus
3. Definition of the parameters
4. Body of the macro function
5. Texts of the translations in the languages managed
See below for an image of the compressed structure in the file .xsp.
112
The detailed description of this structure lie outside the aim of this manual. The files
contain all the information entered with wizard procedure.
For example the images:
• 16x16 pixel image: is in the 16x16 folder;
• 32x32 pixel image: is in the 16x16 folder;
• 200x154 pixel image: is in the same level of the folders in the .xsp file.
113
3.6.2 Use of .XSP macros (CreateMacro)
To recall a machining-macro inside the script use the CreateMacro instruction. The macro
will be applied to the active workplane. Please note that even though the instruction has
the “Create” prefix, the command does not generate any new macro, but simply applies an
existing macro already defined in the system. Remember that the macros that can be used
from script are usually in the Macros folder, in the Maestro installation folder (e.g.:
C:\Program Files\Scm Group\Maestro\Macros)
SelectWorkplane("Top");
CreateMacro("Single Anuba Hinge hole Door-Supporting Frame_7","Anuba",157,35,0,0, true
,7,51,"3","E015",0,0);
SelectWorkplane("Top");
CreateMacro("Single Anuba Hinge hole Door-Supporting Frame_9","Anuba",1003,35,0,0, true
,7,51,"3","E015",0,0);
SelectWorkplane("Top");
CreateMacro("Fastening 90x8x18_11","Slot",615,12,90.5,16,8,18,"3","E035",9,0);
114
3.6.2.1Use of macros. XSP using SetMacroParam
To recall a macro without having to set up all parameters of the macro you can exclusively
set different parameters other than default with the instruction SetMacroParam and then
use the CreateMacro without parameters.
The result will be to apply the macro with all default settings other than those which can be
more dynamic.
The typical case would be to maintain the geometric data as default and change those
relating to position (X, Y).
CreateMacro("ToeKick1","ToeKick1");
115
3.6.3 Import Script
To use a workpiece program in .XCS format in the Maestro interactive environment, use
the “Import script” command in the submenu “Import” of the “Home” menu.
116
3.8 NC functions
Used to define and make the machine perform operations different from the machining
operations.
The following NC functions can be programmed in the scripting file:
117
3.8.1 Enter an ISO instruction
The Createlso function is used to enter an ISO instruction. It has the following parameters:
Examples:
;**********************************
.OP1 ;G0 X0 Y0
;**********************************
G0 X0 Y0
;**********************************
.OP1 ;G0 X0 Y0
;**********************************
ISO "G0" X0 Y0
118
3.8.2 Machine parking
The CreatePark function is used to enter a machine parking. It has the following
parameters:
Example:
;**********************************
. OP1 ;Parking
;**********************************
PARK S=1
119
3.8.3 Null operation
The CreateNullOperation function is used to perform a null machine operation. It has the
following parameters:
Example:
Post Generated:
;**********************************************************
.OP1 ;XN
;**********************************************************
XN X=2000 Y=800 Q=1 S=0 V=2000 T=1001
;**********************************************************
120
3.8.4 Workpiece probing
There are three workpiece probing modes:
1) Probing with side position correction
2) Probing with tool length correction
3) Probing with workpiece roto-translation
The CreateWorkPieceProbing function is used to perform the probing with side position
correction. It has the following parameters:
Example:
Post Generated:
;**********************************************************
.OP1 ;Probing
;**********************************************************
F=1
O X=0.000 Y=0.000 Z=0.000 F=1 ;ChangePlane
XTA X=100 Y=50 Q=1 T=011
;**********************************************************
121
3.8.4.2Probing with tool length correction
The CreateWorkPrismaProbing function is used to perform the probing with tool length
correction. It has the following parameters:
Example:
Post Generated:
;**********************************************************
.OP1 ;Special Probing
;**********************************************************
F=1
O X=0.000 Y=0.000 Z=0.000 F=1 ;ChangePlane
XTASPEC X=111 Y=10 T=1038 F=1 V=3000
;**********************************************************
.OP2 ;Roughing 2 mm of Head_22
;**********************************************************
XG0 X=-107.907 Y=-38.471 Z=20.000 T=1038 P=0 D=20 C=0 V=3000 s=0
XL2P X=-107.907 Y=-38.471 Z=-33.000 V=3000
XTASPECRESET
;**********************************************************
N.B.: - The XTASPECRESET instruction is written only if there are other machining
operations
- Use the SelectWorkplane(); to probe the desired side
122
3.8.4.3Probing with workpiece roto-translation
Example:
Post Generated:
;**********************************************************
.OP1 ;Roto Probing
;**********************************************************
XORGACQ N="ORGX ORGY ANGA" QX1=10.000 QX2=100.000 QY3=5.000 QZ=3.000 T=1004
ROT A=ANGA
;**********************************************************
123
3.8.5 Display an operator message
The CreateMessage function is used to display an operator message. It has the following
parameters:
Example:
Post Generated:
;**********************************************************
.OP1 ;Message
;**********************************************************
XMSG N="Pause for clamps exchange" Q=2 I=0
O X=0 Y=0 Z=0
;**********************************************************
124
3.9 Workplans
The application example below shows creation of a workplan called “Swap”, after the
default one:
ResetApproachStrategy();
ResetRetractStrategy();
SetApproachStrategy(true, true, .5);
ResetDustpan();
CreateSegment("Blade Cut at 0 mm_30", 1200, 0, 1200, 70);
SetRetractStrategy(true, true, .5, 0);
SetPneumaticHoodPosition(4);
ResetAuxiliaryHood();
CreateSlot("Blade Cut at 0 mm_31",65,"Blade Cut at 0 mm", TypeOfProcess.GeneralRouting
,"E001","3",2,-1,-1.6,0);
… (continue)
CreateWorkplan("Swap");
SetWorkpieceSetupPosition(10,435,0, 0);
//internal blocking profile
CreateBlockingProfile("Frame_Left_3",0,0, -17);
AddSegmentToBlockingProfile(1200.0, "");
ResetApproachStrategy();
ResetRetractStrategy();
SetApproachStrategy(false, true, 3);
SetDustpanOffset(10, 1, false);
CreatePolyline("Frame External Routing_32",1200,70);
AddSegmentToPolyline(0.70);
SetRetractStrategy(false, true, 3, 0);
SetPneumaticHoodPosition(1);
125
ResetAuxiliaryHood();
CreateRoughFinish("Frame External Routing_33",65,"Frame External Routing",
TypeOfProcess.GeneralRouting ,"E200","3",2,-1,-1,6,0);
When a new workplan is created it becomes an active workplan for the subsequent
operations. In order to activate a different workplan from the current one in the script, it
must be recalled with the SelectWorkplan instruction. Please note that the workplan must
have been created previously to be activated.
The table below lists the input parameters for the SelectWorkplan function.
126
3.10Workpiece setup in machine
The following must be set, based on the machine that the operation is performed on:
… (continue)
127
The machine parameters set can be seen in Maestro, by clicking Machine parameters.
128
3.10.1.1.1 Refer part to the opposite stop
Example:
SetRelatedToOppositeSideStop(true);
Example:
SetSideStopPositionY(32);
For Cyflex 900 machines it is possible to exclude the aligner at the launch of the program.
To do this, you use the SetWorkPieceSidePresserDisabledOnStart statement
Example:
SetWorkPieceSidePresserDisabledOnStart(true);
129
3.10.1.1.4 Maintaining the processing sequence
While maintaining the machining sequence, the optimised program can be modified to
perform multiple drills in one operation.
To do this, you use the SetMultipleDrillingsCanChangeWorkingSequence statement
There is a feature on Cyflex machines that does not allow very long panels to fall. In
practice, you avoid opening the pliers at the end of the program.
To enable this function, use the SetWorkPieceFallPrevention statement
130
3.10.1.1.7 Default locking
If you want to retain the default locking type set in the machine panel configuration, use
the SetDefaultForTableOptions statement
When set with the true value, this function actually renders setting of the "TableOptions"
parameter of the "SetMachiningParameters" functions useless
This function allows you to retain the set work mode (in favour of advancing or against
advancing) even on the mirror areas where the geometry is a mirror image. The sense of
work is also reversed to obviate the mirroring.
To enable this function, use the SetWorkPieceFallPrevention statement
This function allows you to automatically set up the machine plane to lock the programmed
part without having to enter the "Arrange" environment on Maestro.
The assumptions are:
- you're dealing with a machine with a motorised plane
- you have the semi-automatic type of suction cups (12)
To enable this function, use the SetWorkPieceFallPrevention statement
131
3.10.1.1.10 Waste Toekick Exhaust
This method manages the activation of waste discharge in the presence of ToeKick in a
project by setting a machine parameter
SetToeKickWait (true,true);
Activate the waste drain on both the right and left hand sides
Example:
MachineParameters mp = GetMachiningParameters();
bool CicloContinuo;
CicloContinuo = mp.IsContinuousCycle;
132
3.10.1.2.2 Work area
You can check the work area on which to run the program.
Example:
MachineParameters mp = GetMachiningParameters();
string Field;
Field = mp.Field;
Example:
MachineParameters mp = GetMachiningParameters();
Int64 OpzioniMeccaniche;
OpzioniMeccaniche = mp.MechanicalOptions;
Example:
MachineParameters mp = GetMachiningParameters();
Int64 BloccaggioPiano;
BloccaggioPiano = mp.TableOptions;
You can check whether the machining should be carried out keeping the technology on the
mirrored X or Y areas.
Example:
MachineParameters mp = GetMachiningParameters();
bool TecnologiaSuAreeSpeculari;
TecnologiaSuAreeSpeculari = mp.IsTechnologicalMirror;
133
3.10.1.3 Reading of Work area parameter with GetWorkingField
The work area parameters can be read using the instruction GetWorkingField.
The function can extract the following data:
- Work area symmetry
- Work area origin
- Work Area Dimensions
- First bar of the Area number
- Work area bar number
- Area quadrant
- Reference bar code
Example:
WorkingField wf = GetWorkingField(Field);
bool SpecX,SpecY;
SpecX = wf.SpecularityX; // Indicates whether the work area is symmetric in X.
SpecY = wf.SpecularityY; // Indica se l'area di lavoro è simmetrica in Y.
Example:
WorkingField wf = GetWorkingField(Field);
double OX, OY, OZ;
OX = wf.OrigineX; // Indicates the origin in X of the work area.
OY = wf.OrigineY; // Indica l'origine in Y dell'area di lavoro.
OZ = wf.OrigineZ; // Indica l'origine in Z dell'area di lavoro.
Example:
WorkingField wf = GetWorkingField(Field);
double Lung, Larg;
Lung = wf.Length; // Indicates the length of the work area.
Larg = wf.Width; // Indicates the width of the work area.
134
3.10.1.3.4 Number of the first bar of the Area
You can check the number of the first work area bar
Example:
WorkingField wf = GetWorkingField(Field);
int PrimaBarra;
PrimaBarra = wf.FirstLockingBarNumber;
You can check the number of the bars in the work area
Example:
WorkingField wf = GetWorkingField(Field);
int QtBarre;
QtBarre = wf.LockingBarQuantity;
Example:
WorkingField wf = GetWorkingField(Field);
int Quadrante;
Quadrante = wf.PiecesDispositionQuadrant;
You can check the reference bar code associated with the area.
Example:
WorkingField wf = GetWorkingField(Field);
string CodiceBarra;
CodiceBarra = wf.ReferenceBarUniqueCode;
135
3.10.2 Workpieces positioning on machine plane
To set the workpiece position on the machine plane (position referred to the active
workplan) use the SetWorkpieceSetupPosition instruction.
The table describes the parameters of the function.
The workpiece point that is positioned is the edge of the finished workpiece, that has the
following minimum quotas: X=0,Y=0,Z=0
136
See below for an example where the position x and y assumed by the workpiece can be
printed:
WorkPieceSetupPosition ClasseDelPezzo;
ClasseDelPezzo = GetWorkPieceSetupPosition();
String s;
Executing the program in the example will print the string indicating the position of the
workpiece.
137
3.11Definition of the blocking system
There are two types of blocking systems on the work centres:
1. Clamps blocking
Note: These two instructions can also be used for the suction cups positioning.
138
To set the clamp position along a bar, use the SetClampPosition instruction. The
configuration is for the current main workplan. The clamp is associated to the bar for which
the position has been set in the last previous instruction of the script. The input parameters
for the instruction are described in the table.
The SetSupportBasePosition does not have to be used too.
139
SetMachiningParameters("AB", 1, 0, 1114112, false);
CreateFinishedWorkpieceBox("Frame_Left",1200,70,63);
CreateRawWorkpiece("Frame_Left",10,10,2,0,0,0);
SetWorkpieceSetupPosition(xPos,yPos,0, 0);
//WORKPIECE BLOCKING
// bar 3:
SetBarPosition(3, 1935-xPos);
SetClampPosition(1, 1360-yPos, 1, "H110-A-145");
SetClampPosition(2, 1522-yPos, 1, "H110-A-145");
SetClampPosition(3, 1685-yPos, 1, "H110-A-145");
// bar 2:
SetBarPosition(2, 800);
SetClampPosition(1, -2-yPos, 1, "H110-A-145");
SetClampPosition(2, 527-yPos, 1, "H110-A-145");
SetClampPosition(3, 1685-yPos, 1, "H110-A-145");
// bar 1:
SetBarPosition(1, 400);
SetClampPosition(1, -2-yPos, 1, "H110-A-145");
SetClampPosition(2, 527-yPos, 1, "H110-A-145");
SetClampPosition(3, 1685-yPos, 1, "H110-A-145");
//Clamps closure
// bar 2:
SetBarPosition(2, 800);
SetClampPosition(2, 527-yPos, 2, "H110-A-145");
// bar 1:
SetBarPosition(1, 400);
SetClampPosition(2, 527-yPos, 2, "H110-A-145");
… (continue)
CreateWorkplan("Swap");
SetWorkpieceSetupPosition(10,435,0, 0);
//WORKPIECE BLOCKING
//Clamps opening
// bar 2:
SetBarPosition(2, 800);
SetClampPosition(2, 527-yPos, 1, "H110-A-145");
// bar 1:
140
SetBarPosition(1, 400);
SetClampPosition(2, 527-yPos, 1, "H110-A-145");
//Position on the workpiece
// bar 4: out, open
SetBarPosition(4, 2300-xPos);
SetClampPosition(1, -2-yPos, 1, "H110-A-145");
SetClampPosition(2, 160-yPos, 1, "H110-A-145");
SetClampPosition(3, 322-yPos, 1, "H110-A-145");
// bar 3:
SetBarPosition(3, 1935-xPos);
SetClampPosition(1, -2-yPos, 1, "H110-A-145");
SetClampPosition(2, 160-yPos, 1, "H110-A-145");
SetClampPosition(3, 322-yPos, 1, "H110-A-145");
// bar 2:
SetBarPosition(2, 800);
SetClampPosition(1, 402-yPos, 1, "H110-A-145");
SetClampPosition(2, 1522-yPos, 1, "H110-A-145");
SetClampPosition(3, 1685-yPos, 1, "H110-A-145");
// bar 1:
SetBarPosition(1, 400);
SetClampPosition(1, 402-yPos, 1, "H110-A-145");
SetClampPosition(2, 1522-yPos, 1, "H110-A-145");
SetClampPosition(3, 1685-yPos, 1, "H110-A-145");
//Clamps closure
// bar 2:
SetBarPosition(2, 800);
SetClampPosition(1, 402-yPos, 2, "H110-A-145");
// bar 1:
SetBarPosition(1, 400);
SetClampPosition(1, 402-yPos, 2, "H110-A-145");
ResetApproachStrategy();
ResetRetractStrategy();
SetApproachStrategy(false, true, 3);
SetDustpanOffset(10, 1, false);
CreatePolyline("Frame External Routing_32",1200,70);
AddSegmentToPolyline(0.70);
SetRetractStrategy(false, true, 3, 0);
SetPneumaticHoodPosition(1);
ResetAuxiliaryHood();
CreateRoughFinish("Frame External Routing_33",65,"Frame External Routing",
TypeOfProcess.GeneralRouting ,"E200","3",2,-1,-1,6,0);
141
Image related to a blockage realised for the “Setup” phase.
See below for the image showing the type of blocking used for the “Swap”.
142
3.11.1.1.2 Position clamps with Blocking profile
The blocking profile defines which side or sides are useful to block a specific workpiece
with the clamps system.
The maximum clamping is not considered a descriptive specification of the blocking profile,
as it depends exclusively on the clamp geometry: it is not considered a property of the
blocking profile, but a specification of the type of clamps used (configuration parameter).
Its value is used with the minimum clamping value in the clamps setup on the workpiece
operations.
MSL considers the creation of a blocking geometry like a polyline geometry (for more
information on how to construct a generic polyline, see the relative chapter) and provides
the following instructions:
143
See below for the description tables of the input parameters for the instructions.
144
Name Type Description
length double Segment length
nameElement string Name of added element
Table 112: AddSegmentTanToBlockingProfile parameters
145
The example shows a code extract from a script used to produce a frame on which two
blocking profiles are created, both with segment geometry, but with different minimum
clamping values:
… (continue)
CreateWorkplan("Swap");
SetWorkpieceSetupPosition(10,435,0, 0);
//internal blocking profile
CreateBlockingProfile("Frame_Left_3",0,0, -17);
AddSegmentToBlockingProfile(1200.0, "");
… (continue)
Please note that the blocking profiles are associated to two different workplans. the first for
the “Setup”, whilst the second for the “Swap”. Two different profiles have been defined
because the side used for the workpiece blockage in the first workplan is the side being
machined in the second phase.
The profiles created can be seen in Maestro, with the green colour of the profile line. The
automatic clamps setup rules will be applied to this line.
In order to configure the clamps positioning, without using the automatic setup rules, the
blocking profile definition no longer applies. In this case the user must configure the
clamps positioning with the instructions described in chapter Errore. L'origine riferimento
non è stata trovata.
146
3.11.2 Workpiece blocking with suction cups
The suction cups blocking system, unlike the clamp system, does not require the blocking
definition. This system can be used with a blocking bars system and with a “multi-function”
table. In the first case the suction cups must be fitted on the bars support bases (similarly
to the clamps), in the second case on the multifunction table.
In order to configure the suction cups positioning, without the automatic setup rules, the
position of each suction cups in relation to the workpiece being blocked must be defined
for both solutions.
For the suction cups positioning you must firstly perform the bars and bases positioning
with the SetBarPosition and SetSupportBasePosition instructions (See chapter 3.11.1.1.1)
To set the suction cup position along a bar, use the SetSuctionCupPosition instruction.
The configuration is for the current main workplan. The suction cup is associated to the bar
for which the position has been set in the last previous instruction of the script. The input
parameters for the instruction are described in the table.
The SetSupportBasePosition does not have to be used too.
147
Example of workpiece blocked with suction cups :
SetMachiningParameters("AB", 1, 12, 1114112, false);
CreateFinishedWorkpieceBox("Telaio_Left",600,70,63);
CreateRawWorkpiece("Telaio_Left",10,10,2,0,0,0);
//profilo bloccaggio esterno
CreateBlockingProfile("Telaio_Left_2",610,70,-5);
AddSegmentToBlockingProfile(-10,70, "");
SetWorkpieceSetupPosition(10,825,0, 0);
SetBarPosition(1, 150);
SetSupportBasePosition(2,100);
SetSuctionCupPosition(3,500,0,"H110-A-145x30");
SetSuctionCupPosition(2,74,180,"H110-A-180x65");
SetSuctionCupPosition(1,-500,0,"H110-A-145x30");
SetBarPosition(2, 420);
SetSupportBasePosition(2,100);
SetSuctionCupPosition(3,500,0,"H110-A-145x30");
SetSuctionCupPosition(2,74,180,"H110-A-180x65");
SetSuctionCupPosition(1,-500,0,"H110-A-145x30");
SetBarPosition(3, 1000);
SetBarPosition(4, 1300);
148
To set the suction cup position on a MLTF (multifunction) table, use the
SetMLTFSuctionCupPosition instruction. The configuration is for the current main
workplan. The instruction does not apply to bar tables. The input parameters for the
instruction are described in the table.
SetWorkpieceSetupPosition(20,15,0, 0);
149
3.12Definition of workpieces machined
contemporaneously
In order to machine various workpieces define the following:
See below for the instructions to lay out 4 workpieces on the AB work area:
…(workpiece 1 machining)…
CreateFinishedWorkpieceBox("Workpiece2",800,400,63);
CreateRawWorkpiece("Workpiece2",10,10,2,0,0,0);
SetWorkpieceSetupPosition(1600,10,0, 0);
…(workpiece 2 machining)…
CreateFinishedWorkpieceBox("Workpiece3",800,400,63);
CreateRawWorkpiece("Workpiece3",10,10,2,0,0,0);
SetWorkpieceSetupPosition(10,800,0, 0);
…(workpiece 3 machining)…
CreateFinishedWorkpieceBox("Workpiece4",800,400,63);
CreateRawWorkpiece("Workpiece4",10,10,2,0,0,0);
SetWorkpieceSetupPosition(1600,10,0, 0);
…(workpiece 4 machining)…
150
The setup can be seen in the figure. The edges of the workpieces are in brown.
After having arranges the workpieces on the table, they must be machined in sequence,
machining the first completely and then the second, third and fourth.
In this way lot of time would be lost due to an excessive number of tool changes.
To minimize the tool changes, used the Maestro “Tool Changes Optimization” function.
151
3.13Optimization project
The Xconverter command is used to define which workpieces to insert in a single pgmx
and decide whether to optimize the machining.
152
3.14Mathematical functions
The table below lists the main mathematical functions available in the scripting.
153
3.15Accessorial functions
This section describes certain functions that can help the user in creating a script.
154
4 Nesting Project Management
The .csv file for Nesting describes all the single programs (.pgmx) that must be inserted as
parts in the creation of a Nesting project.
Workpiece Name Name of the workpiece contained in the pgmx file to nest (obligatory)
Workpiece Type: Type of workpiece (empty field or text).
Description Workpiece description (empty field or text).
Quantity: Quantity to nest (value greater than 0)
ExtraQuantity: Additional quantity to nest if possible
(value greater than or equal to 0).
Length: Workpiece length (along axis X) (OBLIGATORY).
Width: Workpiece width (along axis Y) (OBLIGATORY).
Thickness: Workpiece thickness (along axis Z) (OBLIGATORY).
Material: Name of the workpiece material (empty field or material name)
Grain: Grain (1 horizontal, 2 vertical)
File.pgmx : File name with extension (relative name of file with extension
Example:
Part200x300;F1;Routing;5;3;200.000;300.000;18;NOCE;0;Part200x300.pgmx
Part400x400;F1;Routing;10;6;400.000;400.000;18;WALNUT;0;Part400x400.pgmx
155
5 .mixx project creation from command line
A mix type project (.mixx) can be created from a command line with the XConverter
command and a .csv type of file.
The XConverter command is launched from the command line with the PC “commands
prompt” function.
The most effective way is to create a bach file (.bat) where the complete instruction to be
executed is written.
The lines are contained in a file, consisting of a series of elements composed of a key in
brackets "[TAG]" separated with the symbol "=" from the associated value. The field must
end with the character ";".
The type of representation in which the header parameters value is assigned is:
"[TAG]=Value" of this type (example of MIX step):
156
5.2 Create .mixx project from .csv file
This mode is used to create a .mixx file from a .csv file.
To do this use the Xconverter command with the m 11 option.
Example:
Call "D:\projects\XCam\UI00\bin\Debug\XConverter.exe" ^
-s -m 11 ^
-i "D:\Documents\SCM\SW\Maestro\Projects\Post MaestroWD\0\Frame\List for mix.csv" ^
-t "D:\Documents\SCM\SW\Maestro\Tlgx\SerrSCM_R1.tlgx" ^
-o "D:\Documents\SCM\SW\Maestro\Projects\Post MaestroWD\0\Frame\mix.mixx"
Example 2:
Call "D:\projects\XCam\UI00\bin\Debug\XConverter.exe" ^
-s -m 11 ^
-i "D:\Documents\SCM\SW\Maestro\Projects\Post MaestroWD\0\Frame\List with folder.csv" ^
-t "D:\Documents\SCM\SW\Maestro\Tlgx\SerrSCM_R1.tlgx" ^
-o "D:\Documents\SCM\SW\Maestro\Projects\Post MaestroWD\0\Frame\mix_folder.mixx"
157
6 Creation of nesting project from the command
line
You can create a nesting project type (.nstx) from the command line (nstx) using the csv
command XConverter and using a csv type file
The XConverter command is launched from the command line using the "command
prompt" on the PC.
The most effective way is to create a batch file (.bat) on which the complete instruction to
execute is written.
The XConverter command is launched from the command line using the "command
prompt" on the PC.
The most effective way is to create a batch file (.bat) on which the complete instruction to
execute is written.
Call "D:\Progetti\Xcam\UI00\bin\Debug\XConverter.exe" ^
(*\Projects\Xcam\UI00\bin\Debug\XConverter.exe" ^)
-s -m 15 ^
-the "D:\Documenti\SCM\SW\Maestro\Progetti\options.csv" ^
(*\Documents\SCM\SW\Master\Projects\options.csv" ^)
"D:\Documenti\SCM\SW\Maestro\Progetti\sheets.csv"^
(*\Documents\SCM\SW\Master\Projects\sheets.csv" ^)
"D:\Documenti\SCM\SW\Maestro\Progetti\parts.csv"
(*\Documents\SCM\SW\Master\Projects\parts.csv")
-t "D:\Documents\SCM\SW\Master\Tlgx\tools.tlgx" ^
-or "D:\Documents\SCM\SW\Master\Projects\results.nstx" ^
-report
The order in which you specify the .csx input must be the following:
158
6.2 File structure ,CSV of the options
Describes the options to run the nesting algorithm.
The lines are contained in the file are characterised by a series of elements consisting of a
key in brackets "[TAG]" separated by the symbol "=" by the associated value. The field
must end with the character ";" or "." as set in the options to Master.
[TYPE]
Type: string; : Accepted values RECTANGULAR, FREEFORM, TUBE. Default: FREEFORM
Defines the type of Nesting.
[PARTSEQUENCING]
Type: string; Accepted values: AREA, PERIMETER. Default: AREA
Defines whether the Nesting order depends on the area of the parts or from the perimeter.
[MINIMUMPARTDISTANCE]
Type: decimal; Values accepted: greater than or equal to 0. Default: 2.
Defines the minimum distance between two nested parts.
[SPOILBOARDTHICKNESS]
Type: decimal; Values accepted: greater than or equal to 0. Default: 18.
Defines the thickness of the panel measured by the cover panel.
[ENABLEOUTSIDECUT]
Type: whole; Accepted values: 0 (= disabled), 1 (= enabled). Default: 0.
Defines the ability to pass with the tool on the outside of the sheet.
[ENABLEAUTOMATICCUT]
Type: whole; Accepted values: 0 (= disabled), 1 (= enabled). Default: 1.
Defines the automatic cutting of parts.
[ENABLEPARTHOLESNESTING]
Type: whole; Accepted values: 0 (= disabled), 1 (= enabled). Default: 0.
Defines the possibility of using the holes of parts to be nested.
[ENABLEPARTHOLESCUT]
Type: whole; Accepted values: 0 (= disabled), 1 (= enabled). Default: 0.
Defines the cutting of holes of the parts if the parameter ENABLEAUTOMATICCUT is enabled.
[CUTTINGTOOL]
Type: string; Accepted values: tool name shown in setup or empty string to use the default cutting tool for the
nesting cut selected in the Master options. Default: “”.
[CUTDEPTH]
Type: decimal; Accepted values: all. Default: 0.
Defines the extra depth of the cut if the parameter ENABLEAUTOMATICCUT is enabled.
[MAXCUTWIDTH]
Type: decimal; Values accepted: greater than or equal to 0. Default: 0.The value is used if the automatic
cutting of parts ENABLEAUTOMATICCUT is not enabled and represents the maximum cut to apply between
the parts.
159
[PREFEREPARTHOLESNESTING]
Type: whole; Accepted values: 0 (= disabled), 1 (= enabled). Default: 0.
Defines the preference of Nesting in holes of the parts if ENABLEPARTHOLESNESTING parameter is
enabled.
[RESOLUTION]
Type: decimal; Accepted values: greater than or equal to 0. Default: 1
Defines the Nesting resolution.
[LABELNAME]
Type: string; Accepted values: name of the label template to be applied to the parts or empty string for not
applying the label. Default: ""
Defines the name of the label for labelling of Nesting parts.
[FINALCUTFEEDSPEED]
Type: decimal; Accepted values: greater than or equal to 0. Default: 0
Defines the feed speed of the final pass of the cutting of the parts.
[FINALCUTMATERIALDEPTH]
Type: decimal; Accepted values: greater than or equal to 0. Default: 0
Defines the depth of material that needs to be left out of the cut depth of the engraving pass.
[ENABLEINCISION]
Type: integer; Accepted values: 0 (= disabled), 1 (= enabled). Default: 0.
Defines the enabling of the incision cut of the first part of the final cut.
[MAXIMUMINCISIONPARTAREA]
Type: decimal; Accepted values: greater than or equal to 0. Default: 0.
Defines the maximum area of the part for which you can perform the incision before cutting.
0 value means that it is always carried out, values greater than 0 indicates the threshold below which it is
executed.
[ENABLECADCOMPENSATION]
Type: whole; Accepted values: 0 (= disabled), 1 (= enabled). Default: 0.
Defines whether the management of the tool compensation is calculated by Cad or by Cn.
[CUTDIRECTION]
Type: Type; Accepted values: GEOMETRY, CLOCKWISE, COUNTERCLOCKWISE Default: GEOMETRY.
Defines the direction of the cut compared to the profile.
[ENABLEPRESSUREROLLERS]
Type: whole; Accepted values: 0 (= disabled), 1 (= enabled). Default: 0.
Defines the enabling of pressure rollers if available in configuration.
[ENABLETOOLBLOWER]
Type: whole; Accepted values: 0 (= disabled), 1 (= enabled). Default: 0.
Defines the enabling of the machine function of the tool blower.
[TOOLBLOWERMODE]
Type: whole; Accepted values: 0 (= air), 1 (= Air and Oil), 2 (= Blower head), 3 (= Air Tank), 4 (= Air and Oil
Tank). Default: 0.
Defines the enabling of the machine function of the tool blower.
[ENABLEMECHANICALPRESSER]
Type: whole; Accepted values: 0 (= disabled), 1 (= enabled). Default: 0.
Defines the enabling of the machines mechanical presser function.
[ENABLEEXECUTABLESOPTIMIZATION]
Type: whole; Accepted values: 0 (= disabled), 1 (= enabled). Default: 0.
Defines whether to optimise machining.
160
[EXECUTABLESOPTIMIZATIONSTEPWIDTH]
Type: decimal; Accepted values: greater than or equal to 0. Default: 0.
Defines the step width with which to optimise machining.
[EXECUTABLESOPTIMIZATIONSTEPLENGTH]
Type: decimal; Accepted values: greater than or equal to 0. Default: 1.
Defines the step length with which to optimise machining.
[ENABLESMALLPARTOPTIMIZATIONFIRST]
Type: whole; Accepted values: 0 (= disabled), 1 (= enabled). Default: 0.
Defines whether to optimise the cuts of smaller parts first.
[ENABLEDRILLINGOPTIMIZATIONFIRST]
Type: whole; Accepted values: 0 (= disabled), 1 (= enabled). Default: 0.
Defines whether to optimise the drilling of other machining first.
[ENABLEMILLINGINVERSIONOPTIMIZATION]
Type: whole; Accepted values: 0 (= disabled), 1 (= enabled). Default: 0.
Defines whether to invert the machining during the optimisation stage.
[CUTSTARTPOSITION]
Type: string; Accepted values: NONE, MIDDLEOFFIRSTELEMENT, MIDDLEOFMOSTLENGTHELEMENT,
VERTEXOFFIRTSELEMENT Default: NONE:
Defines the starting position of the cut.
[ENABLEREMNANTGENERATION]
Type: whole; Accepted values: 0 (= disabled), 1 (= enabled). Default: 0.
Defines whether to enable the generation of the remnants.
[ENABLEREMNANTBYAREA]
Type: whole; Accepted values: 0 (= disabled), 1 (= enabled). Default: 0.
Defines whether to treat the remnants by area or size
[REMNANTREMNANTMINAREA]
Type: decimal; Accepted values: greater than or equal to 0. Default: 0.
Defines the minimum sheet area to be regarded as remnants.
[REMNANTREMNANTMINLENGTH]
Type: decimal; Accepted values: greater than or equal to 0. Default: 0.
Defines the minimum length of the sheet area to be regarded as remnants.
[REMNANTREMNANTMINWIDTH]
Type: decimal; Accepted values: greater than or equal to 0. Default: 0.
Defines the minimum width of the sheet area to be regarded as remnants.
[REMNANTTYPE]
Type: string; Accepted values: TRUESHAPE, RECTANGULAR, STEPPED, CLEANCUT. Default:
RECTANGULAR.
Defines the type of remnants to be generated.
[ENABLEREMNANTONLYONLASTSHEET]
Type: whole; Accepted values: 0 (= disabled), 1 (= enabled). Default: 0.
Defines whether to enable the generation only on the last sheet.
[REMNANTCUTTINGTOOL]
Type: string; Accepted values: tool name shown in setup or empty string to use the default tool for cutting
remnants. Default: "" in this case the cutting parts tool is taken.
161
[ENABLESCRAPGENERATION]
Type: whole; Accepted values: 0 (= disabled), 1 (= enabled). Default: 0.
Defines whether to enable the generation of the scrap.
[ENABLESCRAPPOCKETING]
Type: whole; Accepted values: 0 (= disabled), 1 (= enabled). Default: 0.
Defines whether to enable the extraction of the scrap.
[SCRAPCUTMINAREA]
Type: decimal; Accepted values: greater than or equal to 0. Default: 0.
Defines the minimum area for scrap to be cut below this value the scrap is particle board.
[SCRAPPOCKETPASSOVERLAP]
Type: decimal; Accepted values: greater than or equal to 0. Default: 5.
Defines the percentage of overlap of the machining passes of the extraction of the scrap.
[SCRAPPOCKETALLOWANCESIDE]
Type: decimal; Accepted values: greater than or equal to 0. Default: 5.
Defines the extraction of the scrap of the quantity of scrap material to leave between the profile and the last
pass.
[ENABLESCRAPCUTIFPOCKETINGIMPOSSIBLE]
Type: whole; Accepted values: 0 (= disabled), 1 (= enabled). Default: 0.
Defines whether to enable the cutting of the scarp if the extraction of the scrap is not possible.
[ENABLESCRAPPRECUT]
Type: whole; Accepted values: 0 (= disabled), 1 (= enabled). Default: 0.
Defines whether to enable the pre cut scraps.
[SCRAPPRECUTDISTANCE]
Type: decimal; Accepted values: greater than or equal to 0. Default: 0.
Define the distance from the edge of the scrap profile to which pre-cut must be carried out.
[SCRAPCUTTINGTOOL]
Type: string; Accepted values: tool name shown in setup or empty string to use the default tool for cutting
scrap. Default: "" in this case the parts cutting tool is taken.
Example .csv file with the specified options (for unselected options the default values planned are used):
[TYPE] = RECTANGULAR;
[MINIMUMPARTDISTANCE] = 3;
[SPOILBOARDTHICKNESS] = 0;
162
6.3 File structure ,CSV of the sheets
CODE]
Type: string; : Accepted values string not anything with code. Default: required field
[WIDTH]
Type: decimal; Accepted values: greater than 0. Default: 1600.
[HEIGHT]
Type: decimal; Accepted values: greater than 0. Default: 1200.
[DEPTH]
Type: decimal; Accepted values: greater than 0. Default: 18.
[MATERIAL]
Type: string; Accepted values: all. Default: “”.
[QUANTITY]
Type:whole; Accepted values: greater than 0. Default: 1.
[NESTINGDIRECTION]
Type: string; Accepted values: X, Y. Default: X.
[NESTINGSTARTCORNER]
Type: string; Accepted values: LOWERLEFT, LOWERRIGHT, UPPERLEFT, UPPERRIGHT. Default:
LOWERLEFT.
[GRAIN]
Type: string; Accepted values: X, Y, empty string. Default: X.
[LEFTMARGIN]
Type: decimal; Values accepted: greater than or equal to 0. Default: 0.
[TOPMARGIN]
Type: decimal; Values accepted: greater than or equal to 0. Default: 0.
[RIGHTMARGIN]
Type: decimal; Values accepted: greater than or equal to 0. Default: 0.
[BOTTOMMARGIN]
Type: decimal; Values accepted: greater than or equal to 0. Default: 0.
[ENABLEROTATION]
Type: whole; Accepted values: 0 (= disabled), 1 (= enabled). Default: 0.
[CODE]=sheet1; [WIDTH] = 3000; [HEIGHT] = 1500; [DEPTH] = 22; [MATERIAL] = MDF; [QUANTITY] = 3;
[CODE]=sheet2; [WIDTH] = 2000; [HEIGHT] = 1500; [DEPTH] = 18; [MATERIAL] = MDF; [QUANTITY] = 10;
163
6.4 File structure ,.CSV of the parts
[PARTPROGRAMNAME]
Type: string; : Accepted values: filename pgmx of the program piece. Default: required field
[CODE]
Type: string; : Accepted values string not anything with code. Default: if not specified is considered the name
of the first piece present in the pgmx.
[WIDTH]
Type: decimal; Accepted values: greater than 0. Default: if not specified the pgmx one is used.
[HEIGHT]
Type: decimal; Accepted values: greater than 0. Default: if not specified the pgmx one is used.
[DEPTH]
Type: decimal; Accepted values: greater than 0. Default: if not specified the pgmx one is used.
[MATERIAL]
Type: string; Accepted values: all. Default: “”.
[QUANTITY]
Type:whole; Accepted values: greater than 0. Default: 1.
[EXTRAQUANTITY]
Type:whole; Accepted values: greater than 0. Default: 0.
[ENABLEROTATION]
Type: whole; Accepted values: 0 (= disabled), 1 (= enabled). Default: 0.
[GRAIN]
Type: string; Accepted values: X, Y, empty string. Default: X.
[ROTATIONSTEPANGLE]
Type: decimal; Accepted values: greater than or equal to 0. Default: 15 (valid only for freeform nesting).
[PRIORITY]
Type: whole; Accepted values: greater than or equal to 0. Default: 0.
[EDGEMINDISTANCE]
Type: decimal; Accepted values: greater than or equal to 0. Default: 0 (valid only for freeform nesting).
LABELFIELD label type fields for labelling. These fields allow you to assign the information for the label of
the part and you can have a field number from 1 to N where N is defined in the Master options.
[LABELFIELD1]
Type: string; Accepted values: all.
[LABELFIELDN]
Type: string; Accepted values: all.
File example .csv file with the list of parts available for nesting:
[PARTPROGRAMNAME]=part1.pgmx;[MATERIAL]=MDF;[QUANTITY]=1;[EXTRAQUANTITY]=0
[PARTPROGRAMNAME]=part2.pgmx;[MATERIAL]=MDF;[QUANTITY]=4;[EXTRAQUANTITY]=0
164
6.5 Nesting report
In addition to the output nstx file in the same folder, you can generate a report file with the
Nesting results in xml format (. nstsrrx) in which the cutting drawings are represented and
the parts included in them. To do this you must enter the key in the command line:
-report
which enables the generation of the cutting diagram.
Below is an extract from the xml type file that defines the cutting diagram.
<NestingSheetsResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://schemas.datacontract.org/2004/07/ScmGroup.XCam.Nesting">
<SheetResults>
<SheetResult>
<Key xmlns="http://schemas.datacontract.org/2004/07/ScmGroup.XCam.MachiningDataModel.Utility">
<ID>1739377</ID>
<ObjectType>ScmGroup.XCam.Nesting.SheetResult</ObjectType>
</Key>
<Name
xmlns="http://schemas.datacontract.org/2004/07/ScmGroup.XCam.MachiningDataModel.Utility">Foglio1</N
ame>
<IsRotated>false</IsRotated>
<NetSheetArea>5000000</NetSheetArea>
<NumberOfSheets>1</NumberOfSheets>
<PartResults>
<PartResult>
<Key xmlns="http://schemas.datacontract.org/2004/07/ScmGroup.XCam.MachiningDataModel.Utility">
<ID>0</ID>
<ObjectType i:nil="true" />
</Key>
<Name
xmlns="http://schemas.datacontract.org/2004/07/ScmGroup.XCam.MachiningDataModel.Utility">Pezzo500x
500</Name>
<Angle>0</Angle>
<IsLabelEnabled>false</IsLabelEnabled>
<IsMirrored>false</IsMirrored>
<LabelXCoordinate>0</LabelXCoordinate>
<LabelYCoordinate>0</LabelYCoordinate>
<PartID
xmlns:d6p1="http://schemas.datacontract.org/2004/07/ScmGroup.XCam.MachiningDataModel.Utility">
<d6p1:ID>1739369</d6p1:ID>
<d6p1:ObjectType>ScmGroup.XCam.Nesting.PartInfo</d6p1:ObjectType>
</PartID>
<PartName>Pezzo500x500</PartName>
<XCoord>7</XCoord>
<YCoord>7</YCoord>
</PartResult>
<PartResult>
<Key xmlns="http://schemas.datacontract.org/2004/07/ScmGroup.XCam.MachiningDataModel.Utility">
<ID>0</ID>
<ObjectType i:nil="true" />
</Key>
<Name
xmlns="http://schemas.datacontract.org/2004/07/ScmGroup.XCam.MachiningDataModel.Utility">Pezzo500x
500</Name>
165
<Angle>0</Angle>
<IsLabelEnabled>false</IsLabelEnabled>
<IsMirrored>false</IsMirrored>
<LabelXCoordinate>0</LabelXCoordinate>
<LabelYCoordinate>0</LabelYCoordinate>
<PartID
xmlns:d6p1="http://schemas.datacontract.org/2004/07/ScmGroup.XCam.MachiningDataModel.Utility">
<d6p1:ID>1739369</d6p1:ID>
<d6p1:ObjectType>ScmGroup.XCam.Nesting.PartInfo</d6p1:ObjectType>
</PartID>
<PartName>Pezzo500x500</PartName>
<XCoord>7</XCoord>
<YCoord>519</YCoord>
</PartResult>
</PartResults>
<SheetID
xmlns:d4p1="http://schemas.datacontract.org/2004/07/ScmGroup.XCam.MachiningDataModel.Utility">
<d4p1:ID>1739322</d4p1:ID>
<d4p1:ObjectType>ScmGroup.XCam.Nesting.SheetInfo</d4p1:ObjectType>
</SheetID>
<SheetName>Foglio1</SheetName>
<TotalCutArea>0</TotalCutArea>
<TotalPartArea>0</TotalPartArea>
<Utilisation>89.4</Utilisation>
<WorkpieceID
xmlns:d4p1="http://schemas.datacontract.org/2004/07/ScmGroup.XCam.MachiningDataModel.Utility">
<d4p1:ID>1739407</d4p1:ID>
<d4p1:ObjectType>ScmGroup.XCam.MachiningDataModel.ProjectModule.WorkPiece</d4p1:ObjectType>
</WorkpieceID>
</SheetResult>
<SheetResult>
<Key xmlns="http://schemas.datacontract.org/2004/07/ScmGroup.XCam.MachiningDataModel.Utility">
<ID>1739378</ID>
<ObjectType>ScmGroup.XCam.Nesting.SheetResult</ObjectType>
</Key>
<Name
xmlns="http://schemas.datacontract.org/2004/07/ScmGroup.XCam.MachiningDataModel.Utility">Foglio1(1)<
/Name>
<IsRotated>false</IsRotated>
<NetSheetArea>5000000</NetSheetArea>
<NumberOfSheets>1</NumberOfSheets>
<PartResults>
<PartResult>
<Key xmlns="http://schemas.datacontract.org/2004/07/ScmGroup.XCam.MachiningDataModel.Utility">
<ID>0</ID>
<ObjectType i:nil="true" />
</Key>
<Name
xmlns="http://schemas.datacontract.org/2004/07/ScmGroup.XCam.MachiningDataModel.Utility">Pezzo500x
500</Name>
<Angle>0</Angle>
<IsLabelEnabled>false</IsLabelEnabled>
<IsMirrored>false</IsMirrored>
<LabelXCoordinate>0</LabelXCoordinate>
<LabelYCoordinate>0</LabelYCoordinate>
<PartID
xmlns:d6p1="http://schemas.datacontract.org/2004/07/ScmGroup.XCam.MachiningDataModel.Utility">
<d6p1:ID>1739369</d6p1:ID>
<d6p1:ObjectType>ScmGroup.XCam.Nesting.PartInfo</d6p1:ObjectType>
</PartID>
<PartName>Pezzo500x500</PartName>
<XCoord>7</XCoord>
166
<YCoord>7</YCoord>
</PartResult>
<PartResult>
<Key xmlns="http://schemas.datacontract.org/2004/07/ScmGroup.XCam.MachiningDataModel.Utility">
<ID>0</ID>
<ObjectType i:nil="true" />
</Key>
<Name
xmlns="http://schemas.datacontract.org/2004/07/ScmGroup.XCam.MachiningDataModel.Utility">Pezzo500x
500</Name>
<Angle>0</Angle>
<IsLabelEnabled>false</IsLabelEnabled>
<IsMirrored>false</IsMirrored>
<LabelXCoordinate>0</LabelXCoordinate>
<LabelYCoordinate>0</LabelYCoordinate>
<PartID
xmlns:d6p1="http://schemas.datacontract.org/2004/07/ScmGroup.XCam.MachiningDataModel.Utility">
<d6p1:ID>1739369</d6p1:ID>
<d6p1:ObjectType>ScmGroup.XCam.Nesting.PartInfo</d6p1:ObjectType>
</PartID>
<PartName>Pezzo500x500</PartName>
<XCoord>7</XCoord>
<YCoord>519</YCoord>
</PartResult>
</PartResults>
<SheetID
xmlns:d4p1="http://schemas.datacontract.org/2004/07/ScmGroup.XCam.MachiningDataModel.Utility">
<d4p1:ID>1739322</d4p1:ID>
<d4p1:ObjectType>ScmGroup.XCam.Nesting.SheetInfo</d4p1:ObjectType>
</SheetID>
<SheetName>Foglio1(1)</SheetName>
<TotalCutArea>0</TotalCutArea>
<TotalPartArea>0</TotalPartArea>
<Utilisation>89.2</Utilisation>
<WorkpieceID
xmlns:d4p1="http://schemas.datacontract.org/2004/07/ScmGroup.XCam.MachiningDataModel.Utility">
<d4p1:ID>1740261</d4p1:ID>
<d4p1:ObjectType>ScmGroup.XCam.MachiningDataModel.ProjectModule.WorkPiece</d4p1:ObjectType>
</WorkpieceID>
</SheetResult>
</SheetResults>
</NestingSheetsResult>
In addition to the cutting diagram, you can generate a file that describes the geometry of
each part used in the Nesting.
By enabling the geo-option in the same Nesting folder many files as there are parts used
will be generated, and each file will have a name coinciding with the part and extension (.
iso).
Example:
Nesting parts
Part1
Part2
Part3
Exit:
Part1.iso
167
Part2.iso
Part3.iso
168
7 Execution of the cycle time estimate from
command line
You can run the estimate of project cycle times (. pgmx) or an entire mix of projects (.
mixx) through the XConverter command. The estimated results of the cycle times are
exported to a csv format file.
The XConverter command is launched from the command line using the "command
prompt" on the PC.
The most effective way is to create a batch file (.bat) on which the complete instruction to
execute is written.
Call "D:\Progetti\Xcam\UI00\bin\Debug\XConverter.exe" ^
(*\Projects\Xcam\UI00\bin\Debug\XConverter.exe" ^)
-s -m 16 ^
-the "D:\Documenti\SCM\SW\Maestro\Progetti\test.pgmx" ^
(*\Documents\SCM\SW\Master\Projects\test.pgmx" ^)
-or "D:\Documents\SCM\SW\Master\Projects\estimationTimesResults.csv"
;Total;test;
Number of repetitions; 1; 1;
Execution time [s]; 498.9; 498.9;
Total cost;0;0;
Milling’ process execution time [s]; 143.7; 143.7;
Drilling' process execution time [s];9.2 9.2;
Facing' process execution time [s]; 0;0;
Edging' process execution time [s]; 34.5;34.5;
Edge trimming’ process execution time [s]; 77.4;77.4;
Group operator time ’4' [s];131.3; 131.3;
Group operator time '3' [s]; 133.6; 133.6;
Vertical drilling process execution time [s];0;0;
Number of vertical drilling downstrokes;0;0;
Average vertical drilling execution time [s];0;0;
Vertical drilling execution time [s];9,2;9,2;
Number of horizontal drilling downstrokes;6;6;
Average horizontal drilling execution time[s];1.5;1.5;
Drilling’ execution time [s];9,2;9,2;
Milling’ execution time [s];131,3;131,3;
Execution time is ‘tilted milling' [s];0; 0;
3D milling' execution time [s];0; 0;
Contouring' execution time [s];0;0 ;
Emptying’ execution time [s];0;0 ;
Blade cuts’ execution time [s];0;0;
Channels' execution time [s];0;0;
Edging' execution time [s];34.5;34.5;
Trimming' execution time [s];16.3;16.3;
169
NOTE: the field names are localised in the language selected in the interface Master. For
example, if the selected language is English, the csv file obtained as a result would be the
following.
;Total;test;
Number of repetitions;1;1;
Execution time [s];50.6;50.6;
Total cost;0;0;
Milling execution time [s];18.5;18.5;
Drilling execution time [s];0;0;
Blading execution time [s];0;0;
Edge banding execution time [s];0;0;
Finishing execution time [s];0;0;
Machining head time '3' [s];18.5;18.5;
Vertical drilling execution time [s];0;0;
Number of vertical drilling downstrokes;0;0;
Vertical drilling average execution time [s];0;0;
Horizontal drilling execution time [s];0;0;
Number of horizontal drilling downstrokes;0;0;
Horizontal drilling average execution time [s];0;0;
Drilling execution time [s];0;0;
Milling execution time [s];18.5;18.5;
Tilted milling execution time [s];0;0;
3D milling execution time [s];0;0;
Contouring execution time [s];0;0;
Pocketing execution time [s];0;0;
Blade cuts execution time [s];0;0;
Slots execution time [s];0;0;
Edging execution time [s];0;0;
End trimming execution time [s];0;0;
170
Example of using a mix of two programs test1.pgmx and test2.pgmx:
Call "D:\Progetti\Xcam\UI00\bin\Debug\XConverter.exe" ^
(*\Projects\Xcam\UI00\bin\Debug\XConverter.exe" ^)
-s -m 16 ^
-the "D:\Documenti\SCM\SW\Maestro\Progetti\test.mixx" ^ (*
Document\SCM\SW\Master\Projects\test.mixx" ^)
-or "D:\Documenti\SCM\SW\Maestro\Progetti\estimationTimesResults.csv"
(*\Documents\SCM\SW\Master\Projects\estimationTimesResults.csv")
The following is an example of the CSV file generated for a mix of programs.
;Total;test1;test2;
Number of repetitions; 1;1;1;
Execution time [s]; 82.1;50.6;31.5;
Total cost;0;0;0;
Milling’ process execution time [s]; 37; 18.5;18.5;
Drilling' process execution time [s];0;0;0;
Facing' process execution time [s]; 0;0;0;
Edging' process execution time [s];0;0;0;
Edge trimming’ process execution time [s];0;0;0;
Group operator time '3' [s]; 37; 18.5;18.5;
Vertical drilling execution time [s];0;0;0;
Number of vertical drilling downstrokes;0;0;0;
Average vertical drilling execution time [s];0;0;0;
Vertical drilling execution time [s];0;0;0;
Number of horizontal drilling downstrokes;0;0;0;
Average horizontal drilling execution time[s];0;0;0;
Drilling’ execution time [s];0;0;0;
Milling’ execution time [s];37;18.5;18.5;
Execution time is ‘tilted milling' [s];0; 0;0;
3D milling' execution time [s];0; 0;0;
Contouring' execution time [s];0;0;0;
Emptying’ execution time [s];0;0;0;
Blade cuts’ execution time [s];0;0;0;
Channels' execution time [s];0;0;0;
Edging' execution time [s];0;0;0;
'Trimming' execution time [s];0;0;0;
171
8 Tools Data-Base
When executing a script you can consult the tools database to retrieve specific information
on a specific tool identified with its alphanumeric code (the same found in the tools
database). The primitive that allows access to the information is the GetTool.
The GetTool primitive provides, if found, the Tool object for the specified code.
With the Tool object the main geometric and technological properties of the tool can be
consulted:
1. Description (Description)
2. Total tool length (TotalLength)
3. Total length (PilotLength)
4. Tool cutter length, useful length (CutterLength)
5. Total tool diameter, that is dimension in the normal axis rotation direction
(TotalDiameter)
6. Tool cutting diameter, that is dimension in the normal axis rotation direction
(CuttingDiameter)
7. Tool radius (Radius)
8. Blade type tool thickness (BladeThickness)
9. Tool rotation axis angle in relation to the vertical (Angle)
10. Max tool rotation speed (MaxSpindleSpeed)
11. Max tool feed speed (MaxFeedSpeed)
The example below shows the consultation of the tool radius with ID “E101”.
double toolRadius;
… (continue)
172
9 Post-processor from command line
A program for the machine panel (.xxl) can be created from a command line with the
XConverter command.
The XConverter command is launched from the command line with the PC “commands
prompt” function.
The most effective way is to create a bach file (.bat) where the complete instruction to be
executed is written.
Example:
Call "D:\projects\XCam\UI00\bin\Debug\XConverter.exe" ^
-s -m 10 ^
-i "D:\Documents\SCM\SW\Maestro\Projects\Post MaestroWD\0\Frame\MSX.pgmx" ^
-i "D:\Documents\SCM\SW\Maestro\Projects\Post MaestroWD\0\Frame\MDX.pgmx" ^
173