Chapter 2 G Commands
149
Ⅰ
Programming
#102=12
(
the binary is: 00001100
)
#103=#101 OR #102
(
or the operation result is : 00001110
)
The window display result of macro variable is #101=10.000000 #102=12.000000 #
103=14.000000
(
12
)
The function BIN converses the decimal into the binary which is displayed in decimal
system.
The function converses the binary number displayed in decimal system into 8421
format BCD. The system cannot display and alarms when some digit in BCD code
after conversion exceeds 9.
Example 1
:
#101=37
(
BCD 37 corresponds to the binary : 00110111
)
#102=BCD[#101]
Macro variable window display #102=55.000000
(2) Transfer and cycle codes
The transfer and the repetition codes can change the control flow, and there are three kind of
transfer and repetition operation: the unconditional transfer GOTO, the conditional transfer
IF…GOTO, IF…THEN and WHILE DO repetition.
Command format:
GOTO n;
Command function:
Skip to the line number n without condition;
Command format:
IF <Logical expression> THEN <expression>;
Command function:
When the logical expression is valid, the system executes one following THEN, otherwise, it
executes the next block.
Command format:
IF < Logical expression > GOTOn;
Command function:
When the logical expression is valid, the system skips the block with the line number n to
execute, otherwise, it executes the next block;
Command format:
WHILE < Logical expression > DOn;
…………
;
ENDn
Command function:
When the logical expression is valid, the system executes the block between Do and END,
otherwise, its execute the block following END. The numerical value n following DO and END
is used to specify the execute range label of the specified program, n value is 1, 2, 3. The
system alarms when n is not 1, 2, 3.
IF, WHILE logical operation character rules are as follows:
Operator substitute character definition
EQ
==
(
=
)
NE
<>
(
≠
)
Summary of Contents for GSK988TA
Page 6: ...GSK988TA GSK988TA1 GSK988TB Turning Center CNC System User Manual Programming Operation VI ...
Page 19: ...1 Ⅰ Programming PROGRAMMING ...
Page 227: ...209 Ⅱ Operation OPERATION ...
Page 369: ...Chater 10 Machining Example 351 Ⅱ Operation ...
Page 371: ...353 Appendix ...
Page 465: ...Appendix 1 Parameters 447 Appendix ...
Page 479: ...Appendix 3 Interface Explanation 461 Appendix ...
Page 527: ...Appendix 5 Installation Layout 509 Appendix ...