GSK988T Turning CNC System User Manual
126
Ⅰ
Programming
2.22 Macro Command
GSK988T provides the macro command which is similar to the high language, and can
realize the variable assignment, and subtract operation, logic decision and conditional jump by
user macro command, contributed to compiling part program for special workpiece, reduce the
fussy counting and simplify the user program.
2.22.1 Variable
(
1
)
variable use
The variable can specify the address value in the program. The variable value is assigned by
the program command or is set directly by the keyboard. One program can use many variables
which can be distinguished by their variable number.
z
Variable expression
Use “#”+variable number to express;
Format
:
#
i
(
i=200
,
202
,
203
,
……
);
Example
:
#205
,
#209
,
#225.
Besides, the expression can be used to specify the variable number. At the moment, the
expression must be in the brackets.
Example
:
#[#20+#30/4]
z
Variable reference
1. Use variable to permute the number following address
Format:
﹤
address
﹥
+“# i” or
﹤
address
﹥
+“
-
# i” means to take the variable value or the
negative value of value of the variable as the address value
Example: F#203…#203=15: it is the same those of F15 functions;
Z-#210…#210=250: it is the same those of Z-250 functions;
G#230…#230=3: it is the same those of G3 functions.
When the variable value is used in program, the decimal point can be omitted. Example:
#1=123: the actual value of #1 is 123.000.
When the variable value followed the axis command address has the decimal point, the data
less than the least setting unit executes the rounding. For example: #1=1.23456; the axis least
setting unit is 0.001, the tool to execute G00 X#1 positions to 1.235 position.
2. Use variable to permute variable number.
Format: “#”+[variable number]
Example: 5 uses #30 to execute the permutation in #5, is written to #[#30].
3. Refer the undefined variable.
When the variable is not defined, it becomes the “Null” variable. When the variable #0 is Null,
it is only read instead of being written.
When the system refers to the undefined variable, it ignores the variable and the word.
Example: when the variable #10 value is 0, the variable #!1 value is Null and the system
executes G00 X#10 Y#11, the execution result is G00 X0
,
Y#11 to be ignored.
Beside using the Null to assign, the variable value is 0 in other conditions.
When #2=< Null >
时,
#1=#2,
#1=<Null>
;
#1=#2·3, #1=0;
#1=#2+#2, #1=0;
<Null> in conditional expression is different with 0.
Summary of Contents for 988T
Page 6: ...GSK988T Turning CNC System User Manual VI ...
Page 14: ...GSK988T Turning CNC System User Manual XIV ...
Page 15: ...Chapter 1 Programming Fundamentals 1 Ⅰ Programming Ⅰ PROGRAMMING ...
Page 16: ...GSK988T Turning CNC System User Manual 2 Ⅰ Programming ...
Page 194: ...GSK988T Turning CNC System User Manual 180 Ⅰ Programming ...
Page 195: ...Chapter Ⅰ Overview 181 Ⅱ Operation Ⅱ OPERATION ...
Page 196: ...GSK988T Turning CNC System User Manual 182 Ⅱ Operation ...
Page 217: ...Chapter Ⅲ Windows 203 Ⅱ Operation ...
Page 267: ...Chapter Ⅲ Windows 253 Ⅱ Operation Fig 3 51 Fig 3 52 ...