Programming principles
1.1 Fundamentals of programming
Turning Part 2: Programming (Siemens instructions)
22 Programming and Operating Manual, 05/2012, 6FC5398-5DP10-0BA0
Address Significance Value assignments Information Programming
IF Jump condition - If the jump condition is fulfilled,
the GoTo operation to the block
with the following
label is
performed;
, otherwise, the next
instruction/block will follow.In
one block,
several IF instructions are
possible.
Relational operators:
= = equal, <> not equal
> greater than, < less than
>= greater than or equal to
<= less than or equal to
N10 IF R1>5 GOTOF
LABEL3
...
N80 LABEL3: ...
LIMS Upper limit speed
of the spindle with
G96, G97
0.001 ... 99 999.999 Limits the spindle speed with the
G96 function enabled - constant
cutting rate and G97
See G96
MEAS Measurement with
deletion of
distance-to-go
+1
-1
=+1: Measuring input 1, rising
edge
=-1: Measuring input1, falling
edge
N10 MEAS=-1 G1 X...
Z... F...
MEAW Measurement
without deletion of
distance-to-go
+1
-1
=+1: Measuring input 1, rising
edge
=-1: Measuring input1, falling
edge
N10 MEAW=1 G1 X... Z...
F...
$A_DBB[n]
$A_DBW[n]
$A_DBD[n]
$A_DBR[n]
Data byte
Data word
Data double-word
Real data
Reading and writing PLC
variables
N10 $A_DBR[5]=16.3 ;
Write Real variables
; with offset position 5
; (position, type and
meaning are agreed
between NC and PLC
)
$AA_MM[
axis
]
Measurement
result for an axis in
the machine
coordinate system
-
Axis
: Identifier of an axis (X, Z)
traversing when measuring
N10 R1=$AA_MM[X]
$AA_MW[
axis
]
Measurement
result for an axis in
the workpiece
coordinate system
-
Axis
: Identifier of an axis (X, Z)
traversing when measuring
N10 R2=$AA_MW[X]
$AC_MEA[1] Measuring task
status
- Default condition:
0: Default condition, probe did
not switch
1: Probe switched
N10 IF $AC_MEAS[1]==1
GOTOF .... ; Continue
program when probe has
switched ...