GSK980TDc Turning CNC System User Manual
148
Ⅰ
Progra
mming
Transfer to the block which serial number is n. The system alarms when others exceeds the
range from 1 to 99999, and it specifies the serial number with the statement.
Format:
GOTO n; n: serial number(1~99999)
Example:
GOTO 1;
GOTO #101;
2) Conditional control (IF statement )
GOTO format:
IF[ conditional statement]GOTO n;
When the specified conditional statement is valid, the system transfers to the block which serial
number is n; When the specified conditional statement is valid, the system executes the next block.
Example:
When the variable #1 is more than 10, the system transfers to the block which serial
number is N2.
N2 G00 X10.0;
THEN format:
IF[conditional expression]THEN<macro program statement >;
When the condition expression is valid, the system executes only one statement following THEN.
Example:
IF[#1 EQ #2] THEN #3=0;
When #1 value is equal to the #2, 0 is assigned to the variable #3; when they are not equal, the
system orderly executes the followings instead of the assignment statement after THEN.
Conditional expression: the conditional expression must include the conditional operator, two
sides of conditional operator can be variable, constant or expression, and it must be closed with the
brackets ‘[’ ‘]’.
Conditional operator: the system uses the conditional operators listed in the following table.
Conditional operator
Meaning
EQ or = =
Equal to (=)
NE or <>
Not equal to (
≠
)
GT or >
More than (>)
GE or >=
More than or equal to (
≥
)
LT or <
Less than (<)
LE or <=
Less than or equal to (
≤
)
Example: IF[3<>2]GOTO 2; its meaning: when 3 is not equal 2, the system skips to N2 block;
IF[#101>=7.22]THEN #101=SIN30; its meaning: when #101 is more than or equal to
7.22, the system executes the assignment after THEN. i.e. the sine value of 30 degree
is assigned to the variable #101.
Typical program: the following program counts the sum of the integer 1~10.
Program
IF [#1GT10] GOTO2;
If the condition
is not met.
If the condition
is met.
Содержание GSK980TDc
Страница 17: ...I Programming ...
Страница 18: ...GSK980TDc Turning CNC System User Manual ...
Страница 190: ...GSK980TDc Turning CNC System User Manual 172 Ⅰ Programming ...
Страница 191: ...Ⅱ Operation Ⅱ Operation ...
Страница 192: ...GSK980TDc Turning CNC System User Manua Ⅱ Operation ...
Страница 217: ...Chapter 1 Operation Mode and Display Interface 197 Ⅱ Operation 2 Data parameter page 3 Common used parameter page ...
Страница 326: ...GSK980TDc Turning CNC System User Manual 306 Ⅱ Operation ...
Страница 327: ...Ⅲ Connection Ⅲ Connection ...
Страница 328: ...GSK980TDc Turning CNC System User Manual Ⅲ Connection ...
Страница 470: ...GSK980TDc Turning CNC System User Manual 448 Ⅲ Connection ...