107
96-8000 Rev AC
May 2010
Programming
#2= ROUND[#1] ; (#2 is set to 3.0)
When round is used in an address expression, “Round” is rounded to the sig-
nificant precision. For metric and angle dimensions, three-place precision is the
default. For inch, four-place precision is the default.
#1= 1.00333 ;
G0 X[ #1 + #1 ] ;
(Table moves to 2.0067) ;
G0 X[ ROUND[ #1 ] + ROUND[ #1 ] ] ;
(Table moves to 2.0066) ;
G0 A[ #1 + #1 ] ;
(Axis moves to 2.007) ;
G0 A[ ROUND[ #1 ] + ROUND[ #1 ] ] ;
(Axis moves to 2.006) ;
D[1.67]
(Diameter 2 is made current) ;
Fix vs. Round
#1=3.54; #2=ROUND[#1]; #3=FIX[#1]. #2 will be set to 4. #3 will be set to 3.
Operators
Operators can be classified into three categories: Arithmetic, Logical and Bool
-
ean.
Arithmetic Operators
Arithmetic operators consist of unary and binary operators. They are:
+
- Unary plus
+1.23
-
- Unary minus
-[COS[30]]
+
- Binary addition
#1=#1+5
-
- Binary subtraction
#1=#1-1
*
- Multiplication
#1=#2*#3
/
- Division
#1=#2/4
MOD
- Remainder
#1=27 MOD 20 (#1 contains 7)
Logical Operators
Logical operators are operators that work on binary bit values. Macro variables
are floating point numbers. When logical operators are used on macro vari
-
ables, only the integer portion of the floating point number is used. The logical
operators are:
OR - logically OR two values together
XOR - Exclusively OR two values together
AND - Logically AND two values together
Examples:
#1=1.0; 0000 0001
#2=2.0; 0000 0010
#3=#1 OR #2; 0000 0011
Here the variable #3 will contain 3.0
after the OR operation.
#1=5.0;
#2=3.0;
Содержание 96-8000
Страница 15: ...6 96 8000 Rev AC May 2010 Mill Warning Decals ...
Страница 16: ...7 96 8000 Rev AC May 2010 Safety Lathe Warning Decals ...
Страница 41: ...32 96 8000 Rev AC May 2010 ...
Страница 93: ...84 96 8000 Rev AC May 2010 ...
Страница 129: ...120 96 8000 Rev AC May 2010 ...
Страница 133: ...124 96 8000 Rev AC May 2010 ...
Страница 268: ......
Страница 269: ......