Official GSK Agents in South Africa
Tel: +27 11 626 2720, [email protected]
GSK980TDi Turning CNC System User Manual
184
Ⅰ
Programming
Programming example:
1) State parameter read, write example
Program Explanation
#
101
=
10000000
;
Macro variable No. 101 is the setting value of the
state parameter No.2.
G10 L52
;
Set the parameter read or write method
N1 R#100
;
Read the state parameter No.1 to the macro
variable No.100.
N1 W00000010
;
Set the state parameter No.1 as 00000010.
N2 W#101
;
Set the state parameter No.2 as the value of the
macro variable No.101.
G11
;
Cacnel the read or write method of the parameter.
2) Data parameter read/write example
Program Explanation
#
101
=
50
;
Marco variable
#
101 is the setting value of the
data parameter No.31.
G10 L52
;
Set the parameter read or write method
N30 R#100
;
Read data parameter No.30 to the macro variable
#
100.
N30 W200
;
Set the data parameter No.30 as 200.
N31 W#101
;
Set the data parameter No. to the value of the
macro variable
#
101.
G11
;
Cacnel the read or write method of the parameter.
3) Axle type parameter read or write example
Program Explanation
#
103
=
00000101
;
Macro variable
#
103 is the setting value of the data parameter
No.188 along with the 1
st
axis (X axis).
#
104
=
100
;
Macro variable
#
104 is the setting value of the data parameter
No.23 along with the 5
th
axis (C axis).
#
105
=
6000
;
Macro variable
#
105 is the setting value of the data parameter
No.38 along with the 2
nd
axis (S2).
G10 L52
;
Set The read or write method of parameter.
N187 P1 R#100
;
Read the 1
st
axis parameter value of the axle-type state
parameter No, 187 to the macro variable
#
100.
N187 P5
W01100001
;
Set the axle type state parameter No.187 along with the 5
th
axis
is 01100001.
N188 P1 W#103
;
Set the 1
st
axis of the axle type state parameter No.188 to the
value of the macro variable
#
103
N22 P1 R#101
;
Read the 1
st
axis parameter value of the axle type data
parameter No.22 to the macro variable
#
101.
N22 P2 W8000
;
Set the 2
nd
axis parameter of the axle type data parameter