Chapter Three Programming
159
Part 1 Programming
3.10.4.1 the Define and Replacement of the Variable
#i=#j Define, replacement
3.10.4.2 The Add Operation
#i=#j + #k Summation
#i=#j - #k Subtraction
#i=#j OR #k Logical sum (Each digit of the 32 digits)
#i=#j XOR #K Exclusive OR (Each digit of the 32 digits)
3.10.4.3 Multiply Operation (The selection of the Macro B)
#i=#j * #k Product
#i=#j / #k Quotient
#i=# j AND #k Logical multiply (Each digit for the 32-digit)
3.10.4.4 Function (Macro program B)
#i=SIN[#j] Sine (Unit: Degree)
#i=COS[#j] Cosine (Unit: Degree)
#i=TAN[#j] Tangent (Unit: Degree)
#i=ATAN[#j]/ [#k] Arc tangent (Unit: Degree)
#i=SQRT[#j] Square root
#i=ABS[#j] Absolute
#i=BIN[#j] The conversion from the BCD to the BIN
#i=BCD[#j] The conversion from the BIN to the BCD
#i=ROUND[#j] Integer in terms of the Round off
#i=FIX[#j] Rounding the part after the decimal point
#i=FUR[#j] The part of the decimal point carry to the integer part
Note: How to use the ROUND function.
(1) If the function ROUND is used operation command or in the IF or WHILE conditional
express, the original data with the decimal point is round off.
For example: #1=ROUND[1.2345]
;
#1 changes into 1.0.
IF[#1 LE ROUND[#2]]GOTO 10
;
If #1 is less than the value of the #2 after round off, it may transfer to the N10 section to operate.
(2) When the function ROUND is used in the address command, the least input increment of the
address is round off.
For example: G01 X[ROUND[#1]
;
If #1 is 1.4567 and the least increment of the X is 0.001, this program is then changed into G01 X
1.457;
In this example, this command is same to the G01 X#1;.
Function ROUND in an address command is used for the following items:
For example: [The incremental move is performed only by the #1 and #2, and then return to the
start point].
N1 #1=1.2345
;
N2 #2=2.3456
;
N3 G01 X#1 F100
;
:
X moves 1.235
N4 X#2
;
:
X moves 2.346
N5 X-[#1+#2]
;
:
X moves -3.580
(
Because #1+#2=3.5801
)
The program can not be return to the start point by N5, because 1.235+2.346=3.581.
Using N5X-[ROUND[#1]+ROUND[#2]]
It equals to the N5X-1.235+2.346], and the program can be returned to the start.
Summary of Contents for GSK983Ma
Page 124: ......
Page 143: ......
Page 185: ......
Page 209: ...Chapter Four Operation 197 Part 2 Operation ...
Page 239: ...Chapter Four Operation 227 Part 2 Operation ...
Page 242: ......
Page 279: ......
Page 296: ...GSK983Ma Milling Machine Center CNC System User Manual 284 Part 2 Operation ...
Page 371: ...Appendix 11 USB Interface Parameter Transfer Operation ...