Download Print this page

Siemens Sinumerik 840D Operating Turning page 126

Hide thumbs Also See for Sinumerik 840D:

Advertisement

Section 4
Notes
B509
B509
Calculation variables R
Value assignment by means of calculation operations:
The use of calculation variables and their linkage in mathematical functions
provides many means in programming.
Since the control evaluates a certain number of blocks in advance, errors
can creep in when mathematical operations are carried out.
For this reason program the code "STOPRE" before the calculation of vari-
ables as shown in block N120. This command stops the advance evalua-
tion until all stored blocks have been completed.
N10 G18 G54 G64 LIMS=3500
N20
N30 R1=20 R2=50
N40
N50 STOPRE
N60
N70
N80 R10=R1+R2
N90 R11=SIN(45)
N100 R12=R1+2
N110 R13=R1
N120 R13=R13/10
N130
Note:
The editor extract shown here demonstrates only a small selection of the
possible calculation operations.
Refer to the manual of your control unit regarding the actually available
functions.
To preserve the clarity it is sensible to describe a variable only once.
For the use of the calculation functions the usual mathematical rules apply.
Values in parenthesis take priority in calculation.
Without a paranthesis, multiplication/division is always carried out before
the addition/substraction.
Page 10
; Value assignment
; Advance evaluation stop
; Calculation instruction
; R10 derives from R1+R2 (value 70)
; R11 results in the sin of 45° (value 0.707)
; R12 results in 22
; R13 takes on the value of R1
; The new R13 derives from the old
; R13 divided by 10 (value 2)
840D/828D SINUMERIK Operate

Advertisement

loading

This manual is also suitable for:

Sinumerik 828d