0% found this document useful (0 votes)
25 views42 pages

NC Programming GROB

The document provides a comprehensive overview of NC programming standards, including the structure of NC programs, data types, zero points, and control structures. It details the use of M-functions, program jumps, and branches, as well as techniques for program part repetition to enhance clarity and reduce errors. Additionally, it covers specific programming techniques such as swiveling and the use of CYCLE800 for advanced machining operations.

Uploaded by

tyyt56495
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views42 pages

NC Programming GROB

The document provides a comprehensive overview of NC programming standards, including the structure of NC programs, data types, zero points, and control structures. It details the use of M-functions, program jumps, and branches, as well as techniques for program part repetition to enhance clarity and reduce errors. Additionally, it covers specific programming techniques such as swiveling and the use of CYCLE800 for advanced machining operations.

Uploaded by

tyyt56495
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 42

Table of contents​

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.0 Training Documentation i


Table of contents

ii Training Documentation 1.0


NC programming | 1

1 NC programming

1.0 Training Documentation 1-1


1 | NC programming
NC Programming Standard

1.1 NC Programming Standard

1.1.1 Basic principles

1.1.1.1 NC Program Structure


An NC program consists of a logical sequence of instructions that are pro-
cessed step-by-step by the control system.
Every instruction set consists of instruction words, an address character, and
an associated numerical value.

Geometrical data Technological data


Block Machine Axis coordinates Interpola- Feed Rota- Tool- Alter
no.: instruc- tion param- tional ing state-
tion eter speed ment
N G X Y Z A B I J K F S T M
Block number: Marks the NC block; may be omitted.
Machine in- Mostly G-functions, but also other available instructions according to the in-
struction: struction list. See the G-function list and the control system help.
Axis data: All axes available on the machine. Axes can also be addressed indirectly via
interpolation parameters, TRAORI or CYCLE800. Axes that are not pro-
grammed do not move.
Feed, speed: The last programmed type with the associated numerical values applies.
Tool: Tool is identified with addresses T and D. The name of a tool can consist of
numbers, letters, and underscores. All associated tool data are activated in
the program with the address D (cutting edge).
Alter state- See the separate M-functions chapter.
ment:
Effectiveness: Instructions can be modal or non-modal. Please see the respective instruction
for the respective effectiveness.
Comment: Comments can be inserted at the end of a block to increase the program's
clarity. The control system recognizes that all characters following a semi-
colon are not commands.

1-2 Training Documentation 1.0


NC programming | 1
NC Programming Standard

1.1.1.2 Help Function


The control system has a comprehensive help function.
Key to call up the control system's internal help.

If you press the "HELP" while you are in the editor, help is offered for the
marked block, if available.

The tree structure in the help window contains links.


Pressing the "Follow link" softkey opens the respective link.

Pressing the "Search" softkey opens an input field of the help.

You can use the help to search for keywords (NC command names) or any
text, for example.

1.0 Training Documentation 1-3


1 | NC programming
NC Programming Standard

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.

Calling up the "HELP" function.

Press the "Table of contents" softkey.

Select item "Grob-Help" from the list.

1-4 Training Documentation 1.0


NC programming | 1
NC Programming Standard

Tables with all available M- and H-functions are stored.

1.0 Training Documentation 1-5


1 | NC programming
NC Programming Standard

1.1.2 Directory Identification

· MPF.DIR = Directory global users part programs


· SPF.DIR = Directory global users subroutines
· WKS.DIR = Directory parts

· *.WPD = Work Piece Directory Option to create a subdirectory in the part direc-
tory.

· *.MPF = Main Program File (main program)


· *.SPF = Sub Program File (subroutine)

· ARC.DIR = Directory for archives


· *.ARC = Archive file

1.1.3 Data types


The following data types are supported.

Data type Significance Range of values


BOOL Truth value: TRUE (1) and FALSE (0) 1, 0
INT Signed integers +/-(2^31–1)
REAL Real numbers (broken numbers with decimal point) +/-(10^-300 ...
10^+300 )
CHAR 1 character ASCII, according to code 0...255 CHAR
STRING Character string, number of characters in [...], max. 200 Numbers, letters,
characters underscore
AXIS only axis names (axis addresses) for indirect program- all axes available
ming in square brackets in the channel
FRAME Geometric specifications for shifting, rotating, scaling and Geometric data
mirroring

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.

A fixed data type is assigned to calculation parameters and system variables:


· R-Parameter: REAL
· System variable: depending on use (see Siemens documentation)

1.1.4 Zero points

1.1.4.1 Zero Point Selection and Description


All positions of the NC-program refer to the effective zero offset. A zero offset
must be assigned known values before it is called up. A zero offset can be
made manually via zero offset management or with an NC-command. It is
implemented via the system variable "$P_UIFR[X]“".

1-6 Training Documentation 1.0


NC programming | 1
NC Programming Standard

Available zero offsets:


G54 to G57 and G505 to G599

Func- Zero point


tion
G54 = Zero offset 1
G55 = Zero offset 2
G56 = Zero offset 3
G57 = Zero offset 4
G505 = Zero offset 5
G506 = Zero offset 6
etc.

Selection of zero offsets:


• In manual mode:
• In the "T,S,M" functions under "Zero offset"
• In an automatic mode:
• Via a G-function in the NC-program

Deselect zero offsets:

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

Description/change of zero offset via NC-commands


It is recommended to describe the zero point in the NC-program especially
for series and machines with several pallets. This function significantly in-
creases process reliability, since the zero point is always moved to the user-
defined point at program start.

1.0 Training Documentation 1-7


1 | NC programming
NC Programming Standard

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.

1.1.4.2 Programmable frames


"Programmable frames" are zero point changes whose effectiveness is limited
in time and that are not directly entered in the zero point (e.g. G54). These
frames can impact each other or cancel each other out.

Available programmable frames:

1-8 Training Documentation 1.0


NC programming | 1
NC Programming Standard

Available Frames Function


"TRANS" and "ATRANS" The zero point can be offset along the active co-
ordinate axes with these commands. The com-
mand "TRANS" deletes all active frames.
"ATRANS" (additive offset) is based on the active
frames.
"ROT" and "AROT" Use command "ROT" or "AROT" to rotate the co-
ordinate system. Counterclockwise rotation is
positive. The positive X-axis is considered the
zero degree position.
"MIRROR" and "AMIRROR" Use command "MIRROR" or "AMIRROR" to mir-
ror the coordinate system at the programmed
axis/axes. The coordinates' signs are mirrored at
the axis/axes.
"SCALE" and "ASCALE" In some cases, it makes sense to scale contour
elements. Existing contours can be enlarged or
reduced with a scaling factor.

Selecting programmable frames:


Translation coordinate system:
Absolute => TRANS X100 Y100
Incre- => ATRANS X100 Y100
mental
Rotation coordinate system:
Absolute => ROT RPL=52 => Rotation around the active plane (G17,
G18 or G19) in degrees
ROT X=20 => Rotation around the programmed linear
axis in degrees
Incre- => AROT RPL=52
mental
AROT X=20

Deselecting programmable frames:


A programmable absolute zero offset (TRANS, ROT, SCALE, MIRROR) without
dimension specifications deletes all programmed zero offsets. The function
"M30" also resets programmable frames.

1.0 Training Documentation 1-9


1 | NC programming
NC Programming Standard

1.1.5 Program Jumps and Branches


In a program, (jump) labels can be set, to which the program jumps from
other places within the same program using the commands GOTOF, GOTOB,
GOTO or GOTOC. Processing continues with the instruction that immediately
follows the label. This permits the implementation of all branches within a
program.

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.

A jump instruction can be combined with a jump condition. The program


jump only occurs if the condition is met.
e.g.: IF R1<R2 GOTOF ZIEL_1

1-10 Training Documentation 1.0


NC programming | 1
NC Programming Standard

1.1.6 Program Part Repetition


To avoid having to reprogram recurring program parts every time, it is rec-
ommended to repeat such parts. This improves clarity, simplifies program
modifications, and decreases the error rate.

Program part repetitions without conditions:


N10 MARKE_ON1: Label start with colon
N20 G1 G91 X100
N30 MARKE_OFF1: Label end with colon
:
N300 REPEAT MARKE_ON1 MARKE_OFF1 P5 Repeat N10 to N30 5 times

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.

N10 PLANE_1: CYCLE800(……..) Branch destination with NC instructions


:
N50 REPEATB PLANE_1 Jump to the branch destination and process
the exact commands in the branch destina-
tion's line once

Program part repetitions with conditions:


N10 REPEAT Condition at the end of the loop. REPEAT
: starts the program part repetition. As long as
: the condition is not fulfilled, the loop is pro-
N70 UNTIL {Bedingung} cessed, at least once, since the query is made
at the end of the loop.

N10 WHILE{Bedingung} Condition at the start of the loop. WHILE


: starts the program part repetition. If the con-
: dition is fulfilled, the loop is processed.
N60 ENDWHILE

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.

1.0 Training Documentation 1-11


1 | NC programming
NC Programming Standard

1.1.7 Control Structures

„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%

„IF ELSE ENDIF“-Instructions:


IF <condition>

ELSE

ENDIF

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

More control instructions:


LOOP ==► ENDLOOP
REPEAT ==► UNTIL
WHILE ==► ENDWHILE
FOR ==► ENDFOR

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.

1-12 Training Documentation 1.0


NC programming | 1
NC Programming Standard

1.1.8 Subroutine technology


Generally, programs are not written as one continuous code, but divided with
useful means providing structure. Subroutines can be used for this purpose.
This allows reusing program parts and makes the NC code clearer.

Maximum possible nesting depth:


12 program levels, including the main program level

There are 2 kinds of subroutines:


• Self-contained subroutines without a value transfer
• Subroutines that receive a value from the calling program.

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

1.0 Training Documentation 1-13


1 | NC programming
NC Programming Standard

Subroutines with a value transfer


If a calling program transmits values to the subroutine, additional require-
ments apply.

In the calling program:


The subroutine, along with the variable types, must be indicated using the in-
struction "EXTERN".
Cycles are read during the start of the control system and do not need to be
declared with "EXTERN".
Example: EXTERN UP_BSP (REAL, BOOL)

In the called program:


In the header, variables of the same type as in the calling program, including
names, must be defined. The values are assigned to these variables when
they are called.
Example: PROC UP_BSP (REAL Y_POS, BOOL _SCHW)

Calling externally stored programs


They are called outside the NC using "EXTCALL" and indicating the drive and
path.
Example: EXTCALL "LOCAL_DRIVE:/TESTVERZEICHNIS/TEST.WPD/TEST1.SPF"

1-14 Training Documentation 1.0


NC programming | 1
NC Programming Standard

1.1.9 Circular programming


There are different ways to program a circle.
• Center of the circle and circle end point
• Circle radius and circle end point
• Aperture angle and circle end point or center
• Polar coordinates
• Intermediate point and end point
• With tangential transition and circle end point (modally active)
This example shows programming with a center of circle and circle end point
including smooth approach and retraction. The center of circle coordinates I,
J, K are given as increments to the circle start point by default. By indicating
I=AC (), J=AC (), K=AC () they can also be given with reference to the part
zero point.

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

1.1.10 Preprocessing Memory

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: Automatic Preprocessing stop


preprocessing memory control

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.

1.0 Training Documentation 1-15


1 | NC programming
NC programming, swiveling

1.2 NC programming, swiveling

1.2.1 General information

1.2.1.1 Definition of terms

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.

1-16 Training Documentation 1.0


NC programming | 1
NC programming, swiveling

1.2.1.2 Axis arrangement of the universal machining center

Coordinate
system acc. to
DIN

Linear axes Rotary axes Additional axes Tool loader axes


X A S YW
Y B ZM EL
Z Q ES
E

1.0 Training Documentation 1-17


1 | NC programming
NC programming, swiveling

1.2.2 5-Axis Transformation "TRAORI"

5-axis transformation "TRAORI" is a dynamic transformation.


After switching on the transformation, the position data (X, Y, Z) always refer
to the tool reference. Changes of the rotary axis position lead to compen-
satory motions of the remaining machine axes so that the position of the tool
reference in relation to the part remains identical. The coordinate system is
oriented with the part.

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.

1-18 Training Documentation 1.0


NC programming | 1
NC programming, swiveling

1.2.3 Swiveling with CYCLE800

1.2.3.1 General information

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.

1.0 Training Documentation 1-19


1 | NC programming
NC programming, swiveling

Recognition of CYCLE800 selection/deselection:


CYCLE800 deactivated CYCLE800 active in home position
(same effect as deactivated)

CYCLE800 active CYCLE800 active


(swiveled in plane) (swiveled in space)

1-20 Training Documentation 1.0


NC programming | 1
NC programming, swiveling

1.2.3.2 Operating Sequence for Programming with CYCLE 800


1. Open the program editor.

PROGRAM

2. Press the "Miscellaneous" softkey.

3. Press the "Swivel in plane" softkey.


ð The "Swivel in plane" screen (CYCLE800) is displayed.

1.0 Training Documentation 1-21


1 | NC programming
NC programming, swiveling

1.2.3.3 Explanation of Cycle Parameters

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)

In case of GROB universal machining centers, the manufacturer cycle


"G_BACK_TUNNEL" is usually programmed before the swivel command.
For more information refer to the chapter "Manufacturer cycles".

1-22 Training Documentation 1.0


NC programming | 1
NC programming, swiveling

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

The values calculated by the control


system are stored in user variables
"_TC_A1" and "_TC_A2", where
they can be viewed.

If a part is not swiveled with "CYCLE800", it must be done in the following NC


block. The advantage is simultaneous and therefore time-saving positioning
of the machine axes.

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

1.0 Training Documentation 1-23


1 | NC programming
NC programming, swiveling

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.

1-24 Training Documentation 1.0


NC programming | 1
NC programming, swiveling

Zero point translation prior to swiveling

X0 Zero offset in the X-axis before swiveling


Y0 Zero offset in the Y-axis before swiveling
Z0 Zero offset in the Z-axis before swiveling

1.0 Training Documentation 1-25


1 | NC programming
NC programming, swiveling

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.

1-26 Training Documentation 1.0


NC programming | 1
NC programming, swiveling

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)

Y Rotation around the Y-axis


X Rotation around the new X-axis
Z Rotation around the new Z-axis

1.0 Training Documentation 1-27


1 | NC programming
NC programming, swiveling

Zero point translation after swiveling

X1 Zero offset of the rotated coordinate system in the X direction


Y1 Zero offset of the rotated coordinate system in Y-direction
Z1 Zero offset of the rotated coordinate system in Z-direction

1-28 Training Documentation 1.0


NC programming | 1
NC programming, swiveling

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

Advantage of overhead machining:


The chips can fall into the chip duct
without hindrance.

1.0 Training Documentation 1-29


1 | NC programming
NC programming, swiveling

1.2.3.4 CYCLE800 Parameter List

CYCLE 800(_FR,_TC,_ST,_MODE,_X0,_Y0,_Z0,_A,_B,_C,_X1,_Y1,_Z1,_DIR, ,_DMODE)

Parameter Function Option


<_FR> Retraction mode (Z-axis) 0 = do not retract
1 = retract in Z
<_TC> Name of swivel data block "TC_GROB" = select swivel data set
"0" = deselect swivel data set
<_ST> Status of transformations 100000 = yes, new, direction –
110000 = no, new, direction –
100001 = yes, additive, direction -
110001 = no, additive, direction –
200000 = yes, new, direction +
220000 = no, new, direction +
200001 = yes, additive, direction +
220001 = no, additive, direction+
<_MODE> Angle sequence 27 = ZYX
(for swivel mode
30 = YZX
"axis by axis")
39 = ZXY
45 = XZY
54 = YXZ
57 = XYZ
<_X0> Reference point X before rotation
<_Y0> Reference point Y before rotation
<_Z0> Reference point Z before rotation
<_A> Rotation 1 according to setting in parame-
ter <_MODE>
<_B> Rotation 2 according to setting in parame-
ter <_MODE>
<_C> Rotation 3 according to setting in parame-
ter <_MODE>
<_X1> Reference point X after rotation
<_Y1> Reference point Y after rotation
<_Z1> Reference point Z after rotation
<_DIR> Movement of rotary axes -1 = overhead machining
0 = no swiveling, only calculate value
1 = vertical machining
<_DMODE> Display mode 0 = do not select a plane
1 = select plane G17
(only active in cycle)

1-30 Training Documentation 1.0


NC programming | 1
NC programming, swiveling

1.2.3.5 Advantage vis-a-vis conventional programming

• 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.

1.2.3.6 Programming order

1. Move the active zero point to the center of rotation.


2. Swivel the machining plane.
3. If necessary, push the zero point to the machining point.
4. Part machining
5. Clear the axes.
6. Reset "Swivel machining plane".

1.0 Training Documentation 1-31


1 | NC programming
NC programming, swiveling

1.2.3.7 Swiveling Practice

Solution:

1-32 Training Documentation 1.0


NC programming | 1
NC programming, swiveling

Solution:

1.0 Training Documentation 1-33


1 | NC programming
NC programming, swiveling

Solution:

1-34 Training Documentation 1.0


NC programming | 1
NC programming, swiveling

Solution:

1.0 Training Documentation 1-35


1 | NC programming
NC programming, swiveling

1.2.4 Program entry


The example program entry includes the following functions:
• Reset all programmable transformations
• Create rough part for simulation.
• Tool call for first machining
• Swivel command on first plane
• Rough-machining of the first surface with face milling cycle

Program header/program information

;=====Sample Program 1=====

;= CUSTOMER: Trainee
;= MACHINE: GX52-XXXX
;==============================================

Sample program header – Describe the program!!!

Reset all programmable transformations

G_RESET

Deselection of all programmable transformations, such as TRANS, ROT,


SCALE, MIRROR, TRAFOOF, CYCLE800

Note on manufacturer cycle "G_RESET":


___________________________________________________________
___________________________________________________________
___________________________________________________________
___________________________________________________________
___________________________________________________________
___________________________________________________________

Select zero point

$P_UIFR[1]=CTRANS(X,0,Y,180,Z,0,A,0,B,0):CROT(X,0,Y,0,Z,0)
G54

Describe and activate zero point G54.

1-36 Training Documentation 1.0


NC programming | 1
NC programming, swiveling

Program rough part definition


A rough part can be defined for the simulation.
1. Press "Miscellaneous" in the horizontal softkey bar

2. Press "Rough part" in the vertical softkey bar


ð The cycle screen "Rough part" is opened.

ZA
X0
X1

ZI

Y1

Y0

3. Enter the rough part dimensions into the cycle screen.


ð Enter the solution for programming example 1 into the empty fields.

4. Press the "Accept" softkey to complete the rough part definition.

WORKPIECE(,"B",,"BOX",112,-75,75,-80,-75,-68,75,2)

The cycle for the rough part definition is output.

Note on rough part definition:


___________________________________________________________
___________________________________________________________
___________________________________________________________

1.0 Training Documentation 1-37


1 | NC programming
NC programming, swiveling

Programming a tool change

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

Selection and preparation of the tool

M6

Change the selected tool into the spindle.

G54 G17 G64 G90 G94 D1 F750 S3000 M3

Tool technology line:

Note on manufacturer cycle "G_BACK_TUNNEL":


___________________________________________________________
___________________________________________________________
___________________________________________________________
___________________________________________________________
___________________________________________________________
___________________________________________________________

Swivel to the first machining plane A-90 degrees

G_BACK_TUNNEL

CYCLE800(0,"TC_GROB",200000,57,0,0,0,-90,0,0,0,0,0,1,100,1)

Program the swivel cycle as explained in chapter "Swiveling with CYCLE800".

Note on swiveling cycle "CYCLE800":


___________________________________________________________
___________________________________________________________
___________________________________________________________
___________________________________________________________
___________________________________________________________
___________________________________________________________

1-38 Training Documentation 1.0


NC programming | 1
NC programming, swiveling

Machining of the surface with face milling cycle "CYCLE61"


In the example, the control system's own face milling cycle is used.

1. Press "Milling" in the horizontal softkey bar.

2. Press "Rough part" in the vertical softkey bar.


ð The cycle screen "CYCLE61" is opened.

In the case of questions about cycle parameters, press the "HELP" key when
the cycle is open.

Notes on the face milling cycle:


___________________________________________________________
___________________________________________________________
___________________________________________________________
___________________________________________________________
___________________________________________________________
___________________________________________________________

G_BACK_TUNNEL

Retract to safe position after machining with the tool axis

etc.

1.0 Training Documentation 1-39


1 | NC programming
NC programming, swiveling

1-40 Training Documentation 1.0

You might also like