|
|
Geometric machine modeling
3.2 Commissioning
Meaning
$NP_NEXTP:
Name of the branching protection area element
Data type:
STRING
Range of values:
All names contained in $NP_NAME (Page 40)
Default value:
"" (empty string)
<n>:
System variable or protection area element index
Data type:
INT
Range of values:
0, 1, 2, ... ($MN_MM_MAXNUM_3D_PROT_AREA_ELEM - 1)
<name>:
Protection area name
Data type:
STRING
Example
The following parallel protection area element with the name "Coolant nozzle 2" is attached to
the 19th protection area element:
Program code
Comment
N100 $NP_NEXTP[18] = "Coolant nozzle 2"
; 19. Protection area element,
; name of the parallel following
element: "Coolant nozzle 2"
3.2.4.5
$NP_COLOR
Function
Enter the protection area element-specific value for alpha/transparency and color (ARGB) in the
system variable. This value is used for the display of the protection area element on the user
interface. If a specific value is not parameterized for a protection area element, the protection
area-specific value from $NP_PROT_COLOR (Page 32) applies.
Structure
Alpha/transparency and color are specified as a double word in hexadecimal format:
AARRGGBBH
•
1. - 3. Byte: RGB color value. See Chapter "Color chart (Page 24)".
•
4. Byte: Alpha channel or transparency value
Byte
Meaning
Range of values
OC
1
Blue
0 - 255D or 0 - FFH
GG
2
Green
RR
3
Red
AA
4
Alpha channel or transparency 1)
1) 0 = transparent or not visible, 255D = FFH = not transparent or filled
Monitoring and compensating
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
43
Geometric machine modeling
3.2 Commissioning
Syntax
$NP_COLOR[<n>] = <name>
Meaning
$NP_COLOR:
Alpha/transparency and color value of the protection area element
Data type:
DWORD
Range of values:
00000000H - FFFFFFFFH
Default value:
0000000H (black, not visible)
<m>:
System variable or protection area element index
Data type:
INT
Range of values:
0, 1, 2, ... ($MN_MM_MAXNUM_3D_PROT_AREA_ELEM - 1)
<value>:
Transparency and color value
Data type:
DWORD
Example
The 19th protection area is to be displayed half transparent and in a green-blue color on the user
interface:
• AA = 7FH = 127D ≙ 50% transparency
• RR (red) = 00 ≙ no red component
• GG (green) = FFH = 255D ≙ 100% green color component
• BB (blue) = 33H = 51D ≙ 20% blue color component
Program code
Comment
N100 $NP_COLOR[18] = 'H7F00FF33'
; 19. Protection area,
; alpha/transparency and color
value = 'H7F00FF33'
3.2.4.6
$NP_D_LEVEL
Function
The detail level as of which the protection area element is displayed on the user interface is
specified via the system variable. If no value different from the default value is assigned for a
protection area element the protection area-specific value takes effect $NP_PROT_D_LEVEL
(Page 33).
Detail level
• Lowest detail level: 0
• Highest detail level: 3
Monitoring and compensating
44
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
Geometric machine modeling
3.2 Commissioning
If the detail level x is selected for the visualization of the machine model, all protection areas and
protection area elements are displayed for which the following applies for the detail level D: D ≤
x
Syntax
$NP_D_LEVEL[<n>] = <value>
Meaning
$NP_PROT_D_LEVEL:
Detail level for the protection area element
Data type:
INT
Range of val-
0 ≤ D ≤ 3
ues:
Default value:
0
<m>:
System variable or protection area element index
Data type:
INT
Range of val-
0, 1, 2, ... ($MN_MM_MAXNUM_3D_PROT_AREA_ELEM - 1)
ues:
<value>:
Detail level
Data type:
INT
Example
The 19th protection area is always to be displayed ⇒ detail level 0:
Program code
Comment
N100 $NP_PROT_D_LEVEL[18] = 0
; 19. Protection area,
; detail level = 0
3.2.4.7
$NP_USAGE
Function
Enter the protection area element usage in the system variable. The usage specifies how the
protection area element is to be considered for the collision avoidance.
• Only visualization, no collision calculation
• Only collision calculation, no visualization
• Visualization and collision calculation
Usage
Meaning
Visualization
The protection area element is displayed in the machine model on the SINUMERIK Operate user
interface
Collision calculation
The protection area element is also taken into account for the collision calculation
Monitoring and compensating
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
45
Geometric machine modeling
3.2 Commissioning
Syntax
$NP_USAGE[<n>] = "<value>"
Meaning
$NP_USAGE:
Use of the protection area element
Data type:
CHAR
Range of values:
"V", "v", "C", "c", "A", "a"
Value
Meaning
"V" or "v"
Only visualization, no collision calculation
"C" or "c"
Only collision calculation, no visualization
"A" or "a"
Visualization and collision calculation
Default value:
"A"
<n>:
System variable or protection area element index
Data type:
INT
Range of values:
0, 1, 2, ... ($MN_MM_MAXNUM_3D_PROT_AREA_ELEM - 1)
<value>:
Usage
Data type:
CHAR
Example
The 19th protection area element is to be displayed at the user interface and included in the
collision calculation:
Program code
Comment
N100 $NP_USAGE[18] = "A"
; 19. Protection area,
; usage = "A"
3.2.4.8
$NP_TYPE
Function
Enter the protection area element type in the system variable.
Type: "FRAME"
A protection area element of the "FRAME" type does not contain any bodies, but defines a
coordinate transformation of the local coordinate system. The coordinate transformation
affects all the following ($NP_NEXT (Page 41)) and/or parallel ($NP_NEXTP (Page 42)) protection
area elements. The values of the coordinate transformation are set via:
• Offset: $NP_OFF (Page 57)
• Rotation direction vector: $NP_DIR (Page 58)
• Angle of rotation: $NP_ANG (Page 60)
No parameters are specified in $NP_PARA (Page 56) for the "FRAME" type.
Monitoring and compensating
46
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
Geometric machine modeling
3.2 Commissioning
Type: "BOX"
=
<
+
;
%
/
L
Length in the X direction
B
Width in the Y direction
H
Height in the Z direction
A protection area element of the "BOX" type defines a paraxial box in the local coordinate system
of the protection area element. The mid-point of the box is at the origin of the local coordinate
system. At the same time as the definition of the body, the local coordinate system can be
transformed via the following system variables:
• Offset: $NP_OFF (Page 57)
• Rotation direction vector: $NP_DIR (Page 58)
• Angle of rotation: $NP_ANG (Page 60)
The parameters length, width and height are to be entered in $NP_PARA (Page 56)
Type: "SPHERE"
=
<
5
;
R
Radius of the sphere:
A protection area element of the "SPHERE" type defines a sphere in the local coordinate system
of the protection area element. The mid-point of the sphere is at the origin of the local
Monitoring and compensating
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
47
Geometric machine modeling
3.2 Commissioning
coordinate system. At the same time as the definition of the body, the local coordinate system
can be transformed via the following system variables:
• Offset: $NP_OFF (Page 57)
• Rotation direction vector: $NP_DIR (Page 58)
• Angle of rotation: $NP_ANG (Page 60)
The parameter radius is to be entered in $NP_PARA (Page 56)
Note
Rotation
As the center point of the sphere and the starting point of the direction vector are in the
coordinate origin of the local coordinate system of the protection area element, a rotation using
the direction vector $NP_DIR (Page 58) and angle of rotation $NP_ANG (Page 60) has no
effect on the position of the sphere.
Type: "CYLINDER"
=
<
5
;
H
Height in the Z direction
R
Radius in the X/Y plane
A protection area element of the "CYLINDER" type defines a cylinder in the local coordinate
system of the protection area element. The mid-point of the cylinder is at the origin of the local
coordinate system. At the same time as the definition of the body, the local coordinate system
can be transformed via the following system variables:
• Offset: $NP_OFF (Page 57)
• Rotation direction vector: $NP_DIR (Page 58)
• Angle of rotation: $NP_ANG (Page 60)
The parameters height and radius are to be entered in $NP_PARA (Page 56)
Monitoring and compensating
48
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
Geometric machine modeling
3.2 Commissioning
Type: "CONE"
=
5
<
5
;
H
Height in the Z direction
R1
Radius 1 in the X/Y plane
R2
Radius 2 in the X/Y plane
A protection area element of the "CONE" type defines a cone in the local coordinate system of the
protection area element. The mid-point of the cone (half cone height on the line of symmetry
of the cone) is at the origin of the local coordinate system. At the same time as the definition of
the body, the local coordinate system can be transformed via the following system variables:
• Offset: $NP_OFF (Page 57)
• Rotation direction vector: $NP_DIR (Page 58)
• Angle of rotation: $NP_ANG (Page 60)
The parameters height, radius 1, and radius 2 must be entered in $NP_PARA (Page 56)
Monitoring and compensating
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
49
Geometric machine modeling
3.2 Commissioning
Type: "TORUS"
=
<
5
5
;
R1
Major radius (= distance from the center of the circle to the center of the torus in the X/Y plane)
R2
Minor radius (= radius of the circle)
A protection area element of the "TORUS" type defines a filled torus in the local coordinate system
of the protection area element. The shape of a torus can most easily be described by a circle
revolved around an axis that lies in its plane. In contrast to a normal torus, however, the hole in
the middle of a filled torus is filled in. The center of the filled torus lies at the origin of the local
coordinate system. At the same time as the definition of the body, the local coordinate system
can be transformed via the following system variables:
• Offset: $NP_OFF (Page 57)
• Rotation direction vector: $NP_DIR (Page 58)
• Angle of rotation: $NP_ANG (Page 60)
The parameters radius 1 and radius 2 must be entered in $NP_PARA (Page 56)
Type: "FILE"
=
<
;
Figure 3-3
Example bodies in STL format
Monitoring and compensating
50
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
Geometric machine modeling
3.2 Commissioning
A protection area element of the "FILE" type defines a body whose geometry data is contained
in the specified file in STL format (triangular areas), in the local coordinate system of the
protection area element. The zero point of the body is at the origin of the local coordinate
system. At the same time as the definition of the body, the local coordinate system can be
transformed via the following system variables:
• Offset: $NP_OFF (Page 57)
• Rotation direction vector: $NP_DIR (Page 58)
• Angle of rotation: $NP_ANG (Page 60)
The parameter is to be entered in $NP_FILENAME (Page 51):
Syntax
$NP_TYPE[<n>] = "<type>"
Meaning
$NP_TYPE:
Type of the protection area element
Data type:
STRING
Range of values:
"FRAME", "BOX", "SPHERE", "CYLINDER", "CONE",
"TORUS", "FILE"
Default value:
"" (empty string)
<n>:
System variable or protection area element index
Data type:
INT
Range of values:
0, 1, 2, ... ($MN_MM_MAXNUM_3D_PROT_AREA_ELEM - 1)
<Type>:
Type designation
Data type:
STRING
Example
The 19th protection area element is a cube:
Program code
Comment
N100 $NP_TYPE[18] = "BOX"
; 19. Protection area element,
; type = "Box"
3.2.4.9
$NP_FILENAME
Function
For protection area elements of the "FILE" type ($NP_TYPE (Page 46)), enter the name of the file
that describes the geometry data of the protection area element in the system variable.
Monitoring and compensating
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
51
Geometric machine modeling
3.2 Commissioning
The following file types are currently possible:
• STL files
• NPP files
STL files
An STL file (file extension .STL) must contain a description of the geometry data of a 3D body
using triangles in the STL format (Standard Tessellation Language).
Search path
A search is made in the directories predefined on the CF card for the file entered in the system
variables in the following sequence:
1. /oem/sinumerik/nck/prot_data/machine/3d_data/mm
2. /oem/sinumerik/nck/prot_data/machine/3d_data/inch
Interpretation of the length specifications
Depending on the storage directory, the length specifications contained in the STL file are
interpreted in mm or inches:
• <path>/mm: Interpretation of the length specifications in millimeters
• <path>/inch: Interpretation of the length specifications in inches
Note
Maximum length of the file name
The maximum file name length, including point and the file extension is 49 characters. For more
than 49 characters, an alarm is displayed when generating an archive.
NPP files
An NPP file (file extension .NPP) must contain a description of the geometry data of one or
several protection area elements using NPP system variables (NC Protection Area Primitives). All
geometrical primitives available in the NC can be defined as protection area elements using an
NPP file (see$NP_TYPE (Page 46)).
Search path
A search is made in the directories predefined on the CF card for the file entered in the system
variables in the following sequence:
1. /oem/sinumerik/nck/prot_data/machine/3d_data/mm
2. /oem/sinumerik/nck/prot_data/machine/3d_data/inch
Monitoring and compensating
52
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
Geometric machine modeling
3.2 Commissioning
Interpretation of the length specifications
Depending on the storage directory, the length specifications contained in the NPP file are
interpreted in mm or inches:
• <path>/mm: Interpretation of the length specifications in millimeters
• <path>/inch: Interpretation of the length specifications in inches
NPP file properties
• An NPP file must start with the following comments lines:
;COLLISION AVOIDANCE DATA
;LOC_NP_ROOT_NAME="<root_name>"
• As <root_name>, the name of the first protection area element contained in the NPP file,
specified there under $NP_NAME, must be entered.
• Comment line are lines that start with the ; character
• NPP files are allowed to contain empty lines
Properties of NPP system variables
NPP system variables contained in the NPP file have the following properties:
• Same name, significance and syntax as the corresponding system variables used in NC
programs
• The system variables of the NC are not overwritten by the NPP system variables.
• Within an NPP file, the indices of NPP system variables must be unique.
• The indices of NPP system variables can be the same in various NPP files.
• The indices and the values assigned in the NPP system variables must be constants.
Supplementary conditions
• The values for $NP_COLOR (Page 43), $NP_D_LEVEL (Page 44), $NP_USAGE (Page 45) are,
for the protection area elements defined in the NPP file, inherited from the protection area
element in which they are integrated. As a consequence, all protection area elements of an
NPP file have the same values for these properties.
• For positioning the protection area elements of an NPP file, the same conditions apply as for
positioning the protection area elements with the system variables of the NC ($NP_TYPE
(Page 46): "BOX", "SPHERE" and "CYLINDER").
• No additional STL or NPP files are embedded in an NPP file.
Note
Maximum length of the file name
The maximum file name length, including point and the file extension is 49 characters. For more
than 49 characters, an alarm is displayed when generating an archive.
Syntax
$NP_FILENAME[<n>] = "<name>"
Monitoring and compensating
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
53
Geometric machine modeling
3.2 Commissioning
Meaning
$NP_FILENAME:
Name of the STL or NPP file
Data type:
STRING
Default value:
"" (empty string)
<n>:
System variable or protection area element index
Data type:
INT
Value range:
0, 1, 2, ... ($MN_MM_MAXNUM_3D_PROT_AREA_ELEM - 1)
<name>:
Name of the STL or NPP file
Data type:
STRING
Examples
Using an STL file
The geometry data for the 19th protection area element are stored in file KUEHLDUESE_1.STL:
Program code
Comment
N100 $NP_FILENAME[18] = "KUEHLDU-
; 19th protection area element,
ESE_1.STL"
; file name = "KUEHLDUESE_1.STL"
Using an NPP file
The NPP file "Kopf_A.NPP" file is loaded into the system variables of the NC for the 19th protection
area element. This contains the following three protection area elements "Box-1",
"Sphere-1" and "Cylinder-1".
Program code
Comment
$NP_NAME[18]
= "Head"
; 19th protection area element
$NP_NEXT[18]
= ""
$NP_NEXTP[18] = ""
$NP_TYPE[18]
= "FILE"
$NP_OFF[18,0] =
80.0
$NP_OFF[18,1] = 100.0
$NP_OFF[18,2] = -50.0
$NP_DIR[18,0] =
0.0
$NP_DIR[18,1] =
0.0
$NP_DIR[18,2] =
0.0
$NP_ANG[18]
=
0.0
$NP_COLOR[18]
= 0
; 1)
$NP_D_LEVEL[18] = 0
; 1)
$NP_USAGE[18]
= "A"
; 1)
$NP_FILENAME[18] = "Kopf_A.npp"
; 1) Active for all protection area elements loaded from file Kopf_A.NPP
Monitoring and compensating
54
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
Geometric machine modeling
3.2 Commissioning
Content of file "Kopf_A.NPP"
Program code
Comment
;COLLISION AVOIDANCE DATA
; 1st header
;LOC_NP_ROOT_NAME = "Box-1"
; 2nd header
$NP_NAME[0]
=
"Box-1"
; 1st protection area element
$NP_NEXT[0]
=
"Sphere-1"
$NP_NEXTP[0]
=
"Cylinder-1"
$NP_TYPE[0]
=
"BOX"
$NP_PARA[0,0]
=
340
$NP_PARA[0,1]
=
340
$NP_PARA[0,2]
=
340
$NP_OFF[0,0]
=
42
$NP_OFF[0,1]
=
73
$NP_OFF[0,2]
=
-100
$NP_DIR[0,0]
=
0
$NP_DIR[0,1]
=
0
$NP_DIR[0,2]
=
1
$NP_ANG[0]
=
30
$NP_NAME[1]
=
"Sphere-1"
; 2nd protection area element
$NP_NEXT[1]
=
""
$NP_NEXTP[1]
=
""
$NP_TYPE[1]
=
"SPHERE"
$NP_PARA[1,0]
=
20
$NP_PARA[1,1]
=
0
$NP_PARA[1,2]
=
0
$NP_OFF[1,0]
=
170
$NP_OFF[1,1]
=
170
$NP_OFF[1,2]
=
170
$NP_DIR[1,0]
=
0
$NP_DIR[1,1]
=
0
$NP_DIR[1,2]
=
0
$NP_ANG[1]
=
0
$NP_NAME[2]
=
"Cylinder-1"
; 3rd protection area element
$NP_NEXT[2]
=
""
$NP_NEXTP[2]
=
""
$NP_TYPE[2]
=
"CYLINDER"
$NP_PARA[2,0]
=
20
$NP_PARA[2,1]
=
20
$NP_PARA[2,2]
=
0
$NP_OFF[2,0]
=
170
$NP_OFF[2,1]
=
170
$NP_OFF[2,2]
=
170
Monitoring and compensating
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
55
Geometric machine modeling
3.2 Commissioning
Program code
Comment
$NP_DIR[2,0]
=
1
$NP_DIR[2,1]
=
2
$NP_DIR[2,2]
=
3
$NP_ANG[2]
=
73
3.2.4.10
$NP_PARA
Function
Enter the dimensions of the protection area body according to the type of the protection area
element ($NP_TYPE (Page 46)) in the system variable.
Coordinate system
The local coordinate system in which the position of the protection area body is specified, is
defined by the system variables $NP_OFF (Page 57), $NP_DIR (Page 58), $NP_ANG
(Page 60).
Syntax
$NP_PARA[<n>,<i>] = <value>
Meaning
$NP_PARA:
Parameter values corresponding to the type of the protection area element
Data type:
REAL
Default value:
0.0
<n>:
System variable or protection area element index
Data type:
INT
Value range:
0, 1, 2, ... ($MN_MM_MAXNUM_3D_PROT_AREA_ELEM - 1)
<i>:
Parameter index
Data type:
INT
Value range:
0, 1, 2
Parameter in-
Type of the protection area element
dex
BOX
SPHERE
CYLINDER
CONE
TORUS
0
Length in X
Radius
Height in Z
Height in Z
Radius 1 1)
1
Width in Y
---
Radius 1)
Radius 1 1)
Radius 2
2
Height in Z
---
---
Radius 2 1) 2)
---
Monitoring and compensating
56
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
Geometric machine modeling
3.2 Commissioning
<value>:
Parameter value
Data type:
REAL
Value range:
0.0 < x ≤ max. REAL value
1)
Radius in the X/Y plane
2)
Parameter value 0.0 is permissible.
---: Parameters that are not evaluated
Example
The 19th protection area element is a cube with the dimensions:
• Length: 50.0 in the X axis
• Width: 100.0 in the Y axis
• Height: 75.5 in the Z axis
Program code
Comment
; 19. protection area element
N100 $NP_TYPE[18] = "BOX"
; type = "BOX"
N120 $NP_PARA[18,0] = 50.0
; length in X
=
50.0
N130 $NP_PARA[18,1] = 100.0
; width in Y = 100.0
N140 $NP_PARA[18,2] = 75.5
; height in Z
=
75.5
3.2.4.11
$NP_OFF
Function
The offset vector by which the local coordinate system of the protection area element is moved
compared to the coordinate system of the previous protection area element should be entered
in the system variable.
Syntax
$NP_OFF[<n>,<i>] = <value>
Meaning
$NP_OFF:
Offset vector
Data type:
REAL
Value range:
- max. REAL value ≤ x ≤ + max. REAL value
Default value:
(0.0, 0.0, 0.0)
<m>:
System variable or protection area element index
Data type:
INT
Value range:
0, 1, 2, ... ($MN_MM_MAXNUM_3D_PROT_AREA_ELEM - 1)
Monitoring and compensating
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
57
Geometric machine modeling
3.2 Commissioning
<i>:
Coordinate index
Data type:
INT
Value range:
0: X coordinate (abscissa)
1: Y coordinate (ordinate)
2: Z coordinate (applicate)
<value>:
Coordinate value
Data type:
REAL
Value range:
- max. REAL value ≤ x ≤ + max. REAL value
Example
The local coordinate system of the 19th The local coordinate system of the protection area
element is moved by the following vector compared to the coordinate system of the previous
protection area element:
• X direction: 25.0
• Y direction: 50.0
• Z direction: 37.25
=
=
13B2))
<
˟
<
]
˞
[
;
\
;
X, Y, Z
Coordinate system of the previous protection area element
X', Y', Z'
Coordinate system of the current protection area element
Program code
Comment
; 19. protection area element, offset vector
N100 $NP_OFF[18,0] = 25.0
X = 25.0
N110 $NP_OFF[18,1] = 50.0
Y = 50.0
N120 $NP_OFF[18,2] = 37.25
Z = 37.25
3.2.4.12
$NP_DIR
Function
The direction vector through which the local coordinate system of the protection area element
is rotated compared to the coordinate system of the previous protection area element should be
entered in the system variable. The angle of rotation should be entered in $NP_ANG (Page 60).
Monitoring and compensating
58
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
Geometric machine modeling
3.2 Commissioning
Boundary conditions
• The absolute value of the direction vector must be greater than: 1*10-6
• A work offset parameterized in $NP_OFF (Page 57) is performed before the rotation.
Syntax
$NP_DIR[<n>,<i>] = <value>
Meaning
$NP_DIR:
Direction vector
Data type:
REAL
Range of values:
- max. REAL value ≤ x ≤ ± max. REAL value
Default value:
(0.0, 0.0, 0.0)
<n>:
System variable or protection area element index
Data type:
INT
Range of values:
0, 1, 2, ... ($MN_MM_MAXNUM_3D_PROT_AREA_ELEM - 1)
<i>:
Coordinate index
Data type:
INT
Range of values:
0 → X; 1 → Y: 2 → Z
<value>:
Coordinate value
Data type:
REAL
Range of values:
- max. REAL value ≤ x ≤ ± max. REAL value
Example
The local coordinate system of the 19th protection area element is rotated around the direction
vector compared to the coordinate system of the previous protection area element. The
direction vector is the unit vector (1; 0; 0), rotated through α=90° in the X/Y plane and β=10° in
the Y/Z plane, in relation to the world coordinate system. The following values result from this
for the individual components of the direction vector:
• X component = cos(α) * cos(β) = cos(90) * cos(10) = 0.0
• Y component = sin(α) * cos(β) = sin(90) * cos(10) ≈ 0.985
• Z component = sin(β) = sin(10) ≈ 0.174
=
13B',5
˟
<
]
˞
[
;
\
Monitoring and compensating
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
59
Geometric machine modeling
3.2 Commissioning
Program code
Comment
; 19. protection area element, direction vector
N100 $NP_DIR[18.0] = COS(90) * COS(10)
; 0 = X component
N110 $NP_DIR[18.1] = SIN(90) * COS(10)
; 1 = Y component
N120 $NP_DIR[18.2] = SIN(10)
; 2 = Z component
3.2.4.13
$NP_ANG
Function
The angle through which the local coordinate system of the protection area element is rotated
around the direction vector ($NP_DIR (Page 58)) compared to the coordinate system of the
previous protection area element should be entered in the system variable.
Syntax
$NP_ANG[<n>] = <value>
Meaning
$NP_ANG:
Angle of rotation
Data type:
REAL
Range of values:
-360° < x ≤ 360°
Default value:
0.0
<n>:
System variable or protection area element index
Data type:
INT
Range of values:
0, 1, 2, ... ($MN_MM_MAXNUM_3D_PROT_AREA_ELEM - 1)
<value>:
Angle
Data type:
REAL
Example
The local coordinate system of the 19th protection area element is rotated by the angle
by δ=45.0° around the direction vector compared to the coordinate system of the previous
protection area element. The direction vector is the unit vector (1; 0; 0), rotated through α=90°
in the X/Y plane and β=10° in the Y/Z plane, in relation to the world coordinate system. The
following values result from this for the individual components of the direction vector:
• X component = cos(α) * cos(β) = cos(90) * cos(10) = 0.0
• Y component = sin(α) * cos(β) = sin(90) * cos(10) ≈ 0.985
• Z component = sin(β) = sin(10) ≈ 0.174
• Angle δ = 45.0°
Monitoring and compensating
60
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
Geometric machine modeling
3.2 Commissioning
=
13B$1*
13B',5
R
=
<
˟
<
]
˞
[
;
;
\
Program code
Comment
; 19. Protection area element, direction vector and angle of rotation
N100 $NP_DIR[18.0] = COS(90)*COS(10)
; 0 = X component
N110 $NP_DIR[18.1] = SIN(90)*COS(10)
; 1 = Y component
N120 $NP_DIR[18.2] = SIN(10)
; 2 = Z component
N130 $NP_ANG[18] = 45.0
; Angle of rotation δ = 45°
3.2.5
System variables: Protection area elements for automatic tool protection
areas
The protection area element of an automatic tool protection area is defined using the
subsequent system variables. The control automatically generates the values of the system
variables from the geometric data of the associated tool, and these can only be read.
Name 1)
Meaning
Analog to 2)
$NP_T_NAME[<n>]
Name of the protection area element
$NP_NAME
(Page 40)
$NP_T_TYPE[<n>]
Type of the protection area element
$NP_TYPE
(Page 46)
$NP_T_FILENAME[<n>]
File name of the STL file that contains the geometric
$NP_FILENAME
data of the protection area element
(Page 51)
(only relevant for $NP_T_TYPE == "FILE")
$NP_T_PARA[<n>,<i>]
Geometric parameters of the protection area body
$NP_PARA
(Page 56)
(only relevant for $NP_T_TYPE == "BOX" or "SPHERE"
or "CYLINDER")
$NP_T_OFF[<n>,<i>]
Offset vector of the protection area element local co-
$NP_OFF
ordinate system
(Page 57)
$NP_T_DIR[<n>,<i>]
Direction vector for the rotation of the protection
$NP_DIR (Page 58)
area element local coordinate system
$NP_T_ANG[<n>]
Angle for the rotation of the protection area element
$NP_ANG
local coordinate system
(Page 60)
1) n = 0, 1, ... ($MN_MM_MAXNUM_3D_T_PROT_ELEM - 1)
2) The system variables of the automatic tool protection areas correspond to those of the machine
protection areas.
Monitoring and compensating
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
61
Geometric machine modeling
3.2 Commissioning
3.2.6
Boundary conditions
Protection area bodies for spindles
For spindles that are not in position-controlled operation, the associated protection area bodies
are only modeled statically. As a result the following boundary conditions must be met when
modeling protection area bodies connected with a spindle as a kinematic element:
• The protection area body must be symmetrical around its axis of rotation.
• The symmetrical axis of the protection area body must lie on the axis of rotation of the spindle
(collinear)
This should be taken into account for all types of protection area bodies:
• The protection area body is a basic geometrical body (sphere, cylinder).
• The protection area body comprises several, geometrical basic bodies.
• The protection area body comprises triangles (STL file).
• The protection area body for an automatic tool protection area is created from the geometric
tool data.
Note
Automatic tool protection areas
Only using tools that are symmetrical around the axis of rotation is recommended for
automatic tool protection areas in connection with spindles.
Following protection areas
The rotational symmetry and collinearity of the protection area body in respect of the axis of
rotation of the spindle must also be complied with for all protection areas that are connected
with elements of the kinematic chain ($NP_NEXT, $NP_NEXTP) following on from the spindle.
Schematic example of such a kinematic chain: ... → (rotary axis/spindle) → (offset) → (linear
axis) → (offset) → ...
Rotary axes
The boundary conditions stated above must also be observed in connection with rotary axes
where these are also operated as spindles.
Tool reference point and kinematic transformation
The position of the associated tool reference point is determined in principle through the
assignment of an automatic tool protection area to an element in the kinematic chain. However,
the position of the tool reference point can be changed through offsets within the automatic tool
protection area via the system variables $NP_T_OFF, $NP_T_DIR and $NP_T_ANG (Page 61). A
change in position for the tool reference point of this type is not captured by the kinematic
transformations. In the context of kinematic transformation it is therefore highly recommended
that no offsets are used for the geometric machine modeling which move the tool reference
point.
Monitoring and compensating
62
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
Geometric machine modeling
3.3 Data lists
3.3
Data lists
3.3.1
Machine data
3.3.1.1
NC-specific machine data
Number
Identifier: $MN_
Description
MD18890 $MN_MM_MAXNUM_3D_PROT_AREAS
Maximum number of protection areas
MD18892 $MN_MM_MAXNUM_3D_PROT_AREA_ELEM
Maximum number of protection area elements
MD18893 $MN_MM_MAXNUM_3D_T_PROT_ELEM
Maximum number of tool protection area elements
MD18897 $MN_MM_MAXNUM_3D_INTERFACE_IN
Maximum number of NC/PLC interface signals for the
preactivation of protection areas
MD18895 $MN_MM_MAXNUM_3D_FACETS
Maximum number of triangles for protection areas
MD18894 $MN_MM_MAXNUM_3D_FACETS_INTERN
Maximum number of triangles for automatic tool pro-
tection areas
MD18899 $MN_PROT_AREA_TOOL_MASK
Creation mode for automatic tool protection areas
3.3.2
System variables
Identifier
Description
$NP_PROT_NAME
Name of the protection area
$NP_CHAIN_ELEM
Name of the kinematic element to which the protection area will be connected
$NP_PROT_TYPE
Type of the protection area
$NP_1ST_PROT
Name of the first protection area element of the protection area
$NP_PROT_COLOR
Transparency and color value of the protection area
$NP_PROT_D_LEVEL
Detail level for the protection area
$NP_BIT_NO
Bit number of the interface signal to activate/deactivate the protection area
$NP_INIT_STAT
Initialization status of the protection area
$NP_INDEX
Array for addressing the effective geometry data
$NP_NAME
Name of the protection area element
$NP_NEXT
Name of the following protection area element
$NP_NEXTP
Name of the branching protection area element
$NP_COLOR
Transparency and color value of the protection area element
$NP_D_LEVEL
Detail level for the protection area element
$NP_USAGE
Usage of the protection area element
$NP_TYPE
Type of the protection area element
$NP_FILENAME
Name of the STL file with the geometry data of the protection area element
body
$NP_PARA
Parameter values corresponding to the type of the protection area element
Monitoring and compensating
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
63
Geometric machine modeling
3.3 Data lists
Identifier
Description
$NP_OFF
Offset vector
$NP_DIR
Direction vector
$NP_ANG
Angle of rotation
Monitoring and compensating
64
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
Collision avoidance, internal
4
4.1
Function description
4.1.1
Options
The function "Collision avoidance" is an option that requires a license. The following versions are
available:
• Protect MyMachine /3D Primitives
Properties:
- Protection: Machine - Machine
- HMI visualization
- Only for single-channel control configurations
- Protection area elements: geometric primitives
• Protect MyMachine /3D STL
Properties:
- such as Protect MyMachine /3D Primitives
- Protection area elements: Files in STL and NPP format
4.1.2
Characteristics
The "Collision avoidance" function is used to prevent collisions of machine parts and tool cutting
edges while the machine axes are being traversed. To do this, the function cyclically calculates
the clearance to the protection areas enveloping the bodies to be protected. If two protection
areas approach one another to within a configurable safety clearance, an alarm is displayed and
the NC program stopped before the relevant traversing block (AUTOMATIC, MDI mode) or the
traversing motion is stopped (JOG mode).
Sequence
The collision avoidance is set up in the following sequence:
1. Enabling of the "Collision avoidance" function by setting the corresponding option (Page 65).
2. Setting the machine data for the basic parameterization of the functions:
- Kinematic chain, Function Manual "Basic Functions", chapter "Kinematic chain"
- Geometric machine modeling, chapter "Machine data (Page 25)"
- Collision avoidance, chapter "Machine data (Page 77)"
Monitoring and compensating
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
65
Collision avoidance, internal
4.1 Function description
3. Description of the kinematic structure of the machine with kinematic elements.
Refer to Function Manual "Basic Functions", chapter "Kinematic chain".
4. Writing of the protection areas and protection area elements as enveloping geometry of the
machine parts, tools and workpieces to be protected. Assignment of the protection area to
elements of the kinematic chain.
See chapter "Geometric machine modeling (Page 17)".
5. Definition of collision pairs, i.e. of two protection areas that are to be monitored for collision.
See chapter "$NP_COLL_PAIR (Page 80)".
6. Triggering a recalculation of the kinematic and geometric model.
See chapter "Request recalculation of the machine model of the collision avoidance (PROTA)
(Page 86)".
7. Activation of the protection areas to be monitored.
See chapter "Setting the protection zone status (PROTS) (Page 87)".
8. Optional: Use of the extended functions and system variables
Limits of the collision avoidance
The function cannot guarantee complete protection against a collision when traversing machine
parts, tools of workpieces. On the one hand, the collision protection can only be as good as the
parameterized kinematic and geometric model or the machine and the protection areas. On the
other hand, bodies that have not been modeled cannot be monitored at all. For this reason, it
remains the responsibility of the machine operator to ensure that a traversing motion is
executed collision-free even when the collision protection is activated.
States of protection areas
Whether a protection area is taken into account for collisions depends on the state of the
protection area:
State
Meaning
Active
The protection area is taken into account for collisions.
Inactive
The protection area is not taken into account for collisions.
Preactivated
The protection area is taken into account for collisions. A collision alarm is only issued
when it has also been activated by a protection area-specific NC/PLC interface signal.
State after control ramp-up
After the control has powered up, all protection areas are in the state corresponding to their
respective setting in $NP_INIT_STAT. See chapter "$NP_INIT_STAT (Page 36)".
State change
The state of a protection areas can be changed by:
• The PROTS() (Page 87) procedure
• Change of the initialization state to $NP_INIT_STAT followed by recalculation of the machine
model through the PROTA() (Page 86) procedure.
Monitoring and compensating
66
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
Collision avoidance, internal
4.1 Function description
Requirements
The following requirements must be satisfied so that the protection areas of a collision pair can
be monitored:
• Axes or spindles: referenced/synchronized
The position measurement system for the axes or spindles which move a protection area
must be referenced or synchronized. If this has not been done the corresponding protection
area is in an "inactive" state.
• External motion
With traversing motions that are not performed by the NC, e.g. PLC axis or manually moved
axis, the current axis position must be known in the NC.
4.1.3
Reaction of the control to a risk of collision
The collision avoidance takes the following parameterizable limit values into account for the
collision detection:
• Collision tolerance
• Safety clearance
<
;
① Protection area 1 (static)
② Protection area 2 (can be moved in X and Y direction)
③ Current clearance
④ Safety clearance
⑤ Collision tolerance / 2
⑥ Collision clearance = safety clearance + collision tolerance
Figure 4-1
Current clearance, collision tolerance and safety clearance
Collision tolerance and safety clearance
Safety clearance
The safety clearance defines a clearance up to which two active protection areas, monitored for
collision, can approach one another. The collision avoidance ensures that this clearance is not
violated and that the collision is displayed.
The safety clearance can be set specifically for each collision pair via a system variable
(Page 81).
Monitoring and compensating
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
67
Collision avoidance, internal
4.1 Function description
For all collision pairs for which no specific safety clearance is set via a system variable, the general
value that can be set via MD10622 $MN_COLLISION_SAFETY_DIST (Page 77) applies.
Collision tolerance
The collision tolerance defines an NC-wide additional clearance valid to the safety clearance.
Two active protection areas monitored for collision may therefore approach each other up to the
collision clearance (safety clearance + collision tolerance). Ideally, the collision avoidance stops
the traversing motion of the protection areas exactly at the collision clearance and displays the
collision. However, it is permissible that the collision tolerance is not complied with exactly or
that a brief violation does not result in collision detection and the traversing motion is not
stopped.
The collision tolerance is set the same for all collision pairs via MD10619
$MN_COLLISION_TOLERANCE (Page 77).
Note
Difference between collision tolerance and safety clearance
The collision tolerance can be violated and is permissible. The safety clearance is always
maintained.
Responses in the AUTOMATIC operating mode
Collision detection during preprocessing
In automatic mode, the traversing blocks of the active program are already checked during the
preprocessing. If a collision is already detected there, this results in the following reactions:
• Stop of the traversing motions in the channel
• NC/PLC interface signal: DB21,
DBX377.0 = 1 (collision avoidance: stop)
• Display of alarm 26260 with the block number of the relevant traversing block
• Cancellation of the program processing
Critical approach
Even in automatic mode, superimposed or asynchronous motions can occur that cannot be
considered in advance. For this reason, the traversing velocity is reduced or the traversing
motion is totally stopped at a critical approach of protection areas:
• Axes-specific NC/PLC interface signal when the traversing velocity is reduced:
DB31,
DBX77.0 == 1 (collision avoidance: velocity reduction)
• Channel-specific NC/PLC interface signal at a stop of the traversing motion:
DB21,
DBX377.0 == 1 (collision avoidance: stop)
Preactivated protection areas
If during the block processing in the preprocessing, it is determined in a traversing block that
two protection areas, of which at least one is only preactivated, would collide if they were
active, this does not yet produce the same reactions as described above in the "Collision
detection during preprocessing". The reactions only occur when both protection areas are
active.
Monitoring and compensating
68
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
Collision avoidance, internal
4.1 Function description
If the block at the activation time is already being traversed in the main run, a collision is detected
based on the collision calculation during preprocessing and the above reactions triggered. The
collision is detected irrespective of whether the protection areas are actually colliding at the
activation time.
Responses in the JOG operating mode
If two protection areas approach one another when traversing in the JOG mode, the traversing
velocity is continuously braked down to standstill when the collision clearance is reached. Alarm
26280 is output when the collision clearance is reached.
If the collision location is exited in the opposite direction, a continuously higher traversing
velocity is possible depending on the clearance of the protection areas.
Traversing motion is always canceled when the collision clearance is reached. Continuation of
the traversing motion always requires a new travel request (e.g. by pressing a traversing key),
irrespective of the traversing direction.
Responses in the MDI operating mode
If two protection areas approach one another when traversing in the MDI mode, the traversing
velocity is continuously braked down to standstill when the collision clearance is reached. Alarm
26260 is output when the collision clearance is reached.
Monitoring and compensating
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
69
Collision avoidance, internal
4.1 Function description
4.1.4
State diagram: Protection area
3527$
1&. 5HVHW
8SGDWH$OO&D6\V9DU([FHSW,QLW6WDW 6%
8SGDWH$OO&D6\V9DU 6%
3527$ 5
8SGDWH$OO&D6\V9DU 6%
&KHFN,QW1FN&D6\V9DU,PDJHV 6%
6% QLFKW LQLWLDOLVLHUW
35276 5
8SGDWH&D6\V9DU,QLW6WDW 6%
>)$/6(@
'(/2%- 3527B$5($
>758(@ 8SGDWH1&.0RGHOO 6%
6FKXW]EHUHLFK LQLWLDOLVLHUW
>LQW3URW7\SH>6%@
0$&+,1( @
>LQW3URW7\SH>6%@
722/ @
0DVFKLQHQVFKXW]EHUHLFK
:HUN]HXJ 6%
>'%
'%;
25
@
>'%
'%;
@
%$ $8720$7,. 25 0'$ DNWLY
%$ -2* DNWLY
%$ $8720$7,.
0'$
%$ -2*
>LQW,QLW6WDW>6%@
$ @
>LQW,QLW6WDW>6%@
, @
LQS,QLW6WDW>6%@
3
>LQW%LW1R>6%@
$1'
>LQW%LW1R>6%@
$1'
'%
'%;
LQS%LW
@
'%
'%;
LQS%LW
@
'%
'%;
LQS%LW
'%
'%;
LQS%LW
6% ¾EHUZDFKW
6% QLFKW ¾EHUZDFKW
(QWU\
35276
$
(QWU\
LQW6WDW>6%@
$
LQW6WDW>6%@
$
>'%
'%;
@
35276 ,
>'%
'%;
@
LQW,QLW6WDW>6%@
3
$1'
LQW%LW1R>6%@
$1'
'%
'%;
LQS%LW
'%
'%;
LQS%LW
LQW,QLW6WDW>6%@
3
$1'
LQW%LW1R>6%@
$1'
'%
'%;
LQS%LW
'%
'%;
LQS%LW
'%
'%;
'%
'%;
'%
'%;
25
%$ $8720$7,. 25 0'$ DNWLY
SB
Protection area
BA
Operating mode
①
UpdateAllCaSysVar(SB) function
All system variables of the collision avoidance are read into NC-internal variables:
int... = $N...
Monitoring and compensating
70
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
Collision avoidance, internal
4.1 Function description
② UpdateAllCaSysVarExeptInitStat(SB) function
As with the UpdateAllCaSysVar(SB) function, but the $NP_INIT_STAT system variable is not read
in. Internally in the NC, the last value of the intInitStat initialization status is therefore retained.
③ CheckIntNckCaSysVarImages(SB) function
The NC-internal variables read in from the system variables are checked for consistency.
Return value when an error is detected: FALSE; if error-free: TRUE.
④ UpdateCaSysVarInitStat(SB) function
Only the system variable $NP_INIT_STAT is read into the NC-internal variable intInitStat.
⑤ The internal structure of the "Tool protection area" state is the same as the "Machine protection
area" state.
⑥ The internal structure of the "JOG mode" state is the same as the "AUTO/MDA mode" state.
4.1.5
Tools
Modeling
Protection areas for tools can be modeled automatically from the collision avoidance and be
updated automatically following a tool change with some limitations. The following conditions
must be fulfilled for this purpose:
• The protection area for the tool is modeled as an automatic tool protection area (type: TOOL).
See system variable $NP_PROT_TYPE (Page 30)
• The tool is managed by the control tool management.
• The tool data stored in the tool management matches the actual geometric dimensions of
the tool.
• The collision avoidance recognizes the completion of the tool change. Normally, by
programming the corresponding tool offset number Dx, with x = 0, 1, 2, 3, ...
• The collision avoidance recognizes the automatic tool protection area for which the tool was
changed.
• If the tool path refers to a normalized tool, the tool radius of the actual tool is specified as
either positive or negative deviations referred to the normalized tool. In this case, collision
avoidance calculates with the following values:
- Positive value: Tool radius = specified value, however, as a minimum, the value of the
parameterized collision tolerance
- Negative value: Tool radius = value of the parameterized collision tolerance
Monitoring and compensating
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
71
Collision avoidance, internal
4.1 Function description
Change to the machine model
If a tool which is located in a magazine or tool adapter modeled in the active machine model of
the collision avoidance is changed in the machine then the machine model must be updated.
This is the case where one of the following actions is carried out, for example:
• A tool is loaded / unloaded in a tool magazine modeled in the machine model.
Example: Tool change in a revolver (circular) magazine.
Update: The machine model update must be explicitly requested by the user using PROTA
once the tool change has completed.
• The tool that is in a tool holder is changed.
Example: Tool change in the tool holder of the main spindle.
Update: The machine model is automatically updated following the tool change
(standard: M6) with output of the programmed tool offset number Dx in the main run.
Tool changes
The collision avoidance only updates the active machine model after a tool change without an
explicit request by PROTA if a tool offset is selected (output of the programmed tool offset
number Dx at the NC/PLC interface).
However, at the control, tool changes can be made, which are not associated with a tool offset
selection. However, for these changes the active machine model is not updated. These types of
tool changes include, for example:
• Loading/unloading a tool at the user interface.
SINUMERIK Operate: Operating area "Parameter" > "Tool list" > Vertical softkey: "Loading" or
"Unloading"
• Carrying out a tool change via the PLC user program
• Directly writing to the tool buffer memory using the system variable $TC_MPP6[9998,
<location>]
• SETMS(<spindle number>): Changing the master spindle in the channel
• TMMVTL: PI service "Prepare magazine location for loading, unload tool"
Further information: Function Manual PLC; PI services > PI service: TMMVTL
• MVTOOL: Command for movement of a tool
Further information: Function Manual Tool Management; NC programming > NC language
commands > MVTOOL - Language command for movement of a tool
If such a change is carried out, then the machine manufacturer must be requested to update the
machine module via the PLC user program. Examples of options include:
• A new channel reset is requested if the channel is in the "reset" state. When the reset response
is appropriately set (MD20110 $MC_RESET_MODE_MASK), then the actual tool offset
number Dx is output again.
• Starting an ASUB or manufacturer's cycle, which includes the output of the tool offset
number Dx and the request to update the machine model (PROTA).
Tool wear
Minimal tool changes do not have to be taken into account in the machine model, as generally
they are far less than the collision clearance.
Monitoring and compensating
72
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
Collision avoidance, internal
4.1 Function description
If a tool change occurs, which is relevant for collision avoidance, e.g. diameter changes for
grinding tools, then these must be taken into account by explicitly requesting that the machine
model is updated (PROTA).
No change to the machine model
The active machine model does not change if a fully modeled machine part with tools, e.g. a tool
magazine, is moved in the machine.
Example: Revolver magazine on a lathe
The revolver magazine on a lathe is fully modeled in the machine model of the collision
avoidance:
• The geometry of the magazine and the tools located inside it
• The motions of the magazine through the machine axes
A rotation of the revolver magazine then does not represent a change to the machine model:
• since no tools are changed inside the machine model the geometries of all the protection
areas remain unchanged.
• As the motions of the protection areas by the machine axes are fully captured by the collision
avoidance via the kinematic chain.
Boundary conditions
Several spindles in the channel
For configurations with several spindles in the channel, the collision avoidance function
assumes that a tool change takes place in the master spindle of the channel (S1). As a result only
the automatic tool protection area of the master spindle is updated through the collision
avoidance once the tool change has taken place.
Unsupported tool configurations
Tool configurations in accordance with ISO modes 4 and 5 (H numbers) along with "flat D
numbers" are not supported by the collision avoidance.
4.1.6
Boundary conditions
Channel assignment
All of the machine components relevant for collision avoidance must be located in the first
channel of the NC:
• All axes and spindles of the kinematic chain.
See Function Manual "Basic Functions", Section "Kinematic chain"
• All tools of the automatic tool protection areas of the geometric machine modeling.
See Chapter "Geometric machine modeling (Page 17)"
Monitoring and compensating
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
73
Collision avoidance, internal
4.1 Function description
Allowance for the following error
The collision avoidance uses the position setpoints of the relevant machine axes for the
clearance calculation of the protection areas. However, the actual positions of the machine axes
differ from the position setpoint by the following error. For this reason, there is also a difference
between the position setpoint and the actual position for the protection areas. This difference
must be taken into account by the user through configuration of a suitably large safety clearance
or enlargement of the protection area.
Compensations
The various compensation functions of the NC - for instance, temperature, spindle and pitch
error and sag compensation - ensure that positions programmed in the workpiece coordinate
system are actually assumed in the machine coordinate system. The collision avoidance takes
into account the position corrections made by the compensation functions.
WARNING
Risk of collision
If compensations are used for other purposes, e.g. in order to implement axis couplings in the
machine coordinate system, the collision avoidance working with position setpoints can no
longer be performed reliably. There is a risk of collision.
Actual value offset in the machine coordinate system with PRESETON
With active collision avoidance and use of an actual value offset in the machine coordinate
system with PRESETON, it is the sole responsibility of the user to ensure that the geometric
model of the collision avoidance remains consistent.
WARNING
Risk of collision
If an actual value offset is made in the machine coordinate system with PRESETON and the
geometric model of the collision avoidance not adapted accordingly, the collision avoidance
working with position setpoints can no longer be performed reliably. There is a risk of collision.
Block search
For the following types of block search there are no collision calculations carried out:
• Type 1: Block search without calculation
• Type 2: Block search with calculation at contour
• Type 4: Block search with calculation at block end point
With the following type of block search collision calculations are carried out (in the
preprocessing) for:
• Type 5: Block search with calculation in "Program test" (SERUPRO) mode
Monitoring and compensating
74
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
Collision avoidance, internal
4.2 Commissioning
AUTOMATIC modes: Incomplete protection area data for collision
When a large number of protection areas have been configured, in exceptional cases, the
following behavior can occur:
• Several protection areas have approached one another, down to the collision tolerance
• Only two protection areas are specified in Alarm 26260 "Collision two protection areas" that
is displayed.
• The collision of the other protection areas is only displayed when manually traversing the
axes after changing into the JOG mode.
Unsupported tool configurations
Collision avoidance does not support multitools. Only the selected tool of the multitool is
monitored.
4.2
Commissioning
4.2.1
General
4.2.1.1
Overview
The commissioning of the "Collision avoidance" function is performed using:
• Machine data
- Specification of the quantity structure
- Specification of general properties of the collision pairs
• System variables
- Parameterization of the collision pairs and their properties
4.2.1.2
Structure of the system variables
The system variables are structured according to the following scheme:
$NP_<name>[<index_1>,<index_2>]
Note
Index_2 is not available for all system variables.
Monitoring and compensating
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
75
Collision avoidance, internal
4.2 Commissioning
General
The system variables to describe the protection areas have the following properties:
• Prefix: $NP_, (N for NC, P for protection).
• They can be read and written via NC programs.
• They can be stored in archives and loaded to the NC again.
Data type
STRING
All system variables of the STRING data type have the following properties:
• Maximum string length: 31 characters
• No distinction is made between upper and lower case
Example: "Axis1" is identical to "AXIS1"
• Spaces and special characters are permitted
Example: "Axis1" is not identical to "Axis 1"
• Names that start with two underscores "__" are reserved for system purposes and must not
be used for user-defined names.
Note
Leading space
Since spaces are valid and distinct characters, names that start with a space followed by two
underscores "__" can, in principle, be used for user-defined names. However, because they
can be easily mistaken for system names, this procedure is not recommended.
Index_1
The individual protection areas are addressed via index_1. Index 0 → 1st protection area, index
1 → 2nd protection area, ... n → (n+1) protection area, where n =
($MN_MM_MAXNUM_3D_PROT_AREAS - 1)
All system variables of a protection area have the same index.
Index_2
For system variables that define a collision pair, the protection areas of the collision pair are
addressed via index_2.
•
0 → 1. Protection area
•
1 → 2. Protection area
Monitoring and compensating
76
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
Collision avoidance, internal
4.2 Commissioning
4.2.2
Machine data
4.2.2.1
Collision tolerance
The collision tolerance (accuracy of the collision check) for all protection areas of the NC
monitored for collision is set with the machine data. If the clearance of two safety areas is less
than the collision clearance, i.e. the sum of safety clearance (Page 77) and collision tolerance,
then there is a collision.
MD10619 $MN_COLLISION_TOLERANCE = <collision tolerance>
Accuracy of automatic generated protection areas
The collision tolerance also determines the accuracy of the protection area bodies of protection
areas produced automatically, e.g. automatic tool protection areas. The accuracy of the
protection area bodies approached using triangle areas is 1/3 of the collision tolerance.
Effects
The smaller the collision tolerance is set, the greater the number of triangular areas required for
the modelling of the automatically generated protection areas and the computation time
required for the collision detection.
Recommended setting
Collision tolerance ≈ 1 mm
See also
Reaction of the control to a risk of collision (Page 67)
4.2.2.2
Safety clearance
The safety clearance for all protection areas of the NC monitored for collision is set with the
machine data. The collision avoidance ensures that the safety clearance is not violated.
MD10622 $MN_COLLISION_SAFETY_DIST = <safety clearance>
Note
Collision pair-specific safety clearance
If a specific safety clearance has been set for a collision pair via the system
variable $NP_SAFETY_DIST (Page 81), this has priority over the NC-specific safety clearance set
in the machine data.
See also
Reaction of the control to a risk of collision (Page 67)
Monitoring and compensating
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
77
Collision avoidance, internal
4.2 Commissioning
4.2.2.3
Maximum memory space
The maximum value of the memory space in KB that can be allocated to the collision avoidance
is set with the machine data.
MD18896 $MN_MM_MAXNUM_3D_COLLISION = <value>
Value
Meaning
0
The maximum value of the memory space is determined automatically by the control using the
following machine data:
• MD18890 $MN_MM_MAXNUM_3D_PROT_AREAS
• MD18892 $MN_MM_MAXNUM_3D_PROT_AREA_ELEM
• MD18894 $MN_MM_MAXNUM_3D_FACETS_INTERN
• MD18895 $MN_MM_MAXNUM_3D_FACETS
> 0
Maximum value = parameterized value [KB]
Note
Only one > 0 value must be entered in the machine data when one of the following alarms is
displayed:
• Alarm 26262 "Insufficient memory space for the collision check of two protection areas"
• Alarm 26263 "Insufficient memory space for determining the clearance of two protection
areas"
Used memory space
Various system variables are available to determine the memory space used by the collision
avoidance. See section "Memory requirement (Page 83)".
4.2.2.4
Maximum number of collision pairs
The maximum number of possible collision pairs has an impact on:
• Length m of the system variable fields (e.g. $NP_COLL_PAIR[ m, ... ] )
• The user memory required for collision avoidance
• The size of the commissioning archive
The maximum number of collision pairs can be restricted with machine data:
MD18898 $MN_MM_MAXNUM_3D_COLL_PAIRS = <value>
<Val-
Meaning
ue>
0
The following applies to the maximum number of possible collision pairs MCP:
MCP = maximum value of the machine data
x > 0
The following applies to the maximum number of possible collision pairs MCP:
MCP = x, with 0 < x ≤ maximum value of the machine data
A value greater than the maximum permissible value of the machine data is limited internally to the
maximum value. No feedback regarding this is sent to the user.
Monitoring and compensating
78
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
Collision avoidance, internal
4.2 Commissioning
4.2.2.5
Protection levels for collision avoidance On/Off
The protection level for switching the collision avoidance On/Off is set with the machine data via
the user interface. The protection level can be specified according to operating mode and
protection area type.
Machine data = <protection level>
Number
Identifier: $MN_
Meaning: Protection level for switching the col-
lision avoidance On/Off
MD51160
ACCESS_WRITE_CA_MACH_JOG
Machine protection areas, JOG/MDI operating
mode
MD51161
ACCESS_WRITE_CA_MACH_AUTO
Machine protection areas, AUTOMATIC mode,
MD51162
ACCESS_WRITE_CA_TOOL
Tool protection areas
Further information
A detailed description of protection levels can be found in:
Function Manual Basic Functions; Various NC/PLC interface signals and functions > Functions >
Access protection via password and keyswitch
4.2.3
System variables
4.2.3.1
Overview
A collision pair is parameterized with the following system variables:
Name
Meaning
$NP_COLL_PAIR
Name of a collision pair protection area
$NP_SAFETY_DIST
Safety clearance of the protection area pair
The system variables are described in detail in the following sections.
Note
Establish a defined initial state
It is recommended that a defined initial state be generated before parameterizing the collision
avoidance. To do this, set the system variables of the collision avoidance to their default values
with the DELOBJ() function.
Change system variable values
If the value of one of the system variables listed above is changed, the change becomes
immediately visible at the user interface, e.g. SINUMERIK Operate. The machine model of the NC
is only updated after explicitly requesting that the machine model is recalculated by calling
the PROTA() (Page 86) or PROTS() (Page 87) function.
Monitoring and compensating
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
79
Collision avoidance, internal
4.2 Commissioning
4.2.3.2
$NP_COLL_PAIR
Function
The names of the two protection areas, which form a collision pair, is entered in a system
variable. The two protection areas can be in any sequence.
Collision pairs
As the collision check requires a lot of computation time, it does not make sense to monitor all
parameterized protection areas for collision with one another through the collision avoidance.
Examples in which a collision check does not make sense:
• Protection areas that cannot collide because of the construction
• Protection areas that have been defined without anchoring to the kinematic chain
The user must define which parameterized protection areas can actually collide on the machine
and define them as collision pairs. Only these protection areas are monitored by the collision
avoidance.
To define a collision pair, the names of the two protection areas must be entered in two system
variables with the same collision pair index. One protection area under the protection area index
0, the other under the protection area index 1.
Part of a collision pair
Using the COLLPAIR() (Page 85) function, a check can be made as to whether two protection
areas are parameterized as collision pair.
Syntax
$NP_COLL_PAIR[<m>,<i>] = "<name>"
Meaning
$NP_COLL_PAIR:
Name of the first or second protection area of a collision pair
Data type:
STRING
Default value:
"" (empty string)
<m>:
System variable or collision pair index
Data type:
INT
Range of values:
0, 1, 2, ... (M -1) 1)
<i>:
Protection area index
Data type:
INT
Range of values:
0 (first protection area), 1 (second protection area)
<name>:
Protection area name
Data type:
STRING
1)
M = n * (n - 1) / 2
where n = $MN_MM_MAXNUM_3D_PROT_AREAS
Monitoring and compensating
80
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
Collision avoidance, internal
4.2 Commissioning
Example
Two protection areas defined with the names "Rotary table" and "Tool in spindle" are to be
checked for collision. The two protection areas are to be mutually monitored for collision. The
definition for this is in the seventh collision pair:
Program code
Comment
N100 $NP_COLL_PAIR[6,0] = "Rotary ta-
; 7th collision pair,
ble"
; 1st Protection area
N110 $NP_COLL_PAIR[6,1] = "Tool in spin-
; 7th collision pair,
dle"
; 2nd Protection area
Supplementary conditions
• When forming a collision pair, it should be observed that every protection area of this pair has
at least one protection area element that is marked with $NP_USAGE (Page 45) = "C" or "A".
Otherwise, with the protection area, it is not permissible to perform a collision or clearance
calculation (Page 88).
• The protection areas of a collision pair are only checked for collision when both protection
areas are in the "Protection area monitored" state. See Chapter "State diagram: Protection
area (Page 70)".
4.2.3.3
$NP_SAFETY_DIST
Function
The collision pair-specific safety clearance is entered in the system variable. The collision
avoidance ensures that this safety clearance is not violated.
If a value not equal to 0.0 is entered in the system variable, the general safety clearance from
MD10622 $MN_COLLISION_SAFETY_DIST (Page 77) is not taken into account for this collision
pair.
If the value 0.0 is entered in the system variable, the safety clearance set in the machine data
applies.
Syntax
$NP_SAFETY_DIST[<m>] = <value>
Meaning
$NP_SAFETY_DIST:
Safety clearance of the collision pair
Data type:
REAL
Default value:
0.0
Monitoring and compensating
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
81
Collision avoidance, internal
4.2 Commissioning
<m>:
System variable or protection area index
Data type:
INT
Range of values:
0, 1, 2, ... (M -1) 1)
<value>:
Safety clearance
Data type:
REAL
Range of values:
0.0 ≤ x ≤ +max. REAL value
Unit:
mm or inch depending on the current dimensions set-
ting
1)
M = n * (n - 1) / 2
where n = $MN_MM_MAXNUM_3D_PROT_AREAS
Example
The safety clearance for the protection areas of the seventh collision pair should be 1.0 mm
(input system: metric).
Program code
Comment
N100 $NP_SAFETY_DIST[6] = 1.0
; 7. collision pair,
; safety clearance = 1.0
See also
Reaction of the control to a risk of collision (Page 67)
4.2.4
Extend system variables
4.2.4.1
Overview
Further information on the internal states and values of the collision avoidance can be read via
the following system variables:
• State data (Page 83)
• Memory requirement (Page 83)
• Braking distance estimations (Page 84)
Monitoring and compensating
82
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
Collision avoidance, internal
4.2 Commissioning
4.2.4.2
State data
The state data of the collision avoidance can be read via the following system variables (OPI
variables)
System variable
OPI variable
Meaning
$AN_COLL_STATE[<m>]
anCollState[<m>]
Current state of a protection area (active/inactive) with
regard to the collision avoidance
$AN_COLL_STATE_COND[<m>]
anCollStateCond[<m>]
Monitoring state (bit-coded) of a protection area
$AN_COLL_IPO_ACTIVE
anCollIpoActive
Activation state of the collision avoidance in the main
run (active/inactive)
$AN_COLL_IPO_LIMIT
anCollIpoLimit
Velocity reduction through collision avoidance in the
main run (active/inactive)
$AN_COLL_LOAD[<i>] 1)
anCollLoad[<i>] 1)
Computation time requirement for the collision avoid-
ance function <i>
$AN_ACTIVATE_COLL_CHECK[<j>]
anActivateColl-
Current state of the NC/PLC interface with index <j> for
Check[<j>]
each 8 bytes:
DB10, DBX234.0 - DBX.241.7 (activate protection areas)
$AN_COLL_CHECK_OFF
anCollCheckOff
Current state of the NC/PLC interface:
DB10 DBX58.0 - 7 (disable protection area group)
$AA_COLLPOS[<a>]
aaCollPos
Position of axis <a> in the machine coordinate system
(MCS) when the last collision alarm occurred
$AC_COLLPOS[<k>]
acCollPos
Vector <k> for the collision position in the world coor-
dinate system when the last collision alarm occurred
a: Axis name
i: 0 = function 1, 1 = function 2, 2 = function 3, ...
j: Index 0, 1, 2, ... for one bit field each of 8 bytes.
k: Coordinate index k = 1, 2, 3 for X, Y, Z coordinates
m: System variable or protection area index 0, 1, 2, ... (MD18890 $MN_MM_MAXNUM_3D_PROT_AREAS - 1)
1) The system variable can be reset by writing the value 0. Every other value is rejected with an error message.
Further information
• For a detailed description of the system variables, refer to:
List Manual, System Variables
• A detailed description of the interface signals can be found in:
Function Manual PLC
4.2.4.3
Memory requirement
The data for the memory requirement of the collision avoidance can be read via the following
system variables (OPI variables):
System variable
OPI variable
Meaning
$AN_COLL_MEM_AVAILABLE
anCollMemAvailable
Size of the memory space in KB reserved for the collision avoid-
ance.
$AN_COLL_MEM_USE_MIN 1)
anCollMemUseMin 1)
Minimum value of the memory space used for the collision
avoidance as a percentage of the reserved memory.
Monitoring and compensating
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
83
Collision avoidance, internal
4.2 Commissioning
System variable
OPI variable
Meaning
$AN_COLL_MEM_USE_MAX 1)
anCollMemUseMax 1)
Maximum value of the memory space used for the collision
avoidance as a percentage of the reserved memory
$AN_COLL_MEM_USE_ACT 1)
anCollMemUseAct 1)
Actual value of the memory space used for the collision avoid-
ance as a percentage of the reserved memory.
1) The system variable can be reset by writing the value 0. Every other value is rejected with an error message.
Further information
For a detailed description of the system variables, refer to:
List Manual, System Variables
4.2.4.4
Braking distance estimations
The estimated total braking distance (linear approximation) and the proportional braking
distances of superimposed motions for an axis can be read via the following system variables
(OPI variables). The estimation only takes the current state of the axis into account. It returns,
e.g. the braking distance 0.0 for an axis that is just at the reversal point as part of a circular path.
Note
The system variables are used for support in the development of user-specific functions as part
of the collision avoidance, and similar functions.
Table 4-1
Basic coordinate system (BCS)
System variable
OPI variable
Meaning
Total braking distance
$AA_DTBREB[<a>]
aaDtbreb
Estimated, linearly approximated total braking dis-
tance
Proportional braking distances for superimposed motions
$AA_DTBREB_CMD[<a>]
aaDtbrebCmd
Command component
$AA_DTBREB_CORR[<a>]
aaDtbrebCorr
Correction component
$AA_DTBREB_DEP[<a>]
aaDtbrebDep
Coupling component
<a>: Axis name
Table 4-2
Machine coordinate system (MCS)
System variable
OPI variable
Meaning
Total braking distance
$AA_DTBREM[<a>]
aaDtbrem
Estimated, linearly approximated total braking dis-
tance
Proportional braking distances for superimposed motions
$AA_DTBREM_CMD[<a>]
aaDtbremCmd
Command component
$AA_DTBREM_CORR[<a>]
aaDtbremCorr
Correction component
Monitoring and compensating
84
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
Collision avoidance, internal
4.3 Programming
System variable
OPI variable
Meaning
$AA_DTBREM_DEP[<a>]
aaDtbremDep
Coupling component
<a>: Axis name
Further information
For a detailed description of the system variables, refer to:
List Manual, System Variables
4.3
Programming
4.3.1
Check for collision pair (COLLPAIR)
The COLLPAIR() function determines whether two protection areas form a collision pair.
Syntax
[<RetVal> =] COLLPAIR(<Name_1>,<Name_2>[,<NoAlarm>)])
Meaning
COLLPAIR:
Check whether part of a collision pair
<RetVal>:
Function return value
Data type:
INT
Value:
≥ 0
The two protection zones form a collision pair.
Return value == collision pair index m
(see $NP_COLL_PAIR (Page 80))
-1
Either two strings have not been specified or at least one
of the two is the zero string.
-2
The protection zone specified in the first parameter has
not been found.
-3
The protection zone specified in the second parameter
has not been found.
-4
Neither of the two specified protection zones has been
found.
-5
Both specified protection zones have been found, but
not together in a collision pair.
<Name_1>:
Name of the first protection zone
Data type:
STRING
Range of val-
Parameterized protection zone names
ues:
Monitoring and compensating
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
85
Collision avoidance, internal
4.3 Programming
<Name_2>:
Name of the second protection area
Data type:
STRING
Range of val-
Parameterized protection zone names
ues:
<NoAlarm>:
Alarm suppression (optional)
Data type:
BOOL
Value:
FALSE (Default)
In the event of an error (<RetVal> < 0), the
program processing is stopped and an alarm
displayed.
TRUE
In the event of an error, the program process-
ing is not stopped and no alarm displayed.
Application: User-specific reaction correspond-
ing to the return value
See also
State diagram: Protection area (Page 70)
4.3.2
Request recalculation of the machine model of the collision avoidance
(PROTA)
If system variables of the kinematic chain $NK_..., the geometric machine modeling or the
collision avoidance $NP_... are written in the part program, the PROTA procedure must
subsequently be called so that the change becomes effective in the NC-internal machine model
of the collision avoidance.
Syntax
PROTA[(<Par>)]
Meaning
PROTA:
Request recalculation of the machine model of the collision avoidance
• Triggers a preprocessing stop.
• Must be alone in the block.
<Par>:
Parameter (optional)
Data type:
STRING
Value:
---
No parameters.
The machine model is recalculated. The states of the pro-
tection areas are retained.
"R"
The machine model is recalculated. The protection areas are
set to their initialization status corresponding to $NP_IN-
IT_STAT (Page 36).
Monitoring and compensating
86
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
Collision avoidance, internal
4.3 Programming
Supplementary conditions
Simulation
The PROTA procedure must not be used in part programs in conjunction with the simulation
(simNC).
Example: Avoiding the PROTA call while the simulation is active.
Program code
Comment
IF $P_SIM == FALSE
; IF simulation not active
PROTA
THEN recalculate collision model
ENDIF
; ENDIF
See also
Setting the protection zone status (PROTS) (Page 87)
4.3.3
Setting the protection zone status (PROTS)
The PROTS() procedure sets the state of protection areas to the specified value.
Syntax
PROTS(<State>[,<Name_1>,...,<Name_n>])
Meaning
PROTS:
Sets the state of protection areas
• Must be alone in the block.
<State>:
Status to which the specified protection zones are to be set
Data type:
CHAR
Value:
"A"or "a"
Status: Active
"I"or "i"
Status: Inactive
"P"or "p"
Status: Preactivated or PLC-controlled 1)
"R"or "r"
Status: NC-internal value of the initialization
status 2)
Monitoring and compensating
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
87
Collision avoidance, internal
4.3 Programming
<Name_1> ...
Name of one or more protection areas that are to be set to the specified status
<Name_n>:
(optional)
If no name is specified, the specified status is set for all defined protection zones.
Data type:
STRING
Range of values:
Parameterized protection zone names
Note
The maximum number of protection areas that can be specified as parameters de-
pends only on the maximum possible number of characters per program line.
1) The activation/deactivation is performed via: DB10.DBX234.0 - DBX241.7
2) The status is set to the NC-internal value of the initialization status, i.e. to the value that the system
variable $NP_INIT_STAT (Page 36) had at the time of the last PROTA( ) (Page 86) call.
4.3.4
Determining the clearance of two protection zones (PROTD)
The PROTD() function calculates the clearance of two protection areas.
Function properties:
• The clearance calculation is performed independent of the protection area status (activated,
deactivated, preactivated).
• To calculate the clearance of two protection areas, only protection area elements are used,
which are marked with $NP_USAGE (Page 45) = "C" or "A". Protection area elements of the
protection area, which are marked with $NP_USAGE = "V", are not taken into consideration.
• Protection areas, where all protection area elements of the protection area are marked with
$NP_USAGE = "V", cannot be used for the clearance calculation.
• The clearance calculation is performed with the positions valid at the end of the previous
block.
• Overlays that are included in the main run calculation (e.g. DRF offset or external zero offset)
are included in the clearance calculation with the values valid at the function interpretation
time.
Note
Synchronization
When using the PROTD() function, it is the sole responsibility of the user to synchronize the
main run and preprocessing, if required, with the STOPRE preprocessing stop.
Collision
If there is a collision between the specified protection areas, the function returns a clearance of
0.0. There is a collision if both the protection areas touch or intersect each other.
The safety clearance for the collision check (MD10622 $MN_COLLISION_SAFETY_DIST) is not
taken into account in the clearance calculation.
Syntax
[<RetVal> =] PROTD([<Name_1>],[<Name_2>],VAR <Vector>[,<System>])
Monitoring and compensating
88
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
Collision avoidance, internal
4.3 Programming
Meaning
PROTD:
Calculates the clearance of the two specified protection areas.
• Must be alone in the block.
<RetVal>:
Function return value: Absolute clearance value of the two protection areas or 0.0 with
collision (see above: Collision paragraph)
Data type:
REAL
Range of values:
0.0 ≤ x ≤ +max. REAL value
<Name_1>,
Names of the two protection areas whose clearance is to be calculated (optional)
<Name_2>:
Data type:
STRING
Range of values:
Parameterized protection area names
Default value:
"" (empty string)
If no protection areas have been specified, the function calcu-
lates the current smallest clearance from all the activated and
preactivated protection areas in the collision model.
<Vector>:
Return value: 3-dimensional clearance vector from protection area <Name_2> to pro-
tection area <Name_1> with:
• <Vector>[0]: X coordinate in the world coordinate system
• <Vector>[1]: Y coordinate in the world coordinate system
• <Vector>[2]: Z coordinate in the world coordinate system
For collision: <Vector> == zero vector
Data type:
VAR REAL [3]
Range of values:
<Vector> [n]: 0.0 ≤ x ≤ ±max. REAL value
<System>:
Measuring system (inch/metric) for clearance and clearance vector (optional)
Data type:
BOOL
Value:
FALSE (Default)
Measuring system corresponding to the cur-
rently active G command from G group 13
(G70, G71, G700, G710).
TRUE
Measuring system corresponding to the set
basic system:
MD52806 $MN_ISO_SCALING_SYSTEM
Monitoring and compensating
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
89
Collision avoidance, internal
4.4 Example
4.4
Example
4.4.1
Specifications
General Information
The basic procedure when parameterizing collision avoidance using a part program is shown
using a simplified 3-axis milling machine as example. All of the system variables relevant for
collision avoidance are written to the part program:
• Kinematic chain $NK_...
• Geometric machine modeling $NP_...
• Collision avoidance $NP_...
The machine model is subsequently activated in the part program, so that after executing the
part program, the collision avoidance has been completely parameterized in the 3-axis milling
machine and is active.
Option and machine data
The following option and machine data must be set for the example:
No.
Option data: $ON_
Value
MD19830
COLLISION_MASK
1
No.
Machine data: $MN_
Value
MD10619
COLLISION_TOLERANCE
1
MD18880
MM_MAXNUM_KIN_CHAIN_ELEM
10
MD18890
MM_MAXNUM_3D_PROT_AREAS
10
MD18892
MM_MAXNUM_3D_PROT_AREA_ELEM
10
MD18893
MM_MAXNUM_3D_T_PROT_ELEM
1
MD18894
MM_MAXNUM_3D_FACETS_INTERN
1000
MD18895
MM_MAXNUM_3D_FACETS
3000
MD18896
MM_MAXNUM_3D_COLLISION
0
MD18897
MM_MAXNUM_3D_INTERFACE_IN
16
MD18899
PROT_AREA_TOOL_MASK
1
Monitoring and compensating
90
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
Collision avoidance, internal
4.4 Example
Principle design of the 3-axis milling machine
The principle machine design is shown in the following diagram.
=
=
;
<
;
<
① Z axis
② Stand
③ Table
④ Machine zero = reference point
⑤ Tool
⑥ Tool holder
The machine parts and/or protection areas are assigned to the following machine axes.
Machine parts and/or protection areas
Machine axis
Table
X1, Y1
Z axis
Z1
Column
---
Tool holder
Z1
Tool
Z1
Monitoring and compensating
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
91
Collision avoidance, internal
4.4 Example
Dimension drawing
The dimensions of the protection area elements as well as their position (vectors to the center
point of the protection area element) referred to the machine zero point are specified in the
following dimension drawing.
Monitoring and compensating
92
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
Collision avoidance, internal
4.4 Example
9=$
96
9:.=
9=$
=
96
<
97
9:.=
=
;
<
9
7
Monitoring and compensating
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
93
Collision avoidance, internal
4.4 Example
Vectors to the center point of the protection area elements
vtool
Tool adapter (0;0;25)
vZA
Z axis (0;200;130)
vS
Column (0;570;350)
vT
Table (0;0;-50)
Kinematic chain
The kinematic chain (see next diagram) starts with an "Offset" type element. These are assigned
to all static protection areas of the machine. In the example, this is only the "Column" protection
area.
The kinematic elements of the machine axes follow the offset element:
• Z axis and X axis traverse independently of one another ⇒ $NK_PARALLEL
• The Y axis traverses dependent on the X axis ⇒ $NK_NEXT
The various protection areas of the geometric machine modeling are assigned the kinematic
elements of the machine axes
Monitoring and compensating
94
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
Collision avoidance, internal
4.4 Example
*HRPHWULF PDFKLQH PRGHOLQJ
3URWHFWLRQ DUHD HOHPHQWV
&</,1'(5
%2;
7
7
= D[LV
722/
$FFHSWDQFH
3URWHFWLRQ DUHDV
0$&+,1(
0$&+,1(
.LQHPDWLF FKDLQ
= D[LV
$;,6B/,1
2))6(7
; D[LV
< D[LV
$;,6B/,1
$;,6B/,1
7DEOH
6WDQG
3URWHFWLRQ DUHDV
0$&+,1(
0$&+,1(
%2;
%2;
3URWHFWLRQ DUHD HOHPHQWV
Collision pairs
For the example, it is assumed that only the following collision pairs are to be taken into account:
• Tool adapter - table
• Tool - table
Monitoring and compensating
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
95
Collision avoidance, internal
4.4 Example
4.4.2
Part program of the machine model
Program code
;***********************************************************
;************************* Example ************************
; milling machine: 3 linear axes, 1 spindle
;
table
=> X1, Y1
;
Z axis, tool adapter, tool => Z1
;***********************************************************
; status: February 11, 2013, 15:34
;
;===========================================================
; Collision machine data used
;===========================================================
; MD10619 $MN_COLLISION_TOLERANCE = 1
;
; MD18880 $MN_MM_MAXNUM_KIN_CHAIN_ELEM
=
100
; MD18890 $MN_MM_MAXNUM_3D_PROT_AREAS
=
10
; MD18892 $MN_MM_MAXNUM_3D_PROT_AREA_ELEM =
10
; MD18893 $MN_MM_MAXNUM_3D_T_PROT_ELEM
=
100
; MD18894 $MN_MM_MAXNUM_3D_FACETS_INTERN
= 1000
; MD18895 $MN_MM_MAXNUM_3D_FACETS
= 3000
; MD18896 $MN_MM_MAXNUM_3D_COLLISION
=
0
; MD18897 $MN_MM_MAXNUM_3D_INTERFACE_IN
=
16
; MD18899 $MN_PROT_AREA_TOOL_MASK
=
1
;
; MD19830 $ON_COLLISION_MASK = 1
; option
;
;
;===========================================================
; Definitions
;===========================================================
DEF INT RETVAL = 0
; return value of the delete function
;
DEF INT C_NKE = 0
; index for kinematic elements
DEF INT C_NPC = 0
; index for protection areas
DEF INT C_NPE = 0
; index for protection area elements
DEF INT C_NPP = 0
; index for collision pairs
;
;
Monitoring and compensating
96
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
Collision avoidance, internal
4.4 Example
Program code
;===========================================================
; initialization of the collision data
;===========================================================
MSG("protection areas")
G4 F3
; reset all parameters to their initial setting
;
RETVAL = DELOBJ("KIN_CHAIN_ELEM")
IF (RETVAL <> 0)
MSG("error: DELOBJ KIN_CHAIN_ELEM")
G4 F5
ENDIF
;
RETVAL = DELOBJ("PROT_AREA_ALL")
IF RETVAL <> 0
MSG("error: DELOBJ PROT_AREA_ALL")
G4 F5
ENDIF
;
RETVAL = DELOBJ("PROT_AREA_COLL_PAIRS")
IF RETVAL <> 0
MSG("error: DELOBJ PROT_AREA_COLL_PAIRS")
G4 F5
ENDIF
;
;
;===========================================================
; kinematic chain
;===========================================================
; KE1: ROOT
; ----------------------------------------------------------
$NK_NAME[C_NKE]
= "ROOT"
$NK_NEXT[C_NKE]
= "X axis"
$NK_PARALLEL[C_NKE]
= ""
$NK_TYPE[C_NKE]
= "OFFSET"
;
$NK_OFF_DIR[C_NKE, 0] = 0.0
; X
$NK_OFF_DIR[C_NKE, 1] = 0.0
; Y
$NK_OFF_DIR[C_NKE, 2] = 0.0
; Z
;
$NK_AXIS[C_NKE]
= ""
$NK_A_OFF[C_NKE]
= 0.0
;
C_NKE = C_NKE + 1
; next kinematic element
;
Monitoring and compensating
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
97
Collision avoidance, internal
4.4 Example
Program code
; ----------------------------------------------------------
; kinematic element: X axis
; ----------------------------------------------------------
$NK_NAME[C_NKE]
= "X axis"
$NK_NEXT[C_NKE]
= "Y axis"
$NK_PARALLEL[C_NKE]
= "Z axis"
$NK_TYPE[C_NKE]
= "AXIS_LIN"
;
$NK_OFF_DIR[C_NKE, 0] = 1.0
; X
$NK_OFF_DIR[C_NKE, 1] = 0.0
; Y
$NK_OFF_DIR[C_NKE, 2] = 0.0
; Z
;
$NK_AXIS[C_NKE]
= "X1"
$NK_A_OFF[C_NKE]
= 0.0
;
C_NKE = C_NKE + 1
; next kinematic element
;
; ----------------------------------------------------------
; kinematic element: Y axis
; ----------------------------------------------------------
$NK_NAME[C_NKE]
= "Y axis"
$NK_NEXT[C_NKE]
= ""
$NK_PARALLEL[C_NKE]
= ""
$NK_TYPE[C_NKE]
= "AXIS_LIN"
;
$NK_OFF_DIR[C_NKE, 0] = 0.0
; X
$NK_OFF_DIR[C_NKE, 1] = 1.0
; Y
$NK_OFF_DIR[C_NKE, 2] = 0.0
; Z
;
$NK_AXIS[C_NKE]
= "Y1"
$NK_A_OFF[C_NKE]
= 0.0
;
C_NKE = C_NKE + 1
; next kinematic element
;
; ----------------------------------------------------------
; kinematic element: Z axis
; ----------------------------------------------------------
$NK_NAME[C_NKE]
= "Z axis"
$NK_NEXT[C_NKE]
= ""
$NK_PARALLEL[C_NKE]
= ""
$NK_TYPE[C_NKE]
= "AXIS_LIN"
;
$NK_OFF_DIR[C_NKE, 0] = 0.0
; X
$NK_OFF_DIR[C_NKE, 1] = 0.0
; Y
$NK_OFF_DIR[C_NKE, 2] = 1.0
; Z
;
$NK_AXIS[C_NKE]
= "Z1"
$NK_A_OFF[C_NKE]
= 0.0
;
C_NKE = C_NKE + 1
; next kinematic element
;
;
Monitoring and compensating
98
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
Collision avoidance, internal
4.4 Example
Program code
;===========================================================
; protection areas with protection area elements
;===========================================================
; protection area 1: Column
; ----------------------------------------------------------
$NP_PROT_NAME[C_NPC]
= "Column"
$NP_PROT_TYPE[C_NPC]
= "MACHINE"
$NP_CHAIN_ELEM[C_NPC] = "ROOT"
$NP_1ST_PROT[C_NPC]
= "SBE column"
$NP_PROT_COLOR[C_NPC] = 'HFFA0A0A4'
; AARRGGBB
$NP_BIT_NO[C_NPC]
= -1
$NP_INIT_STAT[C_NPC]
= "A"
;
C_NPC = C_NPC + 1
; next protection area
;
; ----------------------------------------------------------
; protection area element 1.1: SBE column
; ----------------------------------------------------------
$NP_NAME[C_NPE]
= "SBE column"
$NP_NEXT[C_NPE]
= ""
$NP_NEXTP[C_NPE]
= ""
$NP_TYPE[C_NPE]
= "BOX"
;
cube dimensions
$NP_PARA[C_NPE,0]
= 160.0
; length
$NP_PARA[C_NPE,1]
= 140.0
; width
$NP_PARA[C_NPE,2]
= 800.0
; height
;
center point
$NP_OFF[C_NPE,0]
=
0.0
; X
$NP_OFF[C_NPE,1]
= 570.0
; Y: xxx rear table edge
$NP_OFF[C_NPE,2]
= 350.0
; Z: Lower edge equal to lower edge table
;
$NP_DIR[C_NPE,0]
=
0.0
$NP_DIR[C_NPE,1]
=
0.0
$NP_DIR[C_NPE,2]
=
0.0
;
$NP_ANG[C_NPE]
=
0.0
;
$NP_COLOR[C_NPE]
=
0
$NP_D_LEVEL[C_NPE]
=
0
$NP_USAGE[C_NPE]
= "V"
; V = visualize only
$NP_FILENAME[C_NPE] = ""
;
C_NPE = C_NPE + 1
; next protection area element
;
Monitoring and compensating
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
99
Collision avoidance, internal
4.4 Example
Program code
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; protection area 2: Tool adapter
; ----------------------------------------------------------
$NP_PROT_NAME[C_NPC]
= "Tool adapter"
$NP_PROT_TYPE[C_NPC]
= "MACHINE"
$NP_CHAIN_ELEM[C_NPC] = "Z axis"
$NP_1ST_PROT[C_NPC]
= "SBE tool adapter"
$NP_PROT_COLOR[C_NPC] = 'HFF0000FF'
; AARRGGBB
$NP_BIT_NO[C_NPC]
= -1
$NP_INIT_STAT[C_NPC]
= "A"
;
C_NPC = C_NPC + 1
; next protection area
;
; ----------------------------------------------------------
; protection area element 2.1: SBE tool adapter
; ----------------------------------------------------------
$NP_NAME[C_NPE]
= "SBE tool adapter"
$NP_NEXT[C_NPE]
= ""
$NP_NEXTP[C_NPE]
= ""
$NP_TYPE[C_NPE]
= "CYLINDER"
;
cylinder dimensions
$NP_PARA[C_NPE,0]
= 50.0
; height
$NP_PARA[C_NPE,1]
= 60.0
; radius
$NP_PARA[C_NPE,2]
=
0.0
;
center point
$NP_OFF[C_NPE,0]
=
0.0
; X
$NP_OFF[C_NPE,1]
=
0.0
; Y
$NP_OFF[C_NPE,2]
= 25.0
; Z: Half height
;
$NP_DIR[C_NPE,0]
=
0.0
$NP_DIR[C_NPE,1]
=
0.0
$NP_DIR[C_NPE,2]
=
0.0
;
$NP_ANG[C_NPE]
= 0.0
;
$NP_COLOR[C_NPE]
= 0
$NP_D_LEVEL[C_NPE]
= 0
$NP_USAGE[C_NPE]
= "A"
$NP_FILENAME[C_NPE] = ""
;
C_NPE = C_NPE + 1
; next protection area element
;
Monitoring and compensating
100
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
Collision avoidance, internal
4.4 Example
Program code
; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; protection area 3: Tool
; ----------------------------------------------------------
$NP_PROT_NAME[C_NPC]
= "Tool"
$NP_PROT_TYPE[C_NPC]
= "TOOL"
$NP_CHAIN_ELEM[C_NPC] = "Z axis"
$NP_1ST_PROT[C_NPC]
= ""
$NP_PROT_COLOR[C_NPC] = 'HFFFF0000'
; AARRGGBB
$NP_BIT_NO[C_NPC]
= -1
$NP_INIT_STAT[C_NPC]
= "A"
;
only relevant for type "TOOL"
$NP_INDEX[C_NPC,0]
= 1
; tool location No. / spindle No.
$NP_INDEX[C_NPC,1]
= 9998
; magazine No. / -
$NP_INDEX[C_NPC,2]
= 1
; TOA area
;
C_NPC = C_NPC + 1
; next protection area
;
Monitoring and compensating
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
101
Collision avoidance, internal
4.4 Example
Program code
; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; protection area 4: Z axis
; ----------------------------------------------------------
$NP_PROT_NAME[C_NPC]
= "Z axis"
$NP_PROT_TYPE[C_NPC]
= "MACHINE"
$NP_CHAIN_ELEM[C_NPC] = "Z axis"
$NP_1ST_PROT[C_NPC]
= "SBE Z axis"
$NP_PROT_COLOR[C_NPC] = 'HFFA0A0A4'
; AARRGGBB
$NP_BIT_NO[C_NPC]
= -1
$NP_INIT_STAT[C_NPC]
= "A"
;
C_NPC = C_NPC + 1
; next protection area
;
; ----------------------------------------------------------
; protection area element 4.1: SBE horizontal column
; ----------------------------------------------------------
$NP_NAME[C_NPE]
= "SBE Z axis"
$NP_NEXT[C_NPE]
= ""
$NP_NEXTP[C_NPE]
= ""
$NP_TYPE[C_NPE]
= "BOX"
;
$NP_PARA[C_NPE,0]
= 160.0
$NP_PARA[C_NPE,1]
= 600.0
$NP_PARA[C_NPE,2]
= 160.0
;
$NP_OFF[C_NPE,0]
=
0.0
$NP_OFF[C_NPE,1]
= 200.0
$NP_OFF[C_NPE,2]
= 130.0
;
$NP_DIR[C_NPE,0]
= 0.0
$NP_DIR[C_NPE,1]
= 0.0
$NP_DIR[C_NPE,2]
= 0.0
;
$NP_ANG[C_NPE]
= 0.0
;
$NP_COLOR[C_NPE]
= 0
$NP_D_LEVEL[C_NPE]
= 0
$NP_USAGE[C_NPE]
= "A"
$NP_FILENAME[C_NPE] = ""
;
C_NPE = C_NPE + 1
; next protection area element
;
Monitoring and compensating
102
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
Collision avoidance, internal
4.4 Example
Program code
; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; protection area 5: Table
; --------------------------------------------------------
$NP_PROT_NAME[C_NPC]
= "Table"
$NP_PROT_TYPE[C_NPC]
= "MACHINE"
$NP_CHAIN_ELEM[C_NPC] = "Y axis"
$NP_1ST_PROT[C_NPC]
= "SBE table"
$NP_PROT_COLOR[C_NPC] = 'HFF00FF00'
; AARRGGBB
$NP_BIT_NO[C_NPC]
= -1
$NP_INIT_STAT[C_NPC]
= "A"
;
C_NPC = C_NPC + 1
; next protection area
;
; ----------------------------------------------------------
; protection area element 5.1: SBE table
; ----------------------------------------------------------
$NP_NAME[C_NPE]
= "SBE table"
$NP_NEXT[C_NPE]
= ""
$NP_NEXTP[C_NPE]
= ""
$NP_TYPE[C_NPE]
= "BOX"
;
$NP_PARA[C_NPE,0]
= 1000.0
$NP_PARA[C_NPE,1]
= 500.0
$NP_PARA[C_NPE,2]
= 100.0
;
$NP_OFF[C_NPE,0]
=
0.0
$NP_OFF[C_NPE,1]
=
0.0
$NP_OFF[C_NPE,2]
= -50.0
;
$NP_DIR[C_NPE,0]
= 0.0
$NP_DIR[C_NPE,1]
= 0.0
$NP_DIR[C_NPE,2]
= 0.0
;
$NP_ANG[C_NPE]
= 0.0
;
$NP_COLOR[C_NPE]
= 0
$NP_D_LEVEL[C_NPE]
= 0
$NP_USAGE[C_NPE]
= "A"
$NP_FILENAME[C_NPE] = ""
;
C_NPE = C_NPE + 1
; next protection area element
;
;
Monitoring and compensating
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
103
Collision avoidance, internal
4.5 Data lists
Program code
;===========================================================
; collision pairs
;===========================================================
$NP_COLL_PAIR[C_NPP, 0] = "Tool adapter"
$NP_COLL_PAIR[C_NPP, 1] = "Table"
;
C_NPP = C_NPP + 1
; next collision pair
;
$NP_COLL_PAIR[C_NPP, 0] = "Tool"
$NP_COLL_PAIR[C_NPP, 1] = "Table"
;
C_NPP = C_NPP + 1
; next collision pair
;
;
;===========================================================
; activating the machine model
;===========================================================
PROTA
PROTS("A")
;
M2
;========================= ENDE ===========================
4.5
Data lists
4.5.1
Machine data
4.5.1.1
NC-specific machine data
Number
Identifier: $MN_
Description
MD10619
COLLISION_TOLERANCE
Collision tolerance
MD10622
COLLISION_SAFETY_DIST
Safety clearance
MD18896
MM_MAXNUM_3D_COLLISION
Memory location for the collision avoidance
4.5.2
System variables
Identifier
Description
$NP_COLL_PAIR
Name of the first or second protection area of a collision pair
$NP_SAFETY_DIST
Safety clearance of the collision pair
$AN_COLL_STATE
Current state of a protection area with regard to the collision avoidance
$AN_COLL_STATE_COND
Monitoring state (bit-coded) of a protection area
Monitoring and compensating
104
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
Collision avoidance, internal
4.5 Data lists
Identifier
Description
$AN_COLL_IPO_ACTIVE
Activation state of the collision avoidance in the main run
$AN_COLL_IPO_LIMIT
Velocity reduction through collision avoidance in the main run
$AN_COLL_LOAD
Computation time requirement for the collision avoidance function
$AN_ACTIVATE_COLL_CHECK
Current state of the NC/PLC interface DB10, DBX234.0 - DBX.241.7 (activate
protection areas)
$AN_COLL_CHECK_OFF
Current state of the NC/PLC interface DB10, DBB58 (switch off protection area
groups depending on the operating mode)
$AA_COLLPOS
Position of an axis in the MCS when the last collision alarm occurred
$AC_COLLPOS
Vector for the collision position in the world coordinate system when the last
collision alarm occurred
$AN_COLL_MEM_AVAILABLE
Size of the memory space in KB reserved for the collision avoidance.
$AN_COLL_MEM_USE_MIN
Minimum value of the memory space used for the collision avoidance as a
percentage of the reserved memory.
$AN_COLL_MEM_USE_MAX
Maximum value of the memory space used for the collision avoidance as a
percentage of the reserved memory.
$AN_COLL_MEM_USE_ACT
Actual value of the memory space used for the collision avoidance as a per-
centage of the reserved memory.
$AA_DTBREB
Estimated, linearly approximated total braking distance (BCS)
$AA_DTBREB_CMD
Command component (BCS)
$AA_DTBREB_CORR
Correction component (BCS)
$AA_DTBREB_DEP
Coupling component (BCS)
$AA_DTBREM
Estimated, linearly approximated total braking distance (MCS)
$AA_DTBREM_CMD
Command component (MCS)
$AA_DTBREM_CORR
Correction component (MCS)
$AA_DTBREM_DEP
Coupling component (MCS)
Monitoring and compensating
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
105
Collision avoidance, internal
4.5 Data lists
Monitoring and compensating
106
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
Collision avoidance, external
5
5.1
Function description
5.1.1
Options
The function "Collision avoidance, external" is an option that requires a license: Protect
MyMachine /Open
5.1.2
Characteristics
The function "Collision avoidance, external" provides a proprietary data interface at the
Industrial Ethernet interface X120 of the NCU module. The following data are transferred in real
time via this interface:
• Setpoint and actual values of the machine axes for monitoring and visualizing machine
movements
• Status data and input data for influencing traversing movements
• Signals for monitoring the external application
Based on these data, an independent application for machine visualization and collision
avoidance can be implemented by a SINUMERIK product partner on an external computer.
5.2
Commissioning
5.2.1
Machine data
5.2.1.1
Functions of external collision avoidance
The functions of external collision avoidance are enabled with machine data:
MD16900 $MN_COLLISION_EXT_FUNKTION_MASK.Bit x = 1
Bit
Meaning
0
Activate UDP interface
1 - 31
reserved
Monitoring and compensating
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
107
Collision avoidance, external
5.2 Commissioning
5.2.1.2
Preview time
The preview time is set with machine data:
MD16901 $MN_COLLISION_EXT_PREVIEW_TIME = <preview time>
5.2.1.3
Preview time step
The size of a time step for calculating the movement preview is set in machine data:
MD16902 $MN_COLLISION_EXT_PREVIEW_STEP = <preview time>
5.2.1.4
Timeout time
The time within which the external application must have reported back to the control for sign-
of-life monitoring is set in machine data:
MD16903 $MN_COLLISION_EXT_TIMEOUT = <timeout time>
If the external application does not report back within the set time, alarm 26300 "Sign of life
failure of the external collision avoidance" is displayed.
Monitoring and compensating
108
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
Protection areas
6
6.1
Function
Protection zones are static or moveable in 2- or 3-dimensional ranges within a machine to
protect machine elements against collisions - and must be defined by the user.
The following elements can be protected:
• Fixed machine elements (e.g. tool magazine, probe that can be swiveled).
• Moving machine elements that belong to the tool (e.g. tool, tool holder)
• Moving machine elements that belong to the workpiece (e.g. parts of the workpiece,
clamping table, clamping shoe, spindle chuck, tailstock).
In order that it is guaranteed that the machine element is protected, the protection zones must
be defined so that they completely envelope the element to be protected.
Protection zone monitoring is channel-specific, i.e. all the active protection zones of a channel
monitor one another for collisions.
During automatic execution of part programs in the AUTOMATIC or MDA mode, the NC checks
at the start of every part program block whether a collision between protection zones can occur
upon moving along the programmed path.
After manual deactivation of an active protection zone, traversing can be performed in this zone.
After leaving the protection zone, the protection zone automatically becomes active again.
Monitoring and compensating
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
109
Protection areas
6.1 Function
① Tool-related protection zone
② Workpiece-related protection zone
Figure 6-1
Example of protection zones on a milling machine
Defining protection zones
A protection zone can be 2 or 3 dimensional, and defined using polylines with a maximum of 10
corner points and arcs as contour elements. The definition can be made using commands in the
part program (see "Defining protection zones (CPROTDEF, NPROTDEF) (Page 117)") or using
system variables. All of the contour elements lie in the plane that can be selected with G17, G18
or G19.
3rd dimension
Extending the protection zone in the 3rd dimension can be limited between - ∞ and + ∞:
•
-∞ to +∞
•
-∞ up to the upper limit
• Lower limit to +∞
• Lower limit to upper limit
Coordinate system
The definition of a protection zone takes place with reference to the geometry axis of a channel
and therefore in the basic coordinate system (BCS).
Monitoring and compensating
110
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
Protection areas
6.1 Function
Reference
• Tool-related protection zones
Coordinates for tool-related protection zones must be specified as absolute values referred
to the tool holder reference point F.
• Workpiece-related protection zones
Coordinates for workpiece-related protection zones must be specified as absolute values
referred to the zero point of the basic coordinate system (BCS).
Note
If no tool-related protection zone is active, the tool path is checked against the workpiece-related
protection zones.
If no workpiece-oriented protection area is active, then there is no protection zone monitoring.
Orientation
The orientation of the protection zones is determined by the plane definition (abscissa/
ordinate), in which the contour is described, and the axis perpendicular to the contour (vertical
axis).
The orientation of the protection zones must be the same for the tool- and workpiece-related
protection zones.
Machine/channel-specific protection zones
• Machine-specific protection zones
Data for machine specific protection zones are defined once in the control. These protection
zones can be activated by all channels.
• Channel-specific protection zones
Data for channel-specific protection zones are defined in a channel. These protection zones
can be activated only by this channel.
System variable
When the protection zones are defined using commands in the part program, the protection
zone data is stored in system variables. The system variables can also be written directly so that
the definition of protection areas can also be performed directly in the system variables. The
same supplementary conditions apply for the definition of the contour of a protection zone as
for a protection zone definition using commands in the part program (see "Defining protection
zones (CPROTDEF, NPROTDEF) (Page 117)").
The protection zone definitions cover following system variables:
System variable
Type
Meaning
$SN_PA_ACTIV_IMMED[<n>]
BOOL
Activation type
$SC_PA_ACTIV_IMMED[<n>]
The protection zone is active / not active immediately af-
ter the control system has been powered up and the axes
referenced.
FALSE
Not immediately active
TRUE
Immediately active
Monitoring and compensating
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
111
Protection areas
6.1 Function
System variable
Type
Meaning
$SN_PA_T_W[<n>]
INT
Protection zone type
$SC_PA_T_W[<n>]
0
Workpiece-related protection zone
1
Reserved
2
Reserved
3
Tool-related protection zone
$SN_PA_ORI[<n>]
INT
Orientation of the protection zone, i.e. polygon definition
$SC_PA_ORI[<n>]
in the plane of:
0
1st and 2nd geometry axis
1
3rd and 1st geometry axis
2
2nd and 3rd geometry axis
$SN_PA_LIM_3DIM[<n>]
INT
Type of limitation in the 3rd dimension
$SC_PA_LIM_3DIM[<n>]
0
No limitation
1
Limitation in plus direction
2
Limitation in minus direction
3
Limitation in positive and negative directions
$SN_PA_PLUS_LIM[<n>]
REAL
Value of the limit in the positive direction in the 3rd di-
$SC_PA_PLUS_LIM[<n>]
mension
$SN_PA_MINUS_LIM[<n>]
REAL
Value of the limit in the minus direction in the 3rd dimen-
$SC_PA_MINUS_LIM[<n>]
sion
$SN_PA_CONT_NUM[<n>]
INT
Number of valid contour elements
$SC_PA_CONT_NUM[<n>]
$SN_PA_CONT_TYP[<n>, <i>]
INT
Contour type[<i>], contour type (G1, G2, G3) of the <i>th
$SC_PA_CONT_TYP[<n>, <i>]
contour element
$SN_PA_CONT_ABS[<n>, <i>]
REAL
End point of the contour[<i>], abscissa value
$SC_PA_CONT_ABS[<n>, <i>]
$SN_PA_CONT_ORD[<n>, <i>]
REAL
End point of the contour[<i>], ordinate value
$SC_PA_CONT_ORD[<n>, <i>]
$SN_PA_CENT_ABS[<n>, <i>]
REAL
Center point of the circular contour[<i>], absolute abscis-
$SC_PA_CENT_ABS[<n>, <i>]
sa value
$SN_PA_CENT_ORD[<n>, <i>]
REAL
Center point of the circular contour[i], absolute ordinate
$SC_PA_CENT_ORD[<n>, <i>]
value
$SN_... are system variables for NC and machine-specific protection zones.
$SC_... are system variables for channel-specific protection zones.
The index "<n>" corresponds to the number of the protection zone: 0 = 1st protection zone
The index "<i>" corresponds to the number of the contour element: 0 = 1st contour element
The contour elements must be defined in ascending order.
Note
The system variables of the protection zone definitions are not restored with REORG!
Data of the protection zone definitions
Data storage
Monitoring and compensating
112
Function Manual, 10/2020, 6FC5397-7GP40-0BA1
|
||
|
|
|