Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
www.fomsoftware.com
info@fomsoftware.com
Revision: 2.6.1 full
Pagina 1 di 27
Protocol P2K2
Introduction
A document in P2K2 format can contain information for cutting only or for cutting and machining.
INDEX
1. General Introduction to the P2K2 format
2. P2K2 Structure
3. Description of the nodes
4. Example P2K2 with machinings added only as macro
5. Cutting data conventions and references
6. Machining data conventions and references
7. P2K2 example with various machining types
8. Appendix
8.1. P2K2 for sawing machines with Diamond/Planet Plus/Shadow
8.2. Cutting lines with NC only
P2K2ProtocolloIta
Formato P2K2
www.fomsoftware.com
info@fomsoftware.com
Revision: 2.6.1 full
Pagina 2 di 27
b) The standard machinings are circular millings or drillings, rectangular millings, etc. In case of
standard machinings the file contains the geometric information of the machining: form, position and
tool data.
Use this approach in the integration in case there already exists a database or an external Cam that
contains the geometric information and the tools for the machining.
P2K2ProtocolloIta
Formato P2K2
www.fomsoftware.com
info@fomsoftware.com
Revision: 2.6.1 full
Pagina 3 di 27
</JOB>
In the description of the structure the text --- shows wether there are other nodes of the same type.
The text indicates that this is a node without sublevels.
Description:
<JOB>: obligatory tag that features the entire cutting and machining list.
<VER>: tag that contains the Program Version number that has been used to create the file.
<HEAD> this tag contains a list with all bars that the file consists of. It contains one or more tags
<PDAT>
- <PDAT>: shows the number of bars in the file that have the same code (sigla):
- serie/codice/coloreinterno/coloreesterno
(system/code/inner color/outer color)
<BODY>: this tag contains the data of the cutting list, includine bars and pieces and machinings.
This data is to be found in the following tags:
- <BAR>: contains the tags referred to the profile bar (second level);
- <CUT>: contains the tags referred to the single pieces (third level).
- <MACHININGS>: contains the list of the machinings (4 level)
JOB
VER
HEAD
BODY
MJ
node VER
node HEAD
node BODY
VER
Program version number
Numeric
P2K2ProtocolloIta
Formato P2K2
www.fomsoftware.com
info@fomsoftware.com
Revision: 2.6.1 full
MN
PDAT
Revision number
Pagina 4 di 27
Numeric
HEAD
node PDAT
BODY
BAR
node BAR
PDAT
CODE
DICL
DOCL
BQTY
Profile code
Inner (internal) color code
Outer (external) color code
Number of bars in the list with this profile code
and color
Text
Text
Text
Number
BRAN
SYST
CODE
DICL
DOCL
LEN
LENR
H
MLT
CUT
BAR
Brand of the profile system
Profile system
Profile code
Inner color code
Outer color code
Bar length
Length remaining bar optional
Profile height
Reserved = 1
Node CUT (there mus be at least one in each
BAR node)
Text
Text
Text
Text
Text
Numeric
Numeric
Numeric
Numeric
Node
EXTRAINFO
SFIDO
Node
NODE
ANGL
ANGR
AB1
AB2
CUT
Left cutting angle
Right cutting angle
Left beta cutting angle for sawing machines
with with 2 compound angles for the
inclination of the mobile head (Fom Sawing
Machine KEOPE)
Right beta cutting angle for sawing
machines with with 2 compound angles for
the inclination of the mobile head (Fom
Numeric
Numeric
Numeric
Numeric
P2K2ProtocolloIta
Formato P2K2
www.fomsoftware.com
info@fomsoftware.com
Revision: 2.6.1 full
IL
OL
TRML
TRMR
TAL
TAR
ORCD
TINA
CSNA
IDQUADRO
BCOD
LBL
MACHININGS
CUT
EXIT
AREA
Pagina 5 di 27
Numeric
Numeric
Numeric
Numeric
Numeric
Numeric
Text
Text
Text
Text
Text
Text
numeric
Numeric
Numeric
Numeric
SLOT
numeric
Node
P2K2ProtocolloIta
Formato P2K2
www.fomsoftware.com
info@fomsoftware.com
Revision: 2.6.1 full
MACHINING
Pagina 6 di 27
MACHININGS
Node MACHINING
WCODE (attributo)
VAR1 (attributo)
VAR2 (attributo)
VAR3 (attributo)
VAR4 (attributo)
VERPERC (attributo)
ANGLE (attributo)
OFFSET (attributo)
OFSSETY (attributo)
OFFSETZ (attributo)
FACE (attributo)
P1X (attributo)
P1Y (attributo)
P1Z (attributo)
P2X (attributo)
P2Y (attributo)
P2Z (attributo)
EMPTYGROVE
(attributo)
CODUTENSILE
(attributo)
CILINLAV (attributo)
OFFSETFIN (attributo)
CODUTEFIN (attributo)
MACHINING
Machining code or name
Parameter 1 machining
Parameter 2 machining
Parameter 3 machining
Parameter 4 machining
direction: 1 clockwise, 0 counterclockwise
Rotation angle perpendicular machining
face
Offset x
Offset y
Offset z
Face where machining is applied
Coordinates point 1 machining face
Numeric
Numeric
Numeric
Numeric
Numeric
Numeric
Numeric
Numeric
Numeric
Numeric
Numeric
Milling tool
Text
Numeric
Numeric
Numeric
Text
Numeric
Numeric
Numeric
Numeric
Numeric
Numeric
P2K2ProtocolloIta
Formato P2K2
www.fomsoftware.com
info@fomsoftware.com
Revision: 2.6.1 full
CILLAVFIN
(attributo)
POSDEF (attributo)
DESCRIPTION
(attributo)
SGRAVANZ
(attributo)
SGRUSCITA
(attributo)
SRGLAV (attributo)
SGRROT (attributo)
FINAVANZ (attributo)
FINUSCITA
(attributo)
FINLAV (attributo)
FINROT (attributo)
VARPROFSGR
(attributo)
VARPROFFIN
(attributo)
IDCATEGORY
(attributo)
EXECUTIONLEVEL
(attributo)
CLAMPNEAR
Finishing cylinder
Numeric
Numeric
Text
Numeric
Numeric
Milling rate
Milling Rotation rate
Finishing feed rate
Finishing exit rate
Numeric
Numeric
Numeric
Numeric
Finishing rate
Finishing rotation rate
Milling Depth variation. Moves the mill in
a perpendicular direction to the working
plane at the given value. Avoids tool
consumption using a larger part of the
blade.
Depth variation in finishing.
Numeric
Numeric
Numeric
Numeric
Numeric
FORBIDDENSPACE
Pagina 7 di 27
Numeric
Numeric
Numeric
Numeric
FORBIDDENSPACES
Node FORBIDDENSPACE
FORBIDDENSPACE
P2K2ProtocolloIta
Formato P2K2
www.fomsoftware.com
info@fomsoftware.com
Revision: 2.6.1 full
START (attributo)
END (attributo)
Pagina 8 di 27
Numeric
Numeric
CLAMPS
Node Clamps
PIANO
INDEX
Numeric
POSITION
Numeric
PIANO
START
(attribute)
THICK
(attribute)
PIANI
Node PLANE
PIANO
Initial Depth of work plane
Numeric
Numeric
EXTRAINFO
INFONAME
name
(attribute)
INFOVALUE
value
(attribute)
INFODESCRIPTION Description
(attribute)
Text
Text
Text
SFRIDO
IDXPEZZO
TROLLEY
Offcut id
TROLLEY
SLOT
SLOT
Text
Trolley for
automatic
warehouse
Slot
P2K2ProtocolloIta
Formato P2K2
www.fomsoftware.com
info@fomsoftware.com
Revision: 2.6.1 full
Pagina 9 di 27
P2K2ProtocolloIta
Formato P2K2
www.fomsoftware.com
info@fomsoftware.com
Revision: 2.6.1 full
Pagina 10 di 27
/* Barcode */
/* Label Data */
/* Label Data */
/* Label Data*/
/* Label Data */
P2K2ProtocolloIta
Formato P2K2
www.fomsoftware.com
info@fomsoftware.com
Revision: 2.6.1 full
Pagina 11 di 27
P2K2ProtocolloIta
Formato P2K2
www.fomsoftware.com
info@fomsoftware.com
Revision: 2.6.1 full
Pagina 12 di 27
P2K2ProtocolloIta
Formato P2K2
www.fomsoftware.com
info@fomsoftware.com
Revision: 2.6.1 full
Pagina 13 di 27
POSTERIORE
REAR
Post
ANTERIORE
FRONT
Local
DIREZIONI
LOCALI
directions
LOCAL
/
DIRECTIONS
VISTA SINISTRA
Left
LEFTView
VIEW
P2K2ProtocolloIta
Formato P2K2
www.fomsoftware.com
info@fomsoftware.com
Revision: 2.6.1 full
Pagina 14 di 27
Machining codes
Codice
#0
#1
Descrizione
Circular mill or drill
Rectangular mill
Var1
Radius
Height
Var2
Var3
Length
Radius
(0 if
notused
)
#2
#3
Linear mill
Key mill
Height
Radius (major)
Length
Length
#4
Arc
Radius
Initial Angle
(degrees)
#5
Disk mill
Height
Width
#99#CustomeGe
ometryFileName
Use offset
Offset
Direction
1 =Left
-1=Right
AccessoryName
1 Use offset
-1 Do not use
offset
Var4
Height
(of
linear
milling)
Final
Angle
(degree
s)
Disk
Diamet
er
P2K2ProtocolloIta
Formato P2K2
www.fomsoftware.com
info@fomsoftware.com
Revision: 2.6.1 full
!GeometryName
Pagina 15 di 27
Oblique Faces
In order to add a machining on an oblique face, first define the tools position and direction. The
vectors P1,P2 show the direction of the local Y1 axis, X1 is in the same direction as the machines X
axis, Z1 is the vector product of X1,Y1. The coordinate (0,0,0) is in P1.
X1
Z1
P1
P2
Y1
Y
Forbidden areas for vises
P2K2ProtocolloIta
Formato P2K2
www.fomsoftware.com
info@fomsoftware.com
Revision: 2.6.1 full
Pagina 16 di 27
The forbidden spaces for vises on the left and the right have been created in order to avoid the
positioning of vises at the outer ends of a piece. The example shows pieces cut a a 45 degrees angle.
The forbidden space is refered to the vises center.
P2K2ProtocolloIta
Formato P2K2
www.fomsoftware.com
info@fomsoftware.com
Revision: 2.6.1 full
Pagina 17 di 27
P2K2ProtocolloIta
Formato P2K2
www.fomsoftware.com
info@fomsoftware.com
Revision: 2.6.1 full
Pagina 18 di 27
</MACHININGS>
</CUT>
<LEN>2000</LEN>
<LENR>0</LENR>
<H>0</H>
<MLT>1</MLT>
<MJ>1</MJ>
<MN>0</MN>
</BAR>
</BODY>
</JOB>
P2K2ProtocolloIta
Formato P2K2
www.fomsoftware.com
info@fomsoftware.com
Revision: 2.6.1 full
Pagina 19 di 27
P2K2ProtocolloIta
Formato P2K2
www.fomsoftware.com
info@fomsoftware.com
Revision: 2.6.1 full
Pagina 20 di 27
P2K2ProtocolloIta
Formato P2K2
www.fomsoftware.com
info@fomsoftware.com
Revision: 2.6.1 full
Pagina 21 di 27
8 Appendix
The following example of an XML file refered to a hypothetical purchase order. The information
contained in each tag is shown on the right.
<?xml version="1.0" encoding="ISO-8859-1" ?> (Document format)
<JOB> (Start section)
<VER> (Start section)
<MJ>1</MJ> /* First digit of the program version number that generates the cutting list */
<MN>0</MN> /*Second digit of the program version number that generates the cutting list cifra */
</VER>
<HEAD> (Inizio sezione)
<PDAT>
<CODE>HP110S23</CODE>
/* Profile code */
<DICL>GRZ</DICL>
/* inner color code */
<DOCL>GRZ</DOCL>
/* outer color code */
<BQTY>1</BQTY>
/* quantity of bars per profile */
</PDAT>
</HEAD>
<BODY> (Section start)
<BAR> (Bar Data section start)
<CODE>HP110S23</CODE>
/* Profile code */
<DICL>GRZ</DICL>
/* inner color code */
<DOCL>GRZ</DOCL>
/* outer color code */
<LEN>6000</LEN>
/* bar length */
<LENR>0</LENR>
/* remaining bar length */
<H>100</H>
/* profile height or width */
<MLT>1</MLT>
/* number of bars with this profile */
/* (in general = 1) */
<CUT> (Inizio sezione Dati taglio)
<ANGL>45</ANGL>
/* left head angle */
<ANGR>45</ANGR>
/* right head angle */
<IL>2500</IL>
/* inner length */
<OL>2700</OL>
/* outer length */
<TRML>10</TRML>
/* trimcut: left side */ (2)
<TRMR>10</TRMR>
/* trimcut: right side */ (2)
D-14
D-10
D-10
D-3
D-10
D-7
D-7
D-5
D-2
D-6
D-6
D-7
D-7
P2K2ProtocolloIta
Formato P2K2
www.fomsoftware.com
info@fomsoftware.com
Revision: 2.6.1 full
<TAL>90 <TAL>
<TAR>90</TAR>
<BCOD>ABC123</BCOD>
<LBL> informazioni1</LBL>
<LBL> informazioni2</LBL>
<LBL> informazioni3</LBL>
<LBL> informazioni4</LBL>
/* Label data (
/* Label data (
Pagina 22 di 27
D-13
D-13
D-13
) */
) */
) */(4)
D-13
</CUT>
</BAR>
</BODY>
</JOB>
NOTES:
( 2)
Master Cut
( 4)
In cutting lines, it may contain the number of the disload ways, for example #2#:
the two # signs before and after the number are obligatory.
It is possible to enter both <IL> and <OL> or just one or the other.
If the sawing machine has a profile height reader, the outer dimension is used (<OL>); if not it
will use the inner dimension (<IL>).
D-7
: indicates for example that the field can have a maximum length of 7 digits.
P2K2ProtocolloIta
Formato P2K2
www.fomsoftware.com
info@fomsoftware.com
Revision: 2.6.1 full
Pagina 23 di 27
The limitations on the maximum dimensions (maximum number of digits) of a field are valid
ONLY for sawing machines with Diamond and Planet Plus equipment.
IMPORTANT!
It is obligatory to call the JOB file for Diamond and Planet Plus JOB.xml
IMPORTANT!
A JOB.xml for Diamond and Planet Plus may contain a maximum 2450 cuts and/or 150
different profile codes. For jobs with a higher number of cuts or codes, it is necessary to
create more than one file with the same file name on different floppy disks.
Example
The following example shows an xml file that consists of two bars. Two pieces are cut from both bars.
In theory, an xml file can consist of a single program line, but the convention is to represent it with
more program lines going inwards. After each tag that indicates the beginning of a section, the
children tags in the next line are moved towards the right side. A tag that is part of the same level
always appears in the next line, but it is aligned with the previous tag (example: the tags of the
<PDAT> level, such as <CODE>, <DICL> etc. are all aligned).
<?xml version="1.0" encoding="ISO-8859-1"?>
<JOB>
<VER>
<MJ>1</MJ>
<MN>0</MN>
</VER>
<HEAD>
<PDAT>
<CODE>HP110S23</CODE>
<DICL>GRZ</DICL>
<DOCL>GRZ</DOCL>
<BQTY>2</BQTY>
</PDAT>
</HEAD>
<BODY>
<BAR>
<BRAN>XXXXXXX</BRAN>
<SYST>XXXXXXX</SYST>
<CODE>HP110S23</CODE>
<DICL>GRZ</DICL>
<DOCL>GRZ</DOCL>
<LEN>6000</LEN>
<LENR>700</LENR>
<H>110</H>
<MLT>1</MLT>
<CUT>
<ANGL>45</ANGL>
<ANGR>45</ANGR>
P2K2ProtocolloIta
Formato P2K2
www.fomsoftware.com
info@fomsoftware.com
Revision: 2.6.1 full
Pagina 24 di 27
<IL>2731.3</IL>
<OL>2511.3</OL>
<TRML>10</TRML>
<TRMR>10</TRMR>
<TAL>90</TAL>
<TAR>90</TAR>
<BCOD>ABC123</BCOD>
<LBL>informazioni1</LBL>
<LBL>informazioni2</LBL>
<LBL>informazioni3</LBL>
<LBL>informazioni4</LBL>
</CUT>
<CUT>
<ANGL>90</ANGL>
<ANGR>90</ANGR>
<IL>2546.9</IL>
<OL>2546.9</OL>
<TRML>20</TRML>
<TRMR>20</TRMR>
<TAL>45</TAL>
<TAR>45</TAR>
<BCOD>ABC123</BCOD>
<LBL>informazioni5</LBL>
<LBL>informazioni6</LBL>
<LBL>informazioni7</LBL>
<LBL>informazioni8</LBL>
</CUT>
</BAR>
<BAR>
<BRAN>XXXXXXX</BRAN>
<SYST>XXXXXXX</SYST>
<CODE>HP110S23</CODE>
<DICL>GRZ</DICL>
<DOCL>GRZ</DOCL>
<LEN>5000</LEN>
<LENR>1600</LENR>
<H>50</H>
<MLT>1</MLT>
<CUT>
<ANGL>60</ANGL>
<ANGR>60</ANGR>
<IL>1560</IL>
<OL>1854.7</OL>
<TRML>0</TRML>
<TRMR>0</TRMR>
<TAL>0 </TAL>
<TAR>0</TAR>
<BCOD> GRE62G</BCOD>
<LBL>informazioni9</LBL>
<LBL>informazioni10</LBL>
<LBL>informazioni11</LBL>
<LBL>informazioni12</LBL>
</CUT>
<CUT>
<ANGL>75</ANGL>
<ANGR>75</ANGR>
P2K2ProtocolloIta
Formato P2K2
www.fomsoftware.com
info@fomsoftware.com
Revision: 2.6.1 full
Pagina 25 di 27
<IL>1382</IL>
<OL>1400.5</OL>
<TRML>30</TRML>
<TRMR>30</TRMR>
<TAL>10</TAL>
<TAR>10</TAR>
<BCOD>DHU223</BCOD>
<LBL>informazioni13</LBL>
<LBL>informazioni14</LBL>
<LBL>informazioni15</LBL>
<LBL>informazioni16</LBL>
</CUT>
</BAR>
</BODY>
</JOB>
1)ABCD1234567890
2)RAL1234567 3)RAL7654321
4)2500.0 6)DESCRIELEMENTO
5)2640.0 7)DESCRIZILIBERA
8)DESCRTIPOLOGIA
9)DESCRICOMMESSA
1234567890123456789012345
1
2
3
4
5
6
7
8
9
10
11
1)ABCD1234567890
2)RAL1234567
4a)1520.0
3)RAL7654321
P2K2ProtocolloIta
The names of the tag in the job.xml file are bold or underlined .
Attention!
The linear dimensions of the following example are in inches.
Rb Remaining
SP trimcuts
bar LENR
N=No
S=Yes
Lb Bar Length
LEN
Ut used bar
(length minus
offcut)
Sigla:
Colore1
Colore2
Pos
VX123456789012 Rossoscuro Verdescuro
3
Lb:255.990 Rb:105.400 Ut:150.590 Nb: 20
Executed
dimensions
Misura
SP
X 15.420 135.00-135.00 NN
X 59.230 45.00- 45.00 SS
> 80.120 90.00- 45.00 NN
o 90.560 45.00- 45.00 NN
o 102.780 45.00-135.00 SN
o 135.340 90.00- 90.00 NN
Mb: 1 H:9.999
V:9.999 05
Pointer
Dimensions for
execution
Mb Multibar
quantity MLT
Pos Profile
position in the
machine Code
POS
Nb Bar amount
BQTY
Info
Finestra123456
Info
Info Column
PaoloLuigi1234
MontanteDestro
Abcdefghil
Job LBL (2)
H Profile height
V Paint
thickness
Executed bars
meter
P2K2ProtocolloIta
Formato P2K2
www.fomsoftware.com
info@fomsoftware.com
Revision: 2.6.1 full
Pagina 27 di 27
P2K2ProtocolloIta