EasyManua.ls Logo

Siemens SINUMERIK 840D - Page 126

Siemens SINUMERIK 840D
713 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
B509
B509 Page 10 840D/828D SINUMERIK Operate
Notes
Section 4
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 codeSTOPRE 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.
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.
N10 G18 G54 G64 LIMS=3500
N20 ; Value assignment
N30 R1=20 R2=50
N40
N50 STOPRE ; Advance evaluation stop
N60 ; Calculation instruction
N70
N80 R10=R1+R2 ; R10 derives from R1+R2 (value 70)
N90 R11=SIN(45) ; R11 results in the sin of 45° (value 0.707)
N100 R12=R1+2 ; R12 results in 22
N110 R13=R1 ; R13 takes on the value of R1
N120 R13=R13/10 ; The new R13 derives from the old
N130 ; R13 divided by 10 (value 2)

Other manuals for Siemens SINUMERIK 840D

Related product manuals