NC Programming GROB
NC Programming GROB
Table of contents
1 NC programming.................................................................................................. 1-1
1.1 NC Programming Standard ........................................................................ 1-2
1.1.1 Basic principles ................................................................. 1-2
1.1.1.1 NC Program Structure ........................................................ 1-2
1.1.1.2 Help Function ................................................................... 1-3
1.1.1.3 M-functions ...................................................................... 1-4
1.1.2 Directory Identification....................................................... 1-6
1.1.3 Data types ....................................................................... 1-6
1.1.4 Zero points....................................................................... 1-6
1.1.4.1 Zero Point Selection and Description .................................... 1-6
1.1.4.2 Programmable frames........................................................ 1-8
1.1.5 Program Jumps and Branches ........................................... 1-10
1.1.6 Program Part Repetition ................................................... 1-11
1.1.7 Control Structures ........................................................... 1-12
1.1.8 Subroutine technology ..................................................... 1-13
1.1.9 Circular programming ...................................................... 1-15
1.1.10 Preprocessing Memory ..................................................... 1-15
1.2 NC programming, swiveling...................................................................... 1-16
1.2.1 General information ......................................................... 1-16
1.2.1.1 Definition of terms........................................................... 1-16
1.2.1.2 Axis arrangement of the universal machining center ............ 1-17
1.2.2 5-Axis Transformation "TRAORI" ....................................... 1-18
1.2.3 Swiveling with CYCLE800 ................................................. 1-19
1.2.3.1 General information ......................................................... 1-19
1.2.3.2 Operating Sequence for Programming with CYCLE 800 ......... 1-21
1.2.3.3 Explanation of Cycle Parameters........................................ 1-22
1.2.3.4 CYCLE800 Parameter List ................................................. 1-30
1.2.3.5 Advantage vis-a-vis conventional programming ................... 1-31
1.2.3.6 Programming order ......................................................... 1-31
1.2.3.7 Swiveling Practice ........................................................... 1-32
1.2.4 Program entry ................................................................ 1-36
1 NC programming
If you press the "HELP" while you are in the editor, help is offered for the
marked block, if available.
You can use the help to search for keywords (NC command names) or any
text, for example.
1.1.1.3 M-functions
M-functions are alter statements. All control system internal M-functions are
described in the GROB documentation. A description can also be viewed via
the control system help.
· *.WPD = Work Piece Directory Option to create a subdirectory in the part direc-
tory.
For the definition of own variables, the correct data type must always be se-
lected. This saves memory space and ensures a fluid program execution. In
addition, many functions are possible only with the correct data type.
Syntax Function
G153 Non-modal suppression of common NPV/Frames
SUPA Preprocessing stop and non-modal suppression of all NPV/
Frames
G500 Deactivate all NPV/Frames modally
Syntax Function
$P_GG[n] Read the active G-function of the
function group.
[n] = Number of the group to be read
$P_UIFR[n] This system variable allows direct ac-
cess to the values of adjustable zero
offsets.
[n] = Number of the zero offset to be
described
Function "G_ZP_WRITE" can be used
as an alternative (see manufacturer
cycles).
CTRANS This frame function can be used to
describe a zero offset (rough offset).
CFINE This frame function can be used to
describe a zero offset (fine offset).
CROT This frame function can be used to
describe a zero offset (rotation).
All values and functions that are not described in "„$P_UIFR[n]" are set to
zero.
Typical program
…
N10 G55 Selection of the desired zero point
N20 R10=$P_GG[8] Function group 8 = Number of active
zero point. This number is written on
arithmetic parameter "R10".
R10 = 2
N30 $P_UIFR[R10]=CTRANS(X,50): Description of zero point 2 (G55) with
CFINE(Y,0.5) values "X=50" for rough offset and
"Y=0.5" for fine offset.
…
Jump command:
GOTOF ZIEL_1 Jump forward
GOTOB ZIEL_1 Jump back
GOTO ZIEL_1 Search for label forward, then back.
GOTOC ZIEL_1 Same effect as "GOTO", except that alarm 14080 "Branch destination not
found" is suppressed.
Branch destination:
ZIEL_1: A jump mark is marked by a colon. The name may be selected freely and
must not be defined on the condition that the first two characters are letters
or underscores. Multiple programming of the same label is allowed but not
recommended.
N10 MARKE_START1:
N20 G1 G91 X100
N30 ENDLABEL: Siemens system word for label end
:
N200 REPEAT MARKE_START1 P10 Repeat N10 to N30 10 times
Without a label end, the repeat occurs up to
the calling line.
Jump command:
GOTOF MARKE_2 Jump forward
GOTOB MARKE_1 Jump back
GOTO MARKE_3 Search for label forward, then back.
Branch destination:
ZIEL_1: A jump mark is marked by a colon. The name may be selected freely and
must not be defined on the condition that the first two characters are letters
or underscores. Multiple programming of the same label is allowed but not
recommended.
„IF“-Instructions:
IF <condition> DO <direct command or jump>
Example IF R20>0 DO $AC_OVR=80; if R20 is greater than 0, then reduce feed to
80%
Meaning:
IF Starts the instructions.
<condition> that decides which program block (with ELSE) is executed, or
if the commands between IF and ENDIFare executed.
ELSE initiates the alternate program block. (may be omitted)
ENDIF marks the end of the instructions
Nesting:
Control structures can be nested. If, for example, the last ENDIF instruction
belongs to the first IF instruction, the second to last ENDIF instruction to the
second IF instruction, etc. The total nesting depth is 16 control structures.
Memory location:
• Subroutines without a value transfer can be stored in any accessible
network.
• Subroutines with a value transfer must be stored on the NC.
• Subroutines in the control system's cycles are read during the start of the
control system and do not have to be indicated for value transfer.
Search sequence:
If the storage location is not given when calling up a subroutine, the control
system searches automatically in the following order.
UP_EXAMPLE Call of a global subroutine without value transfer using the following search
sequence:
- same folder as the program being called
- Directory "subprograms"
- Directory "user cycles"
- Directory "manufacturer cycles"
- Directory "standard cycles"
UP_EG (54.32,1) Call of a global subroutine with transfer of two values. The values must be
defined in the calling program and in the subroutine's program header. The
search sequence is as above.
Path indication:
To call a subroutine from a specific path, the path must be indicated. It is
called using the instruction "CALL“-".
Example: CALL “/_N_WKS_DIR/_N_EXAMPLE_WPD/_N_XYZ_MPF“
The path can also be indicated indirectly. To do this, assign the desired path
to a "STRING"-variable.
Example: DEF STRING[50] UP_NAME
UP_NAME=“/_N_WKS_DIR/_N_EXAMPLE_WPD/_N_XYZ_MPF“
…
CALL UP_NAME
Example:
G0 X-20 Y0 Z50 M3
G0 Z2
G1 Z-10
G41 G247 DISR=5 X0 Y0 ;Smooth approach with radius correction and 5mm approach radius
G2 X0 Y0 I=AC (20) ;Circular spigot diameter 40mm
G40 G248 DISR=3 X-20 Y0 ;Smooth tracking, deselection of radius correction, tracking radius
3mm
G0 Z100
In order to calculate a path, the NC must first read the NC blocks. This can be
disadvantageous in certain situations (reading variables).
FIFOCTRL STOPRE
Description: Description:
If a very large number of short axis Non-modal processing is stopped. The
movements occur in sequence, this next block is only executed when all
means increased computing effort for previously prepared blocks have been
the machine. saved and executed.
This presents the risk that the ma- This is required in particular for ac-
chine falls behind with the computa- tions without integrated preprocess-
tions and therefore has to repeatedly ing stop to prevent actions being exe-
interrupt the machining operation. cuted prematurely with incorrect val-
With "FIFOCTRL", the preprocessing ues. (e.g. computations)
memory is completely filled first, be-
fore the machining operation starts.
3-axis machining
If only the linear axes (X, Y and Z) are required to machine a part, it is re-
ferred to as 3-axis machining.
3+2-axis machining
If swiveling the machining plane is required to machine a part, then this is
called 3+2-axis machining. The tool is vertical to the machining plane during
machining operation.
Tilted machining
With tilted machining, also called inclined tool machining, the tool is at an an-
gle to the surface defined by you.
You do not swivel the coordinate system, but change the orientation of the
tool by changing the position of the rotary axes.
The offset that results in the linear axes can offset the control system.
The tool axis is not vertical to the machining plane.
Tilted machining is used to process relief cuts or when a short clamping
length of the tool is required.
5-axis machining
With the 5-axis machining, also called 5-axis simultaneous machining, the
machine moves five axes simultaneously.
With free-form surfaces, the tool can be optimally aligned with the surface of
the part during the entire machining process. NC programs for 5-axis ma-
chining can often no longer be programmed on the control system, but with a
CAD/CAM system.
Coordinate
system acc. to
DIN
Syntax Function
TRAORI Switching on the TCP function (ToolCenterPoint)
TRAFOOF Switch off the TCP function
The function "TRAORI" is mainly used in the CAD/CAM system for free-form
surfaces.
Definition
"CYCLE800" is a static plane transformation. It is also referred to as 3+2
axis machining. This means that the participating rotary axes are positioned
in the transformation only, while the linear axes interpolate during machin-
ing.
The cycle is used for swiveling to any surface in order to machine or measure
it after swiveling. "CYCLE800" converts the active part zero points and tool
compensations to the inclined surface by considering the kinematic chain.
Main advantages
• no complex computation of rotary axis positions and offsets
• kinematic-specific post-processors not required
• Swivel to any position without repeated probing at the respective swivel
position
Important notices
• before the swivel cycle is called, the zero offset must be programmed/
activated
• Before the swivel cycle is called for the first time, a tool and a zero offset
have to be programmed.
• Programs with swiveled plane should always start with the machine in the
home position.
PROGRAM
TC
Options:
TC_GROB Name of swivel data block
0 Deselect swivel data block
Clearing
Options:
Fixed point 1 Prior to swiveling, the machine retracts in spindle axis Z.
no Swivels the rotary axis at the current Z-position (risk of
collision)
Swiveling
Options:
yes Machine swivels the rotary axes on call of cycle.
no Machine swivels the working plane only as calculated value.
"CYCLE800“" stores the positions for the A- and B-axis.
A-axis angle: _TC_A1
B-axis angle: _TC_A2
Programming example:
CYCLE800(0,“TC_GROB“,220000,54,0,0,0,90,-45,0,0,0,0,0,100,1)
G0 X74 Y211 Z200 A=_TC_A1 B=_TC_A2
Swivel plane
Options:
new • The existing frames are deleted. The values defined in the
cycle constitute the new swivel frame
Examples:
1. The coordinate system was swiveled with CYCLE800.
2. It is swiveled to a new swivel plane with CYLCE800, which
is measured from the home position.
3. A CYCLE800 is opened and "new" is selected for the swivel
plane parameter.
4. As a result, the coordinate cross is swiveled/shifted to the
original WCS by computation.
5. The CYCLE800 establishes the new translations/rotations
from this point of origin.
ð As a result, active swiveling to home position before
the new CYCLE800 is not necessary.
additive The swivel frame is added to the last active frames. Program-
mable, additive frames (e.g. AROT, ATRANS, etc.), are consid-
ered in the additive swivel frame.
Swivel mode
Options:
axis by axis Rotate the coordinate system axis by axis.
• Swiveling "axis-by-axis" is recommended, since
programming is independent of machine
kinematics. The control system also carries out
calculations to calculate three solid angles (around
X/Y/Z) to two rotary axes (A/B).
Solid angle Swiveling via solid angle (three-dimensional angle)
Projection angle Swiveling via projection angle
direct Position rotary axes directly with axis angles.
• Direct indication of the rotary axis positions (A, B)
and a coordinate rotation in Z.
Axis sequence
(only available in "axis by axis" swivel mode
For axis by axis swiveling, one axis after the other is selected, and each rota-
tion is based on the previous. The order of the axes can be selected freely.
Options:
XYZ Rotation first around the X-axis, then around the Y-axis, and
finally around the Z-axis
…
ZYX Rotation first around the Z-axis, then around the Y-axis, and
finally around the X-axis
The list of the individual axes changes automatically according to the selected
sequence depending on the axis sequence chosen.
Example: (axis sequence: YXZ)
Selection
By preselecting "Plus" or "Minus" the preferred direction of the 1. rotary axis
(A-axis) is set. The boundary between "vertical" and "overhead" is position
A-90°.
Options:
+ normal machining
– Overhead machining
• As the rotary axes are rotated, a mechanical offset to the set zero point
occurs. The machining surface then positioned at an angle in space is only
reachable via elaborate multi-axis programming.
• The swivel cycle always places the spindle axis vertically on the machining
plane.
• This cycle calculates the offset via the machine kinematics and rotates the
machining plane in space, so that "normal" vertical programming (Z-axis =
spindle axis) is possible.
Solution:
Solution:
Solution:
Solution:
;= CUSTOMER: Trainee
;= MACHINE: GX52-XXXX
;==============================================
G_RESET
$P_UIFR[1]=CTRANS(X,0,Y,180,Z,0,A,0,B,0):CROT(X,0,Y,0,Z,0)
G54
ZA
X0
X1
ZI
Y1
Y0
WORKPIECE(,"B",,"BOX",112,-75,75,-80,-75,-68,75,2)
G_BACK_TUNNEL
Retract the tool tip (reference is Lmax) with the Z-axis to the tunnel entry
This is important before a tool change, otherwise risk of collision
T=Messerkopf_D50
M6
G_BACK_TUNNEL
CYCLE800(0,"TC_GROB",200000,57,0,0,0,-90,0,0,0,0,0,1,100,1)
In the case of questions about cycle parameters, press the "HELP" key when
the cycle is open.
G_BACK_TUNNEL
etc.