Flexible NC programming
1.1 Variables
<n>:
<expression>
:
Example
Assignments to R-parameters and use of R-parameters in mathematical functions:
Program code
R0=3.5678
R[1]=-37.3
R3=-7
$R4=-0.1EX-5
$R[6]=1.874EX8
R7=SIN(25.3)
R[R2]=R10
R[(R1+R2)*R3]=5
X=(R1+R2)
Z=SQRT(R1*R1+R2*R2)
See also
General information about variables General information about variables [Page 17]
22
Number of the R-parameter
Type:
INT
Range of
0 - MAX_INDEX
values:
Note
MAX_INDEX is calculated from the parameterized
number of R-parameters:
MAX_INDEX = (MD28050 $MN_MM_NUM_R_PARAM)
- 1
Array index
Any expression can be used as an array index, as long as the result of
the expression can be converted into the INT data type (INT, REAL,
BOOL, CHAR).
Comment
;
Assignment in preprocessing
;
Assignment in preprocessing
;
Assignment in preprocessing
;
Assignment in main run: R4 = -0.1 * 10^-5
;
Assignment in main run: R6 = 1.874 * 10^8
;
Assignment in preprocessing
;
Indirect addressing using R-parameter
;
Indirect addressing using math. expression
;
Traverse axis X to the position resulting from the
sum of R1 and R2
;
Traverse axis Z to the square root position (R1^2 +
R2^2)
Programming Manual, 02/2011, 6FC5398-2BP40-1BA0
Job planning