کدهای برنامه نویسی کنترل زیمنس

جدول کدهای برنامه نویسی :

( کپی از کاتالوگ کنترل ۸۰۲c ، فرز کاری )

Address Meaning Value Assignment Information Programming
D Tool offset
number
0 … ۹, integer values
only, without sign
Contains offset data for a
particular tool T…;
D0->offset values= 0, max. 9 D
numbers per tool
D…
F Feed
(in combination
with G4, the
dwell time is
also
programmed
under F)
0.001 … ۹۹ ۹۹۹٫۹۹۹ Tool/workpiece path traverse rate
in mm/min or mm/rev., depending
on G94 or G95
F…
G G function
(preparatory
function)
Only specific integer
values
The G functions are divided into G
groups. Only one G function of a
group can be programmed in any
one block.
A G function can be modal (until
canceled by another function of
the same group) or non-modal – it
is only active for the block in
which it is programmed.
G group:
G…
G0 Linear interpolation with rapid
traverse
G0 X… Y… Z…
G1 * Linear interpolation with feed G1 X… Y… Z… F…
G2 Circular interpolation with feed G2 X… Y.. I… J… F…
;Center and end point
G2 X… Y… CR=… F…
;Radius and end point
G2 AR=… I… J… F…
;Aperture angle and
center point
G2 AR=… X… Y… F…
;Aperture angle and end
point
G3 Circular interpolation in clockwise
direction
G3 ….
;otherwise as with G2
G5 Circular interpolation via Intermediate
point
G5 X… Y… Z… IX=…
JY=… KZ=… F…
G33 Thread cutting with constant pitch S… M…
;Spindle speed, direction
G33 Z… K…
;Tapping with compensating
chuck, e.g. in Z axis
G331 Thread interpolation N10 SPOS=… ;Spindle
in position control
N20 G331 Z… K… S…
;Tapping without compensating
chuck, e.g. in Z axis
;RH or LH thread is
defined by the sign of the
lead (e.g. K +): + :
as with M3
- : as with M4
G332 Thread interpolation – retraction
1: Motion commands
(interpolation type)
modally effective
G332 Z… K… ;Tapping
without compen-sating
chuck, e.g. in Z axis
Retraction movement
; Sign of lead as with G331

Address Meaning Value Assignment Information Programming
G4 Dwell time G4 F… ;separate block
or
G4 S…. ;separate block
G63 Tapping with compensating chuck G63 Z… F… S… M…
G74 Reference-point approach G74 X… Y… Z…
;separate block
G75 Fixed-point approach
2: Special movements, non-modal
G75 X… Y… Z…
;separate block
G158 Programmable offset G158 X… Y… Z…
;separate block
G258 Programmable rotation G258 RPL=… ; Rotation
in current plane G17 to
G19, separate block
G259 Additive programmable rotation G259 RPL=… ; add.
rotation in current
plane G17 to G19,
separate block
G25 Lower spindle speed limit G25 S… ;separate block
G26 Upper spindle speed limit
3: Write to memory non-modal
G26 S… ;separate block
G17 * X/Y plane
G18 Z/X plane
G19 Y/Z plane
6: Plane selection modal G17 …. ;vertical axis on
this plane is tool length
compensation axis
G40 * Tool radius compensation OFF
G41 Tool radius compensation left of contour
G42 Tool radius compensation right of contour
7: Tool radius compensation modal
G500 * Settable zero offset OFF
G54 1st settable zero offset
G55 2nd zero offset
G56 3rd zero offset
G57 4th zero offset
8: Settable zero offset modal
G53 Non-modal suppression of settable
zero offset
9: Suppression of settable zero
offset non-modal
G60 * Exact positioning
G64 Continuous path operation
10: Approach behavior modal
G9 Non-modal exact stop 11: Non-modal exact positioning
non-modal
G601 * Exact positioning window fine for G60,
G9
G602 Exact positioning window coarse G60,
G9
12: Exact positioning window
modal
See Section 8.3.12 “Exact
Stop/Continuous Path
Operation…”
G70 Dimensions in inches
G71 * Dimensions in metric values
13: Dimensions in inches/metric
values modal
G90 * Absolute dimensioning
G91 Incremental dimensioning
14: Absolute/incremental
dimensions modal
G94 * Feed F in mm/min
G95 Feed F in mm/rev. of spindle
15: Feed/spindle modal
G901 * Feed override for circle ON
G900 Feed override OFF
16: Feed override modal See Section 8.3.10 “Feed
F”
G450 * Transition circle
G451 Intersection
18: Behavior at corners with tool
radius compensation modal
The functions marked with an * are active from the beginning of the program (with the version of the control
system intended for milling unless otherwise programmed)

Address Meaning Value Assignment Information Programming
I Interpolation parameter ±۰٫۰۰۱ … ۹۹ ۹۹۹٫۹۹۹
Thread:
±۰٫۰۰۱ … ۲۰۰۰٫۰۰۰
For X axis, meaning depends on
whether G2,G3->circle center or
G33, G331, G332->thread pitch
has been programmed
see G2, G3,
G33, G331 and
G332
J Interpolation parameter ±۰٫۰۰۱ … ۹۹ ۹۹۹٫۹۹۹
Thread:
±۰٫۰۰۱ … ۲۰۰۰٫۰۰۰
For Y axis, otherwise as for I see G2, G3,
G33, G331 and
G332
K Interpolation parameter ±۰٫۰۰۱ … ۹۹ ۹۹۹٫۹۹۹
Thread:
±۰٫۰۰۱ … ۲۰۰۰٫۰۰۰
For Z axis, otherwise as for I see G2, G3,
G33, G331 and
G332
L Subroutine, name and
call
7 decimal places,
integers only, without
sign
Instead of a user-defined name
L1 … L9999999 can also be
selected;
this also calls the subroutine in its
own block
Note: L0001 is not the same as L1
L….
;separate block
M Miscellaneous function 0 … ۹۹
integers only, without
sign
E.g. to trigger actions,
such as “Coolant ON”,
max. 5 M functions in one block,
M…
M0 Programmed stop Machining is stopped at the end of
a block containing M0, operation is
continued with ”START”
M1 Optional stop As for M0, but operation only stops
if a special signal has been given
M2 End of program Programmed in the last block to be
executed
M30 – Reserved, do not use
M17 – Reserved, do not use
M3 Spindle clockwise rotation
M4 Spindle counterclockwise rotation
M5 Spindle stop
M6 Tool change Only if activated with M6 in
machine data, otherwise tool
change performed directly with T
command
M40 Automatic speed change
M41 to
M45
Speeds 1 to 5
M70 – Reserved, do not use
M… Remaining M functions This functionality is not predefined
in the control system and can
therefore be freely assigned by the
machine manufacturer.
N Block number – subblock 0 … ۹۹۹۹ ۹۹۹۹
integer only, without
sign
Can be used with a number to
identify blocks, programmed at the
beginning of a block
E.g.: N20
: Block number – main
block
0 … ۹۹۹۹ ۹۹۹۹
integer only, without
sign
Special identification of blocks -
used instead of N… , this block
should contain all the instructions
for a complete set of subsequent
machining operations
E.g.: 20
P Number of subroutine
passes
1 … ۹۹۹۹
integer only, without
sign
Programmed in the same block as
a subroutine to be called several
times, e.g. : N10 L871 P3 ; called
three times
E.g.: L781 P…
;separate block

Address Meaning Value Assignment Information Programming
R0
to
R249
Arithmetic parameters ± ۰٫۰۰۰۰۰۰۱ …
۹۹۹۹ ۹۹۹۹
(۸ decimal places) or
mit with exponent:
± (۱۰-۳۰۰ … ۱۰+۳۰۰ )
R0 to R99 – user assignable
R100 to R249 – transfer
parameters for the machining
cycles
Arithmetic functions In addition to the 4 basic arithmetic
operations + – * / the following
arithmetic functions are also
available:
SIN( ) Sine in degrees E.g.:
R1=SIN(17.35)
COS( ) Cosine in degrees E.g.:
R2=COS(R3)
TAN( ) Tangent in degrees E.g.:
R4=TAN(R5)
SQRT( ) Square root E.g.:
R6=SQRT(R7)
ABS( ) Absolute value E.g.:
R8=ABS(R9)
TRUNC( ) Integer fraction E.g.:
R10=TRUNC(
R11)
RET End of subroutine Used instead of M2 to maintain
continuous path mode
RET
;separa
te block
S Spindle speed
or dwelling with G4 0.001 … ۹۹ ۹۹۹٫۹۹۹
Spindle speed in rev/min,
with G4 dwell time in spindle
revolutions
S…
T Tool number 1 … ۳۲ ۰۰۰
integer only, without
sign
Tool change can be performed
directly with T command or not
until M6 is programmed. This can
be set in the machine data.
T…
X Axis ±.۰۰۱ … ۹۹ ۹۹۹٫۹۹۹ Position data X…
Y Axis ±۰٫۰۰۱ … ۹۹ ۹۹۹٫۹۹۹ Position data Y…
Z Axis ±۰٫۰۰۱ … ۹۹ ۹۹۹٫۹۹۹ Position data Z…
AR Aperture angle for
circular interpolation
0.00001 … ۳۵۹٫۹۹۹۹۹ To be specified in degrees, a
method of defining the circle with
G2/G3
see G2; G3
CHF Chamfer 0.001 … ۹۹ ۹۹۹٫۹۹۹ Insert a chamfer of the specific
length between two contour blocks
N10 X… Y….
CHF=…
N11 X… Y…
CR Radius for circular
interpolation
0.010 … ۹۹ ۹۹۹٫۹۹۹
Negative sign – for
circle selection: greater
than semi-circle
A method of defining a circle with
G2/G3
see G2; G3
GOTOB GOTO instruction
backwards
- Jumps to the block defined by the
label, the target of the jump is
located in the direction of the
beginning of the program.
E.g.: N20
GOTOB
MARKE1
GOTOF GOTO instruction
forwards
- Jumps to the block defined by the
label, the target of the jump is
located in the direction of the end
of the program.
E.g.: N20
GOTOF
MARKE2
IF Jump condition – If the jump condition is fulfilled, the
jump goes to the next instruction,
Comparators:
= = equal to, <>not equal to
> greater than, < less than
>= greater than or equal to

Address Meaning Value Assignment Information Programming
IX Intermediate point for
circular interpolation
±۰٫۰۰۱ … ۹۹ ۹۹۹٫۹۹۹ For the X axis, programmed for
circular interpolation with G5
see G5
JY Intermediate point for
circular interpolation
±۰٫۰۰۱ … ۹۹ ۹۹۹٫۹۹۹ For the Y axis, programmed for
circular interpolation with G5
see G5
KZ Intermediate point for
circular interpolation
±۰٫۰۰۱ … ۹۹ ۹۹۹٫۹۹۹ For the Z axis, programmed for
circular interpolation with G5
see G5
LCYC… Machining cycle call Specified values only Machining cycles have to be called
in a separate block, the transfer
parameters to be used must be
assigned values
Transfer parameters:
LCYC82 Drilling, spot-facing R101: Retraction plane (absolute)
R102: Safety clearance
R103: Reference plane (absolute)
R104: Final drilling depth (absolute)
R105: Dwell time in seconds
N10 R101=…
R102=… ..
..
N20 LCYC82
;separate block
LCYC83 Deep-hole drilling R101: Retraction plane (absolute)
R102: Safety clearance
R103: Reference plane (absolute))
R104: Final drilling depth (absolute)
R105: Dwell time at drilling depth
R107: Feed for drilling
R108: Feed for first drilling depth
R109: Dwell time at starting point
and with swarf removal
R110: First drilling depth (absolute)
R111: Degreesion amount
R127: Machining
type: Chip breaking=0
Swar removal=1
N10 R101=…
R102=… ..
..
N20 LCYC83
;separate block
LCYC840 Tapping with compensating chuck R101: Retraction plane (absolute)
R102: Safety clearance
R103: Reference plane (absolute)
R104: Final drilling depth (absolute)
R106: Thread lead value
R107: Direction of rotation of
spindle for tapping
Value: 3 for M3
4 for M4
N10 R101=…
R102=… ..
..
N20 LCYC840
;separate block
LCYC84 Tapping without compensating chuck R101: Retraction plane (absolute)
R102: Safety clearance
R103: Reference plane (absolute)
R104: Final drilling depth (absolute)
R105: Dwell time at thread base in
seconds
R106: Thread lead value
R112: Speed for tapping
R113: Speed for retraction
N10 R101=…
R102=… ..
..
N20 LCYC84
;separate block
LCYC85 Boring_1 R101: Retraction plane (absolute)
R102: Safety clearance
R103: Reference plane (absolute)
R104: Final drilling depth (absolute)
R105: Dwell time at drilling depth
in seconds
R107: Feed for drilling
R108: Feed on retract from drill hole
N10 R101=…
R102=… ..
..
N20 LCYC85
;separate block

Address Meaning Value Assignment Information Programming
LCYC60 Row of holes R115: Number of drilling/tapping
cycle
Value: 82, 83, 84, 840, 85
(corresponding to LCYC…)
R116: Abscissa reference point
R117: Ordinate reference point
R118: Distance of first hole from
reference point
R119: Number of holes
R120: Angle to position of row of
holes
R121: Distance between the holes
N10 R115=…
R116=… ..
..
N20 LCYC60
;separate block
LCYC61 Hole circle R115: Number of drilling/tapping
cycle
Value: 82, 83, 84, 840, 85
(corresponding to LCYC…)
R116: Center point abscissa of
hole circle (absolute)
R117: Center point ordinate of hole
circle (absolute)
R118: Radius of circle hole
R119: Number of holes
R120: Starting angle
(-180 R121: Indexing angle
N10 R115=…
R116=… ..
..
N20 LCYC61
;separate block
LCYC75 Cutting pockets, slots and circular pockets R101: Retraction plane (absolute)
R102: Safety clearance
R103: Reference plane (absolute)
R104: Pocket depth (absolute)
R116: Pocket center point abscissa
R117: Pocket center point ordinate
R118: Pocket length
R119: Pocket width
R120: Corner radius
R121: Max. infeed depth
R122: Feed for down infeed
R123: Feed for machining in the
plane
R124: Finishing allowance in the
plane
R125: Finishing allowance in the
depth
R126: Cutting direction
Value: 2 for G2
3 for G3
R127: Machining type
Value: 1 for roughing
2 for finishing
N10 R101=…
R102=… ..
..
N20 LCYC75
;separate block
RND Rounding 0.010 … ۹۹ ۹۹۹٫۹۹۹ Inserts a rounding with the radius
value specified tangentially
between two contour blocks
N10 X… Y….
RND=…
N11 X… Y…
RPL Rotary angle with
G258, G259
±۰٫۰۰۰۰۱ … ۳۵۹٫۹۹۹۹ Specified in degrees, angle for a
programmable rotation in the
current plane G17 to G19
see G258;
G259
SF Thread
commencement point
with G33
0.001 … ۳۵۹٫۹۹۹ Specified in degrees, the thread
commencement point with G33 is
offset by the specified amount (not
relevant for tapping)

Address Meaning Value Assignment Information Programming
SPOS Spindle position 0.0000 … ۳۵۹٫۹۹۹۹ Specified in degrees, the spindle
stops at the specified position
(spindle must be designed to do
this)
SPOS=….
STOPRE Preprocessing stop – Special function, the next block is
not decoded until the block prior to
STOPRE is completed
STOPRE
;separate block
$P_TOO
L
Active tool cutting edge read-only integer,
DO to D9
IF
$P_TOOL==7
GOTOF …
$P_TOO
LNO
Active tool number read-only integer,
TO – T32000
IF
$P_TOOLNO=
=46 GOTOF …
$P_TOO
LP
Tool number last
programmed
read-only integer,
TO – T32000
IF
$P_TOOLNP=
=11 GOTOF …