Mitsubishi Electronics Q173HCPU/Q172HCPU Work Light User Manual


 
6 - 136
6 MOTION PROGRAMS FOR POSITIONING CONTROL
6.16.4 Four fundamental operators, assignment operator (+, -, *, /, MOD, =)
Code +, -, *, /, MOD, =
Function
Four fundamental operators,
assignment operator
Addition (+), subtraction (-), multiplication (*), division (/),
remainder (MOD) and assignment (=) are executed.
Format
Numerical value or variable
nOperator1
Operator (+, -, *, /, MOD,=)
Numerical value or variable
n2 ;
[Explanation]
(1) Calculation of the specified operator is performed.
(2) The priority of operations is in order of function, multiplication type operation and
addition type operation.
#@100 = #@110 + #@120 * SIN [#@130] ;
1) Function
2) Multiplication type operation
3) Addition type operation
(3) The area of operation where you want to give priority can be enclosed in [ ].
[ ] can be five levels deep including [ ] of a function. An operational expression
may be described in up to 72 characters. (Up to the maximum number of
characters in one block)
#@100 = SQRT [ [ [#@110 - #@120] * SIN [#@130] + #@140] * #@150] ;
First level
Second level
Third
level
(4) For +, -, * and /, the operation result type is used for operation. Operation data 1, 2
are converted into the operation result type. The operation result can be the 16-,
32- or 64-bit type.
Operation result = operation data 1 operator operation data 2
Operation result
is stored
Operation is performed after conversion of operation data
1, 2 into operation result type.