Official GSK Agents in South Africa
Tel: +27 11 626 2720, [email protected]
Chapter 3 G Commands
173
Ⅰ
Programming
17) Cosine: # I = # J•COS(# K) (Unit: ‰)
G65 H32 P#I Q#J R# k
(Example) G65 H32 P#1Q#102 R#103; (#101 =#102•COS(#103) )
18) Tangent: # I = # J•TAM(# K) (Unit: ‰)
G65 H33 P#I Q#J R# K
(Example) G65 H33 P#101 Q#102 R#103; (#101 = #102•TAM(#103) )
19) Cosine: # I = ATAN(# J /# K) (Unit: ‰)
G65 H34 P#I Q#J R# k
(Example) G65 H34 P#101 Q#102 R#103; (#101 =ATAN(#102/#103) )
Jump commands
1) Unconditional jump
G65 H80 Pn; n: Block number
(Example) G65 H80 P120; (jump to N120)
2) Conditional jump 1 #J.EQ.# K ( = )
G65 H81 Pn Q#J R# K; n: Block number
(Example) G65 H81 P1000 Q#101 R#102;
The program jumps N1000 when # 101= #102 and executes in order when #101
≠
#102.
3) Conditional jump 2 #J.NE.# K (
≠
)
G65 H82 Pn Q#J R# K; n: Block number
(Example) G65 H82 P1000 Q#101 R#102;
The program jumps N1000 when # 101
≠
#102 and executes in order when #101 = #102.
4) Conditional jump 3 #J.GT.# K (
>
)
G65 H83 Pn Q#J R# K; n: Block number
(Example) G65 H83 P1000 Q#101 R#102;
The program jumps N1000 when # 101
>
#202 and executes in order when #101
≤
#102.
5) Conditional jump 4 #J.LT.# K (
<
=
)
G65 H84 Pn Q#J R# K; n: Block number
(Example) G65 H84 P1000 Q#101 R#102;
The program jumps N1000 when # 101
<
#102 and executes in order when #101
≥
#102.
6) Conditional jump 5 #J.GE.# K (
≥
)
G65 H85 Pn Q#J R# K; n: Block number
(Example) G65 H85 P1000 Q#101 R#102;
The program jumps N1000 when # 101
≤
#1 and executes in order when #101
<
#102.
7) Conditional jump 6 #J.LE.# K (
≤
)
G65 H86 Pn Q#J R# K; n: Block number
(Example) G65 H86 P1000 Q#101 R#102;
8) P/S alarm
G65 H99 Pi; i: alarm 500
(Example) G65 H99 P15;
P/S alarm 515.
Note 1: The alarm content (/***) can be omitted. When this alarm content is omitted, only the alarm occurs, and
the alarm content is null.
Note 2: Block number can be specified by variables. Such as: G65 H81 P#100 Q#101 R#102;
The program jumps to block that its block number is specified by #100.