You are on page 1of 147

FATEK PLC

6--------------------------------------------------------------------------
7--------------------------------------------------------------------------
8-------------------------------------------------------------------------SET
8---------------------------------------------------------------------RESET
8---------------------------------------------------------0&1.MC & MCE
9-------------------------------------2&3. SKIP START & SKIP END
9--------------------------------------------------4.DIFFERENTIAL UP
9---------------------------------------------5.DIFFERENTIAL DOWN
10--------------------------------------------------------------6.BIT SHIFT
11-----------------------------------------------7.UP/DOWN COUNTER
13-------------------------------------------------------------------8.MOVE
14-----------------------------------------------------9. MOVE INVERSE
14--------------------------------------------------10.TOGGLE SWITCH
15-----------------------------------------------------------11.ADDITION
15-----------------------------------------------------12.SUBTRACTION
16-------------------------------------------------13.MULTIPLICATION
16----------------------------------------------------------------14.Division
17---------------------------------------------------------15.INCREMENT
18-------------------------------------------------------16 .DECREMENT
19-----------------------------------------------------------17.COMPARE
20------------------------------------------------------18.LOGICAL AND
21--------------------------------------------------------19.LOGICAL OR
22--------------------------------------20.BIN TO BCD CONVERSION
23--------------------------------------21.BCD TO BIN CONVERSION

24-----------------------------------------------------------------22.BREAK
24-----------------------------------------------------23.48-BIT DIVISON
25--------------------------------------------------------------------24.SUM
26------------------------------------------------------------------25.MEAN
27------------------------------------------------------26.SQUARE ROOT
28-----------------------------------------------------------27.NEGATION
28-----------------------------------------------------------28.ABSOLUTE
29--------------------------------------------------29.SIGN EXTENSION
29-----------------------------------------------------------------31.CRC16
30----------------------------------------------------------------32.ADCNV
31--------------------------------------------35.EXCLUSIVE OR (XOR)
32----------------------------------------36.EXCLUSIVE NOR (XNOR)
33---------------------------------------------------37.ZONE COMPARE
34-------------------------------------------------------------40.BIT READ
35-----------------------------------------------------------41.BIR WRITE
36------------------------------------------------------------42.BIT MOVE
37------------------------------------------------------43.NIBBLE MOVE
38---------------------------------------------------------44.BYTE MOVE
39----------------------------------------------------------45.EXCHANGE
40----------------------------------------------------------46.BYTE SWAP
41------------------------------------------------------47.NIBBLE UNITE
42----------------------------------------------48.NIBBLE DISTRIBUTE
43----------------------------------------------------------49.BITE UNITE
44-------------------------------------------------50.BYTE DISTRIBUTE
45-----------------------------------------------------------51.SHIFT LEFT
46---------------------------------------------------------52.SHIFT RIGHT
47-------------------------------------------------------53.ROTATE LEFT
48------------------------------------------------------54.ROTATE RIGHT
49--------------------------------------------------55.BINARY TO GRAY
2

49--------------------------------------------------56. GRAY TO BINARY


50----------------------------------------------------------------57.DECODE
51----------------------------------------------------------------58.ENCODE
52---------------------------------------59.7-SEGMENT CONVERSION
54------------------------------------------------60.ASCII CONVERSION
55------------------------------61.H:M:S to SECONDS CONVERSION
56----------------------------------------------------62.SECOND to H:M:S
57----------------------------------------------------------63.ASCII to HEX
57-----------------------------------------------------------64.HEX toASCII
58----------------------------------------------------------PROGRAM END
58------------------------------------------------------------------65.LABLE
59--------------------------------------------------------------------66.JUMP
59--------------------------------------------------------------------67.CALL
60----------------------------------------------------------------------68.RTS
60-----------------------------------------------------------------------69.RTI
61----------------------------------------------------------------------70.FOR
62-------------------------------------------------------------71.LOOP END
62-------------------------------------------------------74.IMMIDIATE I/O
63----------------------------------------------76.DECIMAL-KEY INPUT
64-----------------------------------------------------77.HEX-KEY INPUT
65------------------------------------------78.DIGITAL SWITCH INPUT
66------------------------------------79.7-SEG OUTPUT WITH LATCH
67--------------------------------------------------80.MULTIPLEX INPUT
68------------------------------------------------------81.PULSE OUTPUT
70-----------------------------------82.PULSE WIDTH MODULATION
71-------------------------------------------------83.SPEED DETECTION
73---------------------------------------------------84.16/7-SEG DISPLAY
75---------------------------------------87.88.89.CUMULATIVE TIMER
77------------------------------------------------90.WATCH DOG TIMER
3

77------------------------------------------------------------91.RESET WDT
78-------------------------------------------------------------------92.HSCTR
79------------------------------------------------------------------93.HSCTW
80-----------------------------------------------------------94.ASCII WRITE
81---------------------------------------------------------------------95.RAMP
83---------------------------------------------------------------------
84------------------------------------100.REGISTER TO TABLE MOVE
86------------------------------------101.TABLE TO REGISTER MOVE
87-----------------------------------------102.TABLE TO TABLE MOVE
88---------------------------------------------103.BLOCK TABLE MOVE
89----------------------------------------------104.BLOCK TABLE SWAP
90---------------------------------105.REGISTER TO TABLE SEARCH
92-----------------------------------106.TABLE TO TABLE COMPARE
93-----------------------------------------------------------107.TABLE FILL
94---------------------------------------------------------108.TABLE SHIFT
96-----------------------------------------------------109.TABLE ROTATE
97------------------------------------------------------------------110.QUENE
99------------------------------------------------------------------111.STACK
100-------------------------------------------------------------------112.DRUM
102------------------------------------------------------113.DATA SORTING
103----------------------------------------------------------114.ZONE WRITE
104--------------------------------------------------------------------
105---------------------------------------------------------120.MATRIX AND
106------------------------------------------------------------121.MATRIX OR
107---------------------------------------------------------122.MATRIX XOR
108-------------------------------------------------------123.MATRIX XNOR
109---------------------------------------------------124.MATRIX INVERSE
110-------------------------------------------------125.MATRIX COMPARE
112--------------------------------------------------126.MATRIX BIT READ
4

114-------------------------------------------------127.MATRIX BIT WRITE


115--------------------------------------------------128.MATRIX BIT SHIFT
117-----------------------------------------------129.MATRIX BIT ROTATE
119------------------------------------130.MATRIX BIT STATUS COUNT
120------------------------------------------------------------------139.HSPWM
121-----------------------------------------------142.STOP PULSE OUTPUT
121-------------------------------------------------------------------143.PSCNV
122-------------------------------------------145.ENABLE OF INTERRUPT
123-------------------------------------------146.DISABLE OF INTERRUPT
124-------------------147.MULTI-AXIS HIGH SPEED PULSE OUTPUT
133------------------------------------160.READ/WRITE FILE REGISTER
134-----------------------------------200.CONVERSION of INT to FLOAT
135--------------------------------------------------201. FLOAT to INTEGER
136-----------------------202. FLOATING POINT NUMBER ADDITION
137----------------203. FLOATING POINT NUMBER SUBTRACTION
138------------204. FLOATING POINT NUMBER MULTIPLICATION
139------------------------205. FLOATING POINT NUMBER DIVISION
140-----------------------206. FLOATING POINT NUMBER COMPARE
141--------------207. FLOATING POINT NUMBER ZONE COMPARE
142--------------- 208. FLOATING POINT NUMBER SQUARE ROOT
143----------------------------------------------------209.SIN INSTRUCTION
144---------------------------------------------------210.COS INSTRUCTION
145--------------------------------------------------211.TAN INSTRUCTION
146------------------------------------------212.CHANGE SIGN OF FLOAT
147---------------------------------------------------213.FLOAT ABSOLUTE

TIMER

Tn: Timer Number


PV: Preset value of the timer
TB:Time Base
TUP :Time Up
CV:Current Value

256 (T0~T255).
) (TB 0.01s,0.1s,1s
TB :
T0~T49 : 0.01s
T50~T199 : 0.1s
T200~T255 : 1s
:
=TBPV
" "EN ) 1( CV 0
PV M1957=0 CV
(32767s)PV M1957=1 CV PV
.
PV .

COUNTER

CN:Counter Number
CLR:Clear Control
CK:Clock
CUP:Count UP
200 16 ) (C0~C199
56 32 )(C200~C255
C200~C239 C0~C130
PLC CV PLC .
CV reset PLC 0). (
20Hz
.
CLR )CUP (CK CLR
0 .

SET

:D
" "EN 1 .

RESET

" "EN 0 .

0&1.MC & MCE


MC:Master Control Loop Start
MCE:Master control Loop End

128 MC )( N=0~127
MC MCE )(N
MCE MC .
" "EN MC .
0 MC
.
MCE MC.

2&3. SKIP START & SKIP END

128 SKP )(N=0~127


SKP SKPE SKPE SKP .
0 EN SKP .

4.DIFFERENTIAL UP

TG Scan Time
.

DOWN

5.DIFFERENTIAL

TG Scan Time
.

6.BIT SHIFT

1 .
CLR 0. "L/R"=0 "L/R"=1.
" "INB 0 1.
:

10

7.UP/DOWN COUNTER

.
CLR 0 "U/D"=1 CV CK
"U/D"=0 .

11

12

8.MOVE

" "EN S D .
:

13

9. MOVE INVERSE

" "EN S )0 1 1 0 (
D .
:

10.TOGGLE SWITCH

" 0 "EN 1 D 1 0 .

14

11.ADDITION

" "EN Sa Sb D .
Sa+Sb=D

12.SUBTRACTION

" "EN Sa Sb D .
Sa-Sb=D

15

13.MULTIPLICATION

" "EN Sa Sb D
.
SaSb=D

14.Division

" "EN Sa Sb D
.
Sb Error .

16

15.INCREMENT

" "EN 0 1 +1 D .
) (range D "OVF"
D .
:

17

16.DECREMENT

" "EN 0 1 1 D -1). (


) (range D "UDF"
D .

18

17.COMPARE

" "EN 0 1 Sa Sb .
" "a=b
Sa>Sb " "a>b
Sa<Sb " "a<b .
:

> < ,, > < =


.

19

18.LOGICAL AND

" "EN 0 1 Sa Sb AND


D .
:

20

19.LOGICAL OR

" "EN 0 1 Sa Sb OR
D .
:

21

20.BIN TO BCD CONVERSION

" "EN 0 1 S
BCD D .
S BCD Range "ERR" D
.
:

22

21.BCD TO BIN CONVERSION

. BIN TO BCD
:

23

22.BREAK

FOR-NEXT . FOR-NEXT
N BREAK
.

23.48-BIT DIVISON

" "EN 0 1 48 Sa 48
Sb D .
" "D=0 .
Sb " "ERR .
:

24

24.SUM

.
S N
N D .
:

25

25.MEAN

.
S .N
" "EN 0 1
D .
N 2 256 "ERR" .
:

26

26.SQUARE ROOT

S D
.
S "ERR" .
:

27

27.NEGATION

" "EN 0 1 D
.
:

28.ABSOLUTE

D D .
:

28

29.SIGN EXTENSION

D 16 " "EN 32
). D+1 (
:

31.CRC16

" "EN 0 1 .
S N
D D+1 .
0
" "ERR .

29

32.ADCNV

) (0~20mA
PLC .
" 0 "F/T ) 0~4095 (12-bit .
" 1 "F/T ) 0~16383 (14-bit .
"EN"=1 S N D .
:

30

)35.EXCLUSIVE OR (XOR

" "EN 0 1 Sa Sb XOR


D .
Sa Sb
0 D 1 0 1 D .
D "D=0" .

31

)36.EXCLUSIVE NOR (XNOR


Sa Sb 1 D
Sa Sb 0 D .

32

37.ZONE COMPARE

" "EN 0 1 S SU SL .
"INZ"
SU "S>U"
SL "S<L" .
SU < SL ERROR .
:

33

40.BIT READ

S .
" "EN 0 1 :
N S " "OBT .
16 S =< N:0~15
32 S =< N:0~31
error .
:

34

41.BIR WRITE

" "EN 0 1 :
" "INB N D .
16 D =< N:0~15
32 D =< N:0~31
error .
:

B3 .

35

42.BIT MOVE

" "EN 0 1 :
Ns S
Nd D .
Ns Nd S D error .
:

36

43.NIBBLE MOVE

" "EN 0 1 :
Ns ) (Nibble=4bits S
Nd D .
:

37

44.BYTE MOVE

" "EN 0 1 :
Ns S
Nd D .
Ns Nd S D error .
:

38

45.EXCHANGE

" "EN 0 1 :
Da Db .
:

39

46.BYTE SWAP

D 16 " "EN
.

40

47.NIBBLE UNITE

S 16 .
N D .
N D 0 .
N 1~4 error .
:

41

48.NIBBLE DISTRIBUTE

S 16 N
D+1D ... .
D+1D ...
0 .
N:1~4 error .
:

42

49.BITE UNITE

S .
N S
...D+1D .
:

43

50.BYTE DISTRIBUTE

S .
) N( ...D+1D
.
:

44

51.SHIFT LEFT

D .
N .
" "INB
N " "OTB .
16 =< N:1~16
32 =< N:1~32
error .
:

45

52.SHIFT RIGHT

D .
N .
" "INB
N " "OTB .
16 =< N:1~16
32 =< N:1~32
error .
:

46

53.ROTATE LEFT



" "OTB .
16 =< N:1~16
32 =< N:1~32
error .
:

47

54.ROTATE RIGHT



" "OTB .
16 =< N:1~16
32 =< N:1~32
error .
:

48

55.BINARY TO GRAY

" "EN 0 1 :
S D
.

56. GRAY TO BINARY

" "EN 0 1 :
S D
.

49

57.DECODE

S ...D+1D
.
2NL : D

Ns ) (S NL
. ) (9 9) (B9
) ( D .
S 16 Ns NL
error .
:

50

58.ENCODE

S
. D
)(Ns+1 S NL .
"H/L"=1
"H/L"=0 .
:

51

59.7-SEGMENT CONVERSION

S 16 ) 4(
8 ) (7-seg D
.
7-seg :

B6 1 D a 7-seg
B5 1 D b 7-seg ...
7-seg N+1.
0~3 N error .
(FB-7SG) FATEK 7-seg
7-seg 59 84 .

52

7-seg

53

60.ASCII CONVERSION

" "EN 0 1 :
ASCII S ASCII
D .
S 6 16 ). 2ASCII
(.
ASCII
.
:

54

61.H:M:S to SECONDS CONVERSION

" "EN 0 1 :
S~S+2
D .
0 "D=0" .
S S+1 S+2 .
:

55

62.SECOND to H:M:S

" "EN 0 1 :

.
D D+1 D+2
.
0 S "D=0" .
-117968399~117964799 S
" (OVER RANGE) "OVF .
:

56

63.ASCII to HEX

" "EN 0 1 :
N ASCII S D
.
ASCII ) 0~9 ( A~F
CPU
S ASCII ) 0~9 ( A~F
" "ERR .

64.HEX toASCII

" "EN 0 1 :
N S ASCII
...D+1D .
PLC ASCII
.

57

PROGRAM END

" "EN 0 1 :
.
END . "EN"=0
.
END CPU
.

65.LABLE


.
INTERRUPT CALLJUMP
. .
S 1 6
.
INTERRUPT .
LABLE .

58

66.JUMP

" "EN 0 1 :

.
.

.

67.CALL

" "EN 0 1 :
PLC CALL LABLE
RTS
CALL CALL
.
: (Return From Subroutine)RTS
error CPU .
CALL
5 .

59

68.RTS

PLC
CALL
CALL .

69.RTI

RTS RTS
RTI INTERRUPT .
CALL LABLE
INTERRUPT CPU
INTERRUPT.

.
RTI .

60

70.FOR

NEXT FOR
NEXT N . FOR NEXT
FOR NEXT .
:

61

71.LOOP END

FOR . FOR
.

74.IMMIDIATE I/O

update .
" "EN 0 1 :
N refresh .
.

62

76.DECIMAL-KEY INPUT

0~9
IN~IN+9 . 4 8
D .
16 D 4 32
8 .
"EN"=1.
" "KPR
1 .
KL
1 1
1 KL .
D
.

63

77.HEX-KEY INPUT

0~9 6
) (A~F .
4 PLC 4
PLC
.

0~9 " "NKP


1 A~F " "FKP
1 .
WR
.

64

78.DIGITAL SWITCH INPUT

"EN" =1 4 BCD
D .
.

4 "Dn"=1 .
(0~9)BCD "ERR" .
PLC .
WR
.

65

79.7-SEG OUTPUT WITH LATCH

4 "EN" =1 S
7-SEG 4. S+1 7-SEG .

PLC FACON NPN PNP .

66

80.MULTIPLEX INPUT

8N 8
N PLC .
8 IN N OT .
N 1 .
OT0 OT1 ....
) N( 8N D
" "DN . .

67

81.PULSE OUTPUT

: MD=0
" "EN 0 1 " "OUT
" "DN HO . " "PAU . "PAU"=1
. "PAU"=0 Fr
UY DY .
:U/D=1 UY .
:U/D=0 DY .
HO
PC. "DN"=1 .
"OUT"=1 0 .
"EN"=1 0
"OUT"=0 . " "EN
0 1 .

" "PAU .

68

) (FR
) (PC . Fr PC
. )" ("U/D ).
" "EN 0 1 (
.

.
UY DY . " "U/D .
: MD=1
" "DIR CK .
) UY(CK ) DY(DR
PLC .
PC 16 0~32767:
PC 32 0~2147483647 :
PC=0 "DN"=0 .
8~2000 :FR
PC Fr " "ERR
.

69

82.PULSE WIDTH MODULATION

"EN"=1 OT To ON
Tp OT. PLC .
0 To OFF .
To Tp ON
.

"ERR" To>Tp .
.

70

83.SPEED DETECTION

) (
rpm 8
(X0~X7)PLC ) (TI
S .


5KHz (Watch Dog Timer)WDT
]. [90
D 16 )(D0~D2
D0 .
D1 .
D2 .
"EN"=1 S D1
. ) (D2
D2 ) (TI.
D0 .
"EN"=0 .

71

D0 16 32767
D0
32767 "OVF"=1 .
n
:

n=60:

72

84.16/7-SEG DISPLAY

FBs-7SG1 FBs-7SG2
16-seg 17-seg .
S .
Ns pointer .
NL .
D .
) (8-bits ) (S 16
.
"ON"=0 "OFF"=0 "EN"=1 Md=0
. "OFF"=1 Md=0 16-seg
. 16-seg PLC LED
.
"OFF"=1 Md=1 7-seg .
"ON"=1 Md=0 1 16-seg .
"ON"=1 Md=1 1 7-seg .

73

74

87.88.89.CUMULATIVE TIMER

.
"TIM"=1 "TIM"=0
. " "TIM 1
.
"EN" 0.
:
" "TUP 1
" "NUP " "TUP 1 .

.

75

ON X0 10 ONYO .

YO ON ONXO 10 OFF YO

YO OFF OFF XO 10ON YO

YO ON OFFXO 10 OFF YO

76

90.WATCH DOG TIMER

WDT
. CPU PLC
I/O refresh WDT WDT
I/O .
scan time

scan time .
" "EN 0 1 :
WDT N10 ms "EN"
PLC .
set WDT
.

91.RESET WDT

" 1 "EN
WDT 0 .

77

92.HSCTR

CN
/ . AB
0~3
CPU . 4~7 CPU
PLC .
" "EN 0 1 :
CV CN
CV .
CV PV CV PV
PLC .

78

93.HSCTW

PV CV CV PV
CPU 92 .
CN .
D 0 CV
D 1 PV .
" "EN 0 1 :
CV PV CN CV
PV .

. CV PV
. .
PLC CV
CV
.

79

94.ASCII WRITE

" "EN 0 1 MD=0 ASCII


S Port1 .
S WinProladder .
ASCII
" 1 "ERR .
" 1 "DN .
" 1 "ACT .
error "ACT" 0 .

.
" 1 "PAU
" "PAU 0 .
" 1 "ABT
.

80

95.RAMP

Tn 0.01s
.
PV .
SL Su .
" "EN 0 1 :
Tn 0 . "U/D"=1 SL D
M1974=0 0.01s D Su - SL/ PV
.
D Su "ASU"=1 .
"U/D"=0 Su D . M1974=0 0.01s
D Su - SL/ PV .
D SL "ASL"=1 .
" "EN 0 1 " "U/D .
D " "U/D .
"PAU"=1. "PAU"=0
.
Su SL ""ERR
1 .

81

82

) 16 32(
(L).

... .
Pointer
Pointer. 16 32
16 . 0~L-1 Pointer.


.

83

100.REGISTER TO TABLE MOVE

" "EN 0 1 :
) (Rs Pointer
.
Td ).(L
" "CLR . "CLR"=1
(Pr) Pointer . Pr L-1 )
( " 1 "END .
Pr L-1 " "INC ." 1 "INC
Pr "CLR".
.
0~L-1: Pointer " 1 "ERR
.

84

85

101.TABLE TO REGISTER MOVE


.
:

86

102.TABLE TO TABLE MOVE

Ts
Td .
L .
" "EN 0 1 :
Pr
.

87

103.BLOCK TABLE MOVE

" "EN 0 1 :

.
:

88

104.BLOCK TABLE SWAP

" "EN 0 1 :
a b
.
:

89

105.REGISTER TO TABLE SEARCH

" "EN 0 1 :
"FHD"=1 (Pr)Pointer L-1
Ts .
"FHD"=0 Pr L-1
Pr .
"D/S"=1 Rs
.
"D/S"=0 Rs
.
" 1 "FND .
Pr L-1 "END"
.

90

91

106.TABLE TO TABLE COMPARE

Ta
Tb .

92

107.TABLE FILL

" "EN 0 1 :
Rs Td .

.

93

108.TABLE SHIFT

" "EN 0 1 :
Ts .
"L/R"=1 "L/R"=0
.
IW
.

OW .
Td Ts .

94

95

109.TABLE ROTATE

" "EN 0 1 :
Ts
Td .
"L/R"=1
"L/R"=0 .
:

96

110.QUENE

QUENE
0~L-1 1~L QUENE Pr=0
QUENE .
: QUENE
QUENE ) (Push
QUENE ). (PoP
QUENE L 16 32
QU .
"I/O"=1 IW push QUENE
"I/O"=0 )QUENE ( pop OW
.
IW push QUENE push
(Pr)pointer pop
QUENE pop OW Pr .
QUENE ) Pr=0( "EPT"=1 .
QUENE ) Pr L QUENE ( "FUL"=1
.
Pr 0~L "ERR"=1 .

97

98

111.STACK

STACK QUEUE .
QUEUE push pop
STACK push pop
.

99

112.DRUM

" "EN 0 1 :
Rs Ts
). Ts0 Ts1
(. Rs D0
Rs D1
...
Rs D 1
0 .

L .
Rs .
M1975=0 "ERR"
0 .
M1975=1
. DRUM
360o .

100


INTERRUPT IMMIDIATE I/O
.
:

101

113.DATA SORTING

" "EN 0 1 :
L S
D .
"A/D"=1
"A/D"=0 .
L 2~127 ."ERR"=1
:

102

114.ZONE WRITE

" "EN 0 1 :
N D (1) set (0) reset .
"1/0"=1 set "1/0"=0 reset .

X0=1 reset R0~R9 0 .

103

2 16 .
) (L .
L16 )( .

.
) 16 (pointer
.
0~16L-1 pointer.

.

104

120.MATRIX AND

" "EN 0 1 :
Ma Mb AND Md
.

105

121.MATRIX OR

" "EN 0 1 :
Ma Mb OR Md
.

106

122.MATRIX XOR

" "EN 0 1 :
Ma Mb XOR Md
.

107

123.MATRIX XNOR

" "EN 0 1 :
Ma Mb XNOR Md
.

108

124.MATRIX INVERSE

" "EN 0 1 :
Ms ) 0 1 1 0 (
Md .

109

125.MATRIX COMPARE

" "EN 0 1 :
"FHD"=1 Pr 16L-1
Ma Mb ) ( .
"FHD"=0 Pr 16L-1 Pr
.
"D/S"=1
.
"D/S"=0
.
" 1 "FND .
Pr 16L-1 "END"
.

110

111

126.MATRIX BIT READ

" "EN 0 1 :
Pr " "OTB .
" "CLR "CLR"=1 Pr 0
" "OTB . Pr .
Pr 16L-1 ) (
" 1 "END .
Pr 16L-1 " "INC . " 1 "INC
Pr "CLR" .
.
0~16L-1 Pr "ERR"=1
.

112

113

127.MATRIX BIT WRITE

" "INB
Pr .

114

128.MATRIX BIT SHIFT

" "EN 0 1 :
1 Ms Md .
"L/R"=1
"L/R"=0 .
" "INB
" "OTB .

115

116

129.MATRIX BIT ROTATE

" "EN 0 1 :
Ms Md
.
"L/R"=1 .
"L/R"=0 .

" "OTB .

117

118

130.MATRIX BIT STATUS COUNT

" "EN 0 1 :
"1/0"=1 1 Ms D
.
"1/0"=0 0 Ms D
.
1 "D=0" .
:

119

139.HSPWM

"EN"=1
.
PW :
) (0=Y0 , 1=Y2 , 2=Y4 , 3=Y6
Rs :
1=1/1000

0=1/100

(1 : Rs=1/100

(2 : Rs=1/1000

OR .
: Rs=1/100

OR=0~100

: Rs=1/1000

OR=0~1000

120

142.STOP PULSE OUTPUT

143.PSCNV

. mm
inch .
140 .

121

145.ENABLE OF INTERRUPT

" "EN 0 1 :
) (LABLE
.
LABLE .

122

146.DISABLE OF INTERRUPT

LABLE
.

123

147.MULTI-AXIS HIGH SPEED PULSE OUTPUT

interpolation
.
) (step . 15
.
4 interpolation .
interpolation .
) =Gp0 Ps0 Ps1

=Gp1 Ps2 (Ps3

U/D A/B
.
Y0 ( Y2,Y4,Y6) : (UP/DOWN) U/D .
) Y1 (Y3,Y5,Y7 .
Y0 ( Y2,Y4,Y6): A/B A .
) Y1 (Y3,Y5,Y7 B .

124


:ON M1991 .
:OFF .
Ps0 :ON M1992 .
Ps0 :OFF .
Ps1 :ON M1993 .
Ps1 :OFF .
Ps2 :ON M1994 .
Ps2 :OFF .
Ps3 :ON M1995 .
Ps3:OFF .
Gp0 :ON M1934 step .
Gp1 :ON M1935 step .
ON : M2000 .
DR4068 Gp0
DR4070 Gp1
D4060

Gp0 error code

D4061

Gp1 error code

D4062

Gp0
) (

D4063

Gp1
) (

125


DR4072

DR4080

Ps No

Ps0

DR4088
DR4074

DR4090

DR4082

Ps1

DR4076

DR4092

DR4084

Ps2

DR4078

DR4094

DR4086

Ps3

147 .
SR
:
A55CH :
:

Total steps

SR
SR+1
SR+2

) 15
(

SR+15
SR+16

N
SR+N15+2

126

WR )( .
WR+0
Working flag WR+1
WR+2
WR+3
WR+4
WR+5
WR+6
WR+7
WR+8
: WR+0
). (1~N
. "EN"=1 ).
(
) B0~B7 : WR+1 ~ 0 (7
B8=ON )(paused
B9=ON
B10=0N
B12=ON ) "("ACT
error B13=ON ) "("ERR
B14=ON ) "("DN
step " "DN .
DN WR+1 .

127

Error

Error

R4060(PS0)

0 :

Error

R4061(PS1)

1 :

R4062(PS2)

2 :

R4063(PS3)

3 :

R4060(Gp0)

4 :

R4061(GP1)

5 :

6 :

7 :

141

8 :

9 :

10 :

13 :

12

14 :

13

15 :

14

30 :

Error of variable address for speed setting

31 :

Error of setting value for speed setting

32 :

Error of variable address for stroke setting

33 :

Error of setting value for stroke setting

34 :

Illegal positioning program

35 :

length error of total step

140

36 :

Over the maximum step

147

37 :

Limited frequency error

38 :

initiate/stop frequency error

39 :

Over range of compensation value for movement

40 :

Over range of moving stroke

41 :

ABS positioning is not allowed within DRVC commands

42 :

DRVZ cant follow DRVC

50 :

Illegal operation mod of DRVZ

51 :

Illegal DOG input number

52 :

Illegal PG0 input number

53 :

Illegal CLR output number

60 :

Illegal linear interpolation command

128

: .
0.
Servo WinProladder
147 .
:
Project name / Table Edit / Servo Program Table
" " Servo Program Table " "New Table .

129

interpolation :

SPD

interpolation
XXXXXX
. m/s
Rxxxx
.
) 1=0- 2
Dxxxx
(

2 .

.
921600 Hz 1
ADR/ABS,X,Y,Z,W,Ut/Ps
mm ) inch 1=0-
:X Ps0
:141
(
:Y Ps1
Ut LIN
123 141
:Z Ps2

.
:W Ps3
ADR: ABS
: ADR
: ABS

LIN

130

:
X,Y,Z,W .
0 )
(
ADR
.
)
(
ABS
.
1999999
.
:
.
: Ut )
03 141 (
:Ps
.

LINE

WAIT

LINE ADR/ABS,X,Y,Z,W,Ut/Ps interpolation


.
:X Ps0


:Y Ps1
.
: Ps
:Z Ps2

Ps0=1000,Ps1=500,Ps2=300,Ps3=0
:W Ps3
1000 Ps0
Ps1 Ps2 500
300 Ps3).
0(

147 .

Time,XXXXX

Rxxxx
.
5 :
Dxxxx
) :Time 0.01(

X0~X255
GOTO .

X0~X255
Y0~Y255
Y0~Y255 ON
M0~M1911

M0~M1911 GOTO
S0~S999
.
S0~S999

131

X0~X255
EXT

Y0~Y255
M0~M1911


ON
GOTO .
ON WAIT
.

S0~S999
NEXT GOTO
1~N
Rxxxx
Dxxxx

MEND

ACTWAIT
EXT GOTO
.
: NEXT
.
: 1~N LABLE
.
Rxxxx
Dxxxx .

132

160.READ/WRITE FILE REGISTER

Ladder
.
" "EN 0 1 :
"R/W"=1 Sb L Pr
Sa .
"R/W"=0 Sa
Sb L Pr .
"INC"=1 Pr .
L=0 L>511 )(F0~F8191
"ERR" .

133

200.CONVERSION of INT to FLOAT

" "EN 0 1 :
16 ) (INTEGER S 32
) (FLOAT D .
:

134

201. FLOAT to INTEGER

" "EN 0 1 :
32 ) (FLOAT S 16
) (INTEGER D .
"ERR"
D .
:

135

202. FLOATING POINT NUMBER ADDITION

" "EN 0 1 :
32) FLOAT( Sa Sb FLOAT D
.
32 ) "ERR" ( 3.41038
.
:

136

203. FLOATING POINT NUMBER SUBTRACTION

" "EN 0 1 :
32) FLOAT( Sa Sb FLOAT D
.
32 )"ERR" ( 3.41038
.
:

137

204. FLOATING POINT NUMBER MULTIPLICATION

" "EN 0 1 :
32) FLOAT( Sa Sb FLOAT D
.
32 )"ERR" ( 3.41038
.
:

138

205. FLOATING POINT NUMBER DIVISION

" "EN 0 1 :
32) FLOAT( Sa Sb FLOAT D
.
32 )"ERR" ( 3.41038
.
:

139

206. FLOATING POINT NUMBER COMPARE

" "EN 0 1 :
32 Sa Sb
"a > b"=1 : Sa > Sb .
"a < b"=1 : Sa < Sb .
"a = b"=1 : Sa = Sb .
:

140

207. FLOATING POINT NUMBER ZONE COMPARE

" "EN 0 1 :
32 S Su SL
"S > U"=1 : S > Su .
"S < L"=1 : S < SL .
"INZ"=1 : SL < S < Su .
"ERR" : SL > Su .
:

141

208. FLOATING POINT NUMBER SQUARE ROOT

" "EN 0 1 :
32 S D
S "ERR" .
:

142

209.SIN INSTRUCTION

" "EN 0 1 :
S 32 D D+1
.
S 0.01 -18000~+18000
"ERR" .
:

143

210.COS INSTRUCTION

" "EN 0 1 :
S 32 D
D+1 .
S 0.01 -18000~+18000
"ERR" .
:

144

211.TAN INSTRUCTION

" "EN 0 1 :
S 32 D D+1
.
S 0.01 -18000~+18000
"ERR" .
:

145

212.CHANGE SIGN OF FLOAT

" "EN 0 1 :
32)FLOAT( D D .

146

213.FLOAT ABSOLUTE

" "EN 0 1 :
D FLOAT D .

147