GSK980MDc Milling CNC System User Manual
150
I Programming
ii. When the result of the operation exceeds 3.65×10
47
( j is about 110), an overflow occurs and P/S
alarm is issued.
iii. A constant can be used instead of the # j variable.
7. ROUND function
When the ROUND function is included in an arithmetic or logic operation command, IF statement, or
WHILE statement, the ROUND function rounds off at the first decimal place.
Example:
When #1=ROUND[#2] is executed where #2=1.2345 the value of variable #1 is 1.0.
When the ROUND function is used in NC statement address, the ROUND function rounds off the
specified value according to the least input increment of the address.
8. Rounding up and down to an integer
With CNC, when the absolute value of the integer produced by an operation on a number is greater
than the absolute value of the original number, such an operation is referred to as rounding up to an integer.
Conversely, when the absolute value of the integer produced by an operation on a number is less than the
absolute value of the original number, such an operation is referred to as rounding down to an integer. Be
particular careful when handling negative numbers.
Example:
Suppose that #1=1.2, #2= -1.2
When #3=FUP[#1] is executed, 2.0 is assigned to #3.
When #3=FIX[#1] is executed, 1.0 is assigned to #3.
When #3=FUP[#2] is executed, -2.0 is assigned to #3.
When #3=FIX[#2] is executed, -1.0 is assigned to #3.
5.3.3 Priority of Operations
1. Function
2. Operation such as multiplication and division
(
*, /, AND
)
3. Operation such as addition and subtraction
(
+, -, OR, XOR
)
5.3.4 Bracket Nesting
Brackets are used to change the order of operations. Brackets can be used to multinesting.
Note that the square bracket [, ] is used to enclose an expression; the round bracket
(,)
is used in notes.
When the priority is not defined, it is advised to use square bracket to enclose.
5.4 Branch and Repetition
In a program, the flow of control can be changed using the GOTO statement and IF statement. Three types
of branch and repetition operations are used:
1. GOTO statement (unconditional branch)
2. IF statement (conditional branch: IF…THEN…)
3. WHILE statement (repetition WHILE…)
Summary of Contents for 980MDc
Page 19: ...GSK980MDc Milling CNC User Manual XVIII ...
Page 20: ...1 I Programming Programming Ⅰ ...
Page 21: ...GSK980MDc Milling CNC System User Manual 2 I Programming ...
Page 139: ...GSK980MDc Milling CNC System User Manual 120 I Programming ...
Page 191: ...GSK980MDc Milling CNC System User Manual 172 I Programming ...
Page 192: ...173 Ⅱ Operation Ⅱ Operation ...
Page 193: ...GSK980MDc Milling CNC System User Manual 174 Ⅱ Operation ...
Page 200: ...Chapter 1 Operation Mode and Display 181 Ⅱ Operation ...
Page 201: ...GSK980MDc Milling CNC System User Manual 182 Ⅱ Operation ...
Page 249: ...GSK980MDc Milling CNC System User Manual 230 Ⅱ Operation ...
Page 253: ...GSK980MDc Milling CNC System User Manual 234 Ⅱ Operation ...
Page 259: ...GSK980MDc Milling CNC System User Manual 240 Ⅱ Operation ...
Page 265: ...GSK980MDc Milling CNC System User Manual 246 Ⅱ Operation ...
Page 293: ...GSK980MDc Milling CNC System User Manual 274 Ⅱ Operation ...
Page 295: ...GSK980MDc Milling CNC System User Manual 276 Ⅱ Operation ...
Page 319: ...GSK980MDc Milling CNC System User Manual 300 Ⅱ Operation ...
Page 320: ...301 Ⅲ Installation Ⅲ Installation ...
Page 321: ...GSK980MDc Milling CNC System User Manual 302 Ⅲ Installation ...
Page 345: ...GSK980MDc Milling CNC System User Manual 326 Ⅲ Installation ...
Page 391: ...GSK980MDc Milling CNC System User Manual 372 Ⅲ Installation ...
Page 392: ...Appendix 373 Appendix Appendix ...
Page 393: ...GSK980MDc Milling CNC System User Manual 374 Appendix ...
Page 394: ...Appendix 375 Appendix Appendix 1 Outline Dimension of GSK980MDc L N ...