Format4 Tpacad 4 0 Code Definition Rev2 14 12 2016
Format4 Tpacad 4 0 Code Definition Rev2 14 12 2016
REV_1 / 23-12-2015
DESCRIBTION OF POSSIBLE INTERFACE WITH TPACAD 4.0 ....................................................................... 1
GENERAL ............................................................................................................................................... 2
1
REV_01 20-04-2016
General
There are 4 different ways to convert external data so that they can be used on the
FOMART4 CNC-machine.
- Use an external post-prozessor that generates *.tcn files (Tpacad file-format). These
files can be used on the machine without additional manipulation.
- Use 2D or 3D DXF files, if required with defined layer definition. These files can be
opened in TpaCAD and be converted into *.tcn files
- Use a defined iso-code format to generate *.txt or *.iso files that can be opened in
TpaCAD and also executed on the machine without additional manipulation.
- For 5-axis interpolation movements *.txt or *.iso files with a defined file format are
used. These files don´t include information about tools and they have to be called using a
subiso call in a normal *.tcn file. They can not be executed on the machine without
additional programming. Offcourse it is possible to generate the *.tcn file including the
subiso call, tool information and path+filename definition of the necessary *.txt or *.iso
file.via postprozessor and save the *.txt and *.iso file with the defined file name under
the defined path. This function can also be used on 3-4 axis machines but offcourse
without change of the BETA angle.
2
REV_01 20-04-2016
3
REV_01 20-04-2016
Piece Geometry
Piece is a block object, featured by:
• Three dimensions: Length, height and thickness. Three piece dimensions are described by l, h,
s letters.
• Six faces.
CAD use a three-dimensional system of fixed Cartesian coordinates, calls Absolute Reference
System of the piece (ARS), same for all pieces and placed like following figure show:
Six faces of the block call Real Faces and have numbers from 1 to 6. Following figure show the
automatic enumeration of faces:
CAD can be configured to work with a different faces enumeration from the automatic ne: in this
case the enumeration called custom, and use numbers from 1 to 6 the same.
CAD can be configured to exclude (disable) one or more real faces.
The default execution sequence is: F1, F2, F3, F4, F5, F6
In addition to six real faces it’s possible to create more face, usually placed inside the piece, call fictitious
faces
4
REV_01 20-04-2016
Programming workings in the piece is always relative to one face and referred to the three-
dimensional Cartesian coordinates of the face. In this case there’s a triad of axis XYZ, where:
• face plane assigned axis X and Y
• the perpendicular direction of the face assigned axis Z, we use like depth axis.
Faces 1 and 2:
5
REV_01 20-04-2016
Face 1:
face dimensions
lf=l
hf=h
sf=s
Face 2:
face dimensions:
lf=l
hf=h
sf=s
Faces 3 and 5:
Face 3:
face dimensions
lf=l
hf=s
sf=h
6
REV_01 20-04-2016
Face 5:
face dimensions
lf=l
hf=s
sf=h
Faces 4 and 6:
Face 4:
face dimensions
lf=h
hf=s
sf=l
Face 6:
face dimensions
lf=h
hf=s
sf=l
For each face, original point is equal to the programmed point at position (0;0;0). Following the
description of how changes the coordinate of a generic point referred to a face. For example face
1, with piece dimensions (l=1000; h=800; s=20):
• X point coordinate will be positive by moving to the right respect the origin, along the direction
describe by red arrow of X axis, unlike negative values placed the point in the opposite side, to
the left of the Y axis of the face;
• Y point coordinate will be positive by moving along the direction describe by green arrow of Y
axis, unlike negative values placed the point in the opposite side, under the X axis of the face;
• Z point coordinate will be positive by moving to the up respect the origin, along the direction
describe by blue arrow of Z axis, unlike negative values placed the point in the opposite side,
under XY plane created by the face;
This means a point placed in the center of XY plane inside the piece with 10 mm of depth respect
the XY face plane has coordinates X=500; Y=400; Z=-10. Same point, but outside the piece will
has same XY coordinates but reverse Z, that is Z=10.
For the most uses, Z values are negative for point inside the piece, unlike positive values for points
outside the piece; this true for all faces, real or not.
But it’s possible to use the convention exactly reverse for the one describe above.
This document assume that the convention is first one described (most use).
CAD can be configured to change the local systems of real faces, by moving origin in XY face
plane on a different corner and by change orientation of axis X and Y. In this case CAD works with
a custom geometry of the piece.
8
REV_01 20-04-2016
TPA\ALBATROS\EDICAD\01.00
$=test of interface cad tpa
::UNm DL=1000 DH=800 DS=40
OFFS{
#0=100
#1=50
#2=-5
}OFFS
VARV{
#0=1
#1=2
}VARV
VAR{
#0=12|diameter|w|f|fi
#1=5||w|i|tool
#2=abc||w|$|text
}VAR
SIDE#1{
$=base
W#81{ ::WTp
#1002=10 #1=101 #2=102 #3=-15 #8015=0 #2005=1.5 #2002=3300 #9012=-5 #9013=-10
#1001=1 }W
}SIDE
SIDE#2{
$=bottom
}SIDE
SIDE#3{
$=front
}SIDE
SIDE#4{
$=queue
}SIDE
SIDE#5{
$=back
}SIDE
SIDE#6{
$=head
}SIDE
Structure here show it’s a block piece (base geometry), with minimal data set (dimensions,
comment and variables) and a hole placed in face 1.
9
REV_01 20-04-2016
Header Lines
TPA\ALBATROS\EDICAD\01.00
$= test of interface cad tpa
::UNm DL=1000 DH=800 DS=40
• `tcn version=2.4.0:
• `code=ansi:
Second row, start with “$=” set the program comment and is optional. If exists, has to start with
prefix “$=”, followed by the description.
10
REV_01 20-04-2016
Execution section
EXE{
#0=1
#1=1
#2=0
#3=0
#4=0
}EXE
#1 Work area, 0=N; 1=M; 2=S; 5=R; 6=N1;7=M1, area definition if programm is
called in CNC Board
11
REV_01 20-04-2016
Variables section
OFFS{
#0=100
#1=50
#2=-5
}OFFS
VARV{
#0=1
#1=2
}VARV
VAR{
#0=12|diameter|w|f|fi
#1=5||w|i|tool
#2=abc||w|$|text
}VAR
Sections are optional and could set global variables of the program. Like describe following,
sections could be three, each one referred to a specific type of variables:
• OFFS{ … }OFFS: variables “o” section. “o” variables could be maximum 8 (in this
example only 3).
• VARV{ … }VARV: variables “v” section. “v” variables could be maximum 8 (in this
example only 2).
• VAR{ … }VAR: variables “r” section. “r” variables could be maximum 300 (in this
example only 3).
The sections of these two groups of variables have the same structure. Take a look of “o”
variables.
The first and the last row are required, to open and close the section: “OFFS{“, “}OFFS”.
Variables “r”
VAR{
#0=12|diameter|w|f|fi
#1=5||w|i|tool
#2=abc||w|$|text
}VAR
12
REV_01 20-04-2016
The first and the last row are required, to open and close the section: “VAR{“, “}VAR”.
13
REV_01 20-04-2016
First row is required, necessary to open section of face program: “SIDE#1{“ open section face 1,
…, “SIDE#6{“ open section face 6.
Second row, starting with “$=” set the face name and it is optional. If exist, have to be start with
prefix “$=”, followed by the face name.
Following there’re block starting with “W#nn{ ::” and closing with “}W”, to define the existing
workings on the face.
Last row (“}SIDE”) is required, to close the face section.
If the workpieceface, face #0 is selected in addition the definition of the application face has to be
asigned: WF=....
e.g
SIDE#0{
$=F #0
W#89{ ::WTs WF=3 #8015=0 #1=100 #2=100 #3=-s+50 #201=1 #203=1 #205=1612
#1001=100 #9521=0 #8101=0 #8096=0 #40=0 #46=1 #8135=0 #8136=0 #8180=0
#8181=0 #8185=0 #8186=0 #9511=0 #9512=0 #9513=0 }W
This means the setup is executed on face #3.
It’s not necessary to set sections for those faces not have any programmed workings inside them.
Faces sections have to be at the end of the text file.
14
REV_01 20-04-2016
A working can be placed on one or more text lines. Following some examples of the same
working:
W#81{ ::WTp #1002=10 #1=101 #2=102 #3=-15 #8015=0 #2005=1.5 #2002=3300 #9012=-5
#9013=-10 #1001=1 }W
W#81{ ::WTp
#1002=10 #1=101 #2=102 #3=-15 #8015=0 #2005=1.5 #2002=3300 #9012=-5 #9013=-10
#1001=1
}W
W#81{ ::WTp
#1002=10 #1=101 #2=102 #3=-15
#8015=0 #2005=1.5 #2002=3300 #9012=-5 #9013=-10 #1001=1
}W
where the working elements is placed on same line or split in more lines, keeping the congruence
of following syntax rules:
• fields in same line is separated by space character;
• section header have the same fixed structure “W#nn{ ::WTc WS=” (example: “W#81{ ::WTp
WS=10”), with:
• W#nn= working operation code (numeric),
• WTc= char describe working type
o ‘p’=punctual,
o ‘s’=setup,
o ‘l’=line,
o ‘a’=arc,
o ‘2’=complex
• WS= continues number of programming (it is not necessary to assigne;it is assignet
automatically, when the program is saved)
• WB= Construction setting (if =1 then the line is not executed, not present if =0)
• WS= ATTENTION not in use (exclution of working, comment)
• remain fields have fixed structure “#nn=st” (example: “#1002=10”), with:
• nn= numeric identify of parameter,
• st= value set to parameter;
(a single field can’t be split in more than one line)
• section closing has fixed structure “}W”.
15
REV_01 20-04-2016
Working: Hole
The header is: “W#81{ ::WTp”.
Geometric parameters:
#1= X dimension of application
If a coordinate not set will be taken the value of that coordinate from the previous work in the working list.
#201= Machine
#203= Group
#203= Group
#205= Tool
If working set both the tool (#205=) and the diameter (#1002=): the tool has the priority and the
diameter set will be ignored.
16
REV_01 20-04-2016
Geometric parameters:
#1= X dimension of application
If a coordinate not set will be taken the value of that coordinate from the previous work in the working list.
#205= Tool
#36= Compensation radius(if not set: will be used the radius of the tool)
#8096= 1= Multisetup
Properties:
#9511= If =1 defined as nesting geometrie
17
REV_01 20-04-2016
Working: Line
W#2201{ ::WTl #1=100 #2=400 #3=-15 }W
Geometric parameters:
#1= X dimension of application (ending point of the line)
If a coordinate not set will be taken the value of that coordinate from the previous work in the working list.
18
REV_01 20-04-2016
Geometric parameters:
#1= X dimension of application (ending point of the arc)
#31= Center X position, relative respect the X position of the arc initial point
#32= Center Y position, relative respect the Y position of the arc initial point
If a coordinate (XYZ) not set will be taken the value of that coordinate from the previous work in the working
list.
Note
Arc parameters defined and described above are "iperstatic", that is too many to define an arc in a free way,
so it’s possible to define only one coordinate X or Y about the arc center. In this way the other coordinate is
calculated automatically without user set redundancy information. Like generic rule, it’s recommended to set
only Cx value if the distance from Xend and Xstart is less than the distance from Ystart and Yend, and to set
only Cy otherwise. This convention is required in case of Xend – Xstart = 0 (Cx has to be set) or Yend –
Ystart = 0 (Cy has to be set). Only in case of complete circle (starting point equal to ending one) must be set
both coordinates of center point.
19
REV_01 20-04-2016
Working: Saw X
W#1050{ ::WT2 WS=1 #8098=..\custom\mcr\lame.tmcr #6=1 #8503=0 #8509=0
#8510=0 #8511=10 #8512=-10 #8514=1 #8515=1 #8516=1161 #8517=100 #8525=0
#8526=0 #8527=0 }W
The header is: “W#1050{ ::WT2”.
Geometric parameters:
#8098= Macro that is used (has to be #8098=..\custom\mcr\lame.tmcr)
#8503= Width of saw-cut (if only one cut = 0, if wider than the thickness of the blade
enter required width of the cut)
#8516= Tool ID
#8524= Entry tool speed (m/min.) (not necessary because defined by tool-parameter)
#8523= Executing saw speed (m/min.) (not necessary because defined by tool-
parameter)
20
REV_01 20-04-2016
#8513= Position Z of depth of the second step of the working (not necessary if 8526
not =1)
#8529= Executing saw speed of the second step (m/min.) (not necessary because
defined by tool-parameter)
21
REV_01 20-04-2016
Working: Saw Y
W#1051{ ::WT2 WS=2 #8098=..\custom\mcr\lame.tmcr #6=1 #8503=10 #8509=1
#8510=100 #8511=0 #8512=-10 #8514=1 #8515=1 #8516=1162 #8518=100 #8525=0
#8526=0 #8527=0 }W
Geometric parameters:
#8098= Macro that is used (has to be #8098=..\custom\mcr\lame.tmcr)
#8503= Width of saw-cut (if only one cut = 0, if wider than the thickness of the blade
enter required width of the cut)
#8516= Tool ID
#8524= Entry tool speed (m/min.) (not necessary because defined by tool-parameter)
#8523= Executing saw speed (m/min.) (not necessary because defined by tool-
parameter)
22
REV_01 20-04-2016
#8513= Position Z of depth of the second step of the working (not necessary if 8526
not =1)
#8529= Executing saw speed of the second step (m/min.) (not necessary because
defined by tool-parameter)
23
REV_01 20-04-2016
Working: Saw XY
W#1052{ ::WT2 WS=3 #8098=..\custom\mcr\lame.tmcr #6=1 #8503=0
#8504=subang #8507=10 #8508=1 #8509=2 #8510=0 #8511=0 #8512=-10 #8514=1
#8515=1 #8516=1236 #8519=45 #8520=200 #8521=90 #8525=0 #8526=0 #8527=0
#8531=0 #8532=0 }W
Geometric parameters:
#8098= Macro that is used (has to be #8098=..\custom\mcr\lame.tmcr)
#8512= Position Z of depth, value is in direction of BETA angle and not perpendicular to
faca#1. Can be changed by value 8508
#8503= Width of saw-cut (if only one cut = 0, if wider than the thickness of the blade
enter required width of the cut)
#8533 Enable X/Y final position (modul and alfa angle are auto. dissabled)
#8519= Angle Alfa, direction of the saw cut, direction X=0°, direction Y=90°
24
REV_01 20-04-2016
#8516= Tool ID
#8524= Entry tool speed (m/min.) (not necessary because defined by tool-parameter)
#8523= Executing saw speed (m/min.) (not necessary because defined by tool-
parameter)
#8526= If =1 saw will be executed in two step, depth defined in 8513 will be
executed reverse feeding direction
#8513= Position Z of depth of the second step of the working (not necessary if 8526
not =1)
#8529= Executing saw speed of the second step (m/min.) (not necessary because
defined by tool-parameter)
Properties:
#8531= If =1 defined as nesting geometrie
25
REV_01 20-04-2016
Geometric parameters:
#8098= Subprogram name (name.extension). Can be set a path too, referred to the
directory of subprograms.
All space characters have to be replaced with ~ character
If a coordinate (XYZ) not set will be taken the value of that coordinate from the previous work in the working
list.
Subprograms variables:
#6= Number of the face of subprogram has to be call.
26
REV_01 20-04-2016
Geometric parameters:
#1= X dimension of application
If a coordinate not set will be taken the value of that coordinate from the previous work in the working list.
#205= Tool
#5= Beta angle (0°= perpendicular to the face, -90° parallel to the face
Properties:
#9511= If =1 defined as nesting geometrie
27
REV_01 20-04-2016
#9516=1 If =1 the Z value defined is absolute and not in direction of beta angle
#9517=2 If=0 not active, if=1 correction above, if=2 correction below
28
REV_01 20-04-2016
Working: Geometric Set-up G205 for 3-4 axis machines (setup with chip-deflector)
W#205{ ::WTs WS=1 #1=-100 #2=0 #3=-s #201=1 #203=1 #205=1600 #1001=100 #5=geo[beta]
#4=0 #9521=0 #40=2 #9513=1 }W
The header is: “W#205{ ::WTs”.
Geometric parameters:
#1= X dimension of application
If a coordinate not set will be taken the value of that coordinate from the previous work in the working list.
#205= Tool
#36= Compensation radius(if not set: will be used the radius of the tool)
Properties:
#9513= If=1 use of chip deflector
29
REV_01 20-04-2016
Working: Geometric Set-up G206 for 3-4 axis machines (oriented setup in lateral
faces)
W#206{ ::WTs WS=2 #8015=0 #1=20 #2=15 #3=-30 #201=1 #203=1 #205=9500 #1001=100
#5=-45 #4=geo[alfa] #9521=0#40=0 }W
The header is: “W#206{ ::WTs”.
Geometric parameters:
#1= X dimension of application
If a coordinate not set will be taken the value of that coordinate from the previous work in the working list.
#205= Tool
#5= Beta angle (0°= perpendicular to the face, -90° parallel to the face
#36= Compensation radius(if not set: will be used the radius of the tool)
30
REV_01 20-04-2016
Geometric parameters:
#1= X dimension of application
If a coordinate not set will be taken the value of that coordinate from the previous work in the working list.
#205= Tool
#5= Beta angle (0°= perpendicular to the face, -90° parallel to the face
Properties:
#9511= If =1 defined as nesting geometrie
31
REV_01 20-04-2016
#9516= If =1 the Z value defined is absolute and not in direction of beta angle
#9517= If=0 not active, if=1 correction above, if=2 correction below
32
REV_01 20-04-2016
This function is used to interrupt the program execution. Machine is moving to the defined position and
green button starts to blink. If the button is pushed the machine continues with the execution of the program
(Attention: W102 is defined as Setup in machine H10 in connection with lable-printing and can not be used
as rapid in this case; the setting in this case is: “WTs” instead of “WTg”)
Geometric parameters:
#1 X dimension of application. In relation to the zero-point of piece and the defined
tool (#205)
#3 Depth dimension in Z. Not used, machine automatically moves to Z=0 (all the
way up)
#205 Tool-number, the tool has to be part of the outfit that is active. Default is tool #1
(first drill)
33
REV_01 20-04-2016
The figure above is an example of a program with three fictitious faces: with face numbers from 7
to 9.
Faces plane is painted in grey in order to highlight them and are show: face numbers and axis
labels of the face (xyz), on the side of positive programming.
The axis triad with the origin in (0;0;0) show in the left-bottom corner of the figure is the absolute
reference system to which are referred the corners of each fictitious face.
Following example highlight parts of the file that set the three new fictitious faces:
TPA\ALBATROS\EDICAD\01.00
$=test interface cad tpa
::UNm DL=1000 DH=800 DS=40
….
GEO{ ::NF=3
GSIDE#7{
#1=400|100|0
#2=400|300|0
#3=400|100|18
#Z=18
}GSIDE
GSIDE#8{ ::AZ=1
#1=200|100|0
#2=200|300|0
#3=200|100|18
#Z=18
}GSIDE
GSIDE#9{
#1=600|0|0
#2=800|200|0
#3=600|0|18
#Z=18
}GSIDE
}GEO
SIDE#1{
• “GEO{ ::NF=3“ open the section and set the total number of fictitious faces (three)
• "}GEO” close the section
Follow each section for all fictitious face defined (in the example: three):
• “GSIDE#7{“ open section of face 7 and “}GSIDE” close it
• “GSIDE#8{“ open section of face 8 e “}GSIDE” close it
• “GSIDE#9{“ open section of face 9 e “}GSIDE” close it
35
REV_01 20-04-2016
GSIDE#8{ ::AZ=1
#1=200|100|0
#2=200|300|0
#3=200|100|18
#Z=18
}GSIDE
In the example of face 8, section header ends with “”::AZ=1” (lack for other two face), to define a
left-hand triad for the face.
#1=200|100|0 First face corner: is the origin of face axis, that is the programmed point (0;0;0):
“#1=” identify the corner (1)
“200 “ X point coordinate
“100” Y point coordinate
“0” Z point coordinate
“|” field separator
#2=200|300|0 Second face corner: is the boundary point in positive direction along X axis
#3=200|100|18 Third face corner: is the boundary point in positive direction along Y axis
#Z=18 Face Thickness. This row is not obligatory, if not present, face thickness will be
equal to piece thickness.
36
REV_01 20-04-2016
OPTION: Lablemanagment
SIDE#1{
W#102{ ::WTs WS=1 #1=111 #2=222 #3=0 #201=1 #205=1 #9505=100 }W
37
REV_01 20-04-2016
DXF Import
r the DXF Import and the necessary settings see the tpacad manual
Chapter: 15.1 From Dxf to TpaCAD format
ATTENTION:
Depending on the settings in TPACAD two versions of the importer are available
38
REV_01 20-04-2016
This function is only availible if in the TPACAD configuration following DLL is activated
TpaSpa.IsoToTpa.v2.dll
Additional information
- For this kind of import there are following limits:
o Only in face#1
o Only lines and holes
o No 5axis movement
- The functionality is that the iso file is converted internaly to a *.tcn file so this
application does not solve the problem of very big programms (can not be compared
with the 5 axis iso-code function)
ATTENTION:
The default setting in 4.0,4.1 is the dll
TpaSpa.ImportIso.v2.dll
With this dll the import always generates a SUBISO call (see next chapter)
39
REV_01 20-04-2016
This command can also be used in machines that have only 3 axis. In this case the setting 5AX has to be set
to zero and the ISO code must not contain C and A axis values.
The SUBISO call can only be applied in face#1 (or in the face#0 calling application face #1). A shift of the
coordinate system using fictive faces is not possible, the values always revere to the coordinate system of
the piece. (attention Z =0 is the bottom of the piece!)
40
REV_01 20-04-2016
G0: this is the starting point for the milling. (rapid movement is done until this point is reached)
X, Y, Z value: Always absolute measurements in mm refered to the center of the tool tip, with the zero
point the SUBISO X Y Z call coordinate. (the zero point is the left buttom corner of the
workpiece, Z=0 level of the cups!)
C and A value: absolute angle measurement of the axis in degree, Starting from the required direction of the
tool the absolute axis values for the C and A axis have to be calculated using the 50° prisma-
head. It is not necessary to respect the mechanic offsets, this is done automatically by the
control
F: feeding speed in mm/min (this value is necessary otherwise a very slow default speed is
applied)
If parameters are not defined they are zero or assumed from the previous line
The tool is defined in the TpaCAD program.
Following regulations:
- Capital letters have to be used.
- Between all informations a space has to be used (G0␣X100␣Y200...)
RTCP Function: the clearance movement between two setups is calculatet by the PLC if the program is
comming from TPACAD. Also in the case that the A and C Axis have to be rotated the Z axis position is
high enough to prevent collisions.
If the program is coming from an iso file it is recommended to set in CNC Board under the tab “main
switch” the selection “move A and C axis with Z axis up”. In this case the Z axis is always moving all the
way up before rotating A and C axis. In this way collisions are prevented.
In case of interpolations with fast movements of the A and the C axes, it is better to cut the profile in more
segments: in this way the machine will be able to manage better the accellerations and the speeds for all the
axes.
41
REV_01 20-04-2016
Example:
42
REV_01 20-04-2016
Prisma head:
Angel between axis: 50°
43
REV_01 20-04-2016
C-Axis
The limit for the C axis is + / - 270,1°.
The zero position for the C axis is when the motor is on the right side of the head. Rotation in direction C
positive is counterclockwise if you look on the spindle from the top.
44
REV_01 20-04-2016
A-axis
The limit for the A axis is + / - 181°
45
REV_01 20-04-2016
Usually the saw-blade (aggregate or on HSK cone) is defined so that the first cut [value defined in
Zp] is done in scoring function.
The depth defined in Z2 is executed with reversed feeding-direction. That means I can program a
pre-cut and a finish cut in one line using e.g. Zp=-1 and Z2= -19. Off course there is also the
option to leave the field Zp empty and only use the field Z2. In this way the feeding-direction is
reversed.
If the beta angle is 90° (saw-blade perpendicular to the face #1) the feeding direction is changed
regarding X and Xf but also C axis position is reversed so the relation between rotation and
feeding direction remains the same.
46
REV_01 20-04-2016
Here an example
Tool setting: saw rotation direction: CLOCKWISE:
With Z=-25
47
REV_01 20-04-2016
Z=-25
48
REV_01 20-04-2016
Saw correction:
Left cut: without radius correction
Right cut: with radius correction
The correction is calculated axial to the sawblade => depth changes
49