Professional Documents
Culture Documents
FP Programming Manual
FP Programming Manual
ai
GLOBAL NETWORK
Europe
http://www.mew-europe.com/
Germany
http://www.aromat.com/
Aromat Corporation
629 Central Ave., New Providence, N.J. 07974 U.S.A.
Tel: 1-908-464-3550 (Headquarters)
etts
es
Asia
Singapore
Representative Office
Indonesia
Vietnam
Philippines
India
Turkey
Brazil
Malaysia
Thailand
U.A.E.
China
Japan
PROGRAMMABLE CONTROLLER
FP Series
Programming Manual
[Applicable PLC]
FP0/FP-e
FP
FP1
FP-M
FP2
FP2SH
FP3
FP10SH
ARCT1F313E-4/ACG-M313E-4
Beijing
Shanghai
Guangzhou
Dalian
Shenzhen
Chengdu
Hong Kong
uth America
..........
Printed in Japan.
ARCT1F313E-7 04.10
http://www.nais-e.com/plc
Table of Contents
Chapter 1
1.1
1.2
Explanation of Relays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2.1
External Input Relays (X) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2.2 External Output Relays (Y) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2.3 Internal Relays (R) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2.4 Special Internal Relays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2.5 Link Relays (L) for FP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2.6 Link Relays (L) for FP2/FP2SH/FP10SH/FP3 . . . . . . . . . . . . . . . . .
1.2.7 Timer (T) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2.8 Counter (C) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2.9 Items Shared by the Timer and Counter . . . . . . . . . . . . . . . . . . . . .
1.2.10 Pulse Relays (P) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2.11 Error Alarm Relays (E) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1 - 21
1 - 21
1 - 22
1 - 23
1 - 25
1 - 26
1 - 28
1 - 32
1 - 33
1 - 34
1 - 37
1 - 39
1.3
1 - 42
1 - 42
1 - 44
1 - 46
1 - 47
1 - 48
1 - 50
1 - 54
1 - 55
1 - 56
1 - 59
1 - 60
1.4
Explanation of Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 70
1.4.1
Integer Type Decimal Constants (K) . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 70
1.4.2 Hexadecimal Constants (H) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 71
i
Table of Contents
1.4.3
1.4.4
1.4.5
1.5
Chapter 2
Basic Instructions
2.1
2.2
Chapter 3
3.1
Chapter 4
2-3
2-3
2-4
2-4
2-5
3-3
3-3
3-4
3-5
3-6
4.1
4.2
4.3
4.4
Operation Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 15
4.4.1
Operation Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 15
ii
4 - 10
4 - 10
4 - 11
4 - 13
Table of Contents
4.4.2
4.4.3
4.4.4
4.5
4.6
4.7
Chapter 5
4 - 19
4 - 19
4 - 20
4 - 21
5.1
5.2
5 - 34
5 - 34
5 - 34
5 - 35
5 - 36
iii
Table of Contents
5.2.3
5.3
5.4
Chapter 6
5 - 42
5 - 42
5 - 43
5 - 44
5 - 46
6.1
6.2
6.3
Chapter 7
7.1
6-3
6-3
6-5
6-6
6-8
Appendix A Specifications
A.1
iv
Performance Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A - 3
A.1.1
FP0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A - 3
A.1.2
FP - e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A - 7
A.1.3
FP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A - 11
A.1.4
FP1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A - 13
A.1.5
FP - M C16T . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A - 15
A.1.6
FP - M C20/C32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A - 17
A.1.7
FP2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A - 19
A.1.8
FP2SH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A - 21
A.1.9
FP10SH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A - 23
Table of Contents
A.1.10 FP3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A - 25
B.2
B - 52
B - 52
B - 55
B - 62
B.3
B.4
B.5
Appendix 1
Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E1 - 1
Error Confirmation When the Error LED Turns ON
Table of Syntax Check Error
Table of Self-Diagnostic Error
Table of Communication Check Error
Appendix 2
Table of Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P2 - 1
Table of Basic Instructions
Table of High-level Instructions
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . I - 1
Record of changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . R - 1
Table of Contents
Basic Instructions
Sequence basic instructions
TMX
ST
Start . . . . . . . . . . . . . . . . . . . 2 - 8
TMY
ST/
Start Not . . . . . . . . . . . . . . . 2 - 8
CT
Counter . . . . . . . . . . . . . . . 2 - 48
OT
Out . . . . . . . . . . . . . . . . . . . . 2 - 8
SR
Shift register . . . . . . . . . . . 2 - 54
Not . . . . . . . . . . . . . . . . . . . 2 - 10
AN
AND . . . . . . . . . . . . . . . . . . 2 - 11
AN/
AND Not . . . . . . . . . . . . . . 2 - 11
OR
OR . . . . . . . . . . . . . . . . . . . 2 - 12
OR/
OR Not . . . . . . . . . . . . . . . . 2 - 12
ST
ST
AN
AN
OR
Leading edge OR . . . . . . . 2 - 14
OR
Trailing edge OR . . . . . . . 2 - 14
OT
OT
ALT
Alternative out . . . . . . . . . 2 - 18
ANS
AND stack . . . . . . . . . . . . . 2 - 19
ORS
OR stack . . . . . . . . . . . . . . 2 - 21
PSHS
Push stack . . . . . . . . . . . . 2 - 23
RDS
Read stack . . . . . . . . . . . . 2 - 23
POPS
Pop stack . . . . . . . . . . . . . 2 - 23
DF
Subroutine instructions
DF/
CALL
Subroutine call . . . . . . . . . 2 - 86
DFI
FCAL
SET
Set . . . . . . . . . . . . . . . . . . . 2 - 32
SUB
Subroutine entry . . . . . . . . 2 - 86
RST
Reset . . . . . . . . . . . . . . . . . 2 - 32
RET
Subroutine return . . . . . . . 2 - 86
KP
Keep . . . . . . . . . . . . . . . . . 2 - 34
NOP
No operation . . . . . . . . . . . 2 - 35
Control instructions
MC
MCE
JP
Jump . . . . . . . . . . . . . . . . . 2 - 61
LBL
Label . . . . . . . . . . 2 - 61, 2 - 64
LOOP
Loop . . . . . . . . . . . . . . . . . . 2 - 64
BRK
Break . . . . . . . . . . . . . . . . . 2 - 68
ED
End . . . . . . . . . . . . . . . . . . . 2 - 70
CNDE
Conditional end . . . . . . . . 2 - 71
EJECT Eject . . . . . . . . . . . . . . . . . . . 2 - 73
Start step . . . . . . . . . . . . . . 2 - 75
NSTL
Next step . . . . . . . . . . . . . . 2 - 75
NSTP
Next step . . . . . . . . . . . . . . 2 - 75
CSTP
Clear step . . . . . . . . . . . . . 2 - 75
STPE
Step end . . . . . . . . . . . . . . 2 - 75
SCLR
Interrupt instructions
INT
Interrupt . . . . . . . . . . . . . . . 2 - 97
IRET
Interrupt return . . . . . . . . . 2 - 97
TML
ICTL
TMR
vi
Table of Contents
Communication conditions
setting . . . . . . . . . . . . . . . 2 - 116
AN<
AN<=
AND=
AND>
ST=
AND<
ST<>
ST>
ST>=
ST<
ST<=
STD=
OR<>
OR>
OR>=
OR<
STD>
OR<=
ORD=
STD<
AN=
AN<>
AN>
ORD<
AN>=
vii
Table of Contents
MV
PMV
F1
P1
DMV
PDMV
F2
P2
MV/
PMV/
F3
P3
DMV/
PDMV/
F4
P4
GETS
PGETS
F5
P5
BTM
PBTM
F6
P6
DGT
PDGT
F7
P7
MV2
PMV2
F8
P8
DMV2
PDMV2
F10
P10
BKMV
PBKMV
Block move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 29
F11
P11
COPY
PCOPY
Block copy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 31
F12
ICRD
F12
P12
ICRD
PICRD
P13
PICWT
F13
P13
ICWT
PICWT
F14
P14
PGRD
PPGRD
F15
P15
XCH
PXCH
F16
P16
DXCH
PDXCH
F17
P17
SWAP
PSWAP
F18
P18
BXCH
PBXCH
viii
Table of Contents
Control instruction
F19
SJP
Auxiliary jump . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 57
+
P+
F21
P21
D+
PD+
F22
P22
+
P+
F23
P23
D+
PD+
F25
P25
P-
F26
P26
DPD -
F27
P27
P-
F28
P28
DPD -
F30
P30
*
P*
F31
P31
D*
PD*
F32
P32
%
P%
F33
P33
D%
PD%
F34
P34
*W
P*W
F35
P35
+1
P+1
F36
P36
D+1
PD+1
F37
P37
-1
P-1
F38
P38
D-1
PD - 1
F39
P39
D*D
PD*D
B+
PB+
F41
P41
DB+
PDB+
ix
Table of Contents
F42
P42
B+
PB+
F43
P43
DB+
PDB+
F45
P45
BPB -
F46
P46
DB PDB -
F47
P47
BPB -
F48
P48
DB PDB -
F50
P50
B*
PB*
F51
P51
DB*
PDB*
F52
P52
B%
PB%
F53
P53
DB%
PDB%
F55
P55
B+1
PB+1
F56
P56
DB+1
PDB+1
F57
P57
B-1
PB - 1
F58
P58
DB - 1
PDB - 1
CMP
PCMP
F61
P61
DCMP
PDCMP
F62
P62
WIN
PWIN
F63
P63
DWIN
PDWIN
F64
P64
BCMP
PBCMP
WAN
PWAN
F66
P66
WOR
PWOR
Table of Contents
F67
P67
XOR
PXOR
F68
P68
XNR
PXNR
F69
P69
WUNI
PWUNI
BCC
PBCC
F71
P71
HEXA
PHEXA
F72
P72
AHEX
PAHEX
F73
P73
BCDA
PBCDA
F74
P74
ABCD
PABCD
F75
P75
BINA
PBINA
F76
P76
ABIN
PABIN
F77
P77
DBIA
PDBIA
F78
P78
DABI
PDABI
F80
P80
BCD
PBCD
F81
P81
BIN
PBIN
F82
P82
DBCD
PDBCD
F83
P83
DBIN
PDBIN
F84
P84
INV
PINV
F85
P85
NEG
PNEG
F86
P86
DNEG
PDNEG
F87
P87
ABS
PABS
F88
P88
DABS
PDABS
F89
P89
EXT
PEXT
xi
Table of Contents
F90
P90
DECO
PDECO
Decode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 201
F91
P91
SEGT
PSEGT
F92
P92
ENCO
PENCO
Encode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 207
F93
P93
UNIT
PUNIT
F94
P94
DIST
PDIST
F95
P95
ASC
PASC
F96
P96
SRC
PSRC
F97
P97
DSRC
PDSRC
CMPR
PCMPR
F99
P99
CMPW
PCMPW
F100
P100
SHR
PSHR
F101
P101
SHL
PSHL
F102
P102
DSHR
PDSHR
F103
P103
DSHL
PDSHL
F105
P105
BSR
PBSR
F106
P106
BSL
PBSL
F108
P108
BITR
PBITR
F109
P109
BITL
PBITL
F110
P110
WSHR
PWSHR
Right shift of one word (16 bits) of 16 - bit data range . . . . . . . . 3 - 245
F111
P111
WSHL
PWSHL
Left shift of one word (16 bits) of 16 - bit data range . . . . . . . . . 3 - 247
F112
P112
WBSR
PWBSR
Right shift of one hexadecimal digit (4-bit) of 16 - bit data range 3 - 249
F113
P113
WBSL
PWBSL
Left shift of one hexadecimal digit (4-bit) of 16 - bit data range 3 - 251
xii
Table of Contents
FIFO instructions
F115
P115
FIFT
PFIFT
F116
P116
FIFR
PFIFR
F117
P117
FIFW
PFIFW
UDC
F119
LRSR
ROR
PROR
F121
P121
ROL
PROL
F122
P122
RCR
PRCR
F123
P123
RCL
PRCL
F125
P125
DROR
PDROR
F126
P126
DROL
PDROL
F127
P127
DRCR
PDRCR
F128
P128
DRCL
PDRCL
BTS
PBTS
F131
P131
BTR
PBTR
F132
P132
BTI
PBTI
F133
P133
BTT
PBTT
F135
P135
BCU
PBCU
F136
P136
DBCU
PDBCU
STMR
Table of Contents
Special instructions
F138
P138
HMSS
PHMSS
F139
P139
SHMS
PSHMS
F140
P140
STC
PSTC
F141
P141
CLC
PCLC
F142
P142
WDT
PWDT
F143
IORF
F143
P143
IORF
PIORF
F144
TRNS
F145
P145
SEND
PSEND
F146
P146
RECV
PRECV
F147
PR
Printout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 364
F148
P148
ERR
PERR
F149
P149
MSG
PMSG
F150
P150
READ
PREAD
F151
P151
WRT
PWRT
F152
P152
RMRD
PRMRD
F153
P153
RMWT
PRMWT
F155
P155
SMPL
PSMPL
F156
P156
STRG
PSTRG
F157
P157
CADD
PCADD
F158
P158
CSUB
PCSUB
F159
P159
MTRN
PMTRN
xiv
Table of Contents
F161
P161
MRCV
PMRCV
DSQR
PDSQR
MV
F1
DMV
F162
HC0S
F163
HC0R
F164
SPD0
F165
CAM0
F166
HC1S
F167
HC1R
F168
SPD1
F169
PLS
F170
PWM
F171
SPDH
F172
PLSH
F173
PWMH
F174
SP0H
F175
SPSH
F176
SPCH
SCR
F181
DSP
DSTM
Table of Contents
MV3
PMV3
F191
P191
DMV3
PDMV3
DAND
PDAND
F216
P216
DOR
PDOR
F217
P217
DXOR
PDXOR
F218
P218
DXNR
PDXNR
F219
P219
DUNI
PDUNI
F230
P230
TMSEC
PTMSEC
Time data
F231
P231
SECTM
PSECTM
Second
GRY
PGRY
F236
P236
DGRY
PDGRY
F237
P237
GBIN
PGBIN
F238
P238
DGBIN
PDGBIN
F240
P240
COLM
PCOLM
F241
P241
LINE
PLINE
SCMP
PSCMP
F258
P258
SADD
PSADD
F259
P259
LEN
PLEN
F260
P260
SSRC
PSSRC
xvi
Table of Contents
F261
P261
RIGHT
PRIGHT
F262
P262
LEFT
PLEFT
F263
P263
MIDR
PMIDR
F264
P264
MIDW
PMIDW
F265
P265
SREP
PSREP
MAX
PMAX
F271
P271
DMAX
PDMAX
F272
P272
MIN
PMIN
F273
P273
DMIN
PDMIN
F275
P275
MEAN
PMEAN
F276
P276
DMEAN
PDMEAN
F277
P277
SORT
PSORT
F278
P278
DSORT
PDSORT
F282
P282
SCAL
PSCAL
F283
P283
DSCAL
PDSCAL
LIMT
PLIMT
F286
P286
DLIMT
PDLIMT
F287
P287
BAND
PBAND
F288
P288
DBAND
PDBAND
F289
P289
ZONE
PZONE
F290
P290
DZONE
PDZONE
xvii
Table of Contents
BSIN
PBSIN
F301
P301
BCOS
PBCOS
F302
P302
BTAN
PBTAN
F303
P303
BASIN
PBASIN
F304
P304
BACOS
PBACOS
F305
P305
BATAN
PBATAN
FMV
PFMV
F310
P310
F+
PF+
F311
P311
FPF -
F312
P312
F*
PF*
F313
P313
F%
PF%
F314
P314
SIN
PSIN
F315
P315
COS
PCOS
F316
P316
TAN
PTAN
F317
P317
ASIN
PASIN
F318
P318
ACOS
PACOS
F319
P319
ATAN
PATAN
F320
P320
LN
PLN
F321
P321
EXP
PEXP
F322
P322
LOG
PLOG
F323
P323
PWR
PPWR
xviii
Table of Contents
F324
P324
FSQR
PFSQR
F325
P325
FLT
PFLT
F326
P326
DFLT
PDFLT
F327
P327
INT
PINT
F328
P328
DINT
PDINT
F329
P329
FIX
PFIX
F330
P330
DFIX
PDFIX
F331
P331
ROFF
PROFF
F332
P332
DROFF
PDROFF
F333
P333
FINT
PFINT
F334
P334
FRINT
PFRINT
F335
P335
F+/ PF+/ -
F336
P336
FABS
PFABS
F337
P337
RAD
PRAD
F338
P338
DEG
PDEG
FCMP
PFCMP
F346
P346
FWIN
PFWIN
F347
P347
FLIMT
PFLIMT
Floating point data upper and lower limit control for real
number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 664
F348
P348
FBAND
PFBAND
F349
P349
FZONE
PFZONE
F350
P350
FMAX
PFMAX
Table of Contents
F351
P351
FMIN
PFMIN
F352
P352
FMEAN
PFMEAN
F353
P353
FSORT
PFSORT
F354
P354
FSCAL
PFSCAL
PID
Compare instructions
F373
P373
DTR
PDTR
F374
P374
DDTR
PDDTR
SETB
PSETB
F411
P411
CHGB
PCHGB
F412
P412
POPB
PPOPB
SBFL
PSBFL
F415
P415
CBFL
PCBFL
F416
P416
PBFL
PPBFL
xx
Chapter 1
Relays, Memory Areas and Constants
1.1
1.1.1
FP0
Item
Numbering
Function
External output
relay
Internal relay
(* Note 2)
Timer
(* Note 2)
Relay
Relay which turns on/off based on specific conditions and is used as a flag.
Counter
(* Note 2)
Special internal
relay
External input
relay
External output
relay
Internal relay
(* Note 2)
Memory
a ea
area
Data register
(* Note 2)
(DT) 1,660
words
(DT0 to
DT1659)
Timer/Counter
set value area
(* Note 2)
Timer/Counter
elapsed value area
(* Note 2)
Special data
register
Index register
Constant Decimal
constants
t t
Hexadecimal
constants
t t
1-2
6,144
words
(DT0 to
DT6143)
16,384
Data memory used in program. Data is
words
handled in 16- bit units (one word).
(DT0 to
DT16383)
( )
(K) K - 32768 to K32767 (for 16-bit operation)
K - 2147483648 to K2147483647 (for 32-bit operation)
( )
(H) H0 to HFFFF (for 16-bit operation)
H0 to HFFFFFFFF (for 32-bit operation)
Notes
1) The points for the timer and counter can be changed by the
setting of system register 5. The numbers given in the table
are the numbers when system register 5 is at its default
setting.
2) There are two unit types, the hold type that saves the
conditions that exist just before turning the power off or
changing form the RUN mode to PROG. mode, and the
non - hold type that resets them. For the FP0 T32C, the
selection of hold type and non - hold type can be changed by
the setting of system register. These areas can be spcified as
hold type or non - hold type by setting system register. For the
FP0 C10/C14/C16/C32/SL1, that area is fixed and allotted the
numbers as shown below.
Hold type and Non-hold type areas
Item
C10/C14/C16
Timer
C32/SL1
From the set value to C127
Non-hold type
976 points
(R0 to R60F)
880 points
(R0 to R54F)
55 words
(WR0 to WR54)
Hold type
Data
eg s e
register
61 words
(WR0 to WR60)
Internal
relay
Non-hold type
Hold type
Counter
Non-hold type
1652 words
(DT0 to DT1651)
6112 words
(DT0 to DT6111)
Hold type
8 words
(DT1652 to DT1659)
32 words
(DT6112 to DT6143)
1-3
FP - e
Item
Number
of points
Function
IEC
X0 - X12F
%IX0.0 %IX12.15
208
Y0 - Y12F
%QX0.0 %QX12.15
Internal relay
(see note 2)
1008
R0 - R62F
%MX0.0 %MX0.62.15
Timer
(see notes 1 and 2)
100
T0 - T99/
C100- C143
Counter
(see notes 1 and 2)
44
C100- C143/
T0 - T99
64
R9000 - R903F
13 words
WX0 - WX12
%IW0 %IW12
13 words
WY0 - WY12
%QW0 %QW12
Internal relay
(see note 2)
Memor area (wo
ory
words)
208
Relay
63 words
WR0 - WR62
%MW0.0 %MW0.62
Data register
(see note 2)
1660 words
DT0 - DT1659
%MW5.0 %MW5.1659
Timer/counter set
value area
144 words
SV0 - SV143
%MW3.0 %MW3.143
EV0 - EV143
%MW4.0 %MW4.143
Special data
register
DT9000 DT9111
%MW5.9000%MW5.9111
Index register
1-4
112 words
2 words
IX - IY
%MW6.0 %MW6.1
Number of
points
6 double
words
DWX0 - DWX11
%ID0 %ID11
6 double
words
DWY0 - DWY11
%QD0 %QD11
Internal relay
(see note 2)
31 double
words
DWR0 - DWR61
%MD0.0 %MD0.61
Data register
(see note 2)
830 double
words
DDT0 DDT1658
%MD5.0 %MD5.1658
Timer/counter set
value area
72 double
words
DSV0 - DSV142
%MD3.0 %MD3.142
Timer/counter
72 double
elapsed value area (see words
note 2)
M
Memory are (double word) (see note 4)
rea
w
e
Item
DEV0 - DEV142
%MD4.0 %MD4.142
Matsushita
Function
IEC
Special data
register
56 double
words
DDT9000 DDT9110
%MD5.9000%MD5.9110
Index register
1 double
words
DI0
%MD6.0
Used as an address of
memory area and constants
modifier.
Item
IEC
C
Consta
ant
Decimal constants
(integral type)
K - 2147483648 to K2147483647
(for 32-bit operation)
- 2147483648 to 2147483647
(for 32-bit operation)
Hexadecimal
constants
Decimal constants
(monorefined real
number)
F - 1.17549410 - 38 to F - 3.4028231038
- 1.17549410E - 38 to - 3.402823E38
F1.17549410 - 38 to F3.4028231038
1.17549410E - 38 to 3.402823E38
1-5
Notes
1) The points for the timer and counter can be changed by the
setting of System register No. 5. The number given in the table
above are the numbers when System register No. 5 is at its
default setting.
2) There are two unit types;
the hold type that saves the conditions that exist just before
turning the power off or changing from the RUN mode to
PROG. mode, and the non - hold type that resets them.
These areas can be specified as hold type or non - hold type by
setting system register.
For the FP - e, that area is fixed and allotted the numbers as
shown in the table below. For the FP - e with clock/calendar
function type, the selection of hold type and non - hold type
can be changed by the setting of system register.
3) The number of points noted above is the number reserved in
the system. For the actual number of points available for use,
refer to I/O Allocation in Appendix A.
4) Double words cannot be specified with FPWIN GR.
Hold type and non - hold type areas*1
Model
AFPE224300
AFPE224305
AFPE214325
(Standard type) (Calendar timer (Thermocouple
type)
input type)
Non- hold type: all points
Timer
Non-hold type
Hold type
yp
Counter
SV: hold
Data
register
i t
Non-hold type
Hold type
Internal
e ay
relay
Non-hold type
Hold type
8 words
(DT1652 to DT1659)
1.1.2
FP
Item
Number
of points
Function
Turns on or off based on
external input.
X0 - X31F
1184
X0 - X73F
512
Y0 - Y31F
1184
Y0 - Y73F
1568
R0 - R97F
Link relay
(see note 2)
1024
L0 - L63F
Timer
(see notes 2
and 3)
1024
T0 - T1007/C1008 - C1023
Counter
(see notes 2
and 3)
1024
Mem
mory area (wo
words)
512
Rel
elay
176
R9000 - R910F
32 words
WX0 - WX31
74 words
WX0 - WX73
32 words
WY0 - WY31
74 words
WY0 - WY73
98 words
WR0 - WR97
Link relay
64 words
WL0 - WL63
1-7
Number of
points
Data register
(see note 2)
32765 words
DT0 - DT32764
Item
128 words
LD0 - LD127
Timer/counter set
value area
(see note 2)
1024 words
SV0 - SV1023
EV0 - EV1023
DT90000 - DT90259
Special data
register
260 words
Index register
14 words
Item
I0 - ID
Function
Data memory used in a
program. Data is handled in
16-bit units (one word).
Decimal constants
(integer type)
Co ant
Consta
Notes
1-8
Hexadecimal
constants
F - 1.17549410 - 38 to F - 3.4028231038
F1.17549410 - 38 to F3.4028231038
1.1.3
FP1
Item
Numbering
Function
C14/C16
C24/C40
C56/C72
External input
relay (X)
External output
relay (Y)
Internal relay
(R) (* Note 1)
256 points
(R0 to R15F)
Timer (T)
(* Note 1)
Relay
128 points
144 points
Counter (C)
(* Note 1)
Special internal
relay (R)
External input
relay (WX)
External output
relay (WY)
Internal relay
(WR)
16 words
(WR0 to
WR15)
256 words
(DT0 to
DT255)
Timer/Counter
set value area
(SV) (* Note 1)
128 words
(SV0 to
SV127)
Timer/Counter
elapsed value
area (EV)
(* Note 1)
Special data
register (DT)
128 words
(EV0 to
EV127)
Index register
(I)
Memory
area
Data register
(DT) (* Note 1)
Constant Decimal
constants (K)
t t
Hexadecimal
constants (H)
t t
1,660 words
(DT0 to
DT1659)
6,144 words
(DT0 to
DT6143)
1-9
Notes
1) There are two unit types, the hold type that saves the
conditions that exist just before turning the power off or
changing from the RUN mode to PROG. mode, and the
non - hold type that resets them. These areas can be specified
as hold type or non - hold type by setting system register.
2) The points for the timer and counter can be changed by the
setting of system register 5. The numbers given in the table
are the numbers when system register 5 is at its default
setting.
1 - 10
1.1.4
FP - M
Item
Numbering
C16T
Function
C20R/
C20T/
C32T
C20RC/
C20TC/
C32TC
External input
relay (X)
External output
relay (Y)
Internal relay
(R) (* Note 1)
256 points
(R0 to
R15F)
1,008 points
(R0 to R62F)
Timer (T)
(* Note 1)
Relay
128 points
(T0 to T99/
C100 to
C127)
(* Note 2)
144 points
(T0 to T99/C100 to C143)
(* Note 2)
If a TM instruction has timed out, the contact with the same number turns on.
Counter (C)
(* Note 1)
If a CT instruction has counted up, the contact with the same number turns on.
Special internal
relay (R)
External input
relay (WX)
External output
relay (WY)
Internal relay
(WR)
16 words
(WR0 to
WR15)
Data register
(DT) (* Note 1)
256 words
(DT0 to
DT255)
128 words
(SV0 to
SV127)
1,660
6,144
words (DT0 words (DT0
to
to
DT1659)
DT6143)
144 words (SV0 to
SV143)
Timer/Counter
set value area
(SV) (* Note 1)
Timer/Counter
elapsed value
area (EV)
(* Note 1)
128 words
(EV0 to
EV127)
Special data
register (DT)
70 words
(DT9000 to
DT9069)
112 words
(DT9000 to DT9069)
(DT9080 to DT9121)
Index register
(I)
Memory
area
Constant Decimal
constants (K)
t t
Hexadecimal
constants (H)
t t
1 - 11
Notes
1) There are two unit types, the hold type that saves the
conditions that exist just before turning the power off or
changing from the RUN mode to PROG. mode, and the
non - hold type that resets them. These areas can be specified
as hold type or non - hold type by setting system register.
2) The points for the timer and counter can be changed by the
setting of system register 5. The numbers given in the table
are the numbers when system register 5 is at its default
setting.
1 - 12
1.1.5
FP2
Item
Numbering
Function
External input
relay
External
output relay
Internal relay
(* Note 1)
Timer
(* Notes 1 and 2)
,
p
(T) 1,024 points
(T0 to T999/ C1000 to C1023)
t
t
Counter
(* Notes 1 and 2)
(C)
Pulse relay
Special internal
relay
Relay
Relay which turns on or off based on specific conditions and is used as a flag.
(* Note 1)
Link relay
Memory
area
External input
relay
Memory
area
External
output relay
Internal relay
Link relay
Data register
(* Note 1)
Memory
area
Timer/Counter
set value area
(* Note 1)
Memory
area
Timer/Counter
elapsed value area
(* Note 1)
Memory
area
File register
(* Notes 1 and 3)
FP2 (32 K)
(when expanded):
0 to 30,717 words
(FL0 to FL30716)
Memory
area
Special data
register
Memory
area
Index register
1 - 13
Item
Numbering
( )
(K)
Function
( )
(H)
(f)
f - 1.17549410 - 38 to f - 3.4028231038
f1.17549410 - 38 to f3.4028231038
Notes
1) There are two unit types, the hold type that saves the
conditions that exist just before turning the power off or
changing from the RUN mode to PROG. mode, and the
non-hold type that resets them. The selection of hold type and
non-hold type can be changed by the setting of system
register.
2) The points for the timer and counter can be changed by the
setting of system register 5. The numbers given in the table
are numbers when system register 5 is at its default setting.
3) The size of the file register varies depending on the settings of
system registers 0, 1 and 2.
1 - 14
1.1.6
FP2SH
Item
Numbering
Function
External input
relay
External output
relay
Internal relay
Relay
(* Note 1)
Link relay
(* Note 1)
Timer
p
( )
(T) 3,072 points
(* Notes 1 and 2)
Counter
( )
(C)
Pulse relay
(* Notes 1 and 2)
internal relay
Memory
area
Relay which turns on or off based on specific conditions and is used as a flag.
External input
relay
External output
relay
Internal relay
Link relay
Data register
(* Note 1)
Timer/Counter
set value area
(* Note 1)
Timer/Counter
elapsed value area
(* Note 1)
File register
(* Note 1)
,
(FL) 98,295 words
(32,765
(32 6 words 3 banks )
d
3b k
1 - 15
Item
Numbering
Memory
area
Special data
register
(DT)
Index register
(I)
Constant Decimal
constants
(integer type)
(K)
Hexadecimal
constants
( )
(H)
Decimal
constants
(monorefined
real number)
(f)
Function
Notes
1) There are two unit types, the hold type that saves the
conditions that exist just before turning the power off or
changing from the RUN mode to PROG. mode, and the
non-hold type that resets them. The selection of hold type and
non-hold type can be changed by the setting of system
register.
2) The points for the timer and counter can be changed by the
setting of system register 5. The numbers given in the table
are numbers when system register 5 is at its default setting.
1 - 16
1.1.7
FP10SH
Item
Numbering
Function
External input
relay
External output
relay
Internal relay
(* Note 1)
Link relay
(* Note 1)
Timer
(* Notes 1 and 2)
N t
d
Counter
(* Notes 1 and 2)
(C)
Pulse relay
Relay
Special internal
relay
Memory
area
External input
relay
External output
relay
Internal relay
Link relay
Data register
(* Note 1)
Timer/Counter
set value area
(* Note 1)
Timer/Counter
elapsed value area
(* Note 1)
Data memory for storing the elapsed value during operation of a timer/counter.
Stores by timer/ counter number.
File register
(* Note 1)
,
(FL) 32,765 words
(FL0 to FL32764)
1 - 17
Item
Numbering
Memory
area
Special data
register
(DT)
Index register
(I)
Constant Decimal
constants
(integer type)
(K)
Hexadecimal
constants
t t
( )
(H)
Decimal
constants
(monorefined
real number)
(f)
Function
512 words
(DT90000 to DT90511)
Notes
1) There are two unit types, the hold type that saves the
conditions that exist just before turning the power off or
changing from the RUN mode to PROG. mode, and the
non-hold type that resets them. The selection of hold type and
non-hold type can be changed by the setting of system
register.
2) The points for the timer and counter can be changed by the
setting of system register 5. The numbers given in the table
are numbers when system register 5 is at its default setting.
1 - 18
1.1.8
FP3
Item
Numbering
Function
External input
relay
External output
relay
Internal relay
Timer
(* Notes 1 and 2)
p
(T) 256 points
(T0 to T199/ C200 to C255)
Counter
(* Notes 1 and 2)
(C)
Special
internal relay
Relay
(* Note 1)
Link relay
(* Note 1)
Memory
area
External
input relay
External
output relay
Internal relay
(WR) 98 words
(WR0 to WR97)
Link relay
Data register
(* Note 1)
Timer/Counter set
value area
(* Note 1)
Timer/Counter
elapsed value area
(* Note 1)
Data memory for storing the elapsed value during operation of a timer/counter.
Stores by timer/ counter number.
File register
(* Notes 1 and 3)
1 - 19
Item
Numbering
Constant Decimal
constants
Hexadecimal
constants
( )
(K)
Function
( )
(H)
Notes
1) There are two unit types, the hold type that saves the
conditions that exist just before turning the power off or
changing from the RUN mode to PROG. mode, and the
non-hold type that resets them. The selection of hold type and
non-hold type can be changed by the setting of system
register.
2) The points for the timer and counter can be changed by the
setting of system register 5. The numbers given in the table
are numbers when system register 5 is at its default setting.
3) The size of the file register varies depending on the settings of
system registers 0 and 1.
1 - 20
1.1.9
Relay Numbers
External input relays (X), External output relays (Y), Internal relays (R), Link relays
(L) and Pulse relays (P)
Since these relays are handled in units of 16 points, they are expressed as a
combination of decimal and hexadecimal numbers as shown below.
Decimal number
1,2,3...
Hexadecimal number
0,1,2...9,A,B...F
The maximum value that can be selected varies with each relay.
Example:
FP2
Decimal number
0, 1, 2 ...
T0, T1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T999
C1000, C1001 . . . . . . . . . . . . . . . . . . . . . . . . . C1023
Note
Counters and timers share the same area. The division of the
area can be changed with system register 5. (The table and
example are when settings are the default values.)
1 - 21
CPU
Power supply
unit
1
16- point type
output unit
FP2
16- point type
input unit
Example:
(Slot No.)
Y10 to Y1F
X0 to XF
1 - 22
WX0
X1F X1E X1D
WX1
...
....
When the state of an external input relay (X) changes, the content
of WX also changes.
1 - 23
1.2
Explanation of Relays
1.2.1
CPU
Input
unit
Input: on
Input
Usage restrictions
The addresses for inputs which do not actually exist cannot be used.
The on or off status of the external input relays cannot be changed by the program in
the programmable controller.
There are no restrictions on the number of times one external input relay is
programmed.
1 - 24
1.2
1.2.2
Explanation of Relays
Output relay
Y
Output
unit
CPU
output
Execution
External
devices
(load):
on
Usage restrictions
External output relays which are not actually allocated can be used in the same way as
internal relays. However, they cannot be specified as hold types.
When used as contacts, there are no restrictions on the number of times that can be
used.
As a rule, when specified as the output destination for operation results of OT and KP
instructions, use is limited to once in a program (to inhibit double output).
Note
Duplicated output
1 - 25
1.2.3
Usage restrictions
When used as contacts, there are no restrictions on the number of times that can be
used.
As a rule, when specified as the output destination for operation results of OT and KP
instructions, use is limited to once in a program (to inhibit double output).
Note
For the FP2/FP2SH/FP3/FP10SH, if the Initialize/Test switch is set to the upper side
(the Initialize side) in the PROG mode, all of the internal relays (R) go off. If a hold type
has been specified (see next page), the internal relays (R) go off as well.
Note
1 - 26
1.2
Explanation of Relays
Non-hold type
Hold type
FP0 C32
Hold type
FP10SH/FP2SH
FP3
FP2
FP - M C16T,
FP0 T32C
FP
FP - e
Note
1 - 27
1.2.4
1 - 28
1.2
1.2.5
Explanation of Relays
on
Communication
Cassette
Send-area
Ln
Send
MEWNET-W0
Receive-area
Ln
Receive
on
When link relays are used, bit information can be exchanged in this way between PLCs.
1 - 29
L0 to L63F
10
If the beginning of a hold type relay is specified using a word number, relays before that
point will be non - hold types, and subsequent relays will be hold types.
For example, if 10 is set for system register 10, L0 to L9F will be non - hold types, and
L100 to L63F will be hold types.
For the default value, all link relays are hold types.
If used as link relays for reception, be aware that no holding operation is carried out,
even if the link relays are specified as hold types using the system registers.
Usage restrictions
When used as contacts, there are no restrictions on the number of times that can be
used.
As a rule, when specified as the output destination for operation results of OT instruction
and KP instruction, use is limited to once in a program (to inhibit double output).
Notes
System register 20 can be used to permit double output. Also,
double output does not result if the SET and RST instructions
are used.
Link relays must be allocated when the network is configured,
before programming is done. The method by which allocations
are made varies depending on the type of network. Refer to
the manual for the pertinent link unit.
1 - 30
1.2
1.2.6
Explanation of Relays
CPU
on
Send-area
Link unit
CPU
Link
station
Ln
Send
MEWNET
Receive-area
Ln
Receive
on
When link relays are used, bit information can be exchanged in this way between PLCs.
1 - 31
L1280 to
L639F
(8,192 points)
1 - 32
1.2
Explanation of Relays
L0 to L63F
10
L640 to L127F
11
L1280 to L639F
16
If the beginning of a hold type relay is specified using a word number, relays before that
point will be non - hold types, and subsequent relays will be hold types.
For example, if 10 is set for system register 10, L0 to L9F will be non - hold types, and
L100 to L63F will be hold types.
For the default value, all link relays are hold types.
If used as link relays for reception, be aware that no holding operation is carried out,
even if the link relays are specified as hold types using the system registers.
Example:
Non - hold type
Hold type
System
register 10
System
register 11
Hold type
System
register 16
L0
to
L63F
L640
to
L127F
L1280
to
L639F
1 - 33
Usage restrictions
When used as contacts, there are no restrictions on the number of times that can be
used.
As a rule, when specified as the output destination for operation results of OT instruction
and KP instruction, use is limited to once in a program (to inhibit double output).
Notes
System register 20 can be used to permit double output. Also,
double output does not result if the SET and RST instructions
are used.
Link relays must be allocated when the network is configured,
before programming is done. The method by which allocations
are made varies depending on the type of network. Refer to
the manual for the pertinent link unit.
For the FP2/FP2SH/FP3/FP10SH, if the Initialize/Test switch is set to the upper side
(the Initialize side) in the PROG mode, all of the link relays (L) go off. If a hold type has
been specified (see next page), these relays go off as well.
Note
1 - 34
1.2
1.2.7
Explanation of Relays
Timer (T)
Timer number
Time - up
Tn: on
Tn
Timer contact: on
n: Timer number
Usage restrictions
When used as contacts, there are no restrictions on the number of times that can be
used.
For the FP2/FP2SH/FP3/FP10SH, if the Initialize/Test switch is set to the upper side
(the Initialize side) in the PROG mode, the timer contact goes off. If a hold type has been
specified, it goes off as well.
Note
With the FP2SH/FP10SH, system register 4 can be set in such a way
that the timer contact is not cleared even if the Initialize/Test switch is
set to the upper side.
1 - 35
1.2.8
Counter (C)
Count - up
Cn:on
Cn
Counter contact: on
n: Counter number
Usage restrictions
When used as contacts, there are no resrictions on the number of times that can be
used.
For the FP2/FP2SH/FP3/FP10SH, if the Initialize/Test switch is set to the upper side
(the Initialize side) in the PROG mode, the counter contact goes off. If a hold type has
been specified, it goes off as well.
Note
1 - 36
1.2
1.2.9
Explanation of Relays
Hold type
Timer
Counter
FP2SH/FP10SH
FP3
FP2
FP - M C16T,
FP
FP0, FP - e
1 - 37
Counter
Hold type
FP2SH/FP10SH
FP3
FP2
FP - M C16T,
FP1 C14, C16
0 to 99 (100 points)
FP - M C20, C32
FP1 C24, C40, C56, C72
0 to 99 (100 points)
FP
FP - e
SV: hold
0 to 99 (100 points)
FP0 T32C
Note
1 - 38
1.2
Explanation of Relays
1 - 39
P0
P0
Y10
X0
P0
Y10
One scan
P1
P1
Y11
X1
P1
Y11
One scan
1 - 40
1.2
Explanation of Relays
Usage restrictions
Pulse relays are cleared when the power is turned off.
A pulse relay can only be used once in a program as an output destination for an OT
or OT instruction (double output is prohibited).
There is no limitation to the number of times a pulse relay can used as a contact.
A pulse relay cannot be specified as an output destination for an OT, KP, SET, RST or
ALT instruction.
A word unit pulse relay (WP) cannot be specified as a storage location for a high-level
instruction.
1 - 41
1.2.11
Note
DT90401 to DT90419
DT90420
Min./sec. data
DT90421
Day/time data
DT90422
Year/month data
Information for up to 500 error alarm relays can be stored in the memory area. Those
which can be monitored or operated by the user, however, are those in the range from
DT90401 to DT90419 only.
Usage restrictions and precautions
Error alarm relay (E) cannot be specified as the output destination for the OT, KP, or ALT
instructions.
Error alarm relay (E) can be turned on and off in multiple locations in the program, using
the SET and RST instructions. However, no check is carried out for overlapping use.
Program for setting (turning on) an error alarm relays
The SET instruction should be used to turn on error alarm relays in the error alarm
conditions.
Error alarm relays are held even if the error condition goes off.
1 - 42
1.2
Example:
Explanation of Relays
X0
S
X0 : on
+1
DT90400
K 3
DT90401
K21
K21
DT90402
K12
K12
DT90403
K 5
K 5
DT90404
K 0
K15
DT90405
K 0
Set E15
No. of error
alarm relays
which are on
K 0
K 4
Relay numbers
of error alarm
relay which are
on
DT90420
DT90421
DT90422
X1
X1 : on
-1
DT90400
K 4
DT90401
K21
K 3
K21
DT90402
K12
K 5
DT90403
K 5
K 0
K 0
DT90405
K 0
DT90404
Reset E12
K 0
Relay numbers of
error alarm relay
which are on
R DT90401
Storage buffer 1
DT90403
K 4
DT90404
Storage buffer 17
K17
DT90417
K18
DT90418
K19
DT90419
Storage buffer 20
K20
Storage buffer 21
K21
K499
K500
Storage buffer 1
K 2
DT90401
Storage buffer 2
K 3
DT90402
Storage buffer 3
K 4
DT90403
Storage buffer 4
K 5
DT90404
Storage buffer 17
K18
DT90417
Storage buffer 18
K19
DT90418
Storage buffer 19
K20
DT90419
Storage buffer 20
Range not
visible to user
K 3
Storage buffer 4
Storage buffer 19
Range visible
to user
DT90402
Storage buffer 18
Range not
visible to user
DT90401
K 2
Storage buffer 3
Range visible
to user
K 1
Storage buffer 2
K21
Storage buffer 21
K22
K500
1 - 44
1.3
1.3
1.3.1
MV,
K0, DT n
Decimal constant (K) or
hexadecimal constant (H)
When 32-bit (double word) data is handled in data registers, use two data registers as
a set. The number of the data register for the lower 16 bits is specified.
DTn
DTn+1
0 0 0 1 1 0 1 0 0 1
0 1 0 0 1 0 0 0 0 1 1 0 1 0
0 1 0 1 1 0 0 0
1 - 45
Hold type
Data register
FP0 C32
Hold type
Hold type
FP
FP - e
Note
For the FP2/FP2SH/FP3/FP10SH, if the Initialize/Test switch is set to the upper side
(the Initialize side) in the PROG mode, all data registers (DT) are cleared to 0. Even if
a hold type has been specified, these are cleared to 0.
Note
1 - 46
1.3
1.3.2
DT9055
DT90055
1 - 47
Clock/calendar timers
(can be used with all types of the FP0 T32C, FP - e, FP, FP2, FP2SH and FP10SH,
FP3 and C version FP - M C20/C32, FP1 C24C/C40C/C56C/C72C types)
The year, month, day, hour, minute, second, and day of the week tracked by the
calendar timer are stored here (DT9053 to DT9057/DT90053 to DT90057).
Note
1 - 48
1.3
1.3.3
12 11 8 7 4 3 0
0 0 0 1 1 0 1 0 0 1 0 1 1 0 0 0
Double - word specifications can also be used in the same way as with data registers.
32 - bit data can be handled.
The number of file registers varies depending on the type and the system register
settings.
Type
FP10SH
32,765 words
FP3 (16 K)
FP3 (10 K)
FP2 (32 K)
FP2 (16 K)
FP2SH
Note
1 - 49
1.3.4
WR1
R1F R1E
R2F R2E
WR2
For the FP2/FP2SH/FP3/FP10SH, if the Initialize/Test switch is set to the upper side
(the Initialize side) in the PROG mode, WX, WY, WR, and WL are cleared to 0. Even
if a hold type has been specified, these are cleared to 0.
Pulse relays (P) and error alarm relays (E) cannot be handled in word units.
Examples of using WX, WY, WR and WL
WX can be used to read in digital switch and keyboard inputs, and WY can be used for
output to 7 - segment displays.
WR can also be used as a shift register.
All of the relays can be used to monitor 16 - bit words.
Precautions concerning usage
If an on or off status of one of the relays composing the memory area changes, the
memory area value will also change.
WR0
0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 (H9)
When R1 is turned on
WR0
0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 (HB)
1 - 50
1.3
1.3.5
LDn
Communication
Cassette
Send
MEWNET-W0
Receive
LDn
When link data registers are used, data can be exchanged between PLCs simply by
writing the data, as shown here.
Available range of link data registers
The available range of link data registers varies depending on the type of network and
the combination of units. The available range and number of points must be specified
separately for each network
For MEWNET- W0
A maximum of 128 words can be used with one control unit. The available range is from
LD0 to LD127
1 - 51
LD0 to LD127
12
If the beginning of a hold type register is specified using a word number, registers before
that point will be non - hold types, and subsequent registers will be hold types. For
example, if 64 is set for system register 12, LD0 to LD63 will be non - hold types, and
LD64 to LD127 will be hold types.
For the default value, all link data registers are hold types.
If used as link data registers for reception, be aware that no holding operation is carried
out, even if the link data registers are specified as hold types using the system registers.
1 - 52
1.3
1.3.6
CPU
Link station
LDn
Send
MEWNET
CPU
Link
station
Receive
LDn
When link data registers are used, data can be exchanged between PLCs simply by
writing the data, as shown here.
1 - 53
LD256 to
LD8447
(8,192 words)
1 - 54
1.3
LD0 to LD127
12
LD128 to LD255
13
LD256 to LD8447
17
If the beginning of a hold type register is specified using a word number, registers before
that point will be non - hold types, and subsequent registers will be hold types. For
example, if 64 is set for system register 12, LD0 to LD63 will be non - hold types, and
LD64 to LD127 will be hold types.
For the default value, all link data registers are hold types.
If used as link data registers for reception, be aware that no holding operation is carried
out, even if the link data registers are specified as hold types using the system registers.
Note
1 - 55
Example:
Non - hold type
Hold type
System
register 12
System
register 13
Hold type
Note
System
register 17
LD0
to
LD127
LD128
to
LD255
LD256
to
LD8447
For the FP2/FP2SH/FP3/FP10SH, if the Initialize/Test switch is set to the upper side
(the Initialize side) in the PROG mode, all of the link data registers (LD) are cleared to
0. Even if a hold type has been specified, these link data registers are cleared to 0.
Note
1 - 56
1.3
1.3.7
A decimal number or SV area number is specified for the set value when the TM or CT
instruction is entered in the program.
An SV is a one - word, 16 - bit memory area which stores a decimal number from K0 to
K32767.
Using set value area (SV)
During RUN mode, a set value for a timer or counter can be changed by rewriting the
corresponding set value area.
The value in a set value area can be read and changed from the program by specifying
the destination and other information in F0 (MV) data transfer instruction.
The set value area can be read and rewritten using a programming tool.
For the FP2/FP2SH/FP3/FP10SH, if the Initialize/Test switch is set to the upper side
(the Initialize side) in the PROG mode, all timer/counter setting value areas (SV) are
cleared to 0. Even if a hold type has been specified, these are cleared to 0.
Note
Example:
SV and EV areas are in a one - to - one correspondence with
timers and counters.
Timer/Counter number
T0
T1
:
T99
SV0
SV1
:
SV99
EV0
EV1
:
EV99
C100
:
SV100
:
EV100
:
1 - 57
1.3.8
Value of EVn
TM n, K 30
0
Value of SVn
SVn
K30
29
Tn
28
Decrements
1
EVn
0
Tn turns on when decrement operation ends
1 - 58
1.3
1.3.9
Modifying DT11
IXDT11
Base address
11
+
11
+
11
+
IX value
Target address
K0
=
DT11
K10
=
DT21
K - 10 =
DT1
Modifying a constant
Constant = Base value + Value in IX or IY
Example 1: Modifying K100
IXK100
Base value
K100
K100
K100
+
+
+
IX value
K0
=
K10
=
K - 10 =
Constant
K100
K110
K90
IXH10
Base value
IX value
H10
+
HA
=
H10
+
H10
=
Constant
H1A
H20
1 - 59
F0 MV, DT 0,
IX
IX setting
K10
10 + 0 = 10
F0 MV, DT 1,
IX
F0 MV, IXWR0,
IX setting
DT 0
K9
1 - 60
WR0
0 =
WR9
1.3
Contents of IY
Contents of IX
For the FP3 if the Initialize/Test switch is set to the upper side (the Initialize side) in the
PROG mode, index registers IX and IY are cleared to 0.
Note
1 - 61
Contents of In+1
Contents of In
Note
1 - 62
1.3
1.3.11
Contents of In+1
Contents of In
Note
1 - 63
For the FP2/FP2SH/FP10SH, if the Initialize/Test switch is set to the upper side (the
Initialize side) in the PROG mode, index registers I0 to ID are cleared to 0.
Note
The bank switching function for index registers can be used on the FP2SH/FP10SH.
This function is not provided in the FP2.
The following index modifications are possible
Memory area numbers used with high-level instructions
K constants (16-bit and 32-bit) and H constants (16-bit and 32-bit) specified with
high-level instructions
Relay numbers used with the following basic instructions: ST, ST/, AN, AN/, OR, OR/,
OT, KP, SET, RST, OT, OT
Instruction numbers specified with the following basic instructions: TM, CT, MC, MCE,
JP, LOOP, CALL, FCAL (FCAL instruction can be used with the FP2SH/FP10SH.)
Memory areas used with the following basic instructions: TM, CT, SR
Note
1 - 64
1.3
Modifying DT11
I0DT11
Base address
11
+
11
+
11
+
I0 value
K0
K10
K - 10
=
=
=
Target address
DT11
DT21
DT1
F0 MV, DT 0,
I0
I0 setting
K10
10 + 100 = 110
DT110
F0 MV, DT 1,
I0
I0 setting
F0 MV, I0DT100, DT 0
K9
9 + 100 = 109
DT109
1 - 65
I0K100
Base value
K100
K100
K100
+
+
+
I0 value
K0
K10
K - 10
=
=
=
16-bit constant
K100
K110
K90
I0H10
Base value
H10
H10
+
+
I0 value
HA
H10
=
=
16-bit constant
H1A
H20
I0K 0
Base value
K0
K0
K0
1 - 66
+
+
+
I1 and I0 value
K10000
=
K60000
=
K999999 =
32-bit constant
K10000
K60000
K999999
1.3
Example:
Modifying X10
IAX10
Base number
10
10
10
19
19
+
+
+
+
+
IA value
H0
HF
H - 10
K7
K - 11
=
=
=
=
=
Target number
X10
X1F
X0
X20
XE
F0 MV, DT 0,
I0
I0 setting
K10
10
X0
XA
10 (decimal) A (hexadecimal)
F0 MV, DT 2,
I0
I0 setting
I0Y10
X0
HF
Y10
Y1F
10 = 1F
1 - 67
F0 MV, DT 0,
I0
I0 setting
K10
10
WR0
WR10
10
F0 MV, DT 1,
IB
IB setting
F0 MV, IBWR0, DT 0
K9
9 +
0
1 - 68
WR9
1.3
Decimal
1, 2, 3 ............12
Hexadecimal
0, 1, 2, 3 ........ 9 A,B ........ F
X 0, X 1 . . . . . . . . . . . . . . . . . . . . X F
X 10, X 11 . . . . . . . . . . . . . . . . . . . . X 1F
X 20, X 21 . . . . . . . . . . . . . . . . . . . . X 2F
Target address
X0
X1
X9
10
XA
15
XF
16
10
X10
31
1F
X1F
159
9F
X9F
160
A0
X100
161
A1
X101
255
FF
X15F
256
100
X160
257
101
X161
265
10A
X169
267
10B
X16A
1 - 69
Correct
TMXI0 0, SV0
Specification of set
value area number
Incorrect
TMXI0 0, K30
Specification of constant
1 - 70
1.3
Bank
0
Bank
1
Bank
2
Bank
15
When the register bank setting instruction F410 (SETB) or the register bank changing
instruction F411 (CHGB) is used to specify a bank number, index registers I0 to ID used
after that point can be used as separate index registers from the I0 to ID index registers
used prior to changing the bank.
The bank is automatically set to bank 0 before execution of the leading address of the
program. The bank is also automatically set to bank 0 before execution of the leading
address of a second program.
The bank numbers of index registers used in interrupt programs, subroutines, and other
sub programs should be specified in such a way that the F411 (CHGB) instruction is
executed at the beginning of the sub program, and the F412 (POPB) instruction is
executed at the end of the sub program.
1 - 71
I0 to ID of
bank 0
R9010
F410 SETB, H 11
SETB, H
I0 to ID of
bank 1
R9010
F410 SETB, H 2
I0 to ID of
bank 2
R9010
F410 SETB, H 3
I0 to ID of
bank 3
Different values can be set for I0 in bank 0, bank 1 and bank 2. The set values are only
effective within their respective ranges.
Note
Sub program
R9010
F412 POPB
IRET
1 - 72
1.4
1.4
1.4.1
Explanation of Constants
Explanation of Constants
Example:
Data is normally handled in units of one word (16 bits), however, it is also occasionally
handled in units of two words (32 bits). In this case, as well, the MSB serves as the sign
bit.
The available range of a decimal constant is:
16-bit equivalent data: K-32768 to K32767
32-bit equivalent data: K-2147483648 to K2147483647
1 - 73
1.4.2
1211 8 7 4 3 0
0
0
A
2
Binary data 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0
Data is normally handled in units of one word (16 bits), however, it is also occasionally
handled in units of two words (32 bits).
The available range of a hexadecimal constant is:
16-bit equivalent data: H0 to HFFFF
32-bit equivalent data: H0 to HFFFFFFFF
1 - 74
1.4
1.4.3
Explanation of Constants
Available PLC
FP0, FP - e, FP, FP2, FP2SH and FP10SH
Range of floating point type real numbers that can be used in operations
The range of floating point type real numbers that can be stored in the memory area is
as noted below.
Range of negative numbers: - 3.402823 x 1038 to - 1.175494 x 10 - 38
Range of positive numbers: 1.175494 x 10 - 38 to 3.402823 x 1038
Even if the results of the real - number operation involve multiple digits, the actual
processing is effective for a mantissa of up to 7 digits.
Example:
(f1.0)
DT20 (f2.0)
DT21
Storage destination
DT0
(f0.5)
DT1
Example 2: When floating point type real number data stored in DT0 and DT1
is being sent to destination, the 32 - bit data sending instruction
F1 (DMV) instruction should be used.
F1 DMV, DT0, DT100
Transmission source
DT0
DT1
(f1.234)
Transmission source
DT100
DT101
(f1.234)
1 - 75
1 - 76
1.4
Explanation of Constants
converted to
16- bit integer
converted to
32- bit integer
1 - 77
converted to
16- bit integer
converted to
32- bit integer
converted to
16- bit integer
converted to
32- bit integer
1 - 78
1.4
Explanation of Constants
1 - 79
1.4.4
BCD Type Real Numbers (H) (for FP2, FP2SH and FP10SH)
Integer segment
H0 to H9999
Decimal point segment
H0 to H9999
Example 2: When sending BCD type real - number data stored in DT0 to
DT2, the F10 (BKMV) block transmission instruction or a similar
instruction should be used, and the data sent in three - word
units.
X10
F10 BKMV, DT0, DT2, DT100
Transmission source
DT0
DT1
DT2
1 - 80
H0
H0
H7071
Transmission destination
DT100
DT101
DT102
H0
H0
H7071
1.4
1.4.5
Explanation of Constants
54
45
4E
57
45
Character constant
1 - 81
1.5
1.5.1
16 - bit data
Data which can be handled in the PLC (16 - bit binary data)
0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Decimal
constants
K
K
K
K
Hexadecimal
constants
32767
1
0
-1
- 32768
H7FFF
H0001
H0000
HFFFF
H8000
32-bit data
Data which can be handled in the PLC (32 - bit binary data)
0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 - 82
Decimal
constants
K 2147483647
K
1
K
0
K
-1
K - 2147483648
Hexadecimal
constants
H7FFFFFFF
H00000001
H00000000
HFFFFFFFF
H80000000
0 0 0 0 0 1 1 1 0 1 0 0 1 1 0 0
A negative number is expressed as a twos complement (the bits of the 16 - bit binary
data of the positive number are inverted and 1 is added to the result).
Example 2: Expressing the decimal number -4
0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
Binary expression of
decimal number 4
Add 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0
Binary expression of
decimal number - 4
1 - 83
5 Each digit is
converted to binary
BCD code
(Binary coded
decimal)
1 - 84
0110
0100
0101 H645
1.5.2
H 7FFF
K 2147483647
H 7FFFFFFF
K
K
K
Min. value
K 32767
H 0001
H 0000
H FFFF
.
K
K
K
H 00000001
H 00000000
H FFFFFFFF
.
H 8000
K-2147483648
.
.
.
.
1
0
-1
.
.
K-32768
.
.
.
.
.
.
1
0
-1
H 80000000
Min. value
1 - 85
K 32767
1
0
-1
...
...
K
K
K
H 7FFF
H 0001
H 0000
H FFFF
...
...
Min. value
K-32768
H 8000
Underflow
H 9999
Min. value
.....
Underflow
1 - 86
Chapter 2
Basic Instructions
Basic Instructions
2-2
2.1
2.1
2.1.1
These basic instructions perform bit unit logic operations and are the basis of the relay
sequence circuit.
As shown in the illustration below, this is expressed by the combination of the relay coil
and contact.
There are several relay types which are explained in Section 1.2, and the relay which
can be specified depends on the instruction. Refer to the explanation of each instruction.
Example:
Start (ST) instruction
Read the on or off status of the specified contact.
Example:
Input contacts
Address
Internal
relay
contacts
4
X0
X1
R0
ST
AN
OT
R0
OR
Output coil
R0
Y10
ST
OT
Bus line
<Ladder diagram>
2-3
Basic Instructions
2.1.2
X0
T5
Constant of
timer 5
K 30
Y30
2.1.3
Control Instructions
2-4
2.1
Interrupt program
In addition to the normal program, enter an interrupt program (specified with INT or IRET)
if you need a program which will execute immediately when a certain condition is met.
When an interrupt is received, the normal program is interrupted and the interrupt
program is executed.
2.1.4
This is a group of instructions which compare two data. A contact is turned on or off based
on the result of the comparison. Each comparison instruction is composed of several
steps.
Example:
Example of comparing the value of DT10 to K100.
<=, DT 10, K100
Y30
2-5
Basic Instructions
2.2
Type of relay
Steps
Normal
Input
0 to 127F
Output
1280 or more
R0 to R111F
R1120 or more
R9000 to R910F
L0 to L127F
L1280 to L639F
Internal relay
y
Special internal
relay
Link relay
y
R
L
Timer
0 to 255
Counter
256 or more
Note
Index modification is possible only with the FP2, FP2SH and
FP10SH.
Basic function instructions
Type of instruction
yp
Specified number
p
TML
0.01
0 01 s units timer
TMR
TMX
1 s units timer
Counter
Shift register
g
Note
2-6
TMY
CT
SR
Steps
Normal
0 to 255
256 or more
0 to 255
256 or more
0 to 255
256 or more
WR0 to WR239
WR240 or more
2.2
Steps
Normal specification
JP
LOOP
CALL
FCAL
Note
2-7
Basic Instructions
ST
ST/
OT
Outline
Start
Start Not
Out
ST, ST/:
OT:
Program example
Boolean
Ladder Diagram
0
2
X0
Address
0
Start
Out
Start Not
OT
10
ST/
Out
Y11
ST
Y10
X0
Instruction
OT
11
Operands
Timer/Counter
Contact
Relay
Instruction
L
P
E
(*1) (*2) (*3)
ST, ST/
OT
N/A
N/A N/A
Index
modifier
(*2)
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
Y10 goes on when X0 turns on.
Y11 goes on when X0 turns off.
X0
on
off
on
Y10 off
on
Y11 off
Description
The ST instruction starts logic operations and regards the input contact specified at the start as a Form A
(normally open) contact.
The ST/ instruction starts logic operations and regards the input contact specified at the start as a Form B
(normally closed) contact.
The OT instruction outputs the operation result to a specified coil.
2- 8
Basic Instructions
Y10
Y10
Y11
Y12
Some input devices, such as emergency stop switches, usually have a Form B (normally closed) contact.
When an emergency stop switch with a Form B contact is programmed, be sure to use the ST instruction.
2- 9
Basic Instructions
/
Outline
Not
Program example
Boolean
Ladder Diagram
X0
Address
Y10
0
Y11
Not
Explanation of example
Y10 goes on and Y11 goes off when X0 turns on.
Y10 goes off and Y11 goes on when X0 turns off.
X0
on
off
on
Y10 off
on
Y11 off
Description
The / instruction inverts the operation result up to this instruction.
2 - 10
Instruction
ST
OT
10
OT
11
Basic Instructions
AN
AN/
AND
AND Not
Outline
Program example
Boolean
Ladder Diagram
Address
Instruction
0
X0
X1
X2
AN
AN/
AND Not
AND
ST
Y10
OT
10
Operands
Timer/Counter
Contact
Relay
Instruction
X
AN, AN/
Y
A
L
P
E
(*1) (*2) (*3)
A
Index
modifier
(*2)
A: Available
N/A: Not Available
Explanation of example
Y10 goes on when both X0 and X1 turn on and also X2 turns off.
X0
on
off
X1
on
off
X2
on
off
on
Y10 off
Description
Performs a logical AND operation with the results of the immediately preceding serially connected operation.
X1
Y10
X2
X3
Y10
X1
X2
X3
2 - 11
Basic Instructions
OR
OR/
OR
OR Not
Outline
Program example
Boolean
Ladder Diagram
X0
Address
Y10
OR
OR/
OR
X2
X1
ST
0
1
Instruction
OT
10
OR Not
Operands
Timer/Counter
Contact
Relay
Instruction
X
OR, OR/
L
P
E
(*1) (*2) (*3)
A
Index
modifier
(*2)
A: Available
N/A: Not Available
Explanation of example
Y10 goes on when either X0 or X1 turns on or X2 turns off.
X0
on
off
X1
on
off
X2
on
off
Y10 on
off
Description
Performs a logical OR operation with the results of the immediately preceding operation connected in
parallel.
2 - 12
Basic Instructions
Y10
X1
X2
X3
2 - 13
Basic Instructions
ST
ST
AN
AN
OR
OR
Outline
Program example
Boolean
Ladder Diagram
Address
3
X3
Y12
Trailing edge OR
X4
OT
10
ST
AN
OT
11
ST
OR
11
Y11
X2
ST
Y10
0
2
X0
X1
OT
12
Operands
Timer/Counter
Contact
Relay
Instruction
Index
modifier
ST, ST
N/A
N/A
AN, AN
N/A
N/A
OR, OR
N/A
N/A
2 - 14
Instruction
A: Available
N/A: Not Available
Basic Instructions
Explanation of example
ST, AN and OR instructions
Output to Y10 takes place for one scan only following a change in X0 from off to on.
X0
on
off
Y10
on
off
One scan
Leading edge
One scan
Leading edge
Output to Y11 takes place for one scan only following a change in X2 from off to on when X1 is on.
X1
on
off
X2
on
off
Y11
on
off
One scan
Output to Y12 takes place for one scan only following a change in X3 or X4 from on to off.
X3
on
off
X4
on
off
Y12
on
off
One scan
One scan
2 - 15
Basic Instructions
OT
OT
Outline
Program example
Boolean
Ladder Diagram
Address
Instruction
0
P0
0
Leading edge Out
X1
P1
ST
OT
X0
ST
OT
3
Trailing edge Out
Operands
Timer/Counter
Contact
Relay
Instruction
X
Index
modifier
OT
N/A
N/A
N/A
OT
N/A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
Output to pulse relay P0 takes place for one scan only following a change in X0 from off to on.
X0
on
off
P0
on
off
One scan
Output to pulse relay P1 takes place for one scan only following a change in X1 from on to off.
X1
on
off
P1
on
off
One scan
2 - 16
Basic Instructions
Description
OT instructions
Output to the pulse relay takes place for one scan only following a change in the immediately previous
processing result from off to on. The pulse relay goes on for one scan only.
OT instructions
Output to the pulse relay takes place for one scan only following a change in the immediately previous
processing result from on to off. The pulse relay goes on for one scan only.
P0
P0
Y10
Y10
DF
on
off
Y10
on
off
One scan
One scan
2 - 17
Basic Instructions
ALT
Alternative out
Inverts the output condition each time the leading edge of the signal is
detected.
Outline
Program example
Boolean
Ladder Diagram
Address
Instruction
0
X0
ST
Y10
A
ALT
10
Alternative out
Operands
X
ALT
Timer/Counter
Contact
Relay
Instruction
Y
N/A
N/A N/A
N/A
N/A
Index
modifier
N/A
A: Available
N/A: Not Available
Explanation of example
Each time X0 changes from off to on, the on/off state of output Y10 toggles.
X0
on
off
Y10
on
off
Invert
Invert
Invert
Description
When the immediately previous processing result changes from off to on, the on/off state of the specified coil
toggles.
The on/off state of the specified coil is held until an ALT instruction specifying that coil rises. (Flip-flop control)
2 - 18
Basic Instructions
ANS
Outline
AND stack
Program example
Boolean
Ladder Diagram
Address
Instruction
X1
Y10
X3
Block 2
Block 1
OR
X2
ST
OR
ANS
X0
0
ST
OT
10
Explanation of example
Y10 goes on when X0 or X1 and X2 or X3 turn on.
(X0 OR X1) AND (X2 OR X3) Y10
block 1
X0
on
off
X1
on
off
X2
on
off
X3
block 2
on
off
on
Y10 off
Description
Blocks connected in parallel are connected in series.
+
A block begins with the ST instruction.
2 - 19
Basic Instructions
block
4
block
5
X0
X2
X4
block
4
X1
X3
X5
block
1
block
2
block
3
Y10
block
5
block
1
block
2
ST
OR
ST
OR
ANS . . . . . . . . . .
block
3
ST
OR
ANS . . . . . . . . . .
OUT
2 - 20
10
Basic Instructions
ORS
Outline
OR stack
Program example
Boolean
Ladder Diagram
Address
Instruction
X2
X3
Block 1
Y10
Block 2
AN
ST
AN
ORS
X1
X0
ST
OT
10
Explanation of example
Y10 goes on when both X0 and X1 or both X2 and X3 turn on.
(X0 AND X1) OR (X2 AND X3) Y10
block 1
X0
X1
on
off
X2
on
off
X3
block 2
on
off
on
off
Y10 on
off
Description
Blocks connected in series are connected in parallel.
+
A block begins with the ST instruction.
2 - 21
Basic Instructions
block 4
block
1
block
2
block
3
X0
X1
X2
X3 1
X4
X5 2
Y10
block
5
block
2
ST
AN
ST
AN
ORS . . . . . . . . .
block
3
AN
ORS . . . . . . . . .
block 5
2 - 22
ST
OUT
10
Basic Instructions
PSHS
RDS
POPS
Outline
Push stack
Read stack
Pop stack
Program example
Boolean
Ladder Diagram
Address
Instruction
0
1
Y10
X2 Push Stack
Y11
X3 Read Stack
Y12
Pop Stack
AN
OT
10
RDS
AN
OT
11
POPS
AN/
X1
PSHS
X0
ST
OT
12
Explanation of example
When X0 turns on:
- Stores the operation result up to the PSHS instruction and Y10 goes on when X1 turns on.
- Reads the stored result using the RDS instruction and Y11 goes on when X2 turns on.
- Reads the stored result using the POPS instruction and Y12 goes on when X3 turns off. Also clears
the result stored by the PSHS instruction.
X0
on
off
X1
on
off
on
Y10 off
X2
on
off
on
Y11 off
X3
on
off
on
Y12 off
2 - 23
Basic Instructions
Description
One operation result can be stored in memory and read, and multiple processes performed.
PSHS (stores operation result):
Stores the operation result up to this instruction and continues execution from the next step.
RDS (reads operation result):
Reads the operation result stored using the PSHS instruction and, using this result, continues operation from
the next step.
POPS (resets operation contents):
Reads the operation result stored using the PSHS instruction and, using this result, continues operation from
the next step. Also clears the operation result stored by the PSHS instruction.
These instructions are used if there is branching from a single contact, followed by another contact or
contacts.
X1
Y10
PSHS
X2
Y11
RDS
X3
X4
Y12
POPS
X0
Y11
X1
X3
Y12
X5
Y13
X6
2 - 24
X2
X4
RDS
X7
Y14
Basic Instructions
Up to 8 times maximum
Up to 7 times maximum
If the instruction is used consecutively more than the allowable number of times, be aware that the program
will not run correctly.
X0 X1 X2 X3 X4 X5 X6
Y10 ST X 0
PSHS . . . .
AN X 1
PSHS . . . .
AN X 2
PSHS . . . .
AN X 3
PSHS . . . .
AN X 4
PSHS . . . .
AN X 5
PSHS . . . .
AN X 6
1
2
3
4
5
6
OT Y10
If a POPS instruction is used during repeated use of a PSHS instruction, reading will take place in order
beginning from the last data stored by the PSHS instruction.
X0 X1 X2 X3 X4 X5
Y10
X6
Y11
X7
Y12
X8
Y13
X9
Y14
XA
Y15
POPS . . . . . 5 Reading
AN
X 6
OT Y 11
POPS . . . . . 4 Reading
AN
X 7
OT Y 12
POPS . . . . . 3 Reading
AN
X 8
OT Y 13
2 - 25
Basic Instructions
DF
DF/
Outline
DF: Turns on the contact for only one scan when the leading edge of
the trigger is detected.
DF/: Turns on the contact for only one scan when the trailing edge of
the trigger is detected. 7
Program example
Boolean
Ladder Diagram
Address
Instruction
0
3
X0
(DF)
X1
(DF/)
Y10
Y11
OT
10
ST
ST
DF
DF/
OT
11
Explanation of example
Y10 goes on for only one scan when the leading edge (off on) of X0 is detected.
Y11 goes on for only one scan when the trailing edge (on off) of X1 is detected.
X0
on
off
X1
on
off
on
Y10 off
Y11 on
off
1 scan
1 scan
1 scan
Leading
edge
1 scan
Trailing
edge
Related instructions
With the FP, FP2, FP2SH and FP10SH, the DFI instruction can be used. It is executed only for the first scan.
2 - 26
Basic Instructions
Description
The DF instruction executes and turns on output for only one scan duration when the trigger changes from an
off to an on state.
The DF/ instruction executes and turns on output for only one scan duration when the trigger changes from an
on to an off state.
There is no limit on the number of times the DF and DF/ instructions can be used.
With the DF and DF/ differential instructions, only a change in the on and off status of the contact is detected.
Thus, if the execution condition is initially on such as when the mode is changed to RUN or the power turned
on in RUN mode, output will not be obtained.
Example:
Leading
edge
X1
(DF)
Y10
X1
Y10
1 2
In the following program the execution condition is initially on, therefore output is not obtained.
R9013
DF
R9010
DF
Y10
Y10
R9010 is always on.
Y10
2 - 27
Basic Instructions
Caution is required when using a differential instruction with instructions which change the order of instruction
execution such as MC and MCE or JP and LBL (below instructions).
- MC to MCE instructions
- JP to LBL instructions
- F19 (SJP) to LBL instructions
- LOOP to LBL instructions
- CNDE instruction
- Step ladder instructions
- Subroutine instructions
When combining a differential instruction with an AND stack or pop stack instruction, take care that the syntax
is correct.
Operation is as follows with a circuit like the one shown below.
Time chart
X0
Y0
DF
X1
X0
X1
Y0
Please use a program as follows when Y0 is turned on at the rise of either X0 or X1.
Time chart
X0
Y0
DF
X1
X0
X1
DF
Y0
R0
DF
Y10
Y10
X1
X0
X1
DF
R0
R0
Y10
Y10
With no differential instruction
2 - 28
Basic Instructions
Example 1:
X0
R0
DF
R0
R0
Y10
Y10
Y10
Example 2:
X0
R0
DF
R0
R0
Y10
Y10
Y10
2 - 29
Basic Instructions
DFI
Outline
Program example
Boolean
Ladder Diagram
X0
0
Address
Y10
Instruction
ST
DFI
DFI
OT
10
Explanation of example
Output to Y10 takes place for one scan only following a change in X0 from off to on.
When the trigger X0 is met after RUN is begun
X0
Y10
One scan
Leading edge
When the trigger X0 is met before RUN
X0
Y10
One scan
Description
When the trigger (execution condition) changes from off to on, the DFI instruction outputs (differential output)
during the following scan only.
When the trigger (execution condition) is met before RUN is begun, output (differential output) takes place at
the first scan.
There is no limit to the number of times the DFI instruction can be used.
When the mode is changed to RUN or the power is turned on in RUN mode and the trigger (execution
condition) is already met, a DF instruction will not obtain output at the first scan. For this reason, use a DFI
instruction.
2 - 30
Basic Instructions
2 - 31
Basic Instructions
SET
RST
Set
Reset
SET: When the execution conditions have been satisfied, the output is
turned on, and the on status is retained.
RST: When the execution conditions have been satisfied, the output is
turned off, and the off status is retained.
Outline
Program example
Boolean
Ladder Diagram
Address
Set
Instruction
Y30
ST
21
SET
30
Y30
X1
20
X0
20
24
ST
25
RST
30
24
Output destination
Reset
Operands
Timer/Counter
Contact
Relay
Instruction
Index
modifier
X
SET, RST
L
(*1)
E
(*2)
(*2)
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Operand
Timer/Counter
Register
Index
register
Constant
WX
RST
WY
WR
WL
SV
EV
DT
FL
N/A
N/A
N/A
N/A
Index
modifier
A
Explanation of example
When X0 turns on, Y30 goes on and holds on.
When X1 turns on, Y30 goes off and stays off.
X0
on
off
X1
on
off
on
Y30 off
Description
The SET instruction executes when the trigger is turned on. Output turns on and holds on even if the triggers
state changes.
The RST instruction executes when the trigger is turned on. Output coil turns off and stays off even if the
triggers state changes.
You can use relays with the same number as many times as you like with the SET and RST instructions.
(Even if a total check is run, this is not handled as a syntax error.)
2 - 32
Basic Instructions
Example:
When X0, X1, and X2 are turned on
Y10
X0
Y10
Y10
X2
Y10
I/O update is performed when an ED instruction is executed, therefore the data actually output is determined
by the final operation result. In the above example, the Y10 output is on.
To output a result while operation is still in progress, use a partial I/O update instruction (F143).
X1
(DF)
Y10
Y10
(DF)
X0
2 - 33
Basic Instructions
KP
Keep
Outline
Program example
Boolean
Ladder Diagram
Address
Set input
X0
Instruction
ST
Reset input
X1
ST
KP R 30
KP
30
Output destination
Operands
Timer/Counter
Contact
Relay
Instruction
X
KP
L
(*1)
N/A
(*2)
N/A
N/A
N/A N/A
Index
modifier
A: Available
N/A: Not Available
Explanation of example
When X0 turns on, output relay R30 goes on and stays on.
R30 goes off when X1 turns on.
X0
on
off
X1
on
off
on
R30 off
Set
Reset
Reset takes
precedence
Description
When the set input turns on, output of the specified relay goes on and stays on.
Output relay goes off when the reset input turns on.
The output relays on state is maintained until a reset input turns on, regardless of the on or off states of the set
input.
If the set input and reset input turn on simultaneously, the reset input has priority.
2 - 34
Basic Instructions
NOP
Outline
No operation
No operation 5
Program example
Boolean
Ladder Diagram
Address
Instruction
0
X1
NOP
AN
NOP
Y10
X2
AN/
X0
0
ST
OT
10
Description
This instruction has no effect on the operation result to that point.
The same operation takes place without a NOP instruction.
The NOP instruction can be used to make the program easier to read when checking or correcting.
When you want to delete an instruction without changing addresses, write a NOP instruction (overwrite the
previous instruction).
When you want to move the addresses of one part of a program without changing the program, insert a NOP
instruction.
This is a convenient means of breaking a long program into several blocks.
Example:
To move the starting point of a program block from address 39
to address 40, insert a NOP instruction at address 39.
Address
36
39
40
44
ST
OR
OT
ST
AN
OT
ST
DF
ST
X0
X1
Y10
X2
X3
R20
R2
X3
Address
36
39
40
41
45
ST X0
OR X1
OT Y10
NOP
ST X2
AN X3
OT R20
ST R2
DF
ST X3
Insert a NOP
instruction.
2 - 35
Basic Instructions
TML
Outline
Program example
Boolean
Ladder Diagram
Address
Instruction
TML
X0
ST
Set value
TM
5, K 300
300
4
T5
R0
ST
OT
Operands
Timer/
Counter
Relay
Instruction
Set value
Index
Constant
register
Register
WX WY WR WL
EV DT LD FL
SV
(*1) (*1) (*1) (*1)
(*1) (*1) (*1) (*1)
A
IX
IY
N/A N/A
Index
modifier
(*2)
N/A
A: Available
N/A: Not Available
Description
The timer is reset and does not retain its data when the power is turned off or the mode is changed from RUN
to PROG. (If you need to retain the operating state , set system register 6.)
When the trigger (execution condition) is on, the set time decrements until the elapsed value reaches zero,
and at this point the timer contact Tn (n represents the timer contact number) goes on.
If the trigger (execution condition) goes off during decrement operation, operation stops and the elapsed
value is reset to zero (cleared).
An OT instruction can appear immediately after a timer coil.
2 - 36
Basic Instructions
Example:
When the value K43 is set, the time will be 0.001 43 = 0.043
seconds.
When the K500 is set, the set time will be 0.001 500 = 0.5
seconds.
Precautions during programming
The timer value decrements during processing, therefore, create the program so that one decrement occurs
during one scan. (A correct result will not be obtained if no processing operations or multiple processing
operations take place during one scan due to an interrupt program or JP/LOOP instruction.) If multiple
processing operations are needed during one scan, set system register 4.
Take care that the syntax is correct when combining a timer instruction with an ANS or POPS instruction.
1.
Set value
X0
T5
Transfer to SV area
SV5
300
TML5, K300
Y10
When the trigger X0 (timer execution condition) rises from off to on, the setting is transferred from the
setting value area SV to the elapsed value area EV with the same number.
(The same operation takes place if the mode is changed to RUN while the trigger (execution condition)
is on.)
With each scan, the value in the elapsed value area EV decrements if the trigger (execution condition)
is on.
2
X0
T5
TML5, K300
Y10
Transfer to EV area
SV5
300
3
Decrement
operation
EV5
300
229
228
227
2 - 37
Basic Instructions
When the value in the elapsed value area EV reaches zero, the timer contact T with the same number
goes on.
X0
T5
SV5
300
TML5, K300
EV5
0
4
Y10
TML5, I0K300
When the constant (K) is specified, the timer number cannot be modified by index modification.
This program cannot be executed.
X0
X1
DT0
30
1
T5
Y10
When the timer execution condition rises from off to on, the value is transferred from the setting value area
(DT0 in this example) to the elapsed value area EV with the same number as the timer.
(The same operation takes place if the mode is changed to RUN while the trigger (execution condition)
is on.)
2 - 38
Basic Instructions
With each scan, the value in the elapsed value area EV decrements if the trigger (execution condition)
is on.
2 Transfer to EV area
X0
F0 MV, K30, SV5
X1
TML5, DT0
T5
DT0
30
3
Decrement
Y10
EV5
30
29
28
27
When the value in the elapsed value area EV reaches zero, the timer contact T with the same number
goes on.
X1
TML5, DT0
T5
Y10
DT0
30
EV5
0
4
Example:
TML5, I2DT0
2 - 39
Basic Instructions
Example:
TML I05, DT 0
T15
Y10
Notes
When a timer number is modified, the number of steps is 4
regardless of the value in the index register.
When both the memory area address and timer number are
modified, different index registers can be used for each.
Examples of timer instruction applications
Serial connection of timer
Ladder diagram
X0
TMX 0, K 30
Boolean
Time chart
T0
Y10
T1
Y11
X0
on
off
T0
on
off
T1
on
off
Boolean
TML 1, K 200
0
0
30
1
200
0
10
1
11
Time chart
ST
PSHS
TML
K
POPS
TML
K
ST
OT
ST
OT
X0
on
off
0
300
T0
on
off
T1
on
off
ST
TMX
K
TML
K
ST
OT
ST
OT
T
Y
T
Y
3s
0.2s
on
Y10 off
on
Y11 off
TML 0, K 300
TML 1, K 200
T0
Y10
T1
Y11
2 - 40
T
Y
T
Y
1
200
0
10
1
11
on
Y10 off
Y11 on
off
0.3s
0.2s
Basic Instructions
Ladder diagram
X1 X0
Boolean
F0 MV, K 500, DT 0
X0 X1
F0 MV, K 300, DT 0
TML 5, DT 0
X2
T5
Y30
Time chart
ST/
AN
F0
X0
on
off
X1
on
off
X2
on
off
T5
on
off
X
X
1
0
(MV)
K 500
DT
0
X
0
X
1
(MV)
K 300
DT
0
X
2
5
DT
0
T
5
Y
30
ST/
AN
F0
ST
TML
ST
OT
DT0 K0
0.5s
K500
0.3s
K300
K500
Connection example
Ladder diagram
R10
R11
T5
Set value
of timer
Boolean
F81 BIN, WX 0, DT 1
TML 5, DT 1
Y30
ST
F81
ST
TML
ST
OT
10
(BIN)
WX 0
DT
1
R
11
5
DT
1
T
5
Y
30
WX0
Digital switch
2 - 41
Basic Instructions
TMR
TMX
TMY
Outline
Program example
Boolean
Ladder Diagram
Trigger
Address
Timer number
Set value
Unit of timer
TMX
Y37
0
5
Elapsed value
T5
ST
TMX 5 K 30
X0
Instruction
30
ST
OT
37
Operands
Timer/
Counter
Relay
Instruction
Set value
Index
Constant
register
Register
WX WY WR WL
EV DT LD FL
SV
(*1) (*1) (*1) (*1)
(*1) (*1) (*1) (*1)
A
IX
IY
N/A N/A
Index
modifier
(*2)
N/A
A: Available
N/A: Not Available
Description
The timer is a non - hold type that is reset if the power is turned off, or if the mode is changed from the RUN to
the PROG mode. If it is necessary to hold the operation state, set system register 6.
When the trigger is on, the set time [n] decrements, and when the elapsed value reaches zero, timer contact
Tn (n is the timer contact number) turns on.
If the trigger turns off during operation, operation stops and the elapsed value is reset (cleared to 0).
An OT instruction can be entered immediately after a timer coil.
2 - 42
Basic Instructions
Example:
When K43 is set in TMX, the set time is 0.1 43 = 4.3 seconds.
When K500 is set in TMR, the set time is 0.01 500 = 5
seconds.
Precautions during programming
In order to ensure correct timer operation, the TM instruction should be executed in every scan. Be aware of
this when using instructions like INT, JP and LOOP.
When a timer instruction is combined with an ANS or POPS instruction, take care that the syntax is correct.
Timer operation
The following is an example of setting the set value with a K constant. For an explanation of operation when
an set value area (SV) is specified, see the following pages.
When the mode is changed to RUN or when the power is turned on with the mode set to RUN, the
timer set value is transferred to the set value area (SV) with the same number.
1
Set value
X0
T5
Transfers to SV area
SV5
30
TMX 5, K 30
Y10
When the timer trigger rises from off to on, the setting is transferred from the set value area (SV) to the
elapsed value area (EV) with the same number. (The same operation takes place if the mode is
changed to RUN when the trigger is on.)
The value in the elapsed value area (EV) decrements every scan if the trigger stays on.
2
X0
T5
Transfers to EV area
SV5
30
TMX 5, K 30
Y10
3
Decrements
EV5
30
29
28
27
2 - 43
Basic Instructions
When the value in the elapsed value area (EV) reaches zero, the timer contact (T) with same number
turns on.
X0
TMX 5, K 30
T5
SV5
30
EV5
0
4
Y10
TMX 0, K 30
Boolean
TMX 1, K 20
T0
Y10
T1
Y11
ST
TMX
K
TMX
K
ST
OT
ST
OT
Time chart
T
Y
T
Y
0
0
30
1
20
0
10
1
11
on
off
T0
on
off
T1
on
off
X0
on
off
0
30
X0
T0
on
off
T1
on
off
3s
on
2s
3s
2s
on
Y10 off
on
Y11 off
Boolean
TMX 0, K 30
TMX 1, K 20
T0
Y10
T1
Y11
2 - 44
ST
PSHS
TMX
K
POPS
TMX
K
ST
OT
ST
OT
T
Y
T
Y
Time chart
1
20
0
10
1
11
Y10 off
Y11 on
off
Basic Instructions
.............
TMX 5, SV5
.............
T5
Y10
When trigger X0 is on the data transfer instruction F0 (MV) is executed, set the K30 in SV5.
When trigger X1 turns on, decrement operation begins from the set value 30.
Specify n (the number of the set value area SV) to be the same number as the timer.
Timer number
Ladder
diagram:
Even if the value of the set value area (SV) is changed during decrement operation, the decrement operation
will continue from the value before the change. Timer operation from the new value will not begin until
decrement operation has ended or is interrupted and the trigger subsequently changes from off to on.
The set value area (SV) is normally a non - hold type which resets if the power is turned off or the mode is
changed from RUN to PROG.
If the SV value was changed while in the RUN mode, and that value is to be used as the set value, without
being reset, the next time that the power supply is turned on, or when the mode is changed from RUN to
PROG, system register 6 should be used to specify the value as a hold type.
2 - 45
Basic Instructions
When the trigger for a high - level instruction is on, the value is set in the set value area (SV). The
following diagram shows an example of using the high - level instruction F0(MV).
Set value
X0
X1
SV5
30
TMX 5, SV 5
1
T5
Transfers to SV area
Y10
When the timer trigger rises from off to on, the setting is transferred from the set value area (SV) to the
elapsed value area (EV) with the same number. (The same operation takes place if the mode is
changed to RUN when the trigger is on.)
The value in the elapsed value area (EV) decrements if the trigger stays on every scan.
X0
X1
T5
Transfers to EV area
SV5
30
TMX 5, SV 5
Y10
Decrement
operation
EV5
30
29
28
27
When the value in the elapsed value area (EV) reaches zero, the timer contact (T) with same number
turns on.
X1
T5
2 - 46
TMX 5, SV 5
Y10
SV5
30
EV5
0
4
Basic Instructions
Ladder diagram
X1 X0
Boolean
F0 MV, K 50, SV 5
X0 X1
F0 MV, K 30, SV 5
TMX 5, SV 5
X2
T5
Y30
Time chart
ST/
AN
F0
X0
on
off
X1
on
off
X2
on
off
T5
on
off
X
X
1
0
(MV)
K
50
SV
5
X
0
X
1
(MV)
K
30
SV
5
X
2
5
SV
5
T
5
Y
30
ST/
AN
F0
ST
TMX
ST
OT
5s
SV5 K0
3s
K30
K50
K50
Connection example
Ladder diagram
R10
R11
T5
Set value
of timer
Boolean
F81 BIN, WX 0, SV 5
ST
F81
TMX 5, SV 5
Y30
ST
TMX
ST
OT
10
(BIN)
WX 0
SV
5
R
11
5
SV
5
T
5
Y
30
WX0
Digital switch
With the FP2SH and FP10SH, a memory area such as a data register DT can be specified as the set value.
2 - 47
Basic Instructions
CT
Outline
Counter
Program example
Boolean
Ladder Diagram
Address
Count number
X0
0
1
X1
CT
Count input
Reset input
Instruction
ST
10
ST
100
CT
1
100
Elapsed value
Set value Y31
10
ST
100
C 100
5
OT
31
Operands
Timer/
Counter
Relay
Instruction
Set value
Index
Constant
register
Register
WX WY WR WL
EV DT LD FL
SV
(*1) (*1) (*1) (*1)
(*1) (*1) (*1) (*1)
A
IX
IY
N/A N/A
Index
modifier
(*2)
N/A
A: Available
N/A: Not Available
Explanation of example
When the leading edge of X0 is detected ten times, counter contact C100 turns on and then Y31 goes on.
The elapsed value is reset when X1 turns on.
X0
on
off
....
X1
on
off
10 times
C100 on
off
Y31 on
off
2 - 48
Basic Instructions
Description
The counter is a decremental preset counter.
At the fall time when the reset input goes from on to off, the value of the set value area (SV) is preset in the
elapsed value area (EV).
When the reset input is on, the elapsed value is reset to 0.
When the count input changes from off to on, the set value begins to decrement, and when the elapsed value
reaches 0, the counter contact Cn (n is the counter number) turns on.
If the count input and reset input both turn on at the same time, the reset input is given priority.
If the count input rises and the reset input falls at the same time, the count input is ignored and preset is
executed.
An OT instruction can be entered immediately after a counter instruction.
Counter operation
The following are examples of specifying a K constant as the set value. For an explanation of operation when
a set value area number is specified, see following pages.
(This example shows a case in which 100 is specified for the counter.)
1
When the mode is changed to RUN or the power is turned on with the mode set to RUN, the counter
set value is transferred to the set value area (SV) with the same number.
When the reset input falls, the value in the set value area (SV) is preset in the elapsed value area
(EV).
1
X0
CT 100
K
10
Transfer
Preset
SV100
10
EV100
10
X1
Y10
C100
Each time the count input X0 turns on, the value in the elapsed value area (EV) decrements.
X0
X1
C100
CT 100
K
SV100
10
10
Y10
Decrements
EV100
10
9
8
7
next page
2 - 49
Basic Instructions
When the value in the elapsed value area (EV) reaches zero, the counter contact (C) with the same
number turns on.
X0
CT 100
K
X1
C100
10
SV100
10
4
EV100
0
Y10
Counting
When used in combination with instructions which change the order of instruction execution such as MC and
MCE or JP and LBL (see below), the operation of the instruction may change depending on the timing of
instruction execution and the count input. Exercise caution in these cases.
- MC to MCE instructions
- JP to LBL instructions
- F19 (SJP) to LBL instructions
- LOOP to LBL instructions
- CNDE instructions
- Step ladder instructions
- Subroutine instructions
Related instructions
Counter instructions also include an up/down counter instruction (F118).
An increment instruction (F35) can be used to provide the same type of function.
2 - 50
Basic Instructions
X1
CT
100
...........
...........
SV 100
X2
Y30
C100
When trigger X0 is on the data transfer instruction [F0 (MV)] is executed, set the K30 in SV100.
When the count input X1 turns on, decrement operation begins from the set value 30.
Specify [n] (the number of the set value area SV) to be the same number as the counter.
Counter number
Display:
CT
100
SV
100
These must
be the same.
Even if the value in the set value area (SV) is changed during decrement operation, the decrement operation
will continue from the value before the change. Counter operation from the new value will not begin until the
counter is reset and the count input subsequently changes from off to on.
2 - 51
Basic Instructions
When the trigger for a high - level instruction is on, the value is set in the set value area (SV). The
following diagram shows an example of using the high - level instruction F0 (MV).
X0
X1
X2
100
Transfers to SV area
Y30
C100
SV100
30
100
When the reset input is off, the value in the set value area (SV) is preset in the elapsed value area
(EV).
X1
X2
CT
SV
100
100
SV100
30
2
C100
Presetting
Y30
Each time the count input X1 turns on, the value in the elapsed value area (EV) decrements.
X1
X2
CT
SV
C100
EV100
30
100
100
SV100
30
EV100
30
29
28
27
Y30
Decrements
When the elapsed value area (EV) reaches zero, the counter contact C with the same number turns
on.
X1
X2
C100
2 - 52
CT
SV
100
100
SV100
30
4
Y30
EV100
0
Basic Instructions
Ladder diagram
X1 X0
X0 X1
Boolean
X2
CT
X3
100
SV
C100
Time chart
ST/
AN
F0
X0
on
off
X1
on
off
X2
on
off
X3
on
off
C100
on
off
ST/
AN
F0
100
Y30
ST
ST
CT
ST
OT
X
X
1
0
(MV)
K
50
SV 100
X
0
X
1
(MV)
K
30
SV 100
X
2
X
3
100
SV 100
C 100
Y
30
SV100
50 times
......
K0
K50
Connection diagram
Ladder diagram
Boolean
X10
X11
X12
Digital switch:
WX0
Set value
of counter
C100
CT
SV
100
ST
F81
ST
ST
CT
100
Y30
ST
OT
10
(BIN)
WX 0
SV 100
X
11
X
12
100
SV 100
C 100
Y 30
With the FP2SH and FP10SH, a memory area such as that of a data register DT can be specified as the set
value.
2 - 53
Basic Instructions
SR
Outline
Shift register
One bit shift of 16-bit [word internal relay (WR)] data to the left.
Program example
Boolean
Ladder Diagram
0
1
X2
2
Instruction
Reset input
ST
ST
Shift input
SR WR 3
ST
X0 Data input
X1
Address
SR
WR
Operands
Instruction
Relay
Timer/Counter
WX WY WR WL
D: Data area N/A N/A
N/A
Register
LD
FL
Index
register
SV
EV
DT
N/A
N/A
IX
Explanation of example
IY
Constant
K
N/A
N/A
Index
modifier
(*)
A
A: Available
N/A: Not Available
If the X1 turns on when X2 is in the off state, the contents of the internal relay WR3 (internal relays R30 to R3F)
are shifted one bit to the left.
1 is shifted in R30 if X0 is on, and 0 is shifted in R30 if X0 is off.
If the X2 turns on, the contents of WR3 are reset to 0.
X0
on
off
X1
on
off
X2
on
off
on
R30 off
on
R31 off
on
R32 off
on
R33 off
on
R34 off
2 - 54
Basic Instructions
Description
Shifts the specified data area (WR) one bit to the left.
When the shift input turns on (rises), the contents of WR are shifted one bit to the left.
During the shift, 1 is set in the empty bit (least significant bit) if the data input is on, or 0 if the data input is off.
When shift input is turned on:
WR3
3F . . . . . . . . . . . . . . . . 30
Bit position
15 . . 12
11 . . 8
7 . . 4
3 . . 0
Binary data
0 0 0 0
1 0 0 0
1 0 0 0
1 1 0 0
0 0 0 1
0 0 0 1
0 0 0 1
1 0 0 0
Data input (X0) on: set bit to 1.
Data input (X0) off: set bit to 0.
When the reset input turns on, the contents of WR are cleared.
When reset input is turned on:
WR (Binary data) 0 0 1 1
0 1 0 0
0 0 0 1
1 0 0 1
0 0 0 0
0 0 0 0
0 0 0 0
Reset input
Data area (Rn)
Reset input is given priority
If the internal relay area is specified as a hold type, take care that the data in the area is not reset to 0 when
the power turns on.
When combining a shift register instruction with an ANS or POPS instruction, take care that the syntax is
correct.
2 - 55
Basic Instructions
Shifts
When used in combination with instructions which change the order of instruction execution such as MC and
MCE or JP and LBL (see below), the operation of the instruction may change depending on the timing of
instruction execution and the shift input.
Exercise caution in these cases.
- MC to MCE instructions
- JP to LBL instructions
- F19 (SJP) to LBL instructions
- LOOP to LBL instructions
- CNDE instruction
- Step ladder instructions
- Subroutine instructions
Related instructions
In addition to the shift register instruction, there is also a left/right shift register (F119).
The same type of operation can also be implemented using a data shift instructions (F100 to F113) or a data
rotate instructions (F120 to F123).
2 - 56
Basic Instructions
MC
MCE
Executes the program between the MC and MCE when the execution
condition turns on. 6
When the execution condition is off, output between the MC and MCE
is turned off.
Outline
Program example
Boolean
Ladder Diagram
Execution
condition
Address
Master control relay number
Instruction
ST/
1 )
MC
Y31
ST
OR
31
OT
31
ST
(MC
X1
OR
32
X0
OT
32
MCE
3
Y31
X2
Y32
6
Y32
(MCE 1 )
Master
control
area
0
1
Explanation of example
Executes the program from the MC1 instruction to the MCE1 instruction when the execution condition X0
turns on.
If the execution condition is off, output is turned off without processing being carried out between the MC1 and
MCE1 instructions.
X0
Execution
condition
on
off
on
off
X1
on
off
Y31
on
off
X2
on
off
Y32
on
off
2 - 57
Basic Instructions
Description
Executes program between the MC and MCE instructions when the execution condition turns on.
When the execution condition is in the off state, the instructions operate as follows.
Instruction
OT
All off
KP
SET
RST
TM
Reset
CT
SR
Differential
Other instructions
Not executed
You must be careful when using one of the instructions below, which are executed by detecting the leading
edge of execution condition such as the differential instruction.
- DF instruction
- Count input for CT instruction
- Count input for F118 (UDC) instruction
- Shift input for SR instruction
- Shift input for F119 (LRSR) instruction
- NSTP instruction
- Differential execution type high - level instruction (this instruction is specified by P and a number)
2 - 58
Basic Instructions
0
Y10
DF
MCE 0
Time chart 1
Time chart 2
on
off
X0
X0
on
off
X1
X1
on
off
Y10
Y10
Execution of previous
differential instruction
on
off
on
off
on
off
Execution of previous
differential instruction
Output will not be obtained if the same execution condition is specified for an MC instruction and a differential
instruction. If output is needed, enter the differential instruction outside of the MC to MCE instruction
sequence.
X0
X0
MC
DF
0
Y10
MCE 0
X0
MC
X0
0
R0
MCE 0
R0
Y10
DF
2 - 59
Basic Instructions
0
Y10
X2
MC
X3
1
Y11
X4
MC
X5
2
Y12
MCE 2
MCE 1
MCE 0
Y10
X0
MC
There are two or more master control instruction sets with the same number.
X0
MC
MC
Duplicated use
X1
X2
Y10
MCE 0
MCE 0
2 - 60
Basic Instructions
JP
LBL
Jump
Label
Skips to the LBL instruction with the same number as the JP instruction.
Outline
Program example
Boolean
Ladder Diagram
10
X1
(JP
1)
10
ST
11
JP
20
LBL
1
1
....
(LBL 1 )
20
Instruction
....
Label number
Address
Explanation of example
When the execution condition X1 turns on, the program skips from JP1 to LBL1.
X1
Program
(JP
1)
X1: on
No
execution
Program
(LBL 1 )
Program
Description
When the execution condition turns on, the program jumps to the label (LBL) instruction that has the same
number as the specified jump number.
The program then continues with the instructions starting from the address of the label that is the jump
destination.
The same label is used for the JP, LOOP and F19(SJP) instructions. Any of these instructions can be used as
the starting point for the jump destination.
Two or more JP instructions with the same number can be used in a program.
X0
R20
X20
(JP
1)
(JP
1)
LOOP 1, DT0
(LBL 1 )
Two or more LBL instructions with same number cannot be specified in the same program.
If a label for the jump destination is not programmed, a syntax error will occur.
2 - 61
Basic Instructions
You must be careful when using one of the instructions below, which are executed by detecting the rise of a
execution condition such as the differential instruction.
- DF (leading edge differential)
- Count input with CT (counter)
- Count input with F118 (up/down counter)
- Shift input with SR (shift register)
- Shift input with F119 (left/right shift register)
- NSTP (next step)
- Differential execution type high - level instruction (this instruction is specified by P and a number)
X1
1)
(LBL 1 )
The program jumps when
the execution condition
turns on.
(JP
(LBL 1 )
X1
(JP
1)
Note
With the FP2SH and FP10SH, the time can be kept accurately
even if these are executed multiple times during a single scan.
To use these together with the JP instruction, change the setting
of system register 4.
2 - 62
Basic Instructions
1
Y10
LBL
X1
DF
Time chart 1
Time chart 2
on
off
X0
X1
X1
Y10
on
off
on
off
Y10
on
off
X0
on
off
on
off
Previous
execution of
JP instruction
Previous
execution of
JP instruction
When the execution condition for the JP instruction equals the execution condition for the differential
instruction, the leading edge (or trailing edge) of the execution condition for the differential instruction will not
be detected.
If the differential output is required, do not write the differential instruction between the JP and LBL
instructions.
X1
JP
X1
DF/
Not executed.
LBL
X1
X1
1
Y11
Y11
DF/
JP
LBL
2 - 63
Basic Instructions
LOOP
LBL
Loop
Label
Skips to the LBL instruction that has the same number as the LOOP
instruction and executes what follows, repeatedly, until the data of a
specified operand becomes 0. 7
Outline
Program example
Boolean
Ladder Diagram
Address
Instruction
10
F0 MV, K5, DT 0
10
ST
11
X0
F0
16
LBL
30
ST
31
LOOP
0
1
....
X1
30
5
DT
(LBL 1 )
0
(MV)
Label number
16
LOOP 1 , DT 0
S
Label number
DT
1
1
0
Operands
Relay
Instruction
Set value
(*1)
(*2)
(*3)
(*4)
(*5)
Timer/Counter
WL
WX WY WR
(*1)
N/A
SV
EV
LD FL IX
IY
DT
(*1) (*2) (*3) (*4)
A
2 - 64
Index
register
Register
Constant
K
N/A
N/A
Index
modifier
(*5)
A
A: Available
N/A: Not Available
Basic Instructions
Description
When the execution condition (trigger) turns on, 1 is subtracted from the contents of S and if the result is other
than 0, the program jumps to the label (LBL instruction) that has the same number as the specified number.
The program then continues with the instructions starting from the address of the label that is the loop
destination.
Set the number of times to execute the program with the LOOP instruction. When the number of times set in S
(K constant) reaches 0, the jump will not occur even if the execution condition (trigger) turns on.
X0
F0 MV, K5 , DT 0
(LBL 1 )
If the value of DT0 is K5, then after performing the jump 5 times,
even if X1 is set to on, the jump operation is not executed.
X1
LOOP 1 , DT 0
If the contents of memory area specified by S is 0 from the beginning, the jump operation is not executed (it is
ignored).
A label is common for the JP instruction, the LOOP instruction and the F19 (SJP) instruction. One can be
used as the destination for all instructions as many times as required.
X0
JP
JP
LBL
R20
X20
LOOP 1, DT0
Two or more LBL instructions with the same number cannot be specified in a program.
With the FP2, FP2SH and FP10SH, index modification of the number specified by the LOOP instruction is
possible.
If a label for the loop destination is not programmed, a syntax error will occur.
Flag conditions
Error flag (R9007): Turns on and remains on when the specified value in the data area S
becomes less than 0 (when the most significant bit (bit position 15) of the
specified data area becomes 1).
Error flag (R9008): Turns on for an instant when the specified value in the data area becomes
less than 0 (when the most significant bit (bit position 15) of the specified
data area becomes 1).
2 - 65
Basic Instructions
TM, CT, and SR instruction operation between the LOOP and LBL instructions
When the LBL instruction is located after the LOOP instruction:
- TM instruction: The TM instruction is not executed.
If it is not executed once during a single scan,
the correct time cannot be guaranteed.
X0
(LBL 1 )
The program jumps when
the execution condition
(trigger) turns on.
LOOP 1, DT 0
(LBL 1 )
X0
LOOP 1, DT 0
The program is repeated
when the execution condition (trigger) turns on.
Note
With the FP2SH and FP10SH, the time can be kept accurately
even if these are executed multiple times during a single scan.
To use these together with the LOOP instruction, change the
setting of system register 4.
2 - 66
Basic Instructions
F0 MV, WR 0, DT 10
F0 MV, WR 1, DT 20
LOOP 10, DT 0
F0 MV, K 20, DT 0
F0 MV, K 0, IX
LBL 10
R0
The LOOP instruction and LBL instruction cannot be used in the step ladder area (the area between SSTP
and STPE).
You cannot perform a jump from a main program to a sub - program (a subroutine program or interrupt
program after the ED instruction), from a sub - program to a main program, or from a sub - program to another
sub - program.
You must be careful when using one of the instructions below, which are executed by detecting the leading
edge of execution condition (trigger) such as the differential instruction.
- DF (leading edge differential)
- Count input of CT (counter)
- Count input of F118 (up/down counter)
- Shift input of SR (shift register)
- Shift input of F119 (left/right shift register)
- NSTP (next step)
- Differential execution type high - level instruction (this instruction is specified by P and a number)
2 - 67
Basic Instructions
BRK
Break
Outline
Program example
Boolean
Ladder Diagram
Address
Instruction
X1
13
Y31
OT
30
BRK
13
ST
14
(BRK)
ST
12
Y30
10
11
X0
10
OT
31
Description
The BRK instruction is effective only in the TEST/RUN mode. In the normal RUN condition, this instruction is
not executed.
In the TEST/RUN mode, program execution is temporarily stopped with the address containing this BRK
instruction.
The BRK instruction is used for checking the program by executing a part of the program.
10
X0
Y30
(BRK)
13
2 - 68
X1
Y31
Stops at the
address 12
Basic Instructions
4. When X0 is in the on state, the BRK instruction is executed and program execution stops.
5. Press the F3 key while holding down the Shift key in the MONITOR & TEST RUN window of
the programming tool software to continue the program execution.
If a BRK instruction is executed, program execution stops.
X1
Y31
Starts from the address 13
13
35
X12
Execution
(BRK)
6. Up to the end of the program, proceed according to the operation in steps 4 and 5 above.
If you want, change to the step operation mode, in which the program stops execution after
execution of each instruction.
2 - 69
Basic Instructions
ED
Outline
End
Program example
Boolean
Ladder Diagram
Address
Instruction
0
X0
R0
0
R0
OR
AN/
X1
ST
OT
Y30
( ED )
99
....
X2
....
R0
96
ST
97
AN
98
OT
30
99
96
ED
Description
Indicates the end of the ordinary program.
Program area
Address 0
Ordinary program
( ED )
Subroutine program
Interrupt program
Program areas are divided into an ordinary program area (main program) and subroutine and interrupt
program areas (sub - programs) using this instruction.
Enter subroutine programs and interrupt programs after the ED instruction.
2 - 70
Basic Instructions
CNDE
Outline
Conditional end
Ends one scan of the program when the execution condition (trigger)
turns on. 10
Program example
Boolean
Ladder Diagram
Address
Instruction
Y30
OR
30
AN/
OT
30
( CNDE )
96
R0
98
X2
Y31
ST
97
CNDE
98
ST
AN/
100
96
99
X3
....
Y30
X1
1
X0
ST
....
OT
31
Description
The CNDE instruction enables you to end one scan of the program.
When the execution condition (trigger) turns on, the program finishes and the input, output, and other such
operations are performed. When the operations are completed, the program then returns to the starting
address.
You can adjust the timing that operations are performed by performing the operations only after a required
number of program scans are completed.
The CNDE instruction cannot be performed in sub - programs such as subroutine programs or interrupt
programs. Use the CNDE instruction in the main program area only.
Two or more CNDE instructions can be used within the main program.
You must be careful when using one of the instructions below, which are executed by detecting the leading
edge of a execution condition (trigger) such as the differential instruction.
- DF (leading edge differential)
- Count input for CT (counter)
- Count input for F118 (UDC) (up/down counter)
- Shift input for SR (shift register)
- Shift input for F119 (LRSR) (left/right shift register)
- NSTP (next step)
- Differential execution type high - level instruction (this instruction is specified by P and a number)
2 - 71
Basic Instructions
X1
Y30
Y30
X3
CNDE
2 - 72
Basic Instructions
EJECT
Outline
Eject
Program example
Boolean
Ladder Diagram
R0
Address
Y0
Instruction
ST
OT
( EJECT )
EJECT
R1
Y1
ST
OT
R2
Y2
ST
OT
2
3
5
Explanation of example
Insert the EJECT instruction in the address where you want the page to break when printing out the program
you created. In the above, the page will break at address 2.
Description
When printing out the program created with the software tool, the page will break at the position where this
instruction is inserted.
As with the NOP instruction, processes in the program will not be affected.
2 - 73
Basic Instructions
2 - 74
Basic Instructions
SSTP
NSTL
NSTP
CSTP
STPE
Outline
Start step
Next step (scan execution type)
Next step (pulse execution type)
Clear step
Step end
Program example
Boolean
Ladder Diagram
X0
Address
Instruction
(NSTP
1)
14
(SSTP
1)
Y10
17
X1
18
(NSTL
2)
22
(SSTP
2)
10
ST
11
10
NSTP
14
SSTP
17
OT
18
ST
19
NSTL
22
SSTP
....
(CSTP 50 )
104
(STPE
100
ST
101
CSTP
104
10
1
....
X3
100
STPE
3
50
2 - 75
Basic Instructions
Description
When the NSTL instruction or the NSTP instruction is executed, the process starting with the SSTP
instruction of the specified number is started and executed.
In a step ladder program, a process is identified as being from one SSTP instruction to the next SSTP or
STPE instruction.
Example:
(SSTP
X0
1)
Y10
Process 1
X1
F0 MV, DT 0, DT 100
(SSTP
2)
Operations such as the sequence control, selection branch control, parallel branch control are easily
executed.
- Sequence control
Only the necessary processes are switched and executed in order.
Process 1
Process 2
Process 3
Process 4
Process 4
Process 3
Process 4
Process 3
2 - 76
Basic Instructions
SSTP
SSTP
SSTP
Process 1
Process 2
In a step ladder program, a process n is identified as being from one SSTPn instruction to the next SSTP or
STPE instruction.
No two processes can have the same process number.
The OT instruction can be programmed at the address just after the SSTP instruction.
The SSTP instruction cannot be programmed in sub - program (subroutine or interrupt program area).
The area starting from the first SSTP instruction to the STPE instruction is referred to as the step ladder area.
The programs in this area are all controlled as processes.
Other areas are referred to as ordinary ladder areas.
Ordinary ladder area
SSTP
SSTP
There is a special internal relay that turns on for one scan only when a process on the step ladder starts.
(R9015: step ladder initial pulse relay.) This relay is used to perform operations for only one scan for counter
reset or other such process starts.
2 - 77
Basic Instructions
NSTP
X0: off
SSTP
SSTP1: Starts
NSTL
R0: on
SSTP
R0
SSTP1: Cleared
SSTP2: Starts
on
Declare the first process to start in the next step instruction in the ordinary ladder area.
A process can be started from the ordinary ladder area or from an already started process.
However, when you start a process with a next step instruction from within a process, the process that is
operating and contains the next step instruction is automatically cleared and the specified process starts.
Be aware that the outputs and other processes are actually turned off by the clear operation during the next
scan.
The NSTP instruction is a differential (pulse) execution type instruction, so it is executed for only one time
when the execution condition (trigger) turns on. Also, since it only detects if the execution condition (trigger)
has changed between on and off, when switched to the RUN mode or when the power supply is turned on
while in the RUN mode and the execution condition (trigger) is already on, the instruction is not executed.
RUN
(Power: on)
Shift input
Operations
with NSTP
Operations
with NSTL
Not
executed
Executed
Executed
Executed
When you use the NSTP instruction with one of the following instructions that changes the order of the
execution of instructions, be aware that the operation of the instructions will differ depending on the timing of
their execution and their triggers.
- MC to MCE instructions
- JP to LBL instructions
- F19 (SJP) - LBL instructions
- LOOP to LBL instructions
- CNDE instruction
- Step ladder instructions
- Subroutine instruction
When combining the NSTP instruction with an ANS or POPS instruction, be careful that the programming is
correct.
2 - 78
Basic Instructions
X1: on
CSTP 99
X1
SSTP 99
Process 99
STPE
A process can also be cleared from the ordinary ladder area or from a process that is already started.
Note
With the FP, FP2, FP2SH and FP10SH, the SCLR (Block Clear)
instruction used to clear multiple processes of specified range at
one time. Refer to SCLR instruction.
SSTP
STPE
2 - 79
Basic Instructions
When you need to clear an entire processes in step ladder program, use the master control (MC and MCE)
instructions as shown below.
Example:
SSTP
SSTP
SSTP
Step
ladder
area
Master control
instructions
STPE
MCE
ED
It is not necessary to execute processes in order of process numbers. You can execute two or more
processes at the same time.
Once you force on or off an output that is programmed in a process not yet executed, the output condition is
maintained until the process starts even if the forced on and off operation is canceled.
Executing
1
2
Executing
Executing process 2
SSTP
Not executing
Not executing
STPE
Ordinary ladder area
Executing
ED
In the diagram, program execution occurs in the ordinary ladder areas and in process 2.
The moment the step ladder process is opened, step ladder internal pulse relay R9015 turns on for an instant
only in the first scan of the process. You can use R9015 to reset a counter or shift register used in the opened
process.
2 - 80
Basic Instructions
The execution state (start/stop) for processes are stored in special data registers:
Type
DT9060 to DT9067
FP3
DT9060 to DT9122
FP0 T32
DT90060 to DT90067
FP/FP2/FP2SH/FP10SH
DT90060 to DT90122
Example:
. 8 7 . . 4 3 .
. 24 23 . . 20 19 .
0 1 0 0 0 0 0 0
. 0
. 16
0 0
Example:
SSTP 0
Y11
X0
Y10
Y10
NSTP
SSTP 1
Y11
Operation status
OT
All off
KP
SET
RST
TM
CT
Holds the state at the time just before the trigger turns off.
SR
Holds the state at the time just before the trigger turns off.
Other instructions
Not executed.
(*): Same operation as when the execution condition (trigger) for the MC instruction turns off. Refer to the
explanation of the MC and MCE instructions.
2 - 81
Basic Instructions
You must be careful when using one of the instructions below, which are executed by detecting the leading
edge of execution condition (trigger) such as the differential instruction.
- DF (leading edge differential)
- Count input of CT (counter)
- Count input of F118 (UDC) (up/down counter)
- Shift input of SR (shift register)
- Shift input of F119 (LRSR) (left/right shift register)
- NSTP (next step)
- Differential execution type high - level instruction (this instruction is specified by P and a number)
Program example
1) When the X10 turns on, process 10 is executed.
Process flowchart
X10: on
R50 turns on
Process 10
X11: on
R51 turns on
Process 11
X12: on
R52 turns on
Process 12
Program
X10
X14: on
(NSTP 10 )
(SSTP 10 )
R50
END
Process 10
X11
X11 on
off
(SSTP 11 )
R51
X12
(NSTL 12 )
Process 11
(CSTP 12 )
(STPE
2 - 82
on
X12 off
on
X14 off
(SSTP 12 )
R52
X14
Time chart
X10 on
off
(NSTL 11 )
Executing
R50 Cleared
Process 12
Executing
R51 Cleared
R52 Executing
Cleared
Process 10
Process 11
Process 12
Basic Instructions
Program example
Process flowchart
X100: on
Process 100
X101: on
X102: on
Process 101
R151
Process 102
R152
turns on.
turns on.
X103: on
X104: on
Process 200
X200: on
END
Time chart
Program
X100
(NSTP 100 )
X100 off
(SSTP 100 )
R150
X101 on
off
on
X101
(NSTL 101 )
X102
Process 100
X102 off
(NSTL 102 )
X103 on
off
(SSTP 101 )
R151
X104 off
on
Process 101
X103
Executing
(NSTL 200 )
R150 Cleared
(SSTP 102 )
R152
X104
(NSTL 200 )
on
X200 off
Executing
R151 Cleared
Process 102
Process 101
Executing
R152 Cleared
Executing
R153 Cleared
(SSTP 200 )
R153
Process 100
Process 200
Process 200
X200
(CSTP 200 )
(STPE
2 - 83
Basic Instructions
Program example
1) When X0 turns on, process 0 is executed.
Process flowchart
X0: on
Process 0
R22
turns
on.
R21
turns on. Process 20
Process 10
X11: on
Process 11
R23
turns on.
X30: on
Process 30
X31: on
Program
X0
Time chart
(NSTP
(SSTP
X0
0)
0)
R20
X10
(NSTL 10 )
(NSTL 20 )
X10 on
off
Process 0
X31 on
off
Process 10
(NSTL 11 )
(SSTP 20 )
R22
R100
Process 20
Executing
R24 Cleared
Process 11
R24
Process 30
(NSTL 0 )
(STPE
2 - 84
Process 0
Process 0
R21 Executing
Cleared
Process 10
R22 Executing
Process 20
Cleared
Executing
(NSTL 30 )
(CSTP 20 )
(SSTP 30 )
X31
Executing
R20 Cleared
R23 Cleared
(SSTP 11 )
R23
X30 R100
X11 on
off
X30 on
off
(SSTP 10 )
R21
X11
on
off
Process 11
Process 30
Basic Instructions
SCLR
Outline
Program example
Boolean
Ladder Diagram
Address
Instruction
0
X0
ST
NSTL
0
0
NSTL
SSTP
ST
NSTL
NSTL
12
NSTL
NSTL
15
NSTL
18
SSTP
SSTP
NSTL
X1
SSTP
1
Y10
21
OT
21
SCLR K1, K3
100
ST
101
1
Y
10
SCLR
K
106
STPE
106
100
XF
STPE
Explanation of example
When input XF goes on, processes in operation from 1 through 3 are cleared.
X0
Process 0
X1
Process 1
Process 2
Process 3
XF
END
Description
When an SCLR instruction is executed, all processes in operation from process n1 through process n2 are
cleared.
n2).
The SCLR instruction can be executed from both normal ladder areas and operating processes.
2 - 85
Basic Instructions
CALL
SUB
RET
Outline
Subroutine call
Subroutine entry
Subroutine return
Program example
Boolean
Ladder Diagram
(CALL
CALL
20
(SUB
21
SUB
30
....
Subroutine
0
1
ED
21
....
(RET
30
1)
....
ST
11
1)
....
20
Instruction
10
X0
10
Address
RET
Description
When the execution condition (trigger) turns on, the CALL instruction is executed and the subroutine
program of the specified number is executed starting with the SUB instruction.
When the subroutine reaches the RET instruction, the program returns to the address after the CALL
instruction of the main program and the execution of the main program resumes.
Main program
CALL
Main program
ED
X0
SUB
Subroutine program
n
2
RET
shown above.
2 - 86
Basic Instructions
(Stage 2)
SUB 1
CALL2
RET
(Stage 3)
SUB 2
CALL3
RET
(Stage 4)
SUB 3
CALL4
RET
(Stage 5)
SUB 4
RET
Flag conditions
Turns on and stays on when performing five nestings and executing the
CALL instruction for the subroutine of the 5th nesting.
Turns on for an instant when performing five nestings and executing the
CALL instruction for the subroutine of the 5th nesting.
SUB
21
Subroutine
RET
IRET
21
0
Interrupt program
Subroutine
IRET
RET
For the FP - M/FP0/FP1, subroutine program cannot be written inside another subroutine program.
SUB
SUB
2
Subroutine
program
Subroutine program
RET
2 - 87
Basic Instructions
For the FP - C/FP2/FP2SH/FP3/FP10SH, subroutine programs may be constructed with multiple entrances
and only one exit.
1
2
3
4
SUB
11
SUB
12
SUB
13
SUB
CALL11
14
CALL13
RET
1
3
to 4 are executed.
and 4 are executed.
You must be careful when you use, in a subroutine, one of the instructions below that is executed by detecting
the leading of execution condition (trigger) such as the differential instruction.
- DF (leading edge differential)
- Count input of CT (counter)
- Count input of F118 (up/down counter)
- Shift input of SR (shift register)
- Shift input of F119 (left/right shift register)
- NSTP (next step)
- Differential execution type high - level instruction (this instruction is specified by P and a number)
Operation status
OT
KP
SET
RST
TM
Does not perform any timing. If timing is not performed once per scan, the correct
time cannot be guaranteed.
CT
SR
DF and DF/
Other instructions
Not executed.
2 - 88
Basic Instructions
FCAL
Outline
Program example
Boolean
Ladder Diagram
Address
X0
FCAL
10
Instruction
10
ST
11
FCAL
0
1
20
21
SUB
Y10
X20
SUB
23
ED
21
ED
20
ST
20
24
OT
10
RET
:
30
:
10
RET
30
Description
Operation and syntax are the same as normal subroutine call instructions. However, the following points are
different.
If the trigger for the CALL instruction is in the off state, the subroutine program is not executed. When the
trigger for the CALL instruction is in the off state, the instructions in the subroutine program operate as
follows.
Instruction
Operation status
OT
KP
SET
RST
TM
CT
Holds the state at the time just before the trigger turns off.
SR
Holds the state at the time just before the trigger turns off.
DF and DF/
Same operation as when the execution condition (trigger) for the MC instruction
turns off. Refer to the explanation of the MC and MCE instructions.
Other instructions
Not executed.
2 - 89
Basic Instructions
MC255
2nd
MC255 to 254
3rd
MC255 to 253
4th
MC255 to 252
5th
MC255 to 251
2 - 90
Basic Instructions
FP0/FP/FP1/FPM
Availability
INT
IRET
Outline
Interrupt
FP0/FP/FP1/FPM
Interrupt return
Indicates the start of the interrupt program.
Indicates the end of the interrupt program.
INT:
IRET:
Program example
Boolean
Ladder Diagram
Address
20
ED
0)
21
INT
....
....
26
IRET
20
(ED
21
(INT
Interrupt program number
(IRET
26
Instruction
Description
When an interrupt is input, the interrupt program of the number specified is executed starting from the INT
instruction.
When the interrupt program reaches the IRET instruction, the program returns to the address where the
interrupt occurred and the main program resumes.
X0
DF
ICTL, S1, S2
Main program
Interrupting
ED
INT
Interrupt
program n
n
2
IRET
shown above.
2 - 91
Basic Instructions
FP0/FP/FP1/FPM
Interrupt
input
FP1/FPM
INT0
X0
CH0
CH0
INT1
X1
CH1
INT2
X2
INT3
X3
CH2
INT4
X4
CH3
INT5
X5
INT6
X6
INT7
X7
Periodical interrupt
INT24
Notes
If the high - speed counter/pulse catch is set, that contact
cannot be used as the interrupt input (trigger).
For the high speed counter - initiated interrupts and periodical
interrupts, it is not necessary to indicate the input (trigger)
contact.
2
2 - 92
Basic Instructions
FP0/FP/FP1/FPM
When the interrupt occurs, the interrupt program with the corresponding number is executed.
Main program
Execution
INT program
Execution
Execution
Interrupt input on
off
If interrupts are disabled, an interrupt will occur only at the point when interrupts are enabled with the ICTL
instruction.
Execution
Main program
Execution
INT program
Interrupt input on
off
Enabled
When another interrupt program is being executed, an interrupt will occur after the current program is
completed.
Execution
Main program
Execution
INT1 program
Execution
INT2 program
INT2 input
on
off
2 - 93
Basic Instructions
FP0/FP/FP1/FPM
X5
INT
5
Specify R9010 or other
contact instead of X5.
F0 MV, K10, DT100
IRET
SUB
11
Subroutine
RET
IRET
11
INT
0
Subroutine
Interrupt program
IRET
RET
INT
IRET
2 - 94
Basic Instructions
FP0/FP/FP1/FPM
Example:
Main program
INT1 program
INT2 program
INT3 program
INT1 input
on
off
INT2 input
on
off
INT3 input
on
off
When more than one interrupt occurs while a interrupt program is being executed, the other programs will be
executed in order from the smallest number to the greatest after the program currently being executed is
finished.
Example:
Main program
INT1 program
INT2 program
INT3 program
INT4 program
INT1 input
on
off
INT2 input
on
off
INT3 input
on
off
INT4 input
on
off
2 - 95
Basic Instructions
FP0/FP/FP1/FPM
Example:
Main program
INT1 program
INT2 program
INT1 input
on
off
INT2 input
on
off
If placed in the execution waiting state, there is a time difference between the time of when the interrupt
occurs and when the interrupt program is actually executed. If you do not want to execute the interrupt
program placed in the execution waiting state because of this, it can be cleared with the ICTL instruction. An
interrupt program that is cleared will not be executed.
Example:
ICTL (INT2 clear) execution
Main program
INT1 program
INT2 program
INT1 input
on
off
INT2 input
Clear
on
off
When the execution of interrupt programs is disabled with the ICTL instruction, interrupts that occur are still
placed in the execution waiting state. When the execution is enabled with the ICTL instruction, the waiting
interrupt programs will then be executed. Programs in the execution waiting state can be cleared with the
ICTL instruction.
2 - 96
Basic Instructions
FP2/FP2SH/FP3/FP10SH
Availability
INT
IRET
Outline
Interrupt
FP2/FP2SH/FP3/FP10SH
Interrupt return
Indicates the start of the interrupt program.
Indicates the end of the interrupt program.
INT:
IRET:
Program example
Boolean
Ladder Diagram
Address
20
ED
0)
21
INT
....
....
26
IRET
20
(ED
21
(INT
Interrupt program number
(IRET
26
Instruction
Description
When an interrupt is input, the interrupt program of the number specified is executed starting from the INT
instruction.
When the interrupt program reaches the IRET instruction, the program returns to the address where the
interrupt occurred and the main program resumes.
X0
DF
ICTL, S1, S2
Main program
Interrupting
ED
INT
Interrupt
program n
n
2
IRET
When the interrupt occurs, the program is executed in the order 1 - 2 - 3 shown above.
In the default mode, all interrupt programs are disabled and cannot be executed. The ICTL instruction should
be used to enable execution of an interrupt program.
2 - 97
Basic Instructions
FP2/FP2SH/FP3/FP10SH
Interrupts from an intelligent unit that issues interrupts (corresponding to INT16 to INT23)
Interrupts are issued in response to the operation status of an intelligent unit with an interrupt issuing
function.
When the interrupt occurs, the interrupt program with the corresponding number is executed.
Main program
Execution
INT program
Execution
Execution
Interrupt input on
off
If interrupts are disabled, an interrupt will occur only at the point when interrupts are enabled with the ICTL
instruction.
Execution
Main program
Execution
INT program
Interrupt input on
off
Enabled
When another interrupt program is being executed, an interrupt will occur after the current program is
completed.
Execution
Main program
Execution
INT1 program
Execution
INT2 program
Interrupt 2 input
2 - 98
on
off
Basic Instructions
FP2/FP2SH/FP3/FP10SH
X5
INT
5
Specify R9010 or other
contact instead of X5.
F0 MV, K10, DT100
IRET
SUB
21
Subroutine
RET
IRET
21
INT
0
Subroutine
Interrupt program
IRET
RET
Interrupt programs with multiple entrances and one exit can be written.
Example:
When the interrupt of the interrupt program 11 is issued, 1 to
3 are executed. When the interrupt of No. 13 is issued, 3 is
executed.
INT
11
INT
12
INT
13
Interrupt 11 is issued
Interrupt 13 is issued
RET
2 - 99
Basic Instructions
FP2/FP2SH/FP3/FP10SH
Example:
Main program
INT1 program
INT2 program
INT3 program
INT1 input
on
off
INT2 input
on
off
INT3 input
on
off
When more than one interrupt occurs while a interrupt program is being executed, the other programs will be
executed in order from the smallest number to the greatest after the program currently being executed is
finished.
Example:
Main program
INT1 program
INT2 program
INT3 program
INT4 program
INT1 input
on
off
INT2 input
on
off
INT3 input
on
off
INT4 input
on
off
2 - 100
Basic Instructions
FP2/FP2SH/FP3/FP10SH
Example:
Main program
INT1 program
INT2 program
INT1 input
on
off
INT2 input
on
off
If placed in the execution waiting state, there is a time difference between the time of when the interrupt
occurs and when the interrupt program is actually executed. If you do not want to execute the interrupt
program placed in the execution waiting state because of this, it can be cleared with the ICTL instruction. An
interrupt program that is cleared will not be executed.
Example:
ICTL (INT2 clear) execution
Main program
INT1 program
INT2 program
INT1 input
on
off
INT2 input
Clear
on
off
When the execution of interrupt programs is disabled with the ICTL instruction, interrupts that occur are still
placed in the execution waiting state. When the execution is enabled with the ICTL instruction, the waiting
interrupt programs will then be executed. Programs in the execution waiting state can be cleared with the
ICTL instruction.
2 - 101
Basic Instructions
FP0/FP/FP1/FPM
Availability
ICTL
FP0/FP/FP1/FPM
Interrupt control
Outline
Performs the interrupt enable or disable and the interrupt clear.
Program example
Boolean
Ladder Diagram
Address
0
X10
( DF )
ST
ICTL, H 0, H 1
S1
Instruction
X
10
DF
ICTL
S2
S1
16-bit equivalent constant or 16-bit area for interrupt control data setting
S2
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
IX
IY
Index
modifier
S1
S2
A
A:
Description
Available
When the ICTL instruction is executed, the interrupt program enable/disable and interrupt clear are set
according to the settings in S1 and S2.
Be sure to use ICTL instructions so that they are executed once at the leading edge of the execution condition
(trigger) using the DF instruction.
Two or more ICTL instructions can have the same execution condition (trigger).
Note
Before executing an interrupt program, be sure to execute the
ICTL instruction and enable the execution of the interrupt
program.
2 - 102
Basic Instructions
FP0/FP/FP1/FPM
Example:
H2, K1
R9034
Input examples
Example 1: Setting a periodical interrupt every 10ms from the start of
operations
R9013
ICTL,
H2, K1
The R9013 (initial pulse relay) turns on only for the first scan
after operations begin.
Example 2: Enable INT0 through INT3 when X0 rises.
X0
DF
ICTL,
H0, HF
Example 3: Clear interrupts other than INT0 after the INT0 program is
completed.
INT 0
R0
ICTL,
H100, H1
IRET
2 - 103
Basic Instructions
FP0/FP/FP1/FPM
Set S1 = H0 to specify enable or disable for the execution of INT0 through INT7.
Set S1 = H100 to clear interrupts INT0 through INT7.
Set S1 = H2 (for units of 10ms) to set the time interval for INT24.
Set S1 = H3 (for units of 0.5ms) to set the time interval for INT24.
Set the control data in the bit corresponding to the number of the interrupt program that you want to control.
Set the bit corresponding to the number of the program you want to enable to 1. (INT program disabled.)
Set the bit corresponding to the number of the program you want to disable to 0. (INT program enabled.)
Example:
When specified so that the interrupt programs INT1 and INT2 are
enabled, and INT0 and INT3 to 7 are inhibited
Bit position 15 . . 12 11 . . 8 7 . . 4 3 . . 0
INT program
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
number
S2 (Enabled/
0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0
disabled)
2 - 104
Basic Instructions
FP0/FP/FP1/FPM
Set the control data in the bit corresponding to the number of the interrupt program that you want to control.
Set the bit corresponding to the number of the program you want to clear to 0. (INT program disabled.)
Set the bit corresponding to the number of the program you want to not clear to 1. (INT program enabled.)
Example:
Specify the setting with decimal number. The time interval = value of S2 10 (ms).
Bit position 15 . .12 11 . . 8 7 . . 4 3 . . 0
S2
K0 to K3000
2 - 105
Basic Instructions
FP0/FP/FP1/FPM
Example:
DF
ICTL,
H0, H21
S1
S2
S1: H0000
Specifies enabling or disabling of interrupt programs that
correspond to interrupts at specified input contact or to target
value match interrupts.
S2: H0021
Enable INT0 and INT5 (set bits 0 and 5 to 1) and disable all
others.
Bit position 15 . . 12 11 . . 8 7 . . 4 3 . . 0
S2
0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1
INT No. 5 4 3 2 1 0
Input contact
X0
(INT0)
X1
X2
(INT1)
(INT2)
X3
X4
(INT3)
(INT4)
X5
(INT5)
Execution
Execution
Execution
INT0 program
INT5 program
INT0 input
INT5 input
on
off
Condition
2 - 106
Execution
on
off
Disabled
Enabled
Basic Instructions
FP0/FP/FP1/FPM
ICTL,
H100, HFE
S1
S2
S1: H100
Clears interrupts from specified input contact or target value
match interrupts.
S2: HFE
Clears interrupt INT0 (bit 0 is 0) and does not clear the other
interrupts.
For the relationship between the set value and the interrupt
input contact, refer to page 2 - 106.
Even though the INT0 interrupt input occurred, when the
interrupt program is disabled, the ICTL instruction can still be
used to clear the INT0 interrupt.
ICTL instruction
Execution
Main program
Execution
INT0 program
INT1 program
INT0 input
on
off
INT1 input
Clear
on
off
Condition
Disabled
Execution
Enabled
2 - 107
Basic Instructions
FP0/FP/FP1/FPM
[S1]: H0002
Specifies periodical interrupt
[S2]: K1500
Specifies the time interval for the periodical interrupt. With
K1500, the time interval is K1500 x 10ms = 15000ms (15s)
After this ICTL instruction is executed, the periodical interrupt
will occur every 15 seconds. At these times, the INT24
interrupt program will be executed.
ICTL instruction
Execution
15s
2 - 108
ICTL,
H2, K0
Basic Instructions
FP2/FP2SH/FP3/FP10SH
Availability
ICTL
Interrupt control
FP2/FP2SH/FP3/FP10SH
Outline
Performs the interrupt enable or disable and the interrupt clear.
Program example
Boolean
Ladder Diagram
Address
40
X10
( DF )
40
ST
41
10
DF
42
ICTL, H 0, H 1
S1
Instruction
ICTL
S2
S1
16-bit equivalent constant or 16-bit area for interrupt control data setting
S2
Operands
Relay
Timer/Counter
Index
register
Register
Operand
WX WY WR WL
SV
EV
DT
LD
FL
IX
(*1)
Constant
IY
(*2)
Index
modifier
S1
S2
A:
Available
Description
When the ICTL instruction is executed, the interrupt program enable/disable and interrupt clear are set
according to the settings in S1 and S2.
Be sure to use ICTL instructions so that they are executed once at the leading edge of the execution condition
(trigger) using the DF instruction.
Two or more ICTL instructions can have the same execution condition (trigger).
Note
Before executing an interrupt program, be sure to execute the
ICTL instruction and enable the execution of the interrupt
program.
Flag conditions
Basic Instructions
FP2/FP2SH/FP3/FP10SH
Input examples
Example 1: Setting a periodical interrupt every 10ms from the start of
operations
R9013
ICTL, H2,
K1
The R9013 (initial pulse relay) turns on only for the first scan
after operations begin.
Example 2: Enable INT0 through INT3 when X30 rises.
X30
DF
ICTL, H0,
HF
Example 3: Clear interrupts other than INT0 after the INT0 program is
completed.
INT 0
R0
ICTL, H100,
H1
IRET
(*1) The intelligent unit which issues interrupts has a high - speed counter unit, a pulse output unit, and other
units.
(*2) FP2/FP2SH/FP10SH only
(*3) Available from FP2/FP2SH Ver. 1.50 or later
2 - 110
FP2/FP2SH/FP3/FP10SH
Basic Instructions
If execution has been specified as enabled or disabled for INT0 to INT15, [S1] = H0.
If an interrupt clear has been specified for INT0 to INT15, [S1] = H100.
If execution has been specified as enabled or disabled for INT16 to INT23, [S1] = H1.
If an interrupt clear has been specified for INT16 to INT23, [S1] = H101.
Set [S1] = H2 to set the time intervals for INT24.
Set [S1] = H3 to set the time intervals for INT24 (for the FP2, FP2SH and FP10SH only)
Set the control data in the bit corresponding to the number of the interrupt program that you want to control.
Set the bit corresponding to the number of the program you want to enable to 1. (INT program disabled.)
Set the bit corresponding to the number of the program you want to disable to 0. (INT program enabled.)
Bit position 15 . . 12 11 . . 8 7 . . 4 3 . . 0
INT program
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
number
S2 (Enabled/
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
disabled)
Bit position 15 . . 12 11 . . 8 7 . . 4 3 . . 0
INT program
23 22 21 20 19 18 17 16
number
S2 (Enabled/
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
disabled)
Set the control data in the bit corresponding to the number of the interrupt program that you want to control.
Set the bit corresponding to the number of the program you want to clear to 0. (INT program disabled.)
Set the bit corresponding to the number of the program you want to not clear to 1. (INT program enabled.)
Bit position 15 . . 12 11 . . 8 7 . . 4 3 . . 0
INT program
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
number
S2 (Enabled/
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
disabled)
Bit position 15 . . 12 11 . . 8 7 . . 4 3 . . 0
INT program
23 22 21 20 19 18 17 16
number
S2 (Enabled/
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
disabled)
Specify the setting with decimal number. The time interval = value of S2 10 (ms).
Bit position 15 . .12 11 . . 8 7 . . 4 3 . . 0
S2
K0 to K3000
Note
For the difference in the operation of H2 and H4, refer to Example
2 for setting periodical interrupt.
(H4 can be specified with the PLC FP2/FP2SH Ver. 1.50 or later.)
2 - 111
Basic Instructions
FP2/FP2SH/FP3/FP10SH
Note
For the difference in the operation of H3 and H5, refer to
Example 2 for setting periodical interrupt.
(H5 can be specified with the PLC FP2/FP2SH Ver. 1.50 or later.)
2 - 112
Basic Instructions
FP2/FP2SH/FP3/FP10SH
ICTL, H0,
H101
S1
S2
[S1]: H0000
This specifies whether execution of the interrupt program
corresponding to the interrupt from the interrupt unit (INT0 to
INT15) is enabled or disabled.
[S2]: H0101
Enable INT0 and INT8 (set bits 0 and 8 to 1) and disable all
others.
Bit position 15 . . 12 11 .
S2
. 8 7 . . 4 3 . . 0
0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1
INT number 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Interrupt unit
X0
(INT0)
X1
X2
(INT1)
(INT2)
X3
X4
(INT3)
(INT4)
X5
X6
(INT5)
(INT6)
X7
X8
(INT7)
(INT8)
X9
XA
(INT9)
(INT10)
XB
(INT11)
XC
XD
(INT12)
(INT13)
XE
(INT14)
XF
(INT15)
2 - 113
Basic Instructions
FP2/FP2SH/FP3/FP10SH
When this ICTL instruction is executed, interrupt programs INT0 and INT8 will be executed when their
corresponding interrupt inputs occur.
ICTL instruction
Main program
Execution
Execution
Execution
INT0 program
INT8 program
INT0 input
INT8 input
Execution
on
off
on
off
Condition
2 - 114
Disabled
Enabled
Basic Instructions
FP2/FP2SH/FP3/FP10SH
ICTL, H100,
HFFFE
S1
S2
[S1]: H0100
Clears interrupts from the interrupt unit (INT 0 to INT15).
[S2]: HFFFE
Clears interrupt INT0 (bit 0 is 0) and does not clear the other
interrupts.
For the relationship between the set value and the interrupt
unit, refer to page 2 - 113 Example of enabling the execution
of interrupt programs.
Even though the INT0 interrupt input occurred, when the
interrupt program is disabled, the ICTL instruction can still be
used to clear the INT0 interrupt.
ICTL instruction
Execution
Main program
Execution
INT0 program
INT8 program
INT0 input
on
off
INT8 input
Clear
on
off
Condition
Disabled
Execution
Enabled
2 - 115
Basic Instructions
FP2/FP2SH/FP3/FP10SH
[S1]: H0002
Specifies periodical interrupt (units: 10ms)
[S2]: K1500
Specifies the time interval for the periodical interrupt. With
K1500, the time interval is K1500 x 10ms = 15000ms (15s)
After this ICTL instruction is executed, the periodical interrupt
will occur every 15 seconds. At these times, the INT24
interrupt program will be executed.
ICTL instruction
Execution
15s
2 - 116
ICTL, H2,
K0
Basic Instructions
FP2/FP2SH/FP3/FP10SH
Int
Int
Int
[S2]
[S2]
Int
Int
[S2]
Int
[S2]
Int
[S2]
2 - 117
Basic Instructions
FP
SYS1
Availability
FP
This changes the communication conditions for the COM port or Tool
port based on the contents specified by the character constant.
Program example
Outline
Boolean Non-ladder
Ladder Diagram
Address
Trigger
10
SYS1,
DF
SYS1
M
S
SYS1,
DF
12
COM1, B8POS1
ST
11
R0
10
Instruction
25
COM1, B8POS1
SYS1
COM1,19200
COM1,19200
No. 1
No. 2
keyword keyword
Character constant M
Operands
Relay
Operand
Timer/Counter
Register
WX WY WR WL
S
SV
EV
DT
LD
FL
N/A
N/A
Index
register
I
N/A
Constant
K
N/A N/A
M
A
Index
modifier
N/A
A: Available
N/A: Not Available
Explanation of example
When R0 turns on, the transmission format and baud rate for the COM. 1 port are set as follows.
Character bit: 8, Parity: Odd
Stop bit: 1
Baud rate: 19,200 bps
Description
The communication conditions for the port specified by No. 1 keyword are changed to the contents specified
by No. 2 keyword.
Contents that can be changed include the following:
1) Communication format
2) Baud rate
3) Unit No.
4) Header and Terminator
5) RS (Request to Send) control
2 - 118
Basic Instructions
FP
Keyword setting
1) Communication format (Shared by the Tool, COM. 1 and COM. 2 ports)
SYS1, M
TOOL,B7 PN S1
Port used
Character bit
B7: 7bits
B8: 8bits
Parity
PN: None
PO: Odd
PE: Even
Stop bit
S1: 1
S2: 2
TOOL,19200
Port used
TOOL: Tool port
COM1: COM. 1 port
COM2: COM. 2 port
Baud rate
2400: 2,400 bps
9600: 9,600 bps
38400: 38,400 bps
115200: 115,200 bps
TOOL,No1
Port used
TOOL: Tool port
COM1: COM. 1 port
COM2: COM. 2 port
Unit No.
No1 to No99: No. 1 to No. 99
COM1,STX
Port used
COM1: COM. 1 port
COM2: COM. 2 port
Header
STX: STX
NOSTX: STX not exist
Terminator
ETX: ETX
CR: CR
CRLF: CR + LF
NOTERM: None
2 - 119
Basic Instructions
FP
COM1,RTS1
Port used
COM1: COM. 1 port
2 - 120
FP
Basic Instructions
2 - 121
Basic Instructions
FP
Availability
SYS1
Password setting
FP
Outline
Program example
Boolean Non-ladder
Ladder Diagram
Address
Trigger
10
DF
SYS1,
DF
12
PASS,ABCD
ST
11
R0
10
Instruction
SYS1
M
No. 1
keyword
PASS,ABCD
No. 2
keyword
Character constant M
Operands
Relay
Operand
Timer/Counter
Register
WX WY WR WL
S
SV
EV
DT
N/A
N/A
LD
Index
register
FL
I
N/A
Constant
K
N/A N/A
M
A
Index
modifier
N/A
A: Available
N/A: Not Available
Explanation of example
When R0 turns on, the controller password is changed to ABCD.
Description
This changes the password specified by the controller to the contents specified by No. 2 keyword.
Keyword setting
SYS1, M
PASS,ABCD
PASS: Fixed
Password (Example: To set the password to ABCD)
2 - 122
Basic Instructions
FP
2 - 123
Basic Instructions
FP
SYS1
Availability
Interrupt setting
FP
This sets the interrupt input based on the contents specified by the
character constant.
Program example
Outline
Boolean Non-ladder
Ladder Diagram
Address
Trigger
10
DF
SYS1,
DF
12
INT1,UP
ST
11
R0
10
Instruction
R
SYS1
M
INT1,UP
No. 1
No. 2
keyword keyword
Character constant M
Operands
Relay
Operand
Timer/Counter
Register
WX WY WR WL
S
SV
EV
DT
N/A
N/A
LD
FL
Index
register
I
N/A
Constant
K
N/A N/A
M
A
Index
modifier
N/A
A: Available
N/A: Not Available
Explanation of example
When R0 turns on, input X1 is set to the interrupt that becomes valid at the rising edge.
Description
This sets the input specified by No. 1 keyword as the interrupt input, and changes the input conditions to the
contents specified by No. 2 keyword.
Keyword setting
SYS1, M
Interrupt input
INT0: X0
INT2: X2
INT4: X4
INT6: X6
INT1: X1
INT3: X3
INT5: X5
INT7: X7
Effective edges
UP: Rising edge
DOWN: Falling edge
BOTH: Rising and falling edges
2 - 124
INT2,UP
Basic Instructions
FP
2 - 125
Basic Instructions
FP
SYS1
Availability
FP
This sets the system setting time when a PLC link is used, based on the
contents specified by the character constant.
Program example
Outline
Boolean Non-ladder
Ladder Diagram
Address
R9014
10
DF
SYS1,
10
11
DF
12
PCLK1T0,100
ST
SYS1
S
SYS1,
Instruction
R
M
25
PCLK1T1,100
PCLK1T0,100
SYS1
M
No. 1
keyword
90141
PCLK1T1,100
No. 2
keyword
Character constant M
Operands
Relay
Operand
Timer/Counter
Register
WX WY WR WL
S
SV
EV
DT
LD
FL
N/A
N/A
Index
register
I
N/A
Constant
K
N/A N/A
M
A
Index
modifier
N/A
A: Available
N/A: Not Available
Explanation of example
When R9014 turns on when a PLC link is being used, the link entry wait time and the error detection times for
transmission assurance relay are set as follows.
Link entry wait time: 100 ms
Error detection time for transmission assurance relay: 100 ms
Description
The conditions specified by No. 1 keyword are set as the time specified by No. 2 keyword.
The setting for the link entry waiting time is set if the transmission cycle time is shortened when there are
stations that have not joined the link (*).
* Stations that have not joined the link: Stations that have not been connected between the No. 1 station and
the station with the largest number, or stations for which the power supply has not been turned on
The error detection time setting for the transmission assurance relay is set if the time between the power
supply being turned off at one station and the transmission assurance relay being turned off at a different
station is to be shortened.
Keyword setting
1) Link entry wait time
SYS1, M
PCLK1T0: Fixed
Specified range: 10 to 400 (10ms to 400ms)
2 - 126
PCLK1T0,100
Basic Instructions
FP
PCLK1T1,100
PCLK1T1: Fixed
Specified range: 100 to 6400 (100ms to 6400ms)
2 - 127
Basic Instructions
FP
Availability
SYS1
FP
Boolean Non-ladder
Ladder Diagram
Address
Trigger
10
SYS1,
DF
DF
12
COM1,WAIT2
ST
11
R0
10
Instruction
SYS1
M
COM1,WAIT2
No. 1
No. 2
keyword keyword
Character constant M
Operands
Relay
Operand
Timer/Counter
Register
WX WY WR WL
S
SV
EV
DT
N/A
N/A
LD
FL
Index
register
I
N/A
Constant
K
N/A N/A
M
A
Index
modifier
N/A
A: Available
N/A: Not Available
Description
The port MEWTOCOL- COM response time specified by No. 1 keyword is delayed based on the contents
specified by No. 2 keyword.
This instruction is used to delay the response time on the PLC side until the state is reached in which
commands can be sent by an external device and responses can be received from the PLC.
<Usage example>
When a commercial RS232C/RS485 converter is being used to carry out communication between a
personal computer and the FP, this instruction is used to return the PLC response after switching of the
enable signal has been completed on the converter side.
Commercial
RS232C/RS485 converter
Command
External
device (PC)
Response
FP
2 - 128
FP
FP
Basic Instructions
FP
Keyword setting
SYS1, M
TOOL,WAITn
Port used
TOOL: Tool port
COM1: COM. 1 port
COM2: COM. 2 port
Response time
WAIT0 to WAIT999 (n: 0 to 999)
If the communication mode has been set to the computer link mode, the set time is the scan time x n (n: 0 to
999).
If the communication mode has been set to the PLC link mode, the set time is n s (n: 0 to 999).
If n = 0, the delay time set by this instruction will be set to None.
Basic Instructions
FP
Availability
SYS2
FP
This changes the settings entered for the system registers of the PLC
link function, in accordance with the specified data.
Program example
Outline
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
11
R0
SYS2,
DT0,
K40,
D1
SYS2
DT
K47
10
ST
D2
0
0
40
47
D1
D2
Operands
Relay
Operand
Timer/Counter
Register
WX WY WR WL
SV
EV
DT
N/A
N/A
D1
N/A
D2
N/A
LD
FL
Index
Constant
register
I
N/A N/A
Index
modifier
N/A N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Description
The contents of system registers No. 40 to No. 47 are changed to the contents of the data registers starting
with the number specified by [S].
System registers
No.
Name
40
0 to 64 words
41
0 to 128 words
42
0 to 63
43
0 to 64 words
44
0 to 127
45
0 to 127 words
46
Not used
47
1 to 16
2 - 130
Basic Instructions
FP
Program example
F0 MV , K
64, DT0
F0 MV , K
128, DT1
F0 MV , K
0, DT2
F0 MV , K
10, DT3
F0 MV , K
0, DT4
F0 MV , K
10, DT5
F0 MV , K
0, DT6
F0 MV , K
5, DT7
Decimals of the average value are rounded off so that the average value is an integer.
2 - 131
Basic Instructions
ST =
ST <>
ST >
ST >=
ST <
ST <=
Performs start operation by comparing two word data items with the
comparison condition. The contact goes on or off depending on the
result of the comparison.
Program example
Outline
Boolean
Ladder Diagram
Address
0
S1
DT
Y30
50
OT
Y31
> =, DT 0, K 60
ST =
S2
=, DT 0, K 50
Instruction
ST > =
DT
S1
S2
K
OT
11
S1
60
Y
S2
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
Index
register
Register
SV
EV
DT
LD
(*1)
Constant
FL
(*2)
IX
(*3)
IY
(*4)
Index
modifier
S1
S2
(*1)
(*2)
(*3)
(*4)
A
A
2 - 132
A:
30
Available
31
Basic Instructions
Explanation of example
Compares the contents of data register DT0 with the constant K50 and K60. If DT0 = K50, the external output
relay Y30 goes on and if DT0
K60, the external output relay Y31 turns on.
DT0
60
50
10
on
Y30 off
on
Y31 off
Description
Compares the word data specified by S1 with the word data specified by S2 according to the comparison
condition.
The ST instruction initiates a logical operation as the liaison contact when the comparison result is a specified
status (=, <, >, etc.).
The result of the comparison operation is as follows:
Comparison
instruction
instr ction
Condition
S1 < S2
S1 = S2
S1 > S2
ST=
off
on
off
ST < >
on
off
on
ST>
off
off
on
ST> =
off
on
on
ST<
on
off
off
ST< =
on
on
off
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
2 - 133
Basic Instructions
STD =
STD <>
STD >
STD >=
STD <
STD <=
Performs start operation by comparing two double word data items with
the comparison condition. The contact goes on or off depending on the
result of the comparison. 13
Program example
Outline
Boolean
Ladder Diagram
Address
0
S1
DT
S1
DT
Y30
100
OT
10
Y31
D >, DT 0, DT 100
10
STD =
S2
D =, DT 0, DT 100
Instruction
STD >
30
DT
19
DT
S2
100
OT
31
S1
S2
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
Index
register
Register
SV
EV
DT
LD
(*1)
Constant
FL
(*2)
IX
(*3)
IY
(*4)
Index
modifier
S1
N/A
S2
(*1)
(*2)
(*3)
(*4)
A
A
N/A
2 - 134
A: Available
N/A: Not Available
Basic Instructions
Explanation of example
Compares the contents of data registers (DT1, DT0) with the data registers (DT101, DT100).
If (DT1, DT0) = (DT101, DT100), the external output relay Y30 goes on and if (DT1, DT0) > (DT101, DT100),
the external output relay Y31 goes on.
Description
Compares the double word data specified by S1 and S1+1 with the double word data specified by S2 and
S2+1 according to the comparison condition.
The STD instruction initiates a logical operation as the liaison contact when the comparison result is a
specified status (=, <, >, etc.).
The result of the comparison operation is as follows:
Comparison
instruction
instr ction
Condition
STD=
off
on
off
STD< >
on
off
on
STD>
off
off
on
STD> =
off
on
on
STD<
on
off
off
STD< =
on
on
off
When processing 32-bit data, the higher 16-bit areas (S1+1, S2+1) are automatically determined once the
lower 16-bit areas (S1, S2) are specified.
S1+1
S2+1
S1
Comparison
The specified data area and the following data area are handled
together as 32 - bit data.
S2
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
2 - 135
Basic Instructions
AN =
AN <>
AN >
AN >=
AN <
AN <=
Performs AND operation by comparing two word data items with the
comparison condition. The contact goes on or off depending on the
result of the comparison. The contacts are connected in series. 14
Program example
Outline
Boolean
Ladder Diagram
Address
Instruction
0
X0
Y30
> =, DT 0, K 60
S1
ST
AN > =
DT
S2
OT
6
S1
60
Y
S2
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
Index
register
Register
SV
EV
DT
LD
(*1)
Constant
FL
(*2)
IX
(*3)
IY
(*4)
Index
modifier
S1
S2
(*1)
(*2)
(*3)
(*4)
A
A
2 - 136
A:
Available
30
Basic Instructions
Explanation of example
Compares the contents of data register DT0 with the constant K60 when X0 turns on. If DT0 K60 in the X0
on state, external output relay Y30 goes on. If DT0 < K60 or if X0 is in the off state, external output relay Y30
goes off.
DT0
60
10
X0 on
off
Y30 on
off
Description
Compares the word data specified by S1 with the word data specified by S2 according to the comparison
condition.
The AN instruction results in serial connection as the liaison contact when the comparison result is a
specified status (=, <, >, etc.).
The result of the comparison operation is as follows:
Comparison
instruction
i t
ti
Condition
S1 < S2
S1 = S2
S1 > S2
AN=
off
on
off
AN< >
on
off
on
AN>
off
off
on
AN> =
off
on
on
AN<
on
off
off
AN< =
on
on
off
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
2 - 137
Basic Instructions
AND =
AND <>
AND >
AND >=
AND <
AND <=
Performs AND operation by comparing two double word data items with
the comparison condition. The contact goes on or off depending on the
result of the comparison. The contacts are connected in series. 15
Outline
Program example
Boolean
Ladder Diagram
Address
Instruction
0
X0
0
S1
Y30
D> =, DT 0, DT100
ST
AND >=
DT
S2
10
DT
100
OT
30
S1
S2
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
Index
register
Register
SV
EV
DT
LD
(*1)
Constant
FL
(*2)
IX
(*3)
IY
(*4)
Index
modifier
S1
N/A
S2
(*1)
(*2)
(*3)
(*4)
A
A
N/A
2 - 138
A: Available
N/A: Not Available
Basic Instructions
Explanation of example
Compares the contents of data registers (DT1, DT0) with the data registers (DT101, DT100) when X0 turns
on. If (DT1, DT0)
(DT101, DT100) in the X0 on state, the external output relay Y30 goes on.
If (DT1, DT0) < (DT101, DT100) or if X0 is in the off state, the external output relay Y30 goes off.
Description
Compares the double word data specified by S1 and S1+1 with the double word data specified by S2 and
S2+1 according to the comparison condition.
The AND instruction results in serial connection as the liaison contact when the comparison result is a
specified status (=, <, >, etc.).
The result of the comparison operation is as follows:
Comparison
instruction
i t
ti
Condition
AND=
off
on
off
AND< >
on
off
on
AND>
off
off
on
AND> =
off
on
on
AND<
on
off
off
AND< =
on
on
off
When processing 32-bit data, the higher 16-bit areas (S1+1, S2+1) are automatically determined once the
lower 16-bit areas (S1, S2) are specified.
The specified data area and the following data area are handled
together as 32 - bit data.
S1+1
S2+1
S1
Comparison
S2
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
2 - 139
Basic Instructions
OR =
OR <>
OR >
OR >=
OR <
OR <=
Boolean
Ladder Diagram
Address
ST
Y30
X0
Instruction
OR > =
DT
> =, DT 0, K 60
K
S1
S2
OT
S1
60
Y
S2
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
Index
register
Register
SV
EV
DT
LD
(*1)
Constant
FL
(*2)
IX
(*3)
IY
(*4)
Index
modifier
S1
S2
(*1)
(*2)
(*3)
(*4)
A
A
2 - 140
A:
Available
30
Basic Instructions
Explanation of example
Y30 goes on when X0 is in the on state, or when DT0
goes off.
K60. If DT0 < K60 and if X0 is in the off state, then Y30
DT0
60
10
X0
on
off
on
Y30 off
Description
Compares the word data specified by S1 with the word data specified by S2 according to the comparison
condition.
The OR instruction results in parallel connection as the liaison contact when the comparison result is a
specified status (=, <, >, etc.).
The result of the comparison operation is as follows:
Comparison
instruction
instr ction
Condition
S1 < S2
S1 = S2
S1 > S2
OR=
off
on
off
OR< >
on
off
on
OR>
off
off
on
OR> =
off
on
on
OR<
on
off
off
OR< =
on
on
off
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
2 - 141
Basic Instructions
ORD =
ORD <>
ORD >
ORD >=
ORD <
ORD <=
Boolean
Ladder Diagram
Address
Instruction
ST
Y30
X0
ORD> =
DT
D> =, DT 0, DT100
DT
S1
S2
10
OT
100
Y
30
S1
S2
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
Index
register
Register
SV
EV
DT
LD
(*1)
Constant
FL
(*2)
IX
(*3)
IY
(*4)
Index
modifier
S1
N/A
S2
(*1)
(*2)
(*3)
(*4)
A
A
N/A
2 - 142
A: Available
N/A: Not Available
Basic Instructions
Eplanation of example
Compares the contents of data registers (DT1, DT0) with the data registers (DT101, DT100). When X0 turns
on or if (DT1, DT0)
(DT101, DT100), the external output relay Y30 goes on.
If (DT1, DT0) < (DT101, DT100) and if X0 is in the off state, the external output relay Y30 goes off.
Description
Compares the double word data specified by S1 and S1+1 with the double word data specified by S2 and
S2+1 according to the comparison condition.
The ORD instruction results in parallel connection as the liaison contact when the comparison result is a
specified status (=, >, <, etc.).
The result of the comparison operation is as follows:
Comparison
instruction
i t
ti
Condition
(S1+1, S1)<
(S2+1, S2)
ORD=
off
on
off
ORD< >
on
off
on
ORD>
off
off
on
ORD> =
off
on
on
ORD<
on
off
off
ORD< =
on
on
off
When processing 32-bit data, the higher 16-bit areas (S1+1, S2+1) are automatically determined once the
lower 16-bit areas (S1, S2) are specified.
The specified data area and the following data area are handled
together as 32 - bit data.
S1+1
S2+1
S1
Comparison
S2
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
2 - 143
Basic Instructions
2 - 144
Chapter 3
High - level Instructions
3-2
3.1
3.1
3.1.1
F0 (MV) instruction
The K0 (S) is copied to DT0 (D)
Execution condition
(Trigger)
Address
X0
0
Operand
F0 MV , K0
S
DT 0
D
Boolean
High- level instruction number
S (Source): Data which is to be processed or data which sets the processing method.
D (Destination): Location where result of processing is stored.
n (number): Numeric data which is to be processed or which sets the processing method.
3-3
3.1.2
High-level instruction numbers are assigned to high-level instructions. For example, the
number assigned to the MV instruction (16-bit data transfer instruction) is 0 (F0 or P0).
A high- level instruction is entered by entering its high-level instruction number.
A high- level instruction with the prefix F is executed in every scan while its execution
condition (trigger) is in the on state.
A high- level instruction with the prefix P is executed only when the leading edge of its
execution condition (trigger) is detected.
For details about F and P type high- level instructions
Input of F type high - level instruction
X0
F0 MV , K 0 ,
DT 0
F
0
P
0
3-4
P0 PMV , K 0 , DT 0
section 3.1.4
3.1
3.1.3
A high-level instruction is always used in a pair with its execution condition (trigger).
When the operation result of the relay sequence circuit specified as the execution
condition (trigger) is on, the high-level instruction is executed.
Example:
There is no need to program the same execution condition (trigger) many times when
two or more high-level instructions are programmed consecutively with the same
execution condition (trigger).
Example:
X0
X0
X0
F0 MV, DT 0 , DT 1
F0 MV, DT 2 , DT 3
F60 CMP, DT 1 , DT 3
X0
P0 PMV, H 8000, DT 9058
P157 PCADD, DT 9054, DT 0, DT 30
3-5
X0
F0 MV, WR 0 , DT 10
F0 MV, LD 1 , DT 11
RDS
P115 PFIFT, DT 10 , DT 11
POPS
3.1.4
Execution condition
(Trigger)
F - type high-level
instruction
Execution
1 scan
Execution condition
(Trigger)
P - type high-level
instruction
Execution
1 scan
As long as the execution condition (trigger) for the P type instruction continues to be
on, the instruction is executed only at the rise of the condition, and is not subsequently
executed.
If the mode is switched to the RUN mode, or the power supply is turned on in the RUN
mode, the instruction is not executed in the first scan if the execution condition (trigger)
for the P type instruction has been in effect from the beginning.
RUN
(Power: on)
Execution
condition
(Trigger)
Operation
of instruction
3-6
Not executed
Executed
3.1
When you use the P type instruction with one of the following instructions that changes
the order of the execution of instructions, be aware that the operation of the instructions
will differ depending on the timing of their execution and their execution conditions
(triggers).
- MC to MCE instructions
- JP to LBL instructions
- F19 (SJP) to LBL instructions
- LOOP to LBL instructions
- CNDE instruction
- Step ladder instructions
- Subroutine instruction
section 4.3
For detailed information
When combining the P type high- level instruction with an AND stack instruction or pop
stack instruction, be careful that the programming is correct. For detailed information
section 4.7
3-7
F0 (MV)
P0 (PMV)
Outline
Boolean
Ladder Diagram
Address
Instruction
10
F0 MV , DT 10 ,
10
F 0
(MV)
DT
R0
ST
11
10
DT
Trigger
20
DT 20
S
S
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
IX (*3) IY (*4)
(*1) (*2)
Constant
K
Index
modifier
D
(*1)
(*2)
(*3)
(*4)
A
N/A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
The contents of data register DT10 are copied to data register DT20 when trigger R0 turns on.
Description
The 16-bit data or 16-bit equivalent constant specified by S is copied to the area specified by D.
Reference
When using an FP1/FP - M high - speed counter: F0 (MV) page 3 - 415
When using an FP0/FP high - speed counter:
F0 (MV) page 3 - 444
When using an FP0/FP pulse output:
F0 (MV) page 3 - 448
3- 8
Application example
Example 1: Transfer K30 to timer set value area SV0 when R1 turns on.
R1
F0 MV, K 30, SV 0
Example 2: Transfer the timer elapsed value EV0 to data register DT0 when
R2 turns on.
R2
Flag conditions
F0 MV, EV 0, DT 0
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
3- 9
F1 (DMV)
P1 (PDMV)
Outline
Boolean
Ladder Diagram
Address
10
R0
ST
11
Trigger
10
Instruction
1 (DMV)
DT
10
DT
F1 DMV , DT 10 , DT20
20
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
IX (*3) IY (*4)
(*1) (*2)
Constant
K
Index
modifier
N/A
D
(*1)
(*2)
(*3)
(*4)
A
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
The contents of data registers DT11 and DT10 are copied to data registers DT21 and DT20 when trigger R0
turns on.
Higher
16- bit area
Content for
DT11
Lower
16- bit area
Content for
DT10
.... The content (16 bits) of DT10 and the content (16 bits) of DT11 are joined and
treated as 32- bit data.
.... 32- bit data is separated into the higher 16- bit data and the lower 16- bit data,
and stored in DT21 and DT20.
To DT21
3 - 10
To DT20
Description
The 32-bit data or 32-bit equivalent constant specified by S is copied to the 32-bit area specified by D.
When processing 32-bit data, the higher 16-bit areas (S+1, D+1) are automatically determined once the
lower 16-bit areas (S, D) are specified.
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
Reference
FP1/FP - M high - speed counter elapsed value:
FP0/FP high - speed counter pulse output elapsed value:
3 - 11
F2 (MV/)
P2 (PMV/)
Outline
Boolean
Ladder Diagram
Address
Instruction
10
10
F2 MV/ , DT 11 ,
F 2
(MV/)
DT
R0
ST
11
11
DT
Trigger
20
DT 20
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
Constant
LD FL
DT
IX (*3) IY (*4)
(*1) (*2)
Index
modifier
D
(*1)
(*2)
(*3)
(*4)
A
N/A
N/A
N/A
A
A: Available
N/A: Not Available
Explanation of example
The contents of data register DT11 are inverted and transferred to data register DT20 when trigger R0 turns
on.
DT 10
DT 11
DT 12
3F
H 5555
[S]
H 1234
R0: on
DT 10
DT 11
DT 12
3 - 12
3F
H 5555
H 1234
1111
DT 20
DT 21
DT 22
23A
[D]
H FFFF
F2 (MV/) execution
Invert and
transfer
DT 20
DT 21
[S]
DT 22
Bit position 15
[D]
DT20
1211 8 7 4 3 0
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
Description
The 16-bit data or 16-bit equivalent constant specified by S is inverted and transferred to the 16-bit area
specified by D.
Bit position 15 1211 8 7 4 3 0
Binary data 0 0 0 0 0 1 0 0 1 1 0 1 0 0 1 0
Hexadecimal
0
4
D
2
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
3 - 13
F3 (DMV/)
P3 (PDMV/)
Outline
Boolean
Ladder Diagram
Address
10
F 3
(DMV/)
DT
R0
ST
11
11
DT
Trigger
10
Instruction
20
F3 DMV/ , DT11 , DT 20
S
S
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
(*4)
N/A
D
(*1)
(*2)
(*3)
(*4)
A
N/A
N/A
N/A
N/A
3 - 14
Index
modifier
A
A
A: Available
N/A: Not Available
Explanation of example
The contents of data registers DT12 and DT11 are inverted and transferred to data registers DT21 and DT20
when trigger R0 turns on.
DT10
H 25AC
DT11
DT12
H FFFD
DT20
R0: on
DT10
H 25AC
DT11
DT12
[D]
H FFFF
34A
F3 (DMV/) execution
Invert and
transfer
H FFFD
DT21
DT22
[S]
H 1111
DT20
[S]
H FFFF
DT21
DT22
[D]
H FFFF
Description
The 32-bit data or 32-bit equivalent constant specified by S is inverted and transferred to the 32-bit area
specified by D.
S
S+1
D
D+1
1 1 0 0 1 1 0 1 0 0 0 1 0 1 0 1
0 0 0 0 0 1 1 1 0 1 0 1 1 0 1 1
0 0 1 1 0 0 1 0 1 1 1 0 1 0 1 0
1 1 1 1 1 0 0 0 1 0 1 0 0 1 0 0
When processing 32-bit data, the higher 16-bit areas (S+1, D+1) are automatically determined once the
lower 16-bit areas (S, D) are specified.
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
3 - 15
F4 (GETS)
P4 (PGETS)
Outline
Program example
Boolean
Ladder Diagram
Address
10
F 4
(GETS)
DT
R0
ST
11
11
DT
Trigger
10
Instruction
20
F4 GETS , DT11 , DT 20
S
S
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
Index
modifier
N/A
N/A
N/A
N/A
N/A
A
A: Available
N/A: Not Available
Explanation of example
The number of WX and WY for the slot specified by S is read, and set in [D, D+1].
D
D+1
When the unit is with X only, the same value is stored for the head number of WY.
When the unit is with Y only, the same value is stored for the head number of WX.
When the unit without input/output is specified, the same value is stored in D and D+1.
Flag conditions
3 - 16
F5 (BTM)
P5 (PBTM)
Copies bit data of one 16-bit area to the specified bit of another 16-bit
area.
For the FP/FP - M/FP0/FP1, the P type high- level instruction
P5 (PBTM) is not available.
Outline
Program example
Boolean
Ladder Diagram
Address
10
R0
ST
11
F 5
(BTM)
DT
Trigger
10
Instruction
20
F5 BTM , DT 20 , H C04 , DT 10
S
C04
DT
10
16-bit equivalent constant or 16-bit area (specifies source and destination bit
positions)
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IY
(*4)
A
A
N/A
N/A
N/A
(*1)
(*2)
(*3)
(*4)
Index
modifier
IX
(*3)
A
A: Available
N/A: Not Available
3 - 17
Explanation of example
The data at bit position 4 in data register DT20 is copied to bit position 12 in data register DT10 when trigger
R0 turns on.
Source [S]
n:H C 0 4
Source
bit position 4
Destination [D]
Destination
bit position 12
Destination [D]
Bit position 15
DT10
F5 (BTM)
execution
R0: on
1211 8 7 4 3 0
0 0 0 1 0 1 0 0 1 1 0 1 0 0 1 0
Description
A single bit in the 16-bit data or the 16-bit equivalent constant specified by S is copied to a bit of the 16-bit area
specified by D, as specified by n.
With the FP2SH and FP10SH, it is possible to transfer the contents of multiple bits as a single transfer.
How to specify n
The n specifies the source and destination bit positions using hexadecimal data as follows:
n:H
15
14
13
12
11
10
Set value
HF
HE
HD
HC
HB
HA
H9
H8
H7
H6
H5
H4
H3
H2
H1
H0
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
3 - 18
Transferring multiple bits [this can only be executed with FP2 (Ver. 1.03 and
subsequent versions), FP2SH, and FP10SH]
With the FP2, FP2SH and FP10SH, if the number of bits to be transferred is specified for n, the specified
number of bits is transferred in sequential order, starting from the position specified by S, to destination,
starting from the position specified by D.
Up to 16 bits can be transferred. The number of bits to be transferred should be specified as a hexadecimal
value. The range is from 0 to F (1 bit to 16 bits).
No. of bits transferred
Setting (n)
1 bit
H0
2 bits
H1
3 bits
H2
4 bits
H3
5 bits
H4
6 bits
H5
7 bits
H6
8 bits
H7
9 bits
H8
10 bits
H9
11 bits
HA
12 bits
HB
13 bits
HC
14 bits
HD
15 bits
HE
16 bits
HF
Example:
Bit position 15 12 11 8 7 4 3 0
1 1 1 0 1 0 0 1 0 0 0 1 1 0 0 1
D
Bit positions 5 and 6 of S are transferred
to bit position 10 and 11 of D
3 - 19
If 0 is specified as the number of bits to be transferred, the specified one bit is transferred.
If the specified range extends beyond the area of S, the contents of the part extending beyond the area are
transferred as 0.
Example:
15 12 11 8 7 4 3 0
0 0 1 1 0 0 1 1 0 1 0 0 0 1 1 0 1 0
Four bits, starting from bit position 14
Bit position 15 12 11 8 7 4 3 0
0 0 1 0 0 0 0 1 1 0 1 1 1 0 0 1
D
F5 (BTM) execution
Bit position 15 12 11 8 7 4 3 0
0 0 1 0 0 0 0 1 1 0 0 0 1 1 0 1
D
Example:
Bit position 15 12 11 8 7 4 3 0
0 1 1 1 1 0 0 1 1 1 1 1 0 0 1 1
D
From among bit positions 6 to 11 of S, bit
positions 6 to 9 are transferred to bit positions 12
to 15 of D (the contents of bit positions 10 and 11
of S are ignored).
3 - 20
F6 (DGT)
P6 (PDGT)
Outline
Boolean
Ladder Diagram
Address
Trigger
10
ST
11
R0
10
Instruction
F 6
(DGT)
DT
10
F6 DGT , DT 10 , H 0 , DT 20
S
DT
20
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IY
(*4)
A
A
N/A
N/A
N/A
(*1)
(*2)
(*3)
(*4)
Index
modifier
IX
(*3)
A
A: Available
N/A: Not Available
Explanation of example
Hexadecimal
digit position
DT10
0 0 0 0 0 0 0 1 0 1 0 0 1 0 0 1
DT20
0 0 0 0 1 0 0 0 1 0 1 0 1 0 0 1
3 - 21
Description
The hexadecimal digits in the 16-bit data or in the 16-bit equivalent constant specified by S are copied to the
16-bit area specified by D, as specified by n.
Digits
Digits are units of 4 bits used when handling data.
With this instruction, 16 - bit data is separated into four digits. The digits are called in order hexadecimal digit 0,
digit 1, digit 2 and digit 3, beginning from the least significant four bits
16-bit data
15 1211 8 7 4 3 0
0 0 0 0 0 0 0 1 0 1 0 0 1 0 0 1
Hexadecimal
Hexadecimal
digit 3
digit 1
Hexadecimal
Hexadecimal
digit 2
digit 0
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
How to specify n
n specifies the 3 source hexadecimal digit position, the 2 number of digits and the
hexadecimal digit position to be copied using hexadecimal data as follows:
destination
n:H
3
3 - 22
and
is 0, such as H000 in the example program on the previous page, use the short
Specify n: H 1 0 1
D
digit
(2) When hexadecimal digit 3 of the source is copied to hexadecimal digit 0 of the destination:
digit
(3) When multiple hexadecimal digits (hexadecimal digits 2 and 3) of the source are copied to multiple
hexadecimal digits (hexadecimal digits 2 and 3) of the destination:
digit
Specify n: H 2 1 2
D
digit
(4) When multiple hexadecimal digits (hexadecimal digits 0 and 1) of the source are copied to multiple
hexadecimal digits (hexadecimal digits 2 and 3) of the destination:
digit
Specify n: H 2 1 0
D
digit
digit
(5) When 4 hexadecimal digits (hexadecimal digits 0 to 3) of the source are copied to 4 hexadecimal
digits (hexadecimal digits 0 to 3) of the destination:
Specify n: H 1 3 0
D
digit
3 - 23
3 - 24
F7 (MV2)
P7 (PMV2)
Outline
Boolean
Ladder Diagram
Address
Instruction
10
ST
11
Trigger
F7
R0
0
(MV2)
DT
S2
10
20
DT
10
DT
30
S1
S2
Operands
Relay
Timer/Counter
Operand
WX WY WR WL
Index
register
Register
SV
EV
DT
FL
LD
(*1)
Constant
Index
modifier
S1
N/A
S2
N/A
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
The contents of data register DT10 are copied to data register DT30 when trigger R0 turns on.
The contents of data register DT20 are copied to data register DT31 when trigger R0 turns on.
16 bits
16 bits
[S2]
Contents of DT20
[S1]
Contents of DT10
[D]
DT31
DT30
3 - 25
Description
The two 16-bit data or two 16-bit equivalent constant specified by S1 and S2 is copied to the 32-bit area
specified by D when the trigger turns on.
Related instruction
To copy three 16-bit data, use the F190 (MV3) instruction.
Flag conditions
3 - 26
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
F8 (DMV2)
P8 (PDMV2)
Outline
Boolean
Ladder Diagram
Address
Trigger
10
ST
11
R0
10
Instruction
F8
S2
DT
20
DT
10
DT
R
(DMV2)
30
S1
S2
Operands
Relay
Timer/Counter
Operand
WX WY WR WL
Index
register
Register
SV
EV
DT
FL
LD
(*1)
Constant
Index Integer
modifier device
S1
N/A
N/A
S2
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
The contents of data register DT11 and DT10 and the contents of data register DT21 and DT20 are copied to
data registers DT33, DT32, DT31 and DT30 when trigger R0 turns on.
Higher
16-bit area
Lower 16-bit
area
[S2]
Higher
16-bit area
Lower 16-bit
area
Contents
of DT11
Contents
of DT10
[S1]
Contents
of DT21
Contents
of DT20
[D]
DT33
DT32
DT31
DT30
3 - 27
Description
The two 32-bit data or two 32-bit equivalent constant specified by S1 and S2 is copied to the 64-bit area (D+3,
D+2, D+1 and D) specified by D when the trigger turns on.
Related instruction
To copy three 32-bit data, use the F191 (DMV3) instruction.
Flag conditions
Error flag (R9007):
Error flag (R9008):
3 - 28
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
F10 (BKMV)
P10 (PBKMV)
Block move
Boolean
Ladder Diagram
Address
Trigger
10
Instruction
ST
11
R0
10
F 10
(BKMV)
DT
DT
DT
10
F10 BKMV , DT 0 , DT 3 , DT 10
S1
S2
S1
S2
Operands
Relay
Operand
Register
Index
register
LD FL
DT
(*1) (*2)
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Constant
Index
modifier
S1
N/A
N/A
N/A
S2
N/A
N/A
N/A
N/A
N/A
N/A
N/A
A
A: Available
N/A: Not Available
Description
The data block specified by S1 and S2 is copied to the block starting from the 16-bit area specified by D.
3 - 29
Explanation of example
The data of data register DT0 to DT3 is copied to the data registers DT10 to DT13 when trigger R0 turns on.
[S1] DT0
DT1
DT2
[S2] DT3
DT4
10
11
12
K
K
13
14
R0: on
[S1] DT0
DT1
DT2
[S2] DT3
DT4
10
11
K
K
12
13
14
Source
DT9
DT10
DT11
DT12
DT13
K
K
0
0
DT9
DT10
DT11
DT12
DT13
10
K
K
11
12
13
[D]
Precautions if the same type of memory area is specified for S1, S2, and D
The instruction is not executed if the address and type of memory area is the same for S1 and D.
If the block being transferred overlaps the transfer destination, the transfer results will be overwritten.
If S1 < D, the source data is copied starting from the higher address to the lower address in order (DT4 DT3
DT2 DT1).
[S1] DT0
DT1
DT2
[S2] DT3
DT4
10
11
K
K
12
13
14
DT0
DT1
DT2
DT3
DT4
10
10
K
K
11
12
13
[D]
If S1 > D, the source data is copied starting from the lower address to the higher address in order (DT0 DT1
DT2).
DT0
DT1
[S1] DT2
DT3
[S2] DT4
10
11
12
K
K
13
14
Flag conditions
DT0
DT1
DT2
DT3
DT4
12
K
K
14
K
K
[D]
13
13
14
3 - 30
F11 (COPY)
P11 (PCOPY)
Block copy
Copies the specified 16-bit data to a block with one or more 16-bit
areas.
For the FP/FP - M/FP0/FP1, the P type high- level instructions are not
available.
Program example
Outline
Boolean
Ladder Diagram
Address
Trigger
10
Instruction
10
11
R0
ST
F 11
D1
(COPY)
DT
D2
14
D1
10
DT
D2
DT
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
(*4)
Index
modifier
D1
N/A
N/A
N/A
N/A
N/A
D2
(*1)
(*2)
(*3)
(*4)
A
N/A
N/A
N/A
N/A
N/A
A
A: Available
N/A: Not Available
3 - 31
Explanation of example
The contents of data register DT0 are copied to the block ranging from data register DT10 to DT14 when
trigger R0 turns on.
DT0
[S] DT1
DT2
DT3
DT4
K
K
10
11
K
K
12
13
14
R0: on
DT0
[S] DT1
DT2
DT3
DT4
K
K
10
11
K
K
12
13
14
DT10
DT11
DT12
DT13
DT14
K
K
0
0
K
K
0
0
[D1]
[D2]
DT10
DT11
DT12
DT13
DT14
K
K
11
11
K
K
11
11
11
[D1]
[D2]
Description
The 16-bit equivalent constant or 16-bit area specified by S is copied to all 16-bit areas of the block specified
by D1 and D2.
Flag conditions
3 - 32
FP0
F12 (ICRD)
Availability
FP0
Outline
Program example
Boolean Non-ladder
Ladder Diagram
Address
Trigger
10
F12 ICRD , K 0 ,
S1
ST
11
R0
10
Instruction
F 12
0
(ICRD)
K10 , DT0
S2
10
DT
S1
Constant for specifying the starting address of EEPROM (for source data)
S2
32- bit equivalent constant or lower 16- bit area of 32- bit data for specifying
number of words to be read
Starting 16- bit area for storing data read from EEPROM (for destination)
Operands
Operand
Relay
Timer/Counter
Register
WX WY WR WL
SV
EV
DT
S1
N/A
N/A
S2
N/A
N/A
N/A
N/A
FL
IX
IY
Index
modifier
N/A
N/A
N/A
N/A
N/A
LD
Index
Constant
register
A: Available
N/A: Not Available
Explanation of example
10 blocks of data stored in blocks 0 to 9 of the EEPROM are transferred to data registers DT0 to DT639 when
execution condition (trigger) R0 turns on.
EEPROM area
[S1] 0 64 words
Data register DT
[D]
0
1 64 words
[S2]
64
2 64 words
128
9 64 words
576
Address
(Block)
3 - 33
FP0
Description
S2 blocks of data stored in the EEPROM starting from S1 are transferred into the data register specified by D.
At this time, the transferred data is handled in units of 1 block/64 words.
Memory area
S1
S2
K0 to K9
K1 to K10
DT0 to DT1595
K0 to K95
K1 to K96
DT0 to DT6080
FP0 T32
K0 to K255
K1 to K256
DT0 to DT16320
640 words
6,144 words
FP0 T32
16,384 words
Because the initial data in the EEPROM is not fixed, caution is required when reading data that has not been
written to the EEPROM.
Flag conditions
3 - 34
Availability
F12 (ICRD)
FP
Outline
Program example
Boolean Non-ladder
Ladder Diagram
Address
Trigger
R0
10
Instruction
10
11
F12 ICRD , K 0 ,
S1
ST
F 12
0
(ICRD)
K10 , DT0
S2
10
DT
S1
Constant for specifying the starting address of FROM (for source data)
S2
32- bit equivalent constant or lower 16- bit area of 32- bit data for specifying
number of words to be read
Starting 16- bit area for storing data read from FROM (for destination)
Operands
Operand
Relay
Timer/Counter
Register
WX WY WR WL
SV
EV
DT
S1
N/A
N/A
S2
N/A
N/A
N/A
N/A
FL
Index
modifier
N/A
N/A
N/A
N/A
N/A
N/A
N/A N/A
N/A
LD
Index
Constant
register
N/A N/A
N/A
A: Available
N/A: Not Available
Explanation of example
10 blocks of data stored in blocks 0 to 9 of the FROM are transferred to data registers DT0 to DT20479 when
execution condition (trigger) R0 turns on.
FROM area
[S1] 0 2,048 words
Data register DT
[D]
0
1 2,048 words
[S2]
2048
2 2,048 words
4096
9 2,048 words
18432
Address
(Block)
3 - 35
Description
S2 blocks of data stored in the FROM starting from S1 are transferred into the data register specified by D. At
this time, the transferred data is handled in units of 1 block (2,048 words).
Memory area
S1
FP
S2
K0 to K15
K1 to K16
DT0 to DT30720
FP
32,765 words
Because the initial data in the FROM is not fixed, caution is required when reading data that has not been
written to the FROM.
Flag conditions
3 - 36
FP2SH/FP10SH
F12 (ICRD)
P12 (PICRD)
Availability
FP2SH/FP10SH
Outline
Program example
Boolean Non-ladder
Ladder Diagram
Address
Trigger
10
F12 ICRD , K 0 ,
S1
ST
11
R0
10
Instruction
F 12
0
(ICRD)
K10 , DT100
S2
10
DT
100
S1
Constant for specifying the starting address of IC card expansion memory (for
source data)
S2
32- bit equivalent constant or lower 16- bit area of 32- bit data for specifying
number of words to be read
Starting 16- bit area for storing data read from IC card (for destination)
Operands
Relay
Timer/Counter
Index
register
Register
Operand
WX WY WR WL
SV
EV
DT
FL
IX
(*1)
LD
Constant
IY
(*2)
Index
modifier
N/A
N/A
N/A
N/A
S2
N/A
N/A
N/A
N/A
N/A
N/A
S1
A
A: Available
N/A: Not Available
Explanation of example
10 words of data stored in addresses 0 to 9 of the IC card expansion memory area are transferred to data
registers DT100 to DT109 when trigger R0 turns on.
Expansion
memory area in
IC card
[S1] 0
Internalmemory
of CPU
[D]
DT100
1
[S2]
DT101
DT102
DT109
Address
3 - 37
FP2SH/FP10SH
Description
S2 words of data stored in the IC card expansion memory area starting from S1 are transferred into the CPU
memory location specified by D.
( n x 21024
-1
S1
S2
256 k
K131070
K131071 (H1FFFF)
512 k
K262142
K262143 (H3FFFF)
1M
K524286
K524287 (H7FFFF)
2M
K1048574
K1048575 (HFFFFF)
m x 1024
2
S1: 0 to [S2]
Flag conditions
3 - 38
FP0
P13 (PICWT)
Step
11
Availability
FP0
Outline
Program example
Boolean Non-ladder
Ladder Diagram
Address
Instruction
10
R0
10
S1
ST
11
Trigger
P 13
(PICWT)
DT
K0
K
K
10
0
S2
32- bit equivalent constant or lower 16- bit area of 32- bit data for specifying
number of words to be write
Starting address (constant) of EEPROM area for storing received data (for
destination)
Operands
Operand
Relay
Timer/Counter
Register
WX WY WR WL
SV
EV
DT
S1
N/A
N/A
S2
N/A
N/A
LD
FL
Index
register
IX
Constant
Index
modifier
IY
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
10 blocks (640 words) of data stored in data registers DT0 to DT576 are transferred to blocks 0 to 9 in the
EEPROM area when execution condition (trigger) R0 turns on.
Data register DT
EEPROM area
[S1] 0 64 words
64 64 words
[S2]
[D]
0
1
128 64 words
576 64 words
9
Address
(Block)
3 - 39
FP0
Description
S2 blocks of data stored in the data register starting from S1 are transferred into the EEPROM area specified
by D. At this time, the transferred data is handled in units of 1 block/64 words.
Memory area
S1
S2
DT0 to DT1595
K1 to K10
K0 to K9
DT0 to DT6080
K1 to K96
K0 to K95
FP0 T32
DT0 to DT16320
K1 to K256
K0 to K255
640 words
6,144 words
FP0 T32
16,384 words
Flag conditions
3 - 40
P13 (PICWT)
Availability
FP
Outline
Program example
Boolean Non-ladder
Ladder Diagram
Address
Instruction
10
10
R0
P13 PICWT , DT 0 ,
S1
K1 ,
ST
11
Trigger
P 13
(PICWT)
DT
K0
S2
S2
32- bit equivalent constant or lower 16- bit area of 32- bit data for specifying
number of words to be write
Starting address of FROM area for storing received data (for destination)
Operands
Operand
Relay
Timer/Counter
Register
WX WY WR WL
SV
EV
DT
S1
N/A
N/A
S2
N/A
N/A
LD
FL
Index
register
Constant
Index
modifier
N/A N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
1 block (2,048 words) of data stored in data registers DT0 is transferred to block 0 in the FROM area when
execution condition (trigger) R0 turns on.
Data register DT
FROM area
[D]
Address
(Block)
3 - 41
Description
S2 block of data stored in the data register starting from S1 is transferred into the FROM area specified by D.
At this time, the transferred data is handled in units of 1 block (2,048 words).
Memory area
S1
FP
S2
DT0 to DT30720
K1
K0 to K15
FP
32,765 words
Flag conditions
3 - 42
FP2SH/FP10SH
F13 (ICWT)
P13 (PICWT)
Availability
FP2SH/FP10SH
Outline
Writes data to the expansion memory area in the IC card.
Program example
Boolean Non-ladder
Ladder Diagram
Address
Trigger
10
ST
11
R0
10
Instruction
R
F 13
(ICWT)
DT
100
S1
S2
10
100
S1
S2
32- bit equivalent constant or lower 16- bit area of 32- bit data for specifying
number of words to be write
Operands
Relay
Timer/Counter
Index
register
Register
Operand
WX WY WR WL
SV
EV
DT
LD
FL
IX
(*1)
Constant
IY
(*2)
Index
modifier
S1
N/A
N/A
N/A
N/A
S2
N/A
N/A
N/A
N/A
N/A
A
A: Available
N/A: Not Available
Explanation of example
10 words of data stored in data registers DT100 to DT109 are transferred to addresses 100 to 109 in the
expansion memory area in the IC card when trigger R0 turns on.
Internal memory
of CPU
Expansionmemory
area in IC card
[S1] DT 100
DT101
[S2]
101
DT102
102
DT109
[D]
100
109
Address
3 - 43
FP2SH/FP10SH
Description
S2 words of data stored in the CPU starting from S1 are transferred into the expansion memory area in the IC
card specified by D.
The F13 (ICWT)/P13 (PICWT) instruction can be executed only in the expansion memory area of an
SRAM- type IC card.
( n x 21024
-1
S1
S2
256 k
K131070
K131071 (H1FFFF)
512 k
K262142
K262143 (H3FFFF)
1M
K524286
K524287 (H7FFFF)
2M
K1048574
K1048575 (HFFFFF)
m x 1024
2
S1: 0 to [S2]
Flag conditions
3 - 44
F14 (PGRD)
P14 (PPGRD)
Outline
Reads a program from the IC card and executes it.
Program example
Boolean Non-ladder
Ladder Diagram
Address
Trigger
10
Instruction
10
11
R0
ST
F 14
DT
(PGRD)
100
S
Starting 16-bit area (max. 4 words of data) for storing file name (max. 8 letters)
in the ASCII format.
Operands
Relay
Timer/Counter
Index
register
Register
Operand
WX WY WR WL
A
SV
EV
DT
LD
FL
IX
(*1)
N/A
Constant
IY
(*2)
N/A
N/A
N/A
Index
modifier
A
A: Available
N/A: Not Available
Explanation of example
When the execution condition R0 is on, the programs for file names written to data register DT100 and
subsequent data registers are read from the IC memory card, and are substituted for the program currently
being executed.
If STEP2 is written for data register DT100 or a subsequent register, the program with the file name STEP2
stored on the IC memory card is read.
CPU
IC memory card
R0
F14(PGRD) , DT100
Program STEP1
Program STEP2
Program STEP3
RUN mode
R0 : on
DT100: STEP2
R20
Y40
R21
3 - 45
Description
The program for the file name stored in the area specified by S is read from the IC memory card, and is
substituted for the program currently being executed.
Subsequent operation is carried out based on the program which was read.
Flag conditions
3 - 46
DT100
DT100
DT101
DT101
DT102
H20
H20
DT103
H20
H20
DT102
Space
codes
H0
Final code
Example:
A B C D
41 42 43 44
R0
F1 (DMV), H 44434241, DT 100
F0 (MV),
0, DT 102
R1
F14 (PGRD), DT 100
3 - 47
Specifying a file name with the ASCII conversion instruction, and converting it
The file name is converted to a character code using the ASCII conversion instruction F95 (ASC), and is
written to a specified memory area.
- Programming can only be done with the programming tool software.
- When the ASCII conversion instruction is executed, the results are stored in a 6 - word (12 - character)
memory area. The specification should be made as follows.
Operand of F95 M
The file name (8 characters) should be entered with characters filling the spaces
starting from the left. Spaces should be entered where characters are not specified.
Example:
( indicates a space)
Specifying a file name of ABCD
R0
R1
,DT 100
R1
F14 (PGRD), DT 100
3 - 48
,DT 100
F15 (XCH)
P15 (PXCH)
Outline
Boolean
Ladder Diagram
Address
10
ST
11
Trigger
10
Instruction
F 15
0
(XCH)
DT
R0
DT
F15 XCH , DT 10 , DT 22
10
22
D2
D1
D1
D2
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
(*4)
Index
modifier
D1
N/A
N/A
D2
(*1)
(*2)
(*3)
(*4)
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
3 - 49
Explanation of example
The contents of data register DT10 and data register DT22 are exchanged when trigger R0 turns on.
[D1] DT10
DT11
DT12
DT13
DT14
10
K
K
K
11
12
13
14
R0: on
[D1] DT10
DT11
DT12
DT13
DT14
K
K
K
K
22
11
12
13
14
DT20
DT21
DT22
DT23
DT24
20
K
K
K
21
22
23
24
[D2]
DT20
DT21
DT22
DT23
DT24
K
K
K
K
20
21
10
23
24
[D2]
Description
The contents in the 16-bit areas specified by D1 and D2 are exchanged.
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
3 - 50
F16 (DXCH)
P16 (PDXCH)
Outline
Boolean
Ladder Diagram
Address
10
R0
ST
11
Trigger
10
Instruction
F 16
(DXCH)
DT
10
DT
22
D2
D1
D2
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
(*4)
Index
modifier
D1
N/A
N/A
N/A
D2
(*1)
(*2)
(*3)
(*4)
N/A
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
3 - 51
Explanation of example
The contents of data registers DT11 and DT10 and data registers DT23 and DT22 are exchanged when
trigger R0 turns on.
[D1] DT10
DT11
DT12
DT13
FFFD
25AC
H
H
F23
R0: on
[D1] DT10
DT11
DT12
DT13
9ABC
H
H
H
DEF1
25AC
F23
DT20
DT21
DT22
DT23
H
H
H
H
1234
5678
9ABC [D2]
DEF1
DT20
DT21
DT22
DT23
H
H
H
H
1234
5678
0 [D2]
FFFD
Description
The contents in the 32-bit areas specified by D1 and D2 are exchanged.
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
3 - 52
F17 (SWAP)
P17(PSWAP)
Exchanges higher and lower order bytes of the specified 16-bit data.
For the FP/FP - M/FP0/FP1, the P type high- level instructions are not
available.
Program example
Outline
Boolean
Ladder Diagram
Address
10
ST
11
Trigger
10
Instruction
F 17
DT
R0
(SWAP)
0
F17 SWAP , DT 0
D
16-bit area to be exchanged higher and lower bytes
Operands
Relay
Operand
D
(*1)
(*2)
(*3)
(*4)
Timer/Counter
WL
WX WY WR
(*1)
N/A
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
(*4)
N/A
Index
modifier
N/A
A
A: Available
N/A: Not Available
Explanation of example
The higher and lower bytes of data register DT0 are exchanged when trigger R0 turns on.
Bit position 15 1211 8 7 4 3 0
0 0 0 0 0 1 0 0 1 1 0 1 0 0 1 0
DT0
Hexadecimal
3 - 53
Description
The higher order byte (higher 8-bit) and lower order byte (lower 8-bit) of the 16-bit area specified by D are
exchanged.
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
3 - 54
F18 (BXCH)
P18(PBXCH)
Outline
Boolean
Ladder Diagram
Address
10
F18
(BXCH)
12
DT
10
DT
13
DT
R0
ST
11
Trigger
10
Instruction
31
D2
D3
D1
D2
D3
Operands
Relay
Timer/Counter
WX WY WR WL
Index
register
Register
Operand
SV
EV
DT
FL
LD
(*1)
Constant
K
Index Integer
modifier device
D1
N/A
N/A
D2
N/A
N/A
D3
N/A
N/A
A: Available
N/A: Not Available
3 - 55
Explanation of example
The data block from data register DT10 to data register DT13 and the data block (DT31 to DT34) starting from
data register DT31 are exchanged when trigger R0 turns on.
[D1] DT10
10
DT30
11
11
31
12
12
32
[D2] DT13
13
33
14
14
34
35
R0: on
[D3]
WR
[D1] DT10
DT30
11
31
10
12
32
11
[D2] DT13
33
12
14
14
34
13
35
[D3]
Description
The data block specified by D1 and D2 and the block starting from the 16-bit area specified by D3 are
exchanged when the trigger turns on.
Flag conditions
Error flag (R9007):
Error flag (R9008):
3 - 56
F19 (SJP)
LBL
Auxiliary jump
Label
Skips to the LBL instruction with the same number as the data area
specified by the F19 (SJP) instruction. 18
Program example
Outline
Boolean
Ladder Diagram
Address
Instruction
10
R0
10
ST
11
F19
F19 SJP, DT 0
(SJP)
DT
0
S
Label number
(LBL 20 )
16-bit area for storing the label number [0 to 255 (256 points)]
Operands
Relay
Timer/Counter
Index
register
Register
Operand
WX WY WR WL
A
SV
EV
DT
LD
FL
IX
(*1)
N/A
Constant
IY
(*2)
N/A
N/A
N/A
Index
modifier
N/A
A: Available
N/A: Not Available
Explanation of example
Skips to the label number with the same number as the value in data register DT0 when trigger R0 turns on.
R0
F19 SJP, DT 0
When
DT0 = K1
Program
When
DT0 = K125
(LBL 1 )
Program
(LBL 125 )
When DT0 is K1, the program skips from F19 (SJP) to LBL1.
When DT0 is K125, the program skips from F19 (SJP) to LBL125.
3 - 57
Description
The F19 (SJP) instruction skips the program between the F19 (SJP) and the LBL with the number specified
by S when the trigger turns on.
Program execution continues from the next instruction after the jump destination label.
Up to 256 jump destinations can be specified (the range of values in which S can be stored is from K0 to
K255).
LBL instructions are specified as destinations of JP, LOOP and F19 (SJP) instructions. Any instruction may
be used as the starting point for the jump destination.
Two or more LBL instructions with the same number cannot be used in the same program.
If there is no label with the same number as the value of S, or if the value stored is outside of the range, the F19
(SJP) instruction will not be executed.
Flag conditions
Using differential type instructions between F19 (SJP) and LBL instructions
This is the same as when programming is done between the JP and LBL instructions. Refer to the
explanation of the JP and LBL instructions.
You must be careful when using one of the instructions below, which are executed by detecting the leading
edge of execution condition (trigger) such as the differential instruction.
DF (leading edge differential)
Count input of CT (counter)
Count input of F118 (up/down counter)
Shift input of SR (shift register)
Shift input of F119 (left/right shift register)
NSTP (next step)
Differential execution type high - level instruction (this instruction is specified by P and a number)
3 - 58
F20 (+)
P20 (P+)
Outline
Boolean
Ladder Diagram
Address
Trigger
10
Instruction
ST
11
R0
10
F 20
F20 +, DT 1 , DT 10
S
0
(+ )
DT
DT
10
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
IX
(*3)
IY
(*4)
Constant
K
Index
modifier
(*1)
(*2)
(*3)
(*4)
N/A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
The contents of data register DT10 and data register DT1 are added together when trigger R0 turns on.
When the decimal number 4 is in DT1 and the decimal number 8 is in DT10, as shown below.
Augend [D]: K8
Bit position 15 1211 8 7 4 3 0
0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
DT10
Addend [S]: K4
3 - 59
Description
The 16-bit equivalent constant or 16-bit area specified by S and the 16-bit area specified by D are added
together.
Augend data
(D)
Addend data
+
Trigger turns on
(S)
Result
(D)
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
= flag (R900B):
Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 16-bit
data (overflows or underflows).
3 - 60
F21(D+)
P21(PD+)
Outline
Boolean
Ladder Diagram
Address
10
ST
11
Trigger
10
Instruction
F 21
0
(D+)
DT
R0
F21 D+ , DT 0 ,
DT
DT 10
0
10
S
S
32-bit equivalent constant or lower 16-bit area of 32-bit area (for addend)
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
(*4)
Index
modifier
N/A
D
(*1)
(*2)
(*3)
(*4)
A
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
3 - 61
Explanation of example
The contents (32 bits) of data registers DT11 and DT10 and the contents (32 bits) of data registers DT1 and
DT0 are added together when trigger R0 turns on.
Higher 16 bits
Lower 16 bits
Contents of
DT11
Contents of
DT10
(Addition)
Contents
of DT1
Contents
of DT0
(Result is stored.)
Description
The 32-bit equivalent constant or the 32-bit area specified by S and the 32-bit data specified by D are added
together.
Addend data
Augend data
(D+1, D)
Result
(S+1, S)
(D+1, D)
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
= flag (R900B):
Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 32-bit
data (overflows or underflows).
3 - 62
F22 (+)
P22 (P+)
Adds two 16-bit data items and stores the result in the specified area.
For the FP/FP - M/FP0/FP1, the P type high- level instruction
P22 (P+) is not available.
Outline
Program example
Boolean
Ladder Diagram
Address
10
R0
ST
11
F 22
(+ )
DT
10
DT
20
DT
Trigger
10
Instruction
30
F22+, DT 10 , DT 20 , DT 30
S1
S2
S1
S2
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IY
(*4)
A
A
S2
N/A
N/A
N/A
S1
(*1)
(*2)
(*3)
(*4)
Index
modifier
IX
(*3)
A
A: Available
N/A: Not Available
3 - 63
Explanation of example
The contents of data registers DT10 and DT20 are added when trigger R0 turns on. The added result is
stored in data register DT30.
when the decimal number 8 is in DT10 and the decimal number 4 is in DT20, as shown below.
Augend [S1]: K8
Bit position 15 1211 8 7 4 3 0
0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
DT10
Addend [S2]: K4
(Addition)
Description
The 16-bit data or 16-bit equivalent constant specified by S1 and S2 are added together. The added result is
stored in D.
Augend data
(S1)
Addend data
Result
(S2)
(D)
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
= flag (R900B):
Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 16-bit
data (overflows or underflows).
3 - 64
F23 (D+)
P23 (PD+)
Adds two 32-bit data items and stores the result in the specified area.
For the FP/FP - M/FP0/FP1, the P type high- level instruction
P23 (PD+) is not available.
Program example
Outline
Boolean
Ladder Diagram
Address
Instruction
10
R0
ST
11
Trigger
F 23
S1
S2
0
(D+)
DT
20
DT
10
DT
F23 D+ , DT 10 , DT 20 , DT 30
10
30
S1
32-bit equivalent constant or lower 16-bit area of 32-bit data (for augend)
S2
32-bit equivalent constant or lower 16-bit area of 32-bit data (for addend)
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
(*4)
Index
modifier
S1
N/A
S2
N/A
D
(*1)
(*2)
(*3)
(*4)
A
N/A
N/A
N/A
N/A
A
A: Available
N/A: Not Available
3 - 65
Explanation of example
The contents of data registers DT11 and DT10 and the contents of data registers DT21 and DT20 are added
when trigger R0 turns on. The added result is stored in data registers DT31 and DT30.
Higher 16 bits
Lower 16 bits
Contents of
DT10
Contents of
DT11
(Addition)
Contents of
DT21
Contents of
DT20
(Result is stored.)
Store to DT31
Description
The 32-bit data or 32-bit equivalent constant specified by S1 and S2 are added together. The added result is
stored in D+1 and D.
Addend data
Augend data
(S1+1, S1)
Result
(S2+1, S2)
(D+1, D)
When processing 32-bit data, the higher 16-bit areas (S1+1, S2+1, D+1) are automatically determined once
the lower 16-bit areas (S1, S2, D) are specified.
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
= flag (R900B):
Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 32-bit
data (overflows or underflows).
3 - 66
F25 ( - )
P25 (P - )
Outline
Boolean
Ladder Diagram
Address
Instruction
10
10
F 25
(- )
DT
R0
ST
11
10
DT
Trigger
20
F25 - , DT 10 , DT 20
S
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
IX
(*3)
IY
(*4)
Constant
K
Index
modifier
(*1)
(*2)
(*3)
(*4)
N/A
N/A
N/A
A
A: Available
N/A: Not Available
Explanation of example
Subtracts the contents of data register DT10 from the contents of data register DT20 when trigger R0 turns
on.
Example 1: When the decimal number 16 is in DT20 and the decimal number
4 is in DT10.
DT20
D: 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 K16
(Subtraction)
DT10
S:
K4
0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
=
D:
DT20
0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0
K12
3 - 67
Example 2: When the decimal number 3 is in DT20 and the decimal number
5 is in DT10.
DT20
D: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1
K3
(Subtraction)
S:
DT10
K5
0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1
=
D:
DT20
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0
K-2
Description
Subtracts the 16-bit equivalent constant or 16-bit area specified by S from the 16-bit area specified by D.
Minuend data
(D)
Subtrahend data
-
(S)
Result
(D)
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
= flag (R900B):
Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 16-bit
data (overflows or underflows).
3 - 68
F26 (D - )
P26 (PD - )
Outline
Boolean
Ladder Diagram
Address
Instruction
10
10
ST
11
Trigger
F 26
0
(D- )
DT
R0
DT
F26 D - , DT 10 , DT 20
S
10
20
32-bit equivalent constant or lower 16-bit area of 32-bit area (for subtrahend)
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
IX
(*3)
IY
(*4)
Constant
K
Index
modifier
(*1)
(*2)
(*3)
(*4)
N/A
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
3 - 69
Explanation of example
Subtracts the contents (32 bits) of data registers DT11 and DT10 from the contents (32 bits) of data registers
DT21 and DT20 when trigger R0 turns on.
Higher 16 bits
Lower 16 bits
Contents of
DT20
Contents of
DT21
(Subtraction)
Contents of
DT11
Contents of
DT10
(Result is stored.)
Description
Subtracts the 32-bit equivalent constant or the 32-bit data specified by S from the 32-bit data specified by D.
Minuend data
(D+1, D)
Subtrahend data
(S+1, S)
Result
(D+1, D)
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
= flag (R900B):
Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 32-bit
data (overflows or underflows).
3 - 70
F27 ( - )
P27 (P - )
Subtracts 16-bit data from the minuend and stores the result in the
specified area.
For the FP/FP - M/FP0/FP1, the P type high- level instruction
P27 (P - ) is not available.
Program example
Outline
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
F 27
(- )
DT
10
DT
20
DT
R0
10
ST
11
30
F27 - , DT 10 , DT 20 , DT 30
S1
S2
S1
S2
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IY
(*4)
A
A
S2
N/A
N/A
N/A
S1
(*1)
(*2)
(*3)
(*4)
Index
modifier
IX
(*3)
A
A: Available
N/A: Not Available
Description
Subtracts the 16-bit data or 16-bit equivalent constant specified by S2 from the 16-bit data or 16-bit equivalent
constant specified by S1. The subtracted result is stored in D.
Minuend data
(S1)
Subtrahend data
-
(S2)
Result
(D)
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Error flag (R9008): Turns on for an instant when the area specified using the index modifier
exceeds the limit.
= flag (R900B):
Turns on for an instant when the calculated result is recognized as 0.
Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 16-bit
data (overflows or underflows).
3 - 71
Explanation of example
Subtracts the contents of data register DT20 from the contents of data register DT10 when trigger R0 turns
on. The subtracted result is stored in data register DT30.
Example 1: When the decimal number 16 is in DT10 and the decimal number
4 is in DT20.
Minuend [S1]: K16
Bit position 15 1211 8 7 4 3 0
DT10
0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0
Subtrahend [S2]: K4
- (Subtraction)
Example 2: When the decimal number 3 is in DT10 and the decimal number
5 is in DT20.
Minuend [S1]: K3
Bit position 15 1211 8 7 4 3 0
DT10
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1
Subtrahend [S2]: K5
- (Subtraction)
Result [D]: K - 2
Bit position 15 1211 8 7 4 3 0
DT30
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0
3 - 72
F28 (D - )
P28 (PD - )
Subtracts 32-bit data from the minuend and stores the result in the
specified area.
For the FP/FP - M/FP0/FP1, the P type high- level instruction
P28 (PD - ) is not available.
Program example
Outline
Boolean
Ladder Diagram
Address
Instruction
10
R0
ST
11
Trigger
F 28
S1
S2
0
(D- )
DT
20
DT
10
DT
F28 D - , DT 10 , DT 20 , DT 30
10
30
S1
32-bit equivalent constant or lower 16-bit area of 32-bit data (for minuend)
S2
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IY
(*4)
A
A
N/A
S2
N/A
N/A
N/A
N/A
N/A
S1
(*1)
(*2)
(*3)
(*4)
Index
modifier
IX
(*3)
A
A: Available
N/A: Not Available
3 - 73
Explanation of example
Subtracts the contents of data registers DT21 and DT20 from the contents of data registers DT11 and DT10
when trigger R0 turns on. The subtracted result is stored in data registers DT31 and DT30.
Higher 16 bits
Contents of
DT11
Contents of
DT21
Lower 16 bits
Contents of
DT10
(Subtraction)
Contents of
DT20
(Result is stored.)
Description
Subtracts the 32-bit data or 32-bit equivalent constant specified by S2 from the 32-bit data or 32-bit equivalent
constant specified by S1. The subtracted result is stored in D+1 and D.
Minuend data
(S1+1, S1)
Subtrahend data
(S2+1, S2)
Result
(D+1, D)
When processing 32-bit data, the higher 16-bit areas (S1+1, S2+1 D+1) are automatically determined once
the lower 16-bit areas (S1, S2, D) are specified.
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
= flag (R900B):
Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 32-bit
data (overflows or underflows).
3 - 74
F30 (*)
P30 (P*)
Outline
Program example
Boolean
Ladder Diagram
Address
10
R0
ST
11
Trigger
10
Instruction
S2
0
(*)
DT
S1
30
S2
20
DT
10
DT
F30 *, DT 10 , DT 20, DT 30
S1
R
30
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IY
(*4)
A
A
S2
N/A
N/A
N/A
N/A
S1
(*1)
(*2)
(*3)
(*4)
Index
modifier
IX
(*3)
A
A: Available
N/A: Not Available
3 - 75
Explanation of example
Multiplies the contents of data register DT10 and DT20 when trigger R0 turns on.
The result is stored in data registers DT 31 and DT 30.
When the decimal number 8 is in DT10 and the decimal number 2 is in DT20.
Multiplicand [S1]: K8
Bit position 15 1211 8 7 4 3 0
DT10
0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
Multiplier [S2]: K2
Bit position 15 1211 8 7 4 3 0
DT20
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
The lower 16 bits of the 32 - bit multiplication result are stored in the specified memory area (DT30), and the
higher16 bits are stored in the area following the specified area (DT31).
Description
Multiplies the 16-bit data or 16-bit equivalent constant specified by S1 and the 16-bit data or 16-bit equivalent
constant specified by S2. The multiplied result is stored in D+1 and D (32-bit area).
Multiplicand data
(S1)
Multiplier data
Result
(S2)
(D+1, D)
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
= flag (R900B):
3 - 76
F31 (D*)
P31 (PD*)
Outline
Boolean
Ladder Diagram
Address
10
R0
ST
11
Trigger
10
Instruction
F 31
S2
0
(D*)
DT
20
DT
10
DT
F31 D* , DT 10, DT 20 , DT 30
S1
30
S1
32-bit equivalent constant or lower 16-bit area of 32-bit data (for multiplicand)
S2
32-bit equivalent constant or lower 16-bit area of 32-bit data (for multiplier)
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
(*4)
Index
modifier
S1
N/A
S2
N/A
D
(*1)
(*2)
(*3)
(*4)
A
N/A
N/A
N/A
N/A
N/A
A
A: Available
N/A: Not Available
Explanation of example
16 bits
16 bits
Contents of
DT11
Contents of
DT10
16 bits
16 bits
Contents of
DT21
16 bits
16 bits
16 bits
Contents of
DT20
16 bits
3 - 77
Description
Multiplies the 32-bit data or 32-bit equivalent constant specified by S1 and the one specified by S2.
The multiplied result is stored in D+3, D+2, D+1 and D.
Multiplicand data
(S1+1, S1)
Multiplier data
Result
(S2+1, S2)
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
= flag (R900B):
3 - 78
F32 (%)
P32 (P%)
Outline
Boolean
Ladder Diagram
Address
10
R0
ST
11
Trigger
10
Instruction
F 32
S2
0
(% )
DT
20
DT
10
DT
F32 % , DT 10 , DT 20 , DT 30
S1
30
S1
S2
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IY
(*4)
A
A
S2
N/A
N/A
N/A
S1
(*1)
(*2)
(*3)
(*4)
Index
modifier
IX
(*3)
A
A: Available
N/A: Not Available
3 - 79
Explanation of example
Divides the contents of data register DT10 by decimal constant DT20 when trigger R0 turns on. The quotient
is stored in data register DT30 and the remainder is stored in special data register DT9015/DT90015.
When the decimal number 15 is in DT10 and the decimal number 4 is in DT20, as shown below.
Dividend [S1]: K15
Bit position 15 1211 8 7 4 3 0
0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1
DT10
Divisor [S2]: K4
Bit position 15 1211 8 7 4 3 0
DT20
0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
Remainder: K3
Quotient [D]: K3
Description
The 16-bit data or 16-bit equivalent constant specified by S1 is divided by the 16-bit data or 16-bit equivalent
constant specified by S2.
The quotient is stored in D and the remainder is stored in the special data register DT9015 (DT90015 for
FP0 T32/FP/FP2/FP2SH/FP10SH).
Divisor
Dividend data
(S1)
Quotient
(S2)
(D)
....
Remainder
(DT9015/DT90015)
With the FP0 T32/FP/FP2/FP2SH/FP10SH and FP0 C10, C14, C16, C32/FP1/FPM/FP3, the numbers of
the special data registers are different.
Type
DT9015
FP0 T32/FP/
FP2/FP2SH/FP10SH
DT90015
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
= flag (R900B):
Carry flag (R9009): Turns on for an instant when the negative minimum value K-32768 (H8000) is
divided by K-1 (HFFFF).
3 - 80
F33 (D%)
P33 (PD%)
Outline
Boolean
Ladder Diagram
Address
Trigger
Instruction
ST
11
R0
10
F 33
(D%)
F33 D% , DT 10 , DT 20 ,
DT 30
DT
20
S1
10
DT
DT
30
S2
10
S1
32-bit equivalent constant or lower 16-bit area of 32-bit data (for dividend)
S2
32-bit equivalent constant or lower 16-bit area of 32-bit data (for divisor)
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IY
(*4)
A
A
N/A
S2
N/A
N/A
N/A
N/A
N/A
S1
Index
modifier
IX
(*3)
A
A: Available
N/A: Not Available
3 - 81
Explanation of example
Higher 16 bits
Lower 16 bits
Contents of
DT11
Contents of DT10
(Division)
Contents of
DT21
Contents of
DT20
Quotient is stored in DT31 and DT30.
To DT31
To DT30
The lower 16 bits of the remainder is stored in DT9015/DT90015 and
the higher 16 bits of the remainder is stored in DT9016/DT90016.
To DT9016/
DT90016
To DT9015/
DT90015
Description
The 32-bit data or 32-bit equivalent constant specified by S1 is divided by the 32-bit data or 32-bit equivalent
constant specified by S2. The quotient is stored in D+1 and D and the remainder is stored in the special data
registers DT9016 and DT9015 (DT90016 and DT90015 for FP0 T32/FP/FP2/FP2SH/FP10SH).
Dividend data
Divisor
S1: lower 16-bit
S2: lower 16-bit
S1+1: higher16-bit
S2+1: higher16-bit
Quotient
D: lower 16-bit
D+1: higher 16-bit
Remainder
DT9015/DT90015
DT9016/DT90016
When processing 32-bit data, the higher 16-bit areas (S1+1, S2+1, D+1) are automatically determined once
the lower 16-bit areas (S1, S2, D) are specified.
With the FP0 T32/FP/FP2/FP2SH/FP10SH and FP0 C10, C14, C16, C32/FP1/FPM/FP3, the numbers of
the special data registers are different.
Type
DT9016, DT9015
FP0 T32/FP/
FP2/FP2SH/FP10SH
DT90016, DT90015
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
= flag (R900B):
Carry flag (R9009): Turns on for an instant when negative minimum value K-2147483648
(H80000000) is divided by K-1 (HFFFFFFFF).
3 - 82
F34 (*W)
P34 (P*W)
Multiplies two 16-bit data items and stores the result in the specified
16-bit area.
For the FP/FP - M/FP0/FP1, the P type high- level instruction
P34 (P*W) is not available.
Program example
Outline
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
10
F34 *W,
F34
(*W)
DT
10
DT
20
DT
R0
ST
11
30
S2
S1
S2
Operands
Relay
Timer/Counter
Operand
WX WY WR WL
Index
register
Register
SV
EV
DT
FL
LD
(*1)
Constant
Index Integer
modifier device
S1
N/A
N/A
S2
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
Multiplies the contents of data register DT10 and data register DT20 when trigger R0 turns on. The multiplied
result is stored in data register DT30.
Multiplicand [S1]: K8
Bit position 15 12 11 8 7 4 3 0
DT10
0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
Multiplier [S2]: K2
Bit position 15 12 11 8 7 4 3 0
DT20
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
R0: on
12 11 8 7 4 3 0
0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0
3 - 83
Description
Multiplies the 16-bit data or 16-bit equivalent constant specified by S1 and the 16-bit data or 16-bit equivalent
constant specified by S2 when the trigger turns on. The multiplied result is stored in D (16-bit area).
Multiplier data
Multiplicand data
S1
Trigger turns on
S2
Result
D
Flag conditions
= flag (R900B):
3 - 84
F35 (+1)
P35 (P+1)
Outline
Boolean
Ladder Diagram
Address
Instruction
10
F 35
DT
R0
10
ST
11
Trigger
0
(+1)
0
F35 +1 , DT 0
D
16-bit area to be increased by 1
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
N/A
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IY
(*4)
IX
(*3)
N/A
N/A
Index
modifier
A
A: Available
N/A: Not Available
(*3) With the FP, FP2, FP2SH, and FP10SH, this is I0 to IC.
(*4) With the FP, FP2, FP2SH, and FP10SH, this is ID.
Explanation of example
Adds 1 to the contents of data register DT0 when trigger R0 turns on.
Original data [D]: K9
Bit position 15 1211 8 7 4 3 0
DT0
0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1
+1
Description
Adds 1 to the 16-bit data specified by D. The result is stored in D.
Original data
(D)
Result
+
(D)
3 - 85
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
= flag (R900B):
Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 16-bit
data (overflows).
3 - 86
F36 (D+1)
P36 (PD+1)
Outline
Boolean
Ladder Diagram
Address
10
ST
11
Trigger
F 36
DT
R0
10
Instruction
0
(D+1)
0
F36 D+1 , DT 0
D
Lower 16-bit area of 32-bit data to be increased by 1
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
N/A
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
A
Constant
IX
(*3)
IY
(*4)
N/A
N/A
N/A
Index
modifier
A
A: Available
N/A: Not Available
(*3) With the FP, FP2, FP2SH, and FP10SH, this is I0 to IC.
(*4) With the FP, FP2, FP2SH, and FP10SH, this is ID.
Explanation of example
Adds 1 to the content of data registers DT1 and DT0 when trigger R0 turns on.
Higher 16 bits
Contents of
DT1
Store to DT1
Lower 16 bits
Contents of
DT0
+1
Store to DT0
3 - 87
Description
Adds 1 to the 32-bit data specified by D. The result is stored in D+1 and D.
Original data
(D+1, D)
Result
+
(D+1, D)
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
= flag (R900B):
Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 32-bit
data (overflows).
3 - 88
F37 ( - 1)
P37 (P - 1)
Outline
Program example
Boolean
Ladder Diagram
Address
10
ST
11
Trigger
F 37
DT
R0
10
Instruction
0
(- 1 )
0
F37 - 1 , DT 0
D
16-bit area to be decreased by 1
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
N/A
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IY
(*4)
IX
(*3)
N/A
N/A
Index
modifier
A
A: Available
N/A: Not Available
(*3) With the FP, FP2, FP2SH, and FP10SH, this is I0 to IC.
(*4) With the FP, FP2, FP2SH, and FP10SH, this is ID.
Explanation of example
Subtracts 1 from the contents of data register DT0 when trigger R0 turns on.
Original data [D]: K10
Bit position 15 1211 8 7 4 3 0
DT0
0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0
-1
Result [D]: K9
Description
Subtracts 1 from the 16-bit data specified by D. The result is stored in D.
Original data
(D)
Result
-
(D)
3 - 89
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
= flag (R900B):
Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 16-bit
data (underflows).
3 - 90
F38 (D - 1)
P38 (PD - 1)
Outline
Program example
Boolean
Ladder Diagram
Address
10
R0
ST
11
Trigger
10
Instruction
R
F 38
DT
F38 D - 1 , DT 0
0
(D- 1)
0
D
Lower 16-bit area of 32-bit data to be decreased by 1
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
N/A
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
A
Constant
IX
(*3)
IY
N/A
N/A
N/A
Index
modifier
A
A: Available
N/A: Not Available
(*3) With the FP, FP2, FP2SH, and FP10SH, this is I0 to IC.
Explanation of example
Subtracts 1 from the content of data registers DT1 and DT0 when trigger R0 turns on.
Higher 16 bits
Lower 16 bits
Contents of
DT1
Contents of
DT0
-1
Store to DT1
Store to DT0
3 - 91
Description
Subtracts 1 from the 32-bit data specified by D. The result is stored in D+1 and D.
Original data
(D+1, D)
Result
-
(D+1, D)
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
= flag (R900B):
Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 32-bit
data (underflows).
3 - 92
F39 (D*D)
P39 (PD*D)
Multiplies two 32-bit data items and stores the result in the specified
32-bit area.
For the FP/FP - M/FP0/FP1, the P type high- level instruction
P39 (PD*D) is not available.
Program example
Outline
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
11
10
F39 D*D,
F39
(D*D)
DT
10
DT
20
DT
R0
ST
30
DT 10, DT 20, DT 30
S1
S2
S1
32-bit equivalent constant or lower 16-bit area of 32-bit data (for multiplicand)
S2
32-bit equivalent constant or lower 16-bit area of 32-bit data (for multiplier)
Operands
Relay
Timer/Counter
Operand
WX WY WR WL
Index
register
Register
SV
EV
DT
FL
LD
(*1)
Constant
Index Integer
modifier device
S1
N/A
N/A
S2
N/A
N/A
N/A
N/A
N/A
Explanation of example
A: Available
N/A: Not Available
Multiplies the contents of data registers DT11 and DT10 and the contents of data registers DT21 and DT20
when trigger R0 turns on. The multiplied result is stored in data registers DT31 and DT30.
16 bits
16 bits
DT11
DT10
16 bits
16 bits
DT21
DT20
R0: on
16 bits
16 bits
DT31
DT30
3 - 93
Description
Multiplies the 32-bit data or 32-bit equivalent constant specified by S1 and the one specified by S2 when the
trigger turns on.
The multiplied result is stored in D+1 and D (32-bit area).
Multiplicand data
Multiplier data
S1:
lower 16-bit
S1+1: higher 16-bit
S2:
lower 16-bit
S2+1: higher 16-bit
Trigger turns on
Result (32-bit)
D
D+1
Flag conditions
= flag (R900B):
3 - 94
F40 (B+)
P40 (PB+)
Adds two BCD data items that express 8-digit decimal numbers (8-digit
BCD H codes).
For the FP/FP - M/FP0/FP1, the P type high- level instruction P40
(PB+) is not available.
Program example
Outline
Boolean
Ladder Diagram
Address
Instruction
10
10
ST
11
Trigger
F 40
0
(B+ )
DT
R0
F40 B+, DT 1 , DT 10
S
DT
10
4-digit BCD equivalent constant or 16-bit area for 4-digit BCD data (for addend)
16-bit area for 4-digit BCD data (for augend and result)
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
(*4)
D
(*1)
(*2)
(*3)
(*4)
A
N/A
N/A
N/A
Index
modifier
A
A
A: Available
N/A: Not Available
3 - 95
Explanation of example
The contents of data register DT10 and data register DT1 are added together when trigger R0 turns on.
When H4 (BCD)is in DT1 and H8 (BCD) is in DT10, as shown below.
Augend [D]: H8 (BCD)
Bit position 15 1211 8 7 4 3 0
DT10
0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
BCD H code
0
0
0
8
(Addition)
Description
The 4-digit BCD equivalent constant or 16-bit area for 4-digit BCD data specified by S and the 16-bit area for
4-digit BCD data specified by D are added together.
Augend data
(D)
Addend data
Result
(S)
(D)
Flag conditions
= flag (R900B):
Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 4-digit
BCD data (overflows).
3 - 96
F41 (DB+)
P41 (PDB+)
Adds two BCD data items that express 8-digit decimal numbers (8-digit
BCD H codes).
For the FP/FP - M/FP0/FP1, the P type high- level instruction P41
(PDB+) is not available.
Outline
Program example
Boolean
Ladder Diagram
Address
10
ST
11
Trigger
10
Instruction
R
F 41
0
(DB+)
DT
R0
DT
F41 DB+ , DT 0 , DT 10
S
0
10
8-digit BCD equivalent constant or lower 16-bit area for 8-digit BCD data (for
addend)
Lower 16-bit area for 8-digit BCD data (for augend and result)
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
(*4)
N/A
D
(*1)
(*2)
(*3)
(*4)
A
N/A
N/A
N/A
N/A
Index
modifier
A
A
A: Available
N/A: Not Available
3 - 97
Explanation of example
The contents of data registers DT11 and DT10 and the contents of data registers DT1 and DT0 are added
together when trigger R0 turns on.
Higher 16 bits
Lower 16 bits
Contents of
DT11
Contents
of DT1
Contents of
DT10
(Addition)
Contents
of DT0
(Result is stored.)
Description
The 8-digit BCD equivalent constant or 8-digit BCD data specified by S and the 8-digit BCD data specified by
D are added together.
Augend data
Addend data
D: lower 4-digit
S: lower 4-digit
+
D+1: higher 4-digit
S+1: higher 4-digit
Result
D: lower 4-digit
D+1: higher 4-digit
Flag conditions
= flag (R900B):
Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 8-digit
BCD data (overflows).
3 - 98
F42 (B+)
P42 (PB+)
Adds two BCD data items that express 4-digit decimal numbers (4-digit
BCD H codes) and stores the result in the specified area.
For the FP/FP - M/FP0/FP1, the P type high- level instruction P42
(PB+) is not available.
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
10
Instruction
ST
11
R0
10
F 42
S2
0
(B+)
DT
20
DT
10
DT
30
S1
4-digit BCD equivalent constant or 16-bit area for 4-digit BCD data
(for augend)
S2
4-digit BCD equivalent constant or 16-bit area for 4-digit BCD data
(for addend)
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IY
(*4)
A
A
S2
N/A
N/A
N/A
S1
(*1)
(*2)
(*3)
(*4)
Index
modifier
IX
(*3)
A
A: Available
N/A: Not Available
3 - 99
Explanation of example
The contents of data register DT10 and data register DT20 are added to gether when trigger R0 turns on.
The added result is stored in data register DT30.
When H (BCD) 8 is in DT10 and H (BCD) 4 is in DT20, as shown below.
Augend [S1]: H8 (BCD)
Bit position 15 1211 8 7 4 3 0
DT10
0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
BCD H code
0
0
0
8
(Addition)
Description
The 4-digit BCD equivalent constants or 16-bit areas for 4-digit BCD data specified by S1 and S2 are added
together. The added result is stored in D.
Augend data
(S1)
Addend data
Result
(S2)
(D)
Flag conditions
Error flag (R9007):
= flag (R900B):
Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 4-digit
BCD data (overflows).
3 - 100
F43 (DB+)
P43 (PDB+)
Adds two BCD data items that express 8-digit decimal numbers
(8-digit BCD H codes) and stores the result in the specified area.
For the FP/FP - M/FP0/FP1, the P type high- level instruction P43
(PDB+) is not available.
Outline
Program example
Boolean
Ladder Diagram
Address
10
R0
ST
11
Trigger
10
Instruction
F 43
S2
0
(DB+)
DT
20
DT
10
DT
30
S1
8-digit BCD equivalent constant or lower 16-bit area for 8-digit BCD data (for
augend)
S2
8-digit BCD equivalent constant or lower 16-bit area for 8-digit BCD data (for
addend)
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IY
A
A
N/A
S2
N/A
N/A
N/A
N/A
N/A
S1
Index
modifier
IX
(*3)
A
A: Available
N/A: Not Available
3 - 101
Explanation of example
The contents of data registers DT11 and DT10 and the contents of data registers DT21 and DT20 are added
together when trigger R0 turns on. The added result is stored in data registers DT31 and DT30.
Higher 16 bits
Lower 16 bits
Contents of
DT10
Contents of
DT11
(Addition)
Contents of
DT21
Contents of
DT20
(Result is stored.)
Store to DT31
Description
The 8-digit BCD equivalent constants or 8-digit BCD data specified by S1 and S2 are added together. The
added result is stored in D+1 and D.
Augend data
Addend data
Result
D: lower 4-digit
D+1: higher 4-digit
When processing 8-digit BCD data, the higher 16-bit areas for 8-digit BCD data (S+1, D+1) are automatically
determined once the lower 16-bit areas (S, D) are specified.
Flag conditions
= flag (R900B):
Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 8-digit
BCD data (overflows).
3 - 102
F45 (B - )
P45 (PB - )
Subtracts one BCD data item that expresses a 4-digit decimal number
(4-digit BCD H codes) from another (minuend).
For the FP/FP - M/FP0/FP1, the P type high- level instruction P45
(PB - ) is not available.
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
ST
11
R0
10
F 45
0
(B - )
10
DT
10
DT
20
S
S
4-digit BCD equivalent constant or 16-bit area for 4-digit BCD data (for subtrahend)
16-bit area for 4-digit BCD data (for minuend and result)
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
IX
(*3)
IY
(*4)
Constant
K
Index
modifier
S
(*1)
(*2)
(*3)
(*4)
N/A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
Subtracts the contents of data register DT10 from the contents of data register DT20 when trigger R0 turns
on. When H (BCD) 16 is in DT20 and H (BCD) 4 is in DT10, as shown below.
Minuend [D]: H16 (BCD)
Bit position 15 1211 8 7 4 3 0
DT20
0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0
BCD H code
0
0
1
6
(Subtraction)
3 - 103
Description
Subtracts the 4-digit BCD equivalent constant or 16-bit area for 4-digit BCD data specified by S from the 16-bit
area for 4-digit BCD data specified by D.
Minuend data
(D)
Subtrahend data
-
(S)
Result
(D)
Flag conditions
= flag (R900B):
Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 4-digit
BCD data (underflow).
3 - 104
F46 (DB - )
P46 (PDB - )
Subtracts one BCD data item that expresses an 8-digit decimal number
(8-digit BCD H code) from another (minuend).
For the FP/FP - M/FP0/FP1, the P type high- level instruction P46
(PDB- ) is not available.
Outline
Program example
Boolean
Ladder Diagram
Address
10
ST
11
Trigger
10
Instruction
R
F 46
0
(DB- )
DT
R0
F46 DB - , DT10 ,
DT
DT20
10
20
S
S
8-digit BCD equivalent constant or lower 16-bit area for 8-digit BCD data (for
subtrahend)
Lower 16-bit area for 8-digit BCD data (for minuend and result)
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
N/A
N/A
N/A
N/A
N/A
Index
modifier
A
A
A: Available
N/A: Not Available
3 - 105
Explanation of example
Subtracts the contents of data registers DT11 and DT10 from the contents of data registers DT21 and DT20
when trigger R0 turns on.
Higher 16 bits
Lower 16 bits
Contents of
DT20
Contents of
DT21
(Subtraction)
Contents of
DT11
Contents of
DT10
(Result is stored.)
Description
Subtracts the 8-digit BCD equivalent constant or 8-digit BCD data specified by S from the 8-digit BCD data
specified by D.
Augend data
Addend data
Result
D: lower 4-digit
D+1: higher 4-digit
S: lower 4-digit
S+1: higher 4-digit
D: lower 4-digit
D+1: higher 4-digit
Flag conditions
Error flag (R9007):
= flag (R900B):
Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 8-digit
BCD data (underflows).
3 - 106
F47 (B - )
P47 (PB - )
Subtracts one BCD data item that expresses a 4-digit decimal number
(4-digit BCD H code) from another (minuend) and stores the result in
the specified area.
For the FP/FP - M/FP0/FP1, the P type high- level instruction P47
(PB - ) is not available.
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
10
Instruction
10
11
R0
ST
F 47
S2
0
(B - )
DT
20
DT
10
DT
30
S1
4-digit BCD equivalent constant or 16-bit area for 4-digit BCD data (for minuend)
S2
4-digit BCD equivalent constant or 16-bit area for 4-digit BCD data (for subtrahend)
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
(*4)
Index
modifier
S1
D
(*1)
(*2)
(*3)
(*4)
S2
N/A
N/A
N/A
A
A: Available
N/A: Not Available
3 - 107
Explanation of example
Subtracts the contents of data register DT20 from the contents of data register DT10 when trigger R0 turns
on. The subtracted result is stored in data register DT30.
When H (BCD) 16 is in DT10 and H (BCD) 4 is in DT20, as shown below.
Minuend [S1]: H16 (BCD)
Bit position 15 1211 8 7 4 3 0
DT10
0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0
BCD H code
0
0
1
6
- (Subtraction)
Description
Subtracts the 4-digit BCD equivalent constant or 16-bit area for 4-digit BCD data specified by S2 from the
4-digit BCD equivalent constant or 16-bit area for 4-digit BCD data specified by S1.
The subtracted result is stored in D.
Minuend data
(S1)
Subtrahend data
-
(S2)
Result
(D)
Flag conditions
= flag (R900B):
Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 4-digit
BCD data (underflows).
3 - 108
F48 (DB - )
P48 (PDB - )
Subtracts one BCD data item that expresses an 8-digit decimal number
(8-digit BCD H code) from another (minuend) and stores the result in
the specified area.
For the FP/FP - M/FP0/FP1, the P type high- level instruction P48
(PDB- ) is not available.
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
10
Instruction
10
11
R0
ST
F 48
S2
0
(DB- )
DT
20
DT
10
DT
30
S1
8-digit BCD equivalent constant or lower 16-bit area for 8-digit BCD data (for
minuend)
S2
8-digit BCD equivalent constant or lower 16-bit area for 8-digit BCD data (for
subtrahend)
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
(*4)
Index
modifier
S1
N/A
S2
N/A
D
(*1)
(*2)
(*3)
(*4)
A
N/A
N/A
N/A
N/A
A
A: Available
N/A: Not Available
3 - 109
Explanation of example
Subtracts the contents of data registers DT21 and DT20 from the contents of data registers DT11 and
DT10 when trigger R0 turns on. The subtracted result is stored in data registers DT31 and DT30.
Higher 16 bits
Contents of
DT11
Contents of
DT21
Lower 16 bits
Contents of
DT10
(Subtraction)
Contents of
DT20
(Result is stored.)
Description
Subtracts the 8-digit BCD equivalent constant or 8-digit BCD data specified by S2 from the 8-digit BCD
equivalent constant or the 8-digit BCD data specified by S1. The subtracted result is stored in D+1 and D.
Minuend data
Subtrahend data
Result
D: lower 4-digit
D+1: higher 4-digit
When processing 8-digit BCD data, the higher 16-bit areas for 8-digit BCD data (S+1, D+1) are automatically
determined once the lower 16-bit areas (S, D) are specified.
Flag conditions
= flag (R900B):
Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 8-digit
BCD data (underflows).
3 - 110
F50 (B*)
P50 (PB*)
Multiplies two BCD data items that express 4-digit decimal numbers
(4-digit BCD H codes).
For the FP/FP - M/FP0/FP1, the P type high- level instruction P50
(PB*) is not available.
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
11
R0
ST
F 50
S1
S2
0
(B*)
DT
20
DT
10
DT
10
30
S1
4-digit BCD equivalent constant or 16-bit area for BCD data (for multiplicand)
S2
4-digit BCD equivalent constant or 16-bit area for BCD data (for multiplier)
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
(*4)
Index
modifier
S1
S2
D
(*1)
(*2)
(*3)
(*4)
A
N/A
N/A
N/A
N/A
A
A: Available
N/A: Not Available
3 - 111
Explanation of example
When H (BCD) 8 is in DT10 and H (BCD) 2 is in DT20, as shown below.
DT30
BCD H code
0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0
0
0
1
6
The lower 16 bits of the 32 - bit multiplication result are stored in the specified memory area (DT30), and the
higher16 bits are stored in the area following the specified area (DT31).
Description
Multiplies the 4-digit BCD equivalent constant or 16-bit area for 4-digit BCD data specified by S1 and S2. The
multiplied result is stored in D+1 and D.
Multiplicand data
Multiplier data
(S1)
(S2)
Multiplied result
(D+1, D)
The multiplied result is stored in the 8-digit area (32 - bit area).
The higher 16-bit area (D+1) is automatically determined once the lower 16-bit area (D) is specified.
Flag conditions
= flag (R900B):
- The area specified using the index modifier exceeds the limit.
- The data is not BCD data.
Turns on for an instant when the calculated result is recognized as 0.
3 - 112
F51 (DB*)
P51 (PDB*)
Multiplies two BCD data items that express 8-digit decimal numbers
(8-digit BCD H codes).
For the FP/FP - M/FP0/FP1, the P type high- level instruction P51
(PDB*) is not available.
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
10
Instruction
10
11
R0
F51 DB* , DT10 , DT20 ,
S1
ST
F 51
0
(DB*)
DT
20
DT
10
DT
DT30
S2
30
S1
8-digit BCD equivalent constant or lower 16-bit area for 8-digit BCD data (for
multiplicand)
S2
8-digit BCD equivalent constant or lower 16-bit area for 8-digit BCD data (for
multiplier)
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IY
N/A
A
A
S2
N/A
N/A
N/A
N/A
N/A
N/A
S1
Index
modifier
IX
(*3)
A
A: Available
N/A: Not Available
3 - 113
Explanation of example
16 bits
16 bits
Contents of
DT11
Contents of
DT10
16 bits
16 bits
Contents of
DT21
16 bits
16 bits
16 bits
Contents of
DT20
16 bits
Description
Multiplies the 8-digit BCD equivalent constant or 8-digit BCD data specified by S1 and the one specified by
S2. The multiplied result is stored in D+3, D+2, D+1, and D.
Multiplicand data
(S1+1, S1)
Multiplier data
Result
(S2+1, S2)
The multiplied result is stored in the 64-bit area (16 - digit BCD).
When processing 8-digit BCD data, the higher 16-bit areas (S1+1, S2+1) are automatically determined once
the lower 16-bit areas (S1, S2) are specified.The areas (D+3, D+2, D+1) other than the lowest 16-bit area (D)
are automatically determined when the lowest 16-bit area is specified.
Flag conditions
= flag (R900B):
- The area specified using the index modifier exceeds the limit.
- The data is not BCD data.
Turns on for an instant when the calculated result is recognized as 0.
3 - 114
F52 (B%)
P52 (PB%)
Divides one BCD data item that expresses a 4-digit decimal number
(4-digit BCD H code) by another (divisor).
For the FP/FP - M/FP0/FP1, the P type high- level instruction P52
(PB%) is not available.
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
10
ST
11
R0
10
Instruction
F 52
S2
0
(B%)
DT
20
DT
10
DT
30
S1
4-digit BCD equivalent constant or 16-bit area for BCD data (for dividend)
S2
4-digit BCD equivalent constant or 16-bit area for BCD data (for divisor)
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IY
(*4)
A
A
S2
N/A
N/A
N/A
S1
(*1)
(*2)
(*3)
(*4)
Index
modifier
IX
(*3)
A
A: Available
N/A: Not Available
3 - 115
Explanation of example
Divides the contents of data register DT10 by the contents of data register DT20 when trigger R0 turns on.
The quotient is stored in data register DT30 and the remainder is stored in special data register DT9015
(DT90015 for FP2/FP2SH/FP10SH).
When H (BCD) 15 is in DT10 and H (BCD) 4 is in DT20, as shown below.
12 11
8 7
4 3
0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1
BCD H code
12 11
8 7
4 3
0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
BCD H code
Bit position 15
X0: on
12 11
8 7
4 3
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1
BCD H code
Remainder: H3 (BCD)
Bit position 15
12 11
8 7
4 3
DT9015/DT90015 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1
BCD H code
Description
The 4-digit BCD equivalent constant or the 16-bit area for 4-digit BCD data specified by S1 is divided by the
4-digit BCD equivalent constant or the 16-bit area for 4-digit BCD data specified by S2. The quotient is stored
in the area specified by D and the remainder is stored in a special data register DT9015 (DT90015 for FP0
T32/FP/FP2/FP2SH/FP10SH).
(S1)
Divisor
Quotient
Remainder
(S2)
(D)
(DT9015/ DT90015)
....
Dividend data
With the FP0 T32,FP, FP2, FP2SH, FP10SH and FP0 C10, C14, C16, C32/ FP1/FP - M/FP3, the numbers
of the special data registers are different.
Type
DT9015
FP0 T32/FP/FP2/FP2SH/FP10SH
DT90015
Flag conditions
= flag (R900B):
3 - 116
F53 (DB%)
P53 (PDB%)
Divides one BCD data item that expresses an 8-digit decimal number
(8-digit BCD H code) by another (divisor).
For the FP/FP - M/FP0/FP1, the P type high- level instruction P53
(PDB%) is not available.
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
10
ST
11
R0
10
Instruction
F 53
S2
0
(DB%)
DT
20
DT
10
DT
30
S1
8-digit BCD equivalent constant or lower 16-bit area for 8-digit BCD data (for
dividend)
S2
8-digit BCD equivalent constant or lower 16-bit area for 8-digit BCD data (for
divisor)
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
Index
modifier
S1
N/A
S2
N/A
N/A
N/A
N/A
N/A
A
A: Available
N/A: Not Available
3 - 117
Explanation of example
Higher 16 bits
Lower 16 bits
Contents of
DT11
Contents of DT10
(Division)
Contents of
DT21
Contents of
DT20
Quotient is stored in DT31 and DT30.
To DT31
To DT30
The lower 16 bits of the remainder is stored in DT9015/DT90015 and
the higher 16 bits of the remainder is stored in DT9016/DT90016.
To DT9016/
DT90016
To DT9015/
DT90015
Description
The 8-digit BCD equivalent constant or the 8-digit BCD data specified by S1 is divided by the 8-digit BCD
equivalent constant or the 8-digit BCD data specified by S2. The quotient is stored in the areas specified by
D+1 and D, and the remainder is stored in special data registers DT9016 and DT9015 (DT90016 and
DT90015 for FP0 T32/FP/FP2/FP2SH/FP10SH).
Dividend data
Divisor
Remainder
....
Quotient
D: lower 4-digit
D+1: higher 4-digit
DT9015/DT90015
DT9016/DT90016
When processing 8-digit BCD data, the higher 16-bit areas (S1+1, S2+1, D+1) are automatically determined
once the lower 16-bit areas (S1, S2, D) are specified.
With the FP0 T32/FP/FP2/FP2SH/FP10SH and FP0 C10, C14, C16, C32/FP1/FP - M/FP3, the numbers of
the special data registers are different.
Special data register
Type
FP0 C10, C14, C16, C32/ FP1/FP - M/FP3
DT9015
FP0 T32/FP/FP2/FP2SH/FP10SH
DT90015
Flag conditions
= flag (R900B):
3 - 118
- The area specified using the index modifier exceeds the limit.
- The data is not BCD data.
- The 8-digit BCD equivalent constant or the 8-digit BCD data for the divisor
(specified by S2) is 0.
Turns on for an instant when the calculated result (quotient) is recognized as
0.
F55 (B+1)
P55 (PB+1)
Outline
Program example
Boolean
Ladder Diagram
Address
Instruction
10
ST
11
Trigger
F 55
DT
R0
0
(B+1)
0
F55 B+1 , DT 0
10
D
16-bit area for 4-digit BCD data to be increased by 1
Operands
Relay
Operand
D
(*1)
(*2)
(*3)
(*4)
Timer/Counter
WL
WX WY WR
(*1)
N/A
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
(*4)
N/A
N/A
Index
modifier
A
A: Available
N/A: Not Available
Explanation of example
Adds 1 to the contents of data register DT0 when trigger R0 turns on.
3 - 119
Description
Adds 1 to the 4-digit BCD data specified by D. The result is stored in D.
Original data
(D)
Result
+
(D)
Flag conditions
= flag (R900B):
- The area specified using the index modifier exceeds the limit.
- The data is not BCD data.
Turns on for an instant when the calculated result is recognized as 0.
Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 4-digit
BCD data (overflows).
3 - 120
F56 (DB+1)
P56 (PDB+1)
Outline
Program example
Boolean
Ladder Diagram
Address
10
ST
11
Trigger
F 56
0
(DB+1)
DT
R0
10
Instruction
F56 DB+1 , DT 0
D
Lower 16-bit area for 8-digit BCD data to be increased by 1
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
N/A
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
A
Constant
IX
(*3)
IY
N/A
N/A
N/A
Index
modifier
A
A: Available
N/A: Not Available
Explanation of example
Adds 1 to the contents (8 - digit BCD data) of data registers DT1 and DT0 when trigger R0 turns on.
Higher 16 bits
Contents of
DT1
Store to DT1
Lower 16 bits
Contents of
DT0
+1
Store to DT0
3 - 121
Description
Adds 1 to the 8-digit BCD data specified by D. The result is stored in D+1 and D.
Original data
(D+1, D)
Result
+
(D+1, D)
Flag conditions
= flag (R900B):
- The area specified using the index modifier exceeds the limit.
- The data is not BCD data.
Turns on for an instant when the calculated result is recognized as 0.
Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 8-digit
BCD data (overflows).
3 - 122
F57 (B - 1)
P57 (PB - 1)
Outline
Program example
Boolean
Ladder Diagram
Address
10
ST
11
Trigger
10
Instruction
R
F 57
DT
R0
0
(B - 1)
0
F57 B - 1 , DT 0
D
16-bit area for BCD data to be decreased by 1
Operands
Relay
Operand
D
(*1)
(*2)
(*3)
(*4)
Timer/Counter
WL
WX WY WR
(*1)
N/A
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
A
Constant
IX
(*3)
IY
(*4)
N/A
N/A
Index
modifier
A
A: Available
N/A: Not Available
Explanation of example
Subtracts 1 from the contents of data register DT0 when trigger R0 turns on.
3 - 123
Description
Subtracts 1 from the 4-digit BCD data specified by D. The result is stored in D.
Original data
(D)
Result
-
(D)
Flag conditions
= flag (R900B):
- The area specified using the index modifier exceeds the limit.
- The data is not BCD data.
Turns on for an instant when the calculated result is recognized as 0.
Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 4-digit
BCD data (underflows).
3 - 124
F58 (DB - 1)
P58 (PDB - 1)
Outline
Program example
Boolean
Ladder Diagram
Address
10
ST
11
Trigger
10
Instruction
R
F 58
DT
R0
0
(DB- 1)
0
F58 DB - 1 , DT 0
D
Lower 16-bit area for 8-digit BCD data to be decreased by 1
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
N/A
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
A
Constant
IX
(*3)
IY
(*4)
N/A
N/A
N/A
Index
modifier
A
A: Available
N/A: Not Available
Explanation of example
Subtracts 1 from the contents (8 - digit BCD data) of data registers DT1 and DT0 when trigger R0 turns on.
Higher 16 bits
Lower 16 bits
Contents of
DT1
Contents of
DT0
-1
Store to DT1
Store to DT0
3 - 125
Description
Subtracts 1 from the 8-digit BCD data specified by D. The result is stored in D+1 and D.
Original data
(D+1, D)
Result
-
(D+1, D)
Flag conditions
= flag (R900B):
- The area specified using the index modifier exceeds the limit.
- The data is not BCD data.
Turns on for an instant when the calculated result is recognized as 0.
Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 8-digit
BCD data (underflows).
3 - 126
F60 (CMP)
P60 (PCMP)
The two specified 16 - bit data are compared and the result is output to
the special internal relay.
For the FP/FP - M/FP0/FP1, the P type high- level instruction P60
(PCMP) is not available.
Outline
Program example
Boolean
Ladder Diagram
Address
Instruction
40
41
Trigger
ST
F 60
0
(CMP)
DT
S1
R0
S2
100
49
R 900A
48
OT
10
49
ST
50
AN
R 900B
51
OT
11
52
R0 R900C
AN
Y11
R0 R900B
ST
Y10
47
ST
AN
R 900C
54
46
46
53
40
OT
Y12
52
S1
12
S2
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
(*4)
Index
modifier
S1
S2
(*1)
(*2)
(*3)
(*4)
A
A
A:
Available
3 - 127
Explanation of example
Compares decimal constant K100 with the contents of data register DT0 when trigger R0 turns on.
When DT0 > K100, R900A turns on and external output relay Y10 turns on.
When DT0 = K100, R900B turns on and external output relay Y11 turns on.
When DT0 < K100, R900C turns on and external output relay Y12 turns on.
Description
Compares the 16-bit data specified by S1 with that specified by S2. The comparison result is output to the
special internal relays R9009, R900A, R900B and R900C.
The following table lists the states of the carry flag (R9009), > flag (R900A), = flag (R900B), and < flag
(R900C), depending on the relative sizes of S1 and S2.
Comparison between
S1 and S2
Flag
R9009
R900A R900B R900C
(> flag) (= flag) (< flag) (carry flag)
S1 < S2
off
off
on
S1 = S2
off
on
off
S1 > S2
on
off
: turns on or off according to the conditions
off
off
Always on relay.
R9010
R9010
R900B
Y11
R9010
R900C
Y12
You can also program the above using the PSHS, RDS, and POPS instructions.
X0
PSHS
F60 CMP, DT 0, K 100
R900A
Y10
RDS
R900B
Y11
POPS
R900C
Y12
This is a program in which operation is the same as the above program example.
3 - 128
Example:
R0
R900B
Y11
R0
a)
R900C
Y12
b)
R1
c)
R1
R1
R900B
Y14
R1
R900C
Y15
d)
3 - 129
Example:
F60 CMP, DT 0, DT 1
R9009
R1
R0
R900B
R2
R0
R900B R9009
R3
Flag operation when comparing BCD data or unsigned 16 - bit data (0 to FFFF)
Comparison between
S1 and S2
Flag
R9009
R900A R900B R900C
(> flag) (= flag) (< flag) (carry flag)
S1 < S2
S1 = S2
S1 > S2
off
off
on
on
off
off
off
off
For example, when S1 = H8000 and S2 = H1000, R900A will turn off and R900C will turn on. For this reason,
the correct comparison result will not be obtained in a program which uses R900A and R900C.
S1
BCD
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
8
0
0
0
S2
BCD
0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
1
0
0
0
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
3 - 130
F61 (DCMP)
P61 (PDCMP)
The two specified 32 - bit data are compared and the result is output to
the special internal relay.
For the FP/FP - M/FP0/FP1, the P type high- level instruction P61
(PDCMP) is not available.
Outline
Program example
Boolean
Ladder Diagram
Address
Instruction
50
ST
51
F 61
Trigger
(DCMP)
DT
S1
R0
DT
S2
0
10
63
66
R0 R900B
R0 R900C
OT
10
ST
64
AN
R 900B
65
Y12
R 900A
63
Y11
AN
62
Y10
ST
OT
11
66
F61 DCMP , DT 0 , DT 10
R0 R900A
61
ST
AN
R 900C
68
60
60
67
50
OT
12
S1
S2
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
Index
modifier
S1
N/A
S2
N/A
A: Available
N/A: Not Available
3 - 131
Explanation of example
Compares the content (32 - bit data) of data registers DT11 and DT10 with the content (32 - bit data) of data
registers DT1 and DT0 when trigger R0 turns on.
When (DT1 and DT0) > (DT11 and DT10), R900A turns on and external output relay Y10 turns on.
When (DT1 and DT0) = (DT11 and DT10), R900B turns on and external output relay Y11 turns on.
When (DT1 and DT0) < (DT11 and DT10), R900C turns on and external output relay Y12 turns on.
Description
Compares the 32-bit data or 32-bit equivalent constant specified by S1 with that specified by S2. The
comparison result is output to special internal relays R9009, R900A, 900B, and R900C.
The following table lists the states of the carry flag (R9009), > flag (R900A), = flag (R900B), and < flag
(R900C), depending on the relative sizes of (S1+1, S1) and (S2+1, S2).
Comparison between
(S1+1, S1) and (S2+1, S2)
Flag
R9009
R900A R900B R900C
(> flag) (= flag) (< flag) (carry flag)
off
off
on
off
on
off
off
off
When processing 32-bit data, the higher 16-bit areas (S1+1, S2+1) are automatically determined once the
lower 16-bit areas (S1, S2) are specified.
Always on relay.
R9010
R9010
R900B
Y11
R9010
R900C
Y12
You can also program the above using the PSHS, RDS, and POPS instructions.
X0
PSHS
F61 DCMP, DT 0, DT10
R900A
Y10
RDS
R900B
Y11
POPS
R900C
Y12
3 - 132
Example:
Compares DT1 and DT0 with DT11 and DT10, and DT3 and DT2
with DT21 and DT20.
X0
a)
X0
X0
b)
F61 DCMP, DT 0, DT 10
R900A
Y10
R900B
Y11
X0
R900C
Y12
X1
c)
X1
F61 DCMP, DT 2, DT 20
R900A
Y13
X1
R900B
Y14
X1
R900C
Y15
d)
3 - 133
Example:
R0
R0
F61 DCMP, DT 0, DT 10
R9009
R1
R0
R900B
R2
R0
R900B R9009
R3
e)
f)
g)
Flag operation when comparing BCD data or unsigned 32 - bit data (0 to FFFFFFFF)
Comparison between
(S1+1, S1) and (S2+1, S2)
Flag
R9009
R900A R900B R900C
(> flag) (= flag) (< flag) (carry flag)
off
off
on
off
on
off
off
off
For example, if an F61 (DCMP) instruction is executed when S1 = H80000000 (K - 2147483648) and S2 =
H10000001 (K+268435457), the result will be S1<S2. Thus R900A will turn off and R900C will turn on. In a
program which uses R900A and R900C, the correct comparison result will not be obtained.
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
3 - 134
F62 (WIN)
P62 (PWIN)
Compares one 16-bit data item with the data band specified by two
other 16-bit data items and the comparison result is output to the
special internal relay.
For the FP/FP - M/FP0/FP1, the P type high- level instruction P62
(PWIN) is not available.
Outline
Program example
Boolean
Ladder Diagram
Address
Instruction
50
51
ST
F 62
10
DT
S3
R0
50
(WIN)
DT
S2
20
DT
Trigger
S1
30
58
10
ST
AN
R 900B
63
OT
11
ST
65
AN
R 900C
66
Y12
R900C
64
R0
64
OT
61
Y11
R900B
R 900A
62
R0
61
Y10
R900A
AN
60
R0
58
ST
59
OT
S1
S3
12
S2
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
(*4)
Index
modifier
S1
S2
S3
(*1)
(*2)
(*3)
(*4)
A
A
A:
A
Available
3 - 135
Explanation of example
Compares the contents of data register DT10 with the contents of data register DT20 (lower limit of the data
band) and data register DT30 (upper limit of the data band) when trigger R0 turns on.
Example:
+500
R900B : on
R900C : on
- 500
S1
S3
S3 < S1
Flag
R9009
R900A R900B R900C
(> flag) (= flag) (< flag) (carry flag)
off
off
on
off
on
off
on
off
off
Flag conditions
S3).
3 - 136
F63 (DWIN)
P63 (PDWIN)
Compares one 32-bit data item with the data band specified by two
other 32-bit data items and the comparison result is output to the
special internal relay.
For the FP/FP - M/FP0/FP1, the P type high- level instruction
P63 (PDWIN) is not available.
Outline
Program example
Boolean
Ladder Diagram
Address
Instruction
50
Lower limit value
Upper limit value
Trigger
S1
ST
51
F 63
(DWIN)
20
DT
10
DT
R0
50
DT
S3
S2
30
10
ST
AN
R 900B
69
OT
11
ST
AN
R 900C
72
Y12
R900C
OT
71
R0
70
R 900A
67
Y11
R900B
AN
70
R900A
R0
67
Y10
ST
65
68
64
64
66
R0
OT
12
S1
S2
32-bit equivalent constant or lower 16-bit area of 32-bit data for lower limit
S3
32-bit equivalent constant or lower 16-bit area of 32-bit data for upper limit
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
(*4)
Index
modifier
S1
N/A
S2
N/A
S3
(*1)
(*2)
(*3)
(*4)
A
A
N/A
A
A: Available
N/A: Not Available
3 - 137
Explanation of example
Compares the contents of data registers DT11 and DT10 with the contents of data registers DT21 and DT20
(lower limit of the data band) and data registers DT31 and DT30 (upper limit of the data band), when trigger R0
turns on.
Example:
+50000
R900B : on
R900C : on
- 50000
Flag
R9009
R900A R900B R900C
(> flag) (= flag) (< flag) (carry flag)
off
off
on
off
on
off
on
off
off
Flag conditions
3 - 138
F64 (BCMP)
P64 (PBCMP)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
S1
ST
11
S3
S2
F 64
R0
(BCMP)
DT
DT
F64 BCMP , DT 0 , DT 10 , DT 20
0
10
DT
10
20
18
18
19
R1
R900B
ST
AN
R 900B
20
R0
OT
S1
16-bit equivalent constant or 16-bit area (specifies starting byte positions and
number of bytes to be compared)
S2
S3
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
(*4)
Index
modifier
S1
S2
N/A
N/A
N/A
N/A
S3
(*1)
(*2)
(*3)
(*4)
A
A
N/A
N/A
N/A
N/A
A
A: Available
N/A: Not Available
3 - 139
Explanation of example
Compares the data block of data register DT10 (4 bytes from DT10 lower order byte) with data register DT20
(4 bytes from DT20 higher order byte) according to the comparison condition in data register DT0 when
trigger R0 turns on. When the contents of the two data blocks are the same, internal relay R1 turns on.
If H1004 is entered in DT0, the two blocks are as follows.
DT0 = H 1 0 0 4
Lower
byte
Data block
specified by
S2
DT10
2
4
Data block
specified by
S3
DT20
Compares
4 bytes (32 bits)
DT11
Higher
byte
DT21
DT22
2
4
Area compared
Description
Compares the contents of the data block specified by S2 with the contents of the data block specified by S3
according to content specified by S1.
When the comparison result is S2 = S3, special internal relay R900B (=flag) turns on.
S1 is the control data that determines factors such as the size of the comparison.
S1 = H
Setting example:
To specify the 4 bytes beginning with the lower byte of the data block specified by S2 and the 4 bytes
beginning with the upper byte of the data block specified by S3, set S1 to H1004.
3 - 140
Flag conditions
F64 BCMP,
DT 0,
DT 1,
WR 5
Y30
R900B
Result of F64
R1
R1
F60 CMP,
R900B
DT 2,
K 100
R2
Result of F60
Note
As shown in the above program, be sure to have the comparison
internal relay before flag R900B. However, if you are using R9010
(on all the time), then it is unnecessary to have the comparison
internal relay before R900B.
3 - 141
3 - 142
F65 (WAN)
P65 (PWAN)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
10
ST
11
R0
10
Instruction
F 65
S2
0
(WAN)
DT
S1
30
S2
20
DT
10
DT
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
Index
register
Register
LD FL
DT
(*1) (*2)
EV
Constant
IY
(*4)
A
A
S2
N/A
N/A
N/A
S1
(*1)
(*2)
(*3)
(*4)
Index
modifier
IX
(*3)
A
A: Available
N/A: Not Available
Explanation of example
Performs AND operation on each bit in data registers DT10 and DT20 when trigger R0 turns on.
The AND operation result is stored in data register DT30.
Bit position 15
[S1]
DT10
DT20
8 7
4 3
0 1 0 0 1 1 0 1 1 0 1 1 1 0 0 1
Bit position 15
[S2]
12 11
12 11
8 7
4 3
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
R0: on
Bit position 15
[D]
DT30
12 11
8 7
4 3
0 0 0 0 0 0 0 0 1 0 1 1 1 0 0 1
3 - 143
Description
Performs AND operation on each bit in the 16-bit equivalent constant or 16-bit data specified by S1 and S2.
The AND operation result is stored in the 16-bit area specified by D.
(S1)
(S2) (D)
You can use this instruction to turn off certain bits of the 16-bit data.
AND operation
The AND operation is shown below.
S1
S2
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
= flag (R900B):
3 - 144
F66 (WOR)
P66 (PWOR)
16-bit data OR
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
10
ST
11
R0
10
Instruction
F 66
S2
0
(WOR)
DT
S1
30
S2
20
DT
10
DT
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
Index
register
Register
LD FL
DT
(*1) (*2)
EV
Constant
IY
(*4)
A
A
S2
N/A
N/A
N/A
S1
(*1)
(*2)
(*3)
(*4)
Index
modifier
IX
(*3)
A
A: Available
N/A: Not Available
Explanation of example
Performs OR operation on each bit in data registers DT10 and DT20 when trigger R0 turns on.
The OR operation result is stored in data register DT30.
Bit position 15
[S1]
DT10
DT20
8 7
4 3
0 1 0 0 1 1 0 1 1 0 1 1 1 0 0 1
Bit position 15
[S2]
12 11
12 11
8 7
4 3
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
R0: on
Bit position 15
[D]
DT30
12 11
8 7
4 3
0 1 0 0 1 1 0 1 1 1 1 1 1 1 1 1
3 - 145
Description
Performs OR operation on each bit in the 16-bit equivalent constant or 16-bit data specified by S1 and S2.
The OR operation result is stored in the 16-bit area specified by D.
(S1)
(S2) (D)
You can use this instruction to turn on certain bits of the 16-bit data.
OR operation
The OR operation is shown below.
S1
S2
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
= flag (R900B):
3 - 146
F67 (XOR)
P67 (PXOR)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
10
ST
11
R0
10
Instruction
F 67
S2
0
(XOR)
DT
S1
30
S2
20
DT
10
DT
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
Index
register
Register
LD FL
DT
(*1) (*2)
EV
Constant
IY
(*4)
A
A
S2
N/A
N/A
N/A
S1
(*1)
(*2)
(*3)
(*4)
Index
modifier
IX
(*3)
A
A: Available
N/A: Not Available
Explanation of example
Performs exclusive OR operation on each bit in data registers DT10 and DT20 when trigger R0 turns on. The
exclusive OR operation result is stored in data register DT30.
Bit position 15
[S1]
DT10
DT20
8 7
4 3
0 1 0 0 1 1 0 1 1 0 1 1 1 0 0 1
Bit position 15
[S2]
12 11
12 11
8 7
4 3
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
R0: on
Bit position 15
[D]
DT30
12 11
8 7
4 3
0 1 0 0 1 1 0 1 0 1 0 0 0 1 1 0
3 - 147
Description
Performs exclusive OR operation on each bit in the 16-bit equivalent constant or 16-bit data specified by S1
and S2. The exclusive OR operation result is stored in the 16-bit area specified by D.
{(S1)
(S2)}
(S2)} (D)
{(S1)
Detects the bits whose on and off states do not match.
If the values of S1 and S2 are equal, all the bits of the data specified by D become 0.
Exclusive OR operation
The exclusive OR operation is shown below.
S1
S2
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
= flag (R900B):
3 - 148
F68 (XNR)
P68 (PXNR)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
10
ST
11
R0
10
Instruction
F 68
S2
0
(XNR)
DT
S1
30
S2
20
DT
10
DT
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
Index
register
Register
LD FL
DT
(*1) (*2)
EV
Constant
IY
(*4)
A
A
S2
N/A
N/A
N/A
S1
(*1)
(*2)
(*3)
(*4)
Index
modifier
IX
(*3)
A
A: Available
N/A: Not Available
Explanation of example
When the trigger R0 is on, if the values of the bits for the same positions with regard to the contents of data
registers DT10 and DT20 are equal, the bit for that position is turned on (1) for data register DT30. If the values
are not equal, the bit is turned off (0).
Bit position 15
[S1]
DT10
Bit position 15
[S2]
DT20
12 11
8 7
4 3
0 1 0 0 1 1 0 1 1 0 1 1 1 0 0 1
12 11
8 7
4 3
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
R0: on
Bit position 15
[D]
DT30
12 11
8 7
4 3
1 0 1 1 0 0 1 0 1 0 1 1 1 0 0 1
3 - 149
Description
Performs exclusive NOR operation on each bit in the 16-bit equivalent constant or 16-bit data specified by S1
and S2. The exclusive NOR operation result is stored in the 16-bit area specified by D.
{(S1)
(S2)}
(S2)} (D)
{(S1)
Detects the bits whose on and off states match.
If the values of S1 and S2 are equal, all the bits of the data specified by D become 1.
S2
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
= flag (R900B):
3 - 150
F69 (WUNI)
P69 (PWUNI)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
F69
(WUNI)
DT
10
DT
20
DT
30
DT
R0
10
ST
11
40
S3
S2
10
S1
S2
S3
16-bit area which stores mask data for combination or 16-bit equivalent
constant data.
Operands
Relay
Timer/Counter
Operand
WX WY WR WL
Index
register
Register
SV
EV
DT
FL
LD
(*1)
Constant
Index Integer
modifier device
S1
N/A
N/A
S2
N/A
N/A
S3
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
[S1:]
DT10
[S2:]
DT20
AND
[S3:]
AND
DT30
[Inverted
S3]
[D:]
DT40
Description
The two groups of word data specified by S1 and S2 are combined by bit unit processing using the mask data
specified by S3 and stored in the area specified by D.
(S1
S3)
(S2
S3) (D)
Flag conditions
Error flag (R9007):
Error flag (R9008):
= flag (R900B):
3 - 152
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the calculated result is recognized as 0.
F70 (BCC)
P70 (PBCC)
Outline
Program example
Boolean
Ladder Diagram
Address
10
ST
11
Trigger
10
Instruction
F 70
0
(BCC)
R0
F70 BCC , K 2 , DT 0 , K 12 , DT 6
S1
S2
S3
DT
K
0
12
DT
S1
S2
S3
16-bit equivalent constant or 16-bit area (specifies number of bytes for BCC
calculation)
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
(*4)
Index
modifier
S1
S2
N/A
N/A
N/A
N/A
S3
D
(*1)
(*2)
(*3)
(*4)
N/A
N/A
N/A
N/A
N/A
A
A: Available
N/A: Not Available
Explanation of example
Calculates the Block Check Code (BCC) of 12 bytes of ASCII data starting from data register DT0, via an
exclusive OR operation, when trigger R0 turns on. The Block Check Code (BCC) is stored in the lower byte of
data register DT6.
3 - 153
Description
Calculates the Block Check Code (BCC) of S3 bytes of ASCII data starting from the 16-bit area specified by
S2, according to the calculation method specified by S1. The Block Check Code (BCC) is stored in the lower
byte of the 16-bit area specified by D. (BCC is one byte. The higher byte of D does not change.)
S1: Specifying the Block Check Code (BCC) calculation method
K0: Addition
K1: Subtraction
K2: Exclusive OR operation
S2 and S3: Specifying the target data
For instance, if 12 bytes of data from DT0 are to be targeted, the following applies:
S2: DT0
Contents of S3: K12 (specified as a decimal number)
Flag conditions
Application example
In this example, the block check code of the message being sent, %01#RCSX0000, is calculated and is
added after the message.
Transmission is done using ASCII codes.
BCC is calculated as an exclusive logical OR.
The message should be stored in the memory area as shown below.
Data register
DT6
DT5
DT4
DT3
DT2
DT1
DT0
3 0 3 0 3 0 3 0 5 8 5 3 4 3 5 2 2 3 3 1 3 0 2 5
ASCII character
12 bytes
F70 BCC, K 2 , DT 0 , K 12 , DT 6
S1: Exclusive logical OR
S2: Start of target data
S3: Length of target data
D: Calculation results
When this is executed, BCC (H 1D) is stored in the last byte of DT6 of D.
3 - 154
%
0
1
#
R
C
S
X
0
0
0
0
2
5
0 0 1 0 0 1 0 1
3
0
ASCII BIN code 0 0 1 1 0 0 0 0
Exclusive OR operation
Exclusive ORing
S1
3
1
0 0 1 1 0 0 0 1
2
Exclusive ORing
Exclusive ORing
0 0 1 1 0 0 0 0
3
Exclusive ORing
0 0 1 1 0 0 0 0
Exclusive ORing
0 0 1 1 0 0 0 0
Exclusive ORing
0 1 0 1 1 0 0 0
Exclusive ORing
0 1 0 1 0 0 1 1
Exclusive ORing
0 1 0 0 0 0 1 1
0
1
1
0
0 1 0 1 0 0 1 0
Exclusive ORing
0
1
0
1
0 0 1 0 0 0 1 1
Exclusive ORing
S2
0
0
1
1
Exclusive ORing
0 0 1 1 0 0 0 0
calculation
3 - 155
F71 (HEXA)
P71 (PHEXA)
Outline
Program example
Boolean
Ladder Diagram
Address
10
R0
ST
11
Trigger
10
Instruction
F 71
S2
(HEXA)
DT
F71 HEXA , DT 0 , K 2 , DT 10
S1
DT
S1
S2
10
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IY
(*4)
N/A
N/A
N/A
N/A
A
A
S2
N/A
N/A
N/A
N/A
N/A
S1
(*1)
(*2)
(*3)
(*4)
3 - 156
Index
modifier
IX
(*3)
A
A: Available
N/A: Not Available
Explanation of example
Converts 2 bytes of data stored in data register DT0 to ASCII codes that express the equivalent
hexadecimals when trigger R0 turns on. The converted data is stored in data registers DT11 and DT10.
DT0
Bit position 15 1211 8 7 4 3 0
Binary data 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1
Hexadecimal
A
B
C
D
DT11
4
DT10
4
ASCII character
3
C
Description
Converts the data starting from the 16-bit area specified by S1 to ASCII codes that express the equivalent
hexadecimals.
The converted result is stored in the area starting from the 16-bit area specified by D.
S2 specifies the number of source data bytes to be converted.
Since ASCII code requires eight bits (one byte) to express one hexadecimal character, the data length when
converted to ASCII code becomes double the source data.
Converted
result
C
D
D+1
S1
1 2
S1+1
3 4
5 6
7 8
Hexadecimal
data
Flag conditions
D+3
6
D+2
7
Converted result
3 - 157
Conversion example
The following shows conversion of hexadecimal data to ASCII codes.
Conversion of four bytes of data (S2 = K4)
S1+1
Hexadecimal data
EF
S1
12
AB
CD
4 bytes
F71 (HEXA) instruction execution
Converted
result
D+3
D+1
D+2
46
45
32
31
42
41
44
43
Result of S1 conversion
Result of S1 + 1
conversion
S1+1
S1
12
AB
CD
3 bytes
F71 (HEXA) instruction execution
Converted result
D+1
D+2
32
31
42
41
44
43
3 - 158
ASCII HEX
code
H30
H31
H32
H33
H34
H35
H36
H37
H38
H39
H41
H42
H43
H44
H45
H46
F72 (AHEX)
P72 (PAHEX)
Outline
Program example
Boolean
Ladder Diagram
Address
10
R0
ST
11
Trigger
10
Instruction
F 72
S2
(AHEX)
DT
F72 AHEX , DT 0 , K 4 , DT 40
S1
DT
40
S1
S2
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IY
(*4)
N/A
N/A
N/A
N/A
A
A
S2
N/A
N/A
N/A
N/A
N/A
S1
(*1)
(*2)
(*3)
(*4)
Index
modifier
IX
(*3)
A
A: Available
N/A: Not Available
3 - 159
Explanation of example
Converts 4 ASCII codes stored in data registers DT0 and DT1 to hexadecimal numbers when trigger R0 turns
on. The converted data is stored in data register DT40.
DT1
4
DT0
4
ASCII character
2
B
1
A
DT40
Bit position 15 1211 8 7 4 3 0
Binary data 1 1 0 0 1 1 0 1 1 0 1 0 1 0 1 1
C
D
A
B
Hexadecimal
Description
Converts ASCII code that expresses hexadecimal characters, starting from the 16-bit area specified by S1, to
hexadecimal numbers as specified by S2. The converted result is stored in the area starting from the 16-bit
area specified by D.
The volume of the results (hexadecimal numeric data) is half that of the converted ASCII code.
Converted
result
Flag conditions
3 - 160
Conversion Example
The following shows conversion of ASCII codes to hexadecimal data.
Conversion of eight characters (S2 = K8)
ASCII code
S1+3
S1+2
32
31
S1+1
S1
46
45
44
43
42
41
8 characters (8 bytes)
F72 (AHEX) instruction execution
D+1
Converted result
12
EF
Result of S1 + 3,
S1 + 2 conversion
D
CD
AB
Result of S1 + 1, S1
conversion
S1+2
S1+1
S1
31
46
45
44
43
42
41
7 characters (7 bytes)
F72 (AHEX) instruction execution
This position is
filled with 0.
D+1
Converted result
10
EF
D
CD
AB
S1+1
S1
46
45
44
43
42
41
6 characters (6 bytes)
F72 (AHEX) instruction execution
Converted result
D+1
EF
D
CD
AB
Note
In the conversion results, only the data for the lower byte is
stored in D + 1 word. The data for the higher byte is left as it is,
and does not change.
3 - 161
ASCII code
44
Converted
result
n-1
n-2
n-1 n-2
This position is
filled with 0.
3 - 162
Hexadecimal
characters
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
F73 (BCDA)
P73 (PBCDA)
Outline
Program example
Boolean
Ladder Diagram
Address
10
R0
F73 BCDA , DT 0 ,
F 73
(BCDA)
DT
DT 10
S2
S1
H4 ,
ST
11
Trigger
10
Instruction
DT
10
S1
S2
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IY
(*4)
N/A
N/A
N/A
N/A
A
A
S2
N/A
N/A
N/A
N/A
N/A
S1
(*1)
(*2)
(*3)
(*4)
Index
modifier
IX
(*3)
A
A: Available
N/A: Not Available
3 - 163
Explanation of example
Converts BCD code that express a 4-digit decimal number (4-digit BCD H code) stored in data register DT0 to
ASCII code when trigger R0 turns on. The converted data is stored in data registers DT10 and DT11.
When S2 = H2 (normal direction, 2 bytes convertion)
DT0
BCD
H code
DT11
ASCII
HEX code
ASCII
character
DT10
1
1
3
3
DT11
ASCII
HEX code
ASCII
character
4
4
DT10
3
3
2
2
1
1
Description
Converts the BCD code starting from the 16-bit area specified by S1 to ASCII code that expresses the
equivalent decimals as specified by S2. The converted result is stored in the area starting from the 16-bit area
specified by D.
A maximum of four bytes (8 - figure of data) can be converted.
S2 specifies the number of source data bytes and the direction of converted data (normal/reverse).
The data length when converted to ASCII code becomes double the BCD source data.
3 - 164
How to specify S2
S2 = H 0 0
Reverse direction
S1
S1
1 2
3 4
D+1
1 2
Converted
result
Flag conditions
3 4
D+1
3 - 165
Conversion Example
The following shows conversion from BCD data to ASCII codes.
Normal direction convertion of 4 bytes (S2 = H0004)
BCD data
S1+1
BCD H code
12
S1
34
56
78
4 bytes
F73 (BCDA) instruction execution
Converted result D+3
D+2
ASCII HEX
32
31
34
33
code
ASCII
2
1
4
3
character
Result of S1 + 1
conversion
D+1
35
38
37
36
Result of S1
conversion
12
S1
34
56
78
4 bytes
F73 (BCDA) instruction execution
Converted result D+3
D+2
ASCII HEX
38
37
36
35
code
ASCII
8
7
6
5
character
Result of S1
conversion
D+1
34
33
32
31
Result of S1 + 1
conversion
3 - 166
ASCII HEX
code
H30
H31
H32
H33
H34
H35
H36
H37
H38
H39
F74 (ABCD)
P74 (PABCD)
Outline
Program example
Boolean
Ladder Diagram
Address
10
R0
F74 ABCD , DT 0 ,
S1
H8 ,
F 74
(ABCD)
DT
DT 40
S2
ST
11
Trigger
10
Instruction
DT
40
S1
S2
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IY
(*4)
N/A
N/A
N/A
N/A
A
A
S2
N/A
N/A
N/A
N/A
N/A
S1
(*1)
(*2)
(*3)
(*4)
Index
modifier
IX
(*3)
A
A: Available
N/A: Not Available
3 - 167
Explanation of example
Converts ASCII codes stored in data registers DT1 and DT0 to BCD data when trigger R0 turns on. The
converted data is stored in data register DT40.
When S2 = H4 (normal direction, 4 bytes)
DT1
ASCII
HEX code
ASCII
character
DT0
3
1
1
DT40
BCD
H code
DT0
3
3
2
2
1
1
DT40
BCD
H code
Description
Converts ASCII codes that express decimal characters, starting from the 16-bit area specified by S1, to BCD
data as specified by S2. The converted result is stored in the area starting from the 16-bit area specified by D.
A maximum of eight characters of data can be converted.
S2 specifies the number of source data bytes and the direction of converted data (normal/reverse).
The data length when converted to a BCD number becomes half the ASCII code source data.
3 - 168
How to specify S2
S2 = H 0 0
1 2
Reverse direction
ASCII
code
3 4
1 2
BCD data
3 4
Conversion Example
The following shows conversion from ASCII codes to BCD data.
8 ASCII characters convertion (S2=H0008)
ASCII code
ASCII HEX
code
S1+3
S1+2
S1+1
S1
38
37
36
35
34
33
32
31
ASCII
character
Converted result
BCD H code
D+1
78
D
56
34
12
3 - 169
S1+3
S1+2
S1+1
S1
37
36
35
34
33
32
31
Converted result
D+1
BCD H code
01
23
D
45
67
BCD character
H30
H31
H32
H33
H34
H35
H36
H37
H38
H39
Flag conditions
0
1
2
3
4
5
6
7
8
9
3 - 170
F75 (BINA)
P75 (PBINA)
Outline
Program example
Boolean
Ladder Diagram
Address
10
R0
ST
11
Trigger
10
Instruction
F 75
S2
0
(BINA)
DT
F75 BINA , DT 0 , K 6 , DT 50
S1
DT
50
S1
S2
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IY
(*4)
A
A
S2
N/A
N/A
N/A
N/A
N/A
S1
(*1)
(*2)
(*3)
(*4)
Index
modifier
IX
(*3)
A
A: Available
N/A: Not Available
3 - 171
Explanation of example
Converts the 16-bit data stored in data register DT0 to ASCII codes that express the equivalent decimals
when trigger R0 turns on. The converted data is stored in data registers DT52 to DT50.
Source
DT0
Bit position 15 1211 8 7 4 3 0
K - 100
Decimal data
Destination
DT52
3
DT51
DT50
2
6 bytes
SPACE
Description
Converts the 16-bit data specified by S1 to ASCII codes that express the equivalent decimals. The converted
result is stored in the area starting from the 16-bit area specified by D as specified by S2.
Specify the number of bytes in decimal number in the S2. (This specification cannot be made with BCD data.)
D+2
D+1
30
30
31
2D
ASCII code
20
20
D
20
20
Extra bytes
Range specified by S2
If the number of bytes of ASCII codes following conversion (including the minus sign) is larger than the
number of bytes specified by the S2, an operation error occurs. Make sure the sign is taken into consideration
when specifying the object of conversion for the S2.
3 - 172
Conversion Example
The following shows conversion from 16 - bit decimal data to ASCII codes.
When a negative number is converted
S1
9C
K - 100
F75 (BINA) instruction execution
Converted
result
D+2
D+1
30
30
31
2D
ASCII code
20
20
(Space) (Space)
Extra bytes
D2
K1234
F75 (BINA) instruction execution
Converted
result
D+2
D+1
34
33
32
21
ASCII code
20
20
(Space) (Space)
Extra bytes
ASCII HEX
code
H20
H2D
H30
H31
H32
H33
H34
H35
H36
H37
H38
H39
3 - 173
Flag conditions
3 - 174
F76 (ABIN)
P76 (PABIN)
Converts ASCII code that expresses decimal digits to 16-bit data that
expresses the equivalent number.
For the FP/FP - M/FP0/FP1, the P type high- level instruction
P76 (PABIN) is not available.
Outline
Program example
Boolean
Ladder Diagram
Address
Instruction
10
R0
10
ST
11
Trigger
F 76
S2
0
(ABIN)
DT
F76 ABIN , DT 0 , K 6 , DT 50
S1
DT
50
S1
S2
16-bit equivalent constant or 16-bit area to specify number of source data bytes
to be converted
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
Index
register
Register
LD FL
DT
(*1) (*2)
EV
Constant
IX
(*3)
IY
(*4)
Index
modifier
S1
N/A
N/A
N/A
N/A
S2
D
(*1)
(*2)
(*3)
(*4)
A
N/A
N/A
N/A
N/A
N/A
A
A: Available
N/A: Not Available
Explanation of example
Converts ASCII codes (6 bytes) that express decimal digits in data registers DT2 to DT0 to 16-bit data when
trigger R0 turns on. The converted data is stored in data register DT50.
Source
ASCII HEX code
ASCII character
DT2
3
0
0
DT1
3
0
0
DT0
2
6 bytes
In this case, this position should
be set to SPACE or 0.
Destination
DT50
Bit position 15 12 11 8 7 4 3 0
Decimal data
K - 100
3 - 175
Description
Converts the ASCII codes that express the decimal digits, starting from the 16-bit area specified by S1 to
16-bit data as specified by S2. The converted result is stored in the area specified by D.
S2 specifies the number of source data bytes to be converted using decimal number. (This specification
cannot be made with BCD data.)
Flag conditions
The area specified using the index modifier exceeds the limit.
The number of bytes specified by S2 exceeds the area specified by S1.
The data specified by S2 is recognized as 0.
The converted result exceeds the 16-bit area specified by D.
The converted result exceeds the 16-bit data.
ASCII code not corresponding to decimal numbers (0 to 9) or ASCII
characters (+, - , and SPACE) is specified.
Conversion Example
The following shows conversion from ASCII codes to decimal data in a 16 - bit configuration.
Example of converting an ASCII code indicating a negative number
ASCII code
S1+2
S1+1
S1
30
30
31
2D
30
30
(0)
(0)
ASCII code
Extra bytes
Range specified by S2
F76 (ABIN) instruction execution
D
Converted result
FF
9C
K - 100
3 - 176
Example 1:
ASCII code
S1+2
S1+1
30
30
31
2B
ASCII code
S1
20
20
(Space) (Space)
Extra bytes
Range specified by S2
Example 2:
ASCII code
S1+2
S1+1
30
30
31
ASCII code
20
S1
20
20
Extra bytes
Range specified by S2
F76 (ABIN) instruction execution
Converted result
of example 1 or 2
D
00
64
K100
Decimal
characters
SPACE
+
0
1
2
3
4
5
6
7
8
9
3 - 177
F77 (DBIA)
P77 (PDBIA)
Outline
Program example
Boolean
Ladder Diagram
Address
10
R0
ST
11
Trigger
10
Instruction
S2
77
0
(DBIA)
DT
F77 DBIA , DT 0 , K 10 , DT 50
S1
K
DT
10
50
S1
S2
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
Index
modifier
S1
N/A
N/A
D
(*1)
(*2)
(*3)
(*4)
S2
N/A
N/A
N/A
N/A
N/A
3 - 178
A
A: Available
N/A: Not Available
Explanation of example
Converts the 32-bit data stored in data registers DT1 and DT0 to ASCII code that expresses the equivalent
decimals when trigger R0 turns on. The converted data is stored in data registers DT54 to DT50 (10 bytes).
Source
DT1
DT0
Bit position 15 1211 8 7 4 3 0 15 1211 8 7 4 3 0
Decimal
Destination
ASCII HEX code
ASCII character
K12345678
DT54
8
8
DT53
6
6
DT51
2
3
DT52
5
5
4
4
DT50
SPACE
Description
Converts the 32-bit data specified by S1 to ASCII code that expresses the equivalent decimals. The
converted result is stored in the area starting from the 16-bit area specified by D as specified by S2.
S2 specifies the number of bytes used to express the destination data using decimal.
Flag conditions
The area specified using the index modifier exceeds the limit.
The number of bytes specified by S2 exceeds the area specified by D.
The data specified by S2 is recognized as 0.
The converted result exceeds the area specified by D.
The number of bytes of converted result exceeds the number of bytes
specified by S2.
- For FP2SH and FP10SH, the error flag (R9007) turns on only when these
operation errors occurs.
3 - 179
Conversion Example
The following shows conversion from 32 - bit decimal format data to ASCII codes.
Example of converting a negative number
S1+1
FF
43
S1
9E
B2
K - 12345678
F77 (DBIA) instruction execution
Converted
result
D+4
D+3
D+2
D+1
38
37
36
35
34
33
32
31
2D
20
(Space)
ASCII code
Extra byte
00
BC
S1
61
4E
K12345678
F77 (DBIA) instruction execution
Converted
result
D+2
D+3
D+1
38
37
36
35
34
33
32
31
ASCII code
Range specified by S2 (8 bytes)
3 - 180
ASCII HEX
code
H20
H2B
H2D
H30
H31
H32
H33
H34
H35
H36
H37
H38
H39
F78 (DABI)
P78 (PDABI)
Converts ASCII code that expresses decimal digits to 32-bit data that
expresses the equivalent number.
For the FP/FP - M/FP0/FP1, the P type high- level instruction
P78 (PDABI) is not available.
Outline
Program example
Boolean
Ladder Diagram
Address
10
R0
ST
11
Trigger
10
Instruction
F 78
S2
0
(DABI)
DT
F78 DABI , DT 0 , K 10 , DT 50
S1
K
DT
10
50
S1
S2
16-bit equivalent constant or 16-bit area to specify number of source data bytes
to be converted
Lower 16-bit area of 32-bit data for storing converted data (destination)
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
Index
modifier
IX
(*3)
IY
N/A
N/A
N/A
N/A
A
A
S2
N/A
N/A
N/A
N/A
N/A
N/A
S1
A
A: Available
N/A: Not Available
Explanation of example
Converts ASCII codes (10 bytes) that express decimal digits in data registers DT4, DT3, DT2, DT1 and DT0
to 32-bit data when trigger R0 turns on. The converted data is stored in data registers DT51 and DT50.
Source
ASCII HEX code
ASCII character
DT4
8
8
DT3
7
7
6
6
DT1
2
3
DT2
5
5
4
4
3
3
3
2
DT0
SPACE
Destination
DT51
DT50
Bit position 15 12 11 8 7 4 3 0 15 12 11 8 7 4 3 0
Decimal
K12345678
3 - 181
Description
Converts ASCII code that expresses the decimal digits, starting from the 16-bit area specified by S1 to 32-bit
data as specified by S2. The converted result is stored in the area starting from the 16-bit area specified by D.
S2 specifies the number of bytes used to express the destination data using decimals.
Flag conditions
The area specified using the index modifier exceeds the limit.
The number of bytes specified by S2 exceeds the area specified by S1.
The data specified by S2 is recognized as 0.
The converted result exceeds the area specified by D.
The converted result exceeds the 32-bit data.
ASCII code not corresponding to decimal numbers (0 to 9) or ASCII
characters (+, - , and SPACE) is specified.
Conversion Example
The following shows conversion from ASCII codes to decimal data in a 32 - bit configuration.
Example of converting an ASCII code indicating a negative number
ASCII code
S1+4
S1+2
S1+3
S1+1
S1
38
37
36
35
34
33
32
31
2D
20
(Space)
ASCII code
Extra byte
D+1
FF
43
9E
K - 12345678
3 - 182
B2
Example 1:
ASCII code
S1+3
S1+2
S1+1
S1
38
37
36
35
34
33
32
31
ASCII code
Range specified by S2 (8 bytes)
Example 2:
ASCII code
S1+4
S1+3
S1+2
S1+1
S1
38
37
36
35
34
33
32
31
2B
20
(Space)
ASCII code
Extra byte
D+1
00
BC
D
61
4E
K12345678
Decimal
characters
SPACE
+
0
1
2
3
4
5
6
7
8
9
3 - 183
3 - 184
F80 (BCD)
P80 (PBCD)
Outline
Program example
Boolean
Ladder Diagram
Address
10
ST
11
Trigger
10
Instruction
R
F 80
0
(BCD)
DT
R0
10
DT
20
S
S
16-bit equivalent constant or 16-bit area for storing 16- bit binary data (source)
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
(*4)
D
(*1)
(*2)
(*3)
(*4)
A
N/A
N/A
N/A
Index
modifier
A
A
A: Available
N/A: Not Available
3 - 185
Explanation of example
Converts the contents of data register DT10 to BCD code that expresses a 4-digit decimal when trigger R0
turns on. The converted data is stored in data register DT20.
If DT10 is 16 using decimal number conversion, the following will be stored in DT20.
Source [S]: K16
Bit position 15 1211 8 7 4 3 0
0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0
DT10
Decimal
K16
Conversion (to BCD code)
Description
Converts the 16-bit binary data specified by S to BCD code that expresses a 4-digit decimal. The converted
data is stored in D.
Flag conditions
3 - 186
F81 (BIN)
P81 (PBIN)
Outline
Program example
Boolean
Ladder Diagram
Address
Instruction
10
10
ST
11
Trigger
F 81
0
(BIN)
DT
R0
DT
10
20
4-digit BCD equivalent constant or 16-bit area for 4-digit BCD data (source)
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
(*4)
Index
modifier
D
(*1)
(*2)
(*3)
(*4)
A
N/A
N/A
N/A
A: Available
N/A: Not Available
3 - 187
Explanation of example
Converts the contents of data register DT10 to 16-bit binary data when trigger R0 turns on. The converted
data is stored in data register DT20.
If DT10 is BCD data consisting of H15, the following will be stored in DT20.
Source [S]: H15 (BCD)
Bit position 15 1211 8 7 4 3 0
0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1
DT10
BCD H code
K15
Description
Converts BCD code that expresses a 4-digit decimal specified by S to 16-bit binary data. The converted data
is stored in D.
Flag conditions
3 - 188
F82 (DBCD)
P82 (PDBCD)
Outline
Program example
Boolean
Ladder Diagram
Address
10
R20
ST
11
Trigger
10
Instruction
R
F 82
20
(DBCD)
DT
10
DT
20
S
S
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
Index
modifier
N/A
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
Converts the contents of data registers DT11 and DT10 to BCD code that expresses an 8-digit decimal when
trigger R20 turns on. The converted data is stored in data registers DT21 and DT20.
Description
Converts the 32-bit data specified by S to BCD code that expresses an 8-digit decimal. The converted data is
stored in D+1 and D.
3 - 189
Flag conditions
3 - 190
F83 (DBIN)
P83 (PDBIN)
Outline
Program example
Boolean
Ladder Diagram
Address
10
R20
ST
11
Trigger
10
Instruction
R
F 83
20
(DBIN)
DT
10
DT
20
S
S
8-digit BCD equivalent constant or lower 16-bit area for 8-digit BCD code
(source)
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
N/A
N/A
N/A
N/A
Index
modifier
N/A
A
A
A: Available
N/A: Not Available
Explanation of example
Converts BCD code that expresses an 8 - digit decimal of data registers DT11 and DT10 to 32-bit binary data
when trigger R20 turns on. The converted data is stored in data registers DT21 and DT20.
Description
Converts BCD code that expresses an 8-digit decimal specified by S to 32-bit binary data. The converted
data is stored in D+1 and D.
Flag conditions
3 - 191
F84 (INV)
P84 (PINV)
Outline
Program example
Boolean
Ladder Diagram
Address
Instruction
10
10
R20
ST
11
Trigger
F 84
20
(INV)
DT
F84 INV , DT 0
D
16-bit area to be inverted
Operands
Relay
Operand
D
(*1)
(*2)
(*3)
(*4)
Timer/Counter
WL
WX WY WR
(*1)
N/A
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
(*4)
N/A
N/A
Index
modifier
A
A: Available
N/A: Not Available
Explanation of example
Inverts the contents of data register DT0 when trigger R20 turns on.
Destination
Bit position 15 1211 8 7 4 3 0
0 1 0 1 1 1 1 0 1 0 1 1 1 1 0 1
DT0
Destination
R20: on (inversion)
Description
Inverts each bit (0 or 1) of the 16-bit data specified by D.
This instruction is useful for controlling an external device (7 - segment display) that uses negative logic
operation.
Flag conditions
3 - 192
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
F85 (NEG)
P85 (PNEG)
Outline
Program example
Boolean
Ladder Diagram
Address
10
ST
11
Trigger
10
Instruction
F 85
DT
R20
20
(NEG)
0
F85 NEG , DT 0
D
16-bit area for storing original data and its twos complement
Operands
Relay
Operand
D
(*1)
(*2)
(*3)
(*4)
Timer/Counter
WL
WX WY WR
(*1)
N/A
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
(*4)
N/A
N/A
Index
modifier
A
A: Available
N/A: Not Available
Explanation of example
Takes twos complement of data register DT0 when trigger R20 turns on.
Destination
Bit position 15 1211 8 7 4 3 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1
DT0
Decimal data
Destination
K3
R20: on
K-3
3 - 193
Description
Takes twos complement of 16-bit data specified by D.
The twos complement is obtained by inverting all bits and adding 1 to the inverted result.
This instruction is useful for changing the sign of 16-bit data from positive to negative or from negative to
positive.
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
3 - 194
F86 (DNEG)
P86 (PDNEG)
Outline
Program example
Boolean
Ladder Diagram
Address
10
R20
ST
11
Trigger
10
Instruction
F 86
DT
F86 DNEG , DT 0
20
(DNEG)
0
D
Lower 16-bit area of 32-bit data for storing original data and its twos
complement
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
N/A
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
A
Constant
IX
(*3)
IY
N/A
N/A
N/A
Index
modifier
A
A: Available
N/A: Not Available
Explanation of example
Takes twos complement of data registers DT1 and DT0 when trigger R20 turns on.
Destination
DT1
DT0
Bit position 15 1211 8 7 4 3 0 15 1211 8 7 4 3 0
Binary data 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1
K-3
Decimal data
Destination
DT1
DT0
Bit position 15 1211 8 7 4 3 0 15 1211 8 7 4 3 0
Binary data 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1
Decimal data
K3
3 - 195
Description
Takes twos complement of 32-bit data specified by D.
The twos complement is obtained by inverting all bits and adding 1 to the inverted result.
This instruction is useful for changing the sign of 32-bit data from positive to negative or from negative to
positive.
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
3 - 196
F87 (ABS)
P87 (PABS)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
10
Instruction
10
R20
ST
11
F 87
DT
F87 ABS , DT 0
20
(ABS)
0
D
16-bit area for storing original data and its absolute value
Operands
Relay
Operand
D
(*1)
(*2)
(*3)
(*4)
Timer/Counter
WL
WX WY WR
(*1)
N/A
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
A
Constant
IX
(*3)
IY
(*4)
N/A
N/A
Index
modifier
A
A: Available
N/A: Not Available
Explanation of example
Takes absolute value of data register DT0 when trigger R20 turns on.
For instance, regardless of whether the value of DT0 is K1 or K - 1, it will be K1 when the instruction is
executed.
Description
Takes absolute value of signed 16-bit data specified by D. The absolute value of the signed 16-bit data is
stored in D.
This is effective for processing data in which the polarity (+ or - ) changes.
Flag conditions
Carry flag (R9009): Turns on for an instant when 16-bit data is the negative value range: K-1 to
K-32767 (HFFFF to H8001).
3 - 197
F88 (DABS)
P88 (PDABS)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
10
Instruction
10
R20
ST
11
F 88
DT
F88 DABS , DT 0
20
(DABS)
0
D
Lower 16-bit area of 32-bit data for storing original data and its absolute value
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
N/A
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
A
Constant
IX
(*3)
IY
N/A
N/A
N/A
Index
modifier
A
A: Available
N/A: Not Available
Explanation of example
Takes absolute value of data registers DT1 and DT0 when trigger R20 turns on. The absolute value of DT1
and DT0 is stored in data registers DT1 and DT0.
Description
Takes the absolute value of signed 32-bit data specified by D. The absolute value of the 32-bit data is stored in
D+1 and D.
This is effective for processing data in which the polarity (+ or - ) changes.
Flag conditions
- The area specified using the index modifier exceeds the limit.
- The 32-bit data is the negative minimum value K-2147483648
(H80000000).
Carry flag (R9009): Turns on for an instant when 32-bit data is negative value range K-1 to
K-2147483647 (HFFFFFFFF to H80000001).
3 - 198
F89 (EXT)
P89 (PEXT)
Copies the sign bit of the specified 16-bit data to all the bits of the
higher 16-bit area (extended 16-bit area).
For the FP/FP - M/FP0/FP1, the P type high- level instruction
P89 (PEXT) is not available.
Outline
Program example
Boolean
Ladder Diagram
Address
10
R20
ST
11
Trigger
10
Instruction
R
F 89
DT
20
(EXT)
0
F89 EXT , DT 0
D
16-bit area for storing original 16-bit binary data
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
N/A
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
A
Constant
IX
(*3)
IY
N/A
N/A
N/A
Index
modifier
A
A: Available
N/A: Not Available
3 - 199
Explanation of example
Copies the sign bit of data register DT0 to all the bits of data register DT1 when trigger R20 turns on.
If K - 2 is stored in DT0, the data will be as follows.
Sign bit (0: positive, 1: negative)
DT0
Bit position 15 1211 8 7 4 3 0
Binary data 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0
Decimal data
K-2
16-bit data
R20: on
DT1
DT0
Bit position 15 1211 8 7 4 3 0 15 1211 8 7 4 3 0
Binary data 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0
K-2
Decimal data
Description
16 - bit data is converted to 32 - bit data, without signs and values being changed.
If the sign bit (bit position 15) of the 16 - bit data specified by D is 0, all 16 bits of the next area of D will be set to
0. If the sign bit is 1, all 16 bits will be set to 1.
By doing this, the 16 - bit data is converted to 32 - bit data, without the sign or the values changing.
Double word data with D as the first data can be used as the operand of 32 - bit operation instructions following
execution of the F89 (EXT) instruction.
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
3 - 200
F90 (DECO)
P90 (PDECO)
Decode
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
ST
11
F 90
R20
10
(DECO)
DT
10
404
DT
20
20
16-bit area equivalent constant or 16-bit area to specify starting bit position and
number of bits to be decoded
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
(*4)
Index
modifier
D
(*1)
(*2)
(*3)
(*4)
A
N/A
N/A
N/A
A
A: Available
N/A: Not Available
Explanation of example
Decodes data register DT10 according to the n = H404 when trigger R20 turns on. The decoded result is
stored in data register DT20.
Example:
When n: H404
Source
Bit position 4
Destination
3 - 201
Description
Decodes the contents of 16-bit data specified by S according to the contents of n. The decoded result is
stored in the area starting from 16-bit area specified by D.
The length of the area required to store decoding results changes depending on the length of the data being
decoded.
12 11
8 7
4 3
0 0 0 0 0 0 0 0
Starting bit
position
Number of
bits
H0
H0
H1
H1
H2
H2
H3
H3
H4
H4
H5
H5
H6
H6
H7
H7
H8
H8
Set value
H9
HA
10
HB
12
HD
13
HE
14
HF
3 - 202
11
HC
15
Relationship between number of bits and occupied data area for decoded result
Number of bits to be
decoded
1-word
2-bit*
1-word
4-bit*
1-word
1-word
16-bit
2-word
32-bit
4-word
64-bit
8-word
128-bit
16-word
256-bit
8-bit*
* Invalid bits in the data area required for the result are set to 0.
Decoded example
When decoding 4-bit data, 16-bit data for the decoded result is shown below.
Decoding conditions (n)
Starting bit position: H0 (bit position 0)
Number of bits to be decoded: H4 (4 bits)
Data to be decoded
[Binary (decimal)]
0000 (K0)
0001 (K1)
0010 (K2)
0011 (K3)
0100 (K4)
0101 (K5)
0110 (K6)
0111 (K7)
1000 (K8)
1001 (K9)
1010 (K10)
1011 (K11)
1100 (K12)
1101 (K13)
1110 (K14)
1111 (K15)
Decoded result
15 12 11 8
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
3 0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
3 - 203
Flag conditions
3 - 204
F91 (SEGT)
P91 (PSEGT)
7-segment decode
Outline
Program example
Boolean
Ladder Diagram
Address
Instruction
10
ST
11
Trigger
F 91
20
(SEGT)
DT
DT
R20
10
10
S
S
Starting 16-bit area for storing 4-digit data for 7-segment indication (destination)
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
(*4)
Index
modifier
D
(*1)
(*2)
(*3)
(*4)
A
N/A
N/A
N/A
N/A
A
A: Available
N/A: Not Available
Explanation of example
Converts the contents of data register DT0 to 4-digit data for 7-segment indication when trigger R20 turns on.
The converted data is stored in word internal relays DT11 and DT10.
For example, to display ABCD, the following would be entered.
Source
Bit position 15 12 11 8 7 4 3 0
1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1
DT0
Hexadecimal
Destination
Bit position 15 1211 8 7 4 3 0
0 1 1 1 0 1 1 1 0 1 1 1 1 1 0 0
DT11
7-segment
A
B
indication
3 - 205
Description
Converts the 16-bit equivalent constant or 16-bit data specified by S to 4-digit data for 7-segment indication.
The converted data is stored in the area starting from the 16-bit area specified by D.
The relationship between the displayed contents and the contents specified for S, and the data of the
7 - segment display is shown below.
One digit data to be
converted
Organization of
7-segment indication
Hexadecimal
Binary
g f
H0
0 0 0 0
0 0 1 1
1 1 1 1
H1
0 0 0 1
0 0 0 0
0 1 1 0
H2
0 0 1 0
0 1 0 1
1 0 1 1
LSB
H3
0 0 1 1
0 1 0 0
1 1 1 1
H4
0 1 0 0
0 1 1 0
0 1 1 0
H5
0 1 0 1
0 1 1 0
1 1 0 1
H6
0 1 1 0
0 1 1 1
1 1 0 1
H7
0 1 1 1
0 0 1 0
0 1 1 1
H8
1 0 0 0
0 1 1 1
1 1 1 1
H9
1 0 0 1
0 1 1 0
1 1 1 1
HA
1 0 1 0
0 1 1 1
0 1 1 1
HB
1 0 1 1
0 1 1 1
1 1 0 0
HC
1 1 0 0
0 0 1 1
1 0 0 1
HD
1 1 0 1
0 1 0 1
1 1 1 0
HE
1 1 1 0
0 1 1 1
1 0 0 1
HF
1 1 1 1
0 1 1 1
0 0 0 1
Flag conditions
e d c b a
7-segment
indication
b
c
d
MSB
3 - 206
F92 (ENCO)
P92 (PENCO)
Encode
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
ST
11
F 92
R20
10
10
DT
20
(ENCO)
DT
20
16-bit equivalent constant or 16-bit area to specify starting bit position and
number of bits to be encoded
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IY
(*4)
N/A
N/A
A
A
N/A
N/A
N/A
N/A
N/A
(*1)
(*2)
(*3)
(*4)
Index
modifier
IX
(*3)
A
A: Available
N/A: Not Available
3 - 207
Explanation of example
Encodes contens of data register DT11 and DT10 according to the n: H5 when trigger R20 turns on. The
encoded result is stored in 8 bits of data register DT20 starting from bit position 0.
When n: H0005
Number of bits to be encoded: 25 = 32 bits
Starting bit position to be encoded for destination data: bit position 0
The 8th bit of 32-bit
data is in the on state.
32 bits specified by H5
Source
Destination
[D]
Encoded result:K8
Description
Encodes the contents of data specified by S according to the contents of n. The encoded result is stored in the
16-bit area specified by D starting from the specified bit position.
If more than one bit is on in a segment being decoded, the uppermost bit is effective.
The contents of the 2nL segment at the beginning of the area specified by the S are encoded. The encoded
results are stored as decimal data, in the eight bits starting from the bit specified as the nH bit.
Invalid bits in the specified area for the result are set to 0.
3 - 208
12 11
8 7
4 3
0 0 0 0 0 0 0 0
Number of
bits
Starting bit
position
H1
H2
H3
8 (1 byte)
H1
H4
16 (1 word)
H2
H5
32 (2 words)
H3
H6
64 (4 words)
H4
H7
128 (8 words)
H5
H8
H6
H7
H8
Set value
H0
H9
HA
10
HB
11
HC
12
HD
13
HE
14
HF
15
3 - 209
Encoded example
When encoding 16-bit data (nL=4), the encoded results are shown below.
Data to be encoded
15 12
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
11
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
Flag conditions
7 4
3 0
Encoded result
[Binary (decimal)]
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
(K0)
(K1)
(K2)
(K3)
(K4)
(K5)
(K6)
(K7)
(K8)
(K9)
(K10)
(K11)
(K12)
(K13)
(K14)
(K15)
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
3 - 210
F93 (UNIT)
P93 (PUNIT)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
ST
11
F 93
R20
10
DT
20
(UNIT)
10
3
DT
20
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IY
(*4)
N/A
N/A
A
A
N/A
N/A
N/A
N/A
N/A
(*1)
(*2)
(*3)
(*4)
Index
modifier
IX
(*3)
A
A: Available
N/A: Not Available
3 - 211
Explanation of example
Extracts lower 4 bits of data registers DT12 to DT10, combines the extracted data, and stores it in data
register DT20 when trigger R20 turns on.
Bit position 15
12 11
8 7
4 3
DT10
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
DT11
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
DT12
0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
Bit position 15
DT20
12 11
8 7
4 3
0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
When the n < K4, 0 is set to bit position 12 to 15.
Description
Extracts the lower 4 bits (bit positions 0 to 3) of each specified area, starting from the 16-bit area specified by S
and combines the extracted data into one word. The result is stored in the 16-bit area specified by D.
n specifies the number of data areas to be extracted.
(range of n: K0 to K4)
When K0 is specified for n, this instruction is not executed.
When n < K4, 0 is automatically set to positions at D where the corresponding 16-bit source data does not
exist.
Source
Bit position 15 1211 8 7 4 3 0
Digit 1
S
n
Digit 2
Digit 3
Digit 4
S+1
S+2
S+3
Bit positions 4 to 15 of each
data area are invalid.
Destination
Bit position 15 1211 8 7 4 3 0
Digit 4 Digit 3 Digit 2
Digit 1
D
Flag conditions
3 - 212
F94 (DIST)
P94 (PDIST)
Divides the specified 16-bit data into four 4-bit units and distributes the
divided data into the lower 4 bits of the specified 16-bit areas.
For the FP/FP - M/FP0/FP1, the P type high- level instruction
P94 (PDIST) is not available.
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
ST
11
R20
10
20
(DIST)
10
4
DT
94
DT
20
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IY
(*4)
A
A
N/A
N/A
N/A
N/A
N/A
(*1)
(*2)
(*3)
(*4)
Index
modifier
IX
(*3)
A
A: Available
N/A: Not Available
3 - 213
Explanation of example
Divides the 16-bit data of data register DT10 into 4-bit units and the divided data is stored in the lower 4 bits (bit
positions 0 to 3) of data registers DT20 to DT23 when trigger R20 turns on.
Bit position 15
DT10
12 11
8 7
4 3
0 1 1 1 0 0 1 1 0 0 0 1 0 0 0 0
Bit position 15
12 11
8 7
4 3
DT20
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
DT21
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
DT22
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1
DT23
0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1
Description
Divides the 16-bit data specified by S into 4-bit units and distributes the divided data into the lower 4 bits (bit
positions 0 to 3) of 16-bit areas starting from D.
n specifies the number of data divisions.(range of n: K0 to K4)
When K0 is specified for n, this instruction is not executed.
n
Source
Bit position 15
S
12 11
Digit 4
8 7
Digit 3
4 3
Digit 2
Digit 1
Destination
Bit position 15
12 11
8 7
4 3
Digit 1
D+1
Digit 2
D+2
Digit 3
D+3
Digit 4
Bit positions 4 to 15 are filled with 0s.
Flag conditions
3 - 214
F95 (ASC)
P95 (PASC)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
ST
11
R20
10
20
(ASC)
M ABC1230_DEF
R
95
DT
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
N/A
Index
register
Register
Constant
Index
modifier
EV
LD FL
DT
(*1) (*2)
IX
(*3)
IY
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
Converts the character constants ABC1230_DEF to ASCII code when trigger R20 turns on. The ASCII
code is stored in data registers DT2 to DT7.
Character constant
[S]
Character constants
M ABC1230 DEF
R20: on
Data register
[D]
DT7
DT6
DT5
DT3
DT4
DT2
ASCII character
SPACE
When the number of character constants specified by S is less than 12, the ASCII code H20 (SPACE) is
stored in the extra destination area.
3 - 215
Description
Converts the character constants specified by S to ASCII code. The converted ASCII code is stored in 6
words starting from the 16-bit area specified by D.
S:
MA
11 spaces
R20
F95 ASC, MA
DT 2
H41
DT3:
H20
H20
DT4:
H20
H20
DT5:
H20
H20
DT6:
H20
H20
DT7:
H20
H20
Higher byte
(A)
DT2:
H20
R20: on
Lower byte
11 spaces
R20
F95 ASC, M
S: M
R20
A , DT 2
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
S: M
5 spaces
6 spaces
F95 ASC, M
R20: on
, DT 2
DT2:
H20
H20
DT3:
H20
H20
DT3:
H20
H20
DT4:
H20
H20
DT4:
H20
H20
DT5:
H20
H20
DT5:
H20
H41
DT6:
H20
H20
DT6:
H20
H20
DT7:
H41
(A)
H20
DT7:
H20
H20
Higher byte
3 - 216
Lower byte
(A)
Higher byte
H20
H20
R20: on
DT2:
Lower byte
Flag conditions
Turns on and stays on when the last area for ASCII code exceeds the limit (6
words: six 16-bit areas).
Turns on for an instant when the last area for ASCII code exceeds the limit (6
words: six 16-bit areas).
b4
ASCII
HEX code
b3
b2
b1
b0
NUL DLE
SPACE
SOH DC1
STX DC2
ETX DC3
EOT DC4
ENQ NAK
ACK SYN
&
BEL ETB
BS CAN
HT
EM
LF SUB
VT ESC
FF
FS
<
CR
GS
SO
RS
>
SI
US
DEL
b5
b4
b6
b5
b7
3 - 217
3 - 218
F96 (SRC)
P96 (PSRC)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
10
ST
11
R0
10
Instruction
F 96
S2
0
(SRC)
DT
20
DT
S3
10
DT
40
S1
S2
S3
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
(*4)
Index
modifier
S1
S2
N/A
N/A
N/A
N/A
N/A
S3
(*1)
(*2)
(*3)
(*4)
A
N/A
N/A
N/A
N/A
N/A
A
A: Available
N/A: Not Available
3 - 219
Explanation of example
Searches for the value given in data register DT10 in the block of data register DT20 through DT40 when
trigger R0 turns on.
For example, to search the area of the value called H1234, H1234 would be written to DT10.
Searched data
DT10:
1 2 3 4
[S1]
DT39: 1 2 3 4 19
DT40: 1 2 3 4 20 [S3]
Relative position number
If DT22, DT39, and DT40 match the searched data, the following occurs.
- If the number of registers matching the searched data = 3
K3 is stored in DT9037 (with the FP0 T32, FP, FP2, FP2SH and FP10SH: DT90037).
- If the position of the first matching data (the relative position number) = 2
K2 is stored in DT9038 (with the FP0 T32, FP, FP2, FP2SH, and FP10SH: DT90038).
Description
Searches for values matching S1 in the block of 16-bit areas specified by S2 (starting area) through S3
(ending area).
When the search operation is performed, the search results are stored as follows.
- The number of data items that match S1 is stored in special data register DT9037 (with the FP0 T32,
FP, FP2, FP2SH and FP10SH: DT90037).
- The position of the first matching data item, counting from the starting 16-bit area S2, is stored in
special data register DT9038 (with the FP0 T32, FP, FP2, FP2SH and FP10SH: DT90038).
Starting area S2 and ending area S3 should:
- Be the same type of operand.
- Satisfy S2
S3.
Data is searched from S2 to S3.
Flag conditions
3 - 220
F97 (DSRC)
P97 (PDSRC)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
11
10
F97
(DSRC)
DT
10
DT
20
DT
R0
ST
40
S2
S3
S1
S2
S3
Operands
Relay
Timer/Counter
Operand
WX WY WR WL
Index
register
Register
SV
EV
DT
FL
LD
(*1)
S1
S2
N/A
N/A
S3
N/A
N/A
Constant
Index Integer
modifier device
A
N/A
N/A
N/A
A: Available
N/A: Not Available
3 - 221
Explanation of example
Searches for the value given in data registers DT10 and DT11 in the block of data register DT20 through
DT40 when trigger R0 turns on.
For example, to search the area of the value called H01234567, H01234567 would be written to DT10 and
DT11.
Searched data
DT11,
DT10:
0 1 2 3 4 5 6 7
DT23,DT22: 1 2 F F 1 2 F F
DT25, DT24: 0 1 2 3 4 5 6 7
DT27, DT26: 7 F F F 7 F F F
[S1]
DT21,DT20: 0 1 2 3 5 7 6 4
DT39, DT38:
0 1 2 3 4 5 6 7
DT41, DT40:
0 1 2 3 4 5 6 7
10 [S3]
If DT24 and DT25, DT38 and DT39, and DT40 and DT41 match the searched data, the following occurs.
- The number K3 of data items that match the searched data (DT10 and DT11) is stored in special
data register DT90037.
- The position K2 of the first matching data item, counting from data register DT20, is stored in special
data register DT90038.
Description
Searches for values matching S1 in the block of 32-bit areas specified by S2 (starting area) through S3
(ending area) when the trigger turns on.
When the search operation is performed, the search results are stored as follows.
- The number of data items that match S1 is stored in special data register DT90037.
- The position of the first matching data item, counting from the starting 32-bit area S2, is stored in
special data register DT90038.
The starting area S2 and ending area S3 should:
- Be the same type of operand.
S3.
- Satisfy S2
Data S1 is searched from S2 to S3.
Flag conditions
3 - 222
F98 (CMPR)
P98 (PCMPR)
Shifts out non-zero data stored at the highest address of the table to
the specified area and compresses the data in the table to the higher
address.
For the FP/FP - M/FP0/FP1, the P type high- level instruction
P98 (PCMPR) is not available.
Outline
Program example
Boolean
Ladder Diagram
Address
10
R0
ST
11
Trigger
10
Instruction
F 98
DT
F98 CMPR , DT 0 , DT 5 , DT 10
D2
D1
(CMPR)
0
DT
D3
D1
D3
10
D2
DT
Operands
Relay
Timer/Counter
Operand
WX WY WR WL
Index
register
Register
SV
EV
DT
LD
FL
(*1)
Constant
Index
modifier
D1
N/A
N/A
N/A
N/A
D2
N/A
N/A
N/A
N/A
D3
N/A
N/A
N/A
N/A
A
A: Available
N/A: Not Available
3 - 223
Explanation of example
If the execution condition (trigger) R0 is on, the contents of data register DT5 are sent to data register DT10.
Also, in the range from DT0 to DT5, non - zero contents are stored in sequential order, starting from DT5. The
0 (zero) is set in the other areas of the data table.
F98 (CMPR) execution
[D1]
DT0
444
DT2
DT3
11
555
DT4
444
DT5
10
11
DT5
10
Specified
data range
555
DT1
DT10
DT0
[D2]
[D3]
Description
The data in the table specified by D1 and D2 is rearranged as follows:
- Contents of D2 (highest address) is shifted out to the area specified by D3.
- Non - zero data is shifted (compressed) in sequential order, in the direction of the higher address in
the specified range.
D1
K3
D1
K2
0
D2
K3
D2
K2
D3
K1
K1
Starting area D1 and ending area D2 should be the same type of operand.
Be sure to specify D1 and D2 with D1
D2.
Flag conditions
3 - 224
Application example
In combination with the F99 (CMPW)/P99 (PCMPW) instruction, this can be used to construct an optional
buffer.
(1) Executing the F99 (CMPW)/P99 (PCMPW) instruction
When data items are written to the first address of the buffer (the area of the specified range), they
are stored and accumulated in the buffer in sequential order. The oldest data will be stored in the
last address of the buffer.
31
0
F98 (CMPR)
execution
0
0
0
31
Specified
data range
44
555
11
F98 (CMPR)
execution
31
44
31
555
44
(11)
(555)
11
555
This can be used to extract valid non - zero data from the data written in random order.
0
112
Specified
data range
0
0
131
0
12
Each time the F98 (CMPR) instruction is executed, data is extracted in sequential order, from
to
3 - 225
F99 (CMPW)
P99 (PCMPW)
Shifts in data to the smallest address of the specified data table and
compresses the data in the table toward the higher address.
For the FP/FP - M/FP0/FP1, the P type high- level instruction
P99 (PCMPW) is not available.
Outline
Program example
Boolean
Ladder Diagram
Address
10
R0
ST
11
Trigger
10
Instruction
F 99
(CMPW)
DT
D1
DT
D2
10
DT
D1
D2
Operands
Relay
Timer/Counter
Operand
WX WY WR WL
Index
register
Register
SV
EV
DT
LD
FL
(*1)
Constant
IX
(*2)
IY
(*3)
Index
modifier
D1
N/A
N/A
N/A
N/A
N/A
D2
N/A
N/A
N/A
N/A
N/A
3 - 226
A
A: Available
N/A: Not Available
Explanation of example
If the execution condition (trigger) R0 is on, the contents of data register DT10 are sent to data register DT0.
Also, in the range from DT0 to DT5, non - zero contents are stored in sequential order, starting from DT5. The
0 (zero) is set in the other areas of the data table.
F99 (CMPW)
execution
[S]
DT10 32
[D1]
DT0
555
DT1
444
DT2
32
DT3
11
444
DT4
11
DT5
10
Specified
data range
10
[D2]
Note
Because the contents of S are written to DT0, the original
contents of DT0 (for example, 555) are overwritten.
Description
The data in the table specified by D1 and D2 is rearranged as follows:
- Data specified by S is shifted in to the area specified by D1 (starting address).
- Non - zero data is shifted (compressed) in sequential order, in the direction of the higher address in
the specified range.
D3
K4
D1
K3
D1
K0
K0
K2
K4
K0
D2
K0
K2
D2
K1
K1
Starting area D1 and ending area D2 should be the same type of operand.
Be sure to specify D1 and D2 with D1
D2.
Flag conditions
Application example
In combination with the F98 (CMPR)/P98 (PCMPR) instruction, this can be used to construct an optional
buffer.
(1) Executing the F99 (CMPW)/P99 (PCMPW) instruction
When data items are written to the first address of the buffer (the area of the specified range), they
are stored and accumulated in the buffer in sequential order. The oldest data will be stored in the
last address of the buffer.
31
0
F99 (CMPW)
execution
0
0
0
Specified
data range
31
44
555
11
F99 (CMPW)
execution
31
44
31
555
44
(11)
(555)
11
555
This can be used to extract valid non - zero data from the data written in random order.
12
0
0
131
112
0
31
D1
0
0
0
0
112
131
D2
Effective data
12
Executing the F99 (CMPW) instruction causes only the valid data to be stored.
3 - 228
F100 (SHR)
P100 (PSHR)
Outline
Program example
Boolean
Ladder Diagram
Address
Instruction
10
ST
11
Trigger
F100
0
(SHR)
DT
F100 SHR , DT 0 , K 4
R0
10
D
D
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
(*4)
N/A
N/A
n
(*1)
(*2)
(*3)
(*4)
N/A
A
Index
modifier
A
A
A: Available
N/A: Not Available
Explanation of example
Shifts 4 bits in data register DT0 to the right when trigger R0 turns on.
The data in bit position 3 is transferred to special internal relay R9009 (carry flag).
Bit position 15 1211 8 7 4 3 0
1 0 1 0 0 1 1 0 1 1 0 0 1 0 1 1
DT0
R0: on
0 0 0 0 1 0 1 0 0 1 1 0 1 1 0 0
DT0
In this case, the higher 4 bits
of DT0 are filled with 0s.
3 - 229
Description
Shifts n bits of the 16-bit data area specified by D to the right (to the lower bit position).
n
Bit position 15 1211 8 7 4 3 0
D
The data in the n th bit is transferred to R9009 (carry flag).
Bit position 15 1211 8 7 4 3 0
0 0 0 0
D
The higher n bits of D are filled with 0s.
0 0 0 0 0 0 0 0
Upper 8 bits
are invalid
K0 to K255
(H00 to HFF)
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
Carry flag (R9009): Turns on for an instant when the content of bit transferred to R9009 (n th bit)
is recognized as 1.
3 - 230
F101 (SHL)
P101 (PSHL)
Outline
Program example
Boolean
Ladder Diagram
Address
Instruction
10
ST
11
Trigger
F101
0
(SHL)
DT
F101 SHL , DT 0 ,
K4
R0
10
D
D
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
(*4)
N/A
N/A
n
(*1)
(*2)
(*3)
(*4)
N/A
A
Index
modifier
A
A
A: Available
N/A: Not Available
Explanation of example
Shifts 4 bits in data register DT0 to the left when trigger R0 turns on.
The data in bit position 12 is transferred to special internal relay R9009 (carry flag).
Bit position 15 1211 8 7 4 3 0
DT0
1 0 1 0 0 1 1 0 1 1 0 0 1 0 1 1
0 1 1 0 1 1 0 0 1 0 1 1 0 0 0 0
3 - 231
Description
Shifts n bits of the 16-bit area specified by D to the left (to the higher bit position).
n
Bit position 15 1211 8 7 4 3 0
D
The data in the n th bit is
transferred to R9009
(carry flag). Bit position 15 1211 8 7 4 3 0
0 0 0 0
D
n bits starting from bit position 0 are filled with 0s.
0 0 0 0 0 0 0 0
Upper 8 bits
are invalid
K0 to K255
(H00 to HFF)
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
Carry flag (R9009): Turns on for an instant when the content of bit transferred to R9009 (n th bit)
is recognized as 1.
3 - 232
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
R0
ST
11
F102
(DSHR)
DT
DT 2
10
DT
10
Operands
Relay
Timer/Counter
Operand
WX WY WR WL
Index
register
Register
SV
EV
DT
LD
FL
(*1)
N/A
Constant
K
N/A
Index Integer
modifier device
A
N/A
N/A
A: Available
N/A: Not Available
3 - 233
Description
Shifts n bits of the 32-bit data area specified by D to the right (to the lower bit position) when the trigger turns
on.
[D+1]
[D]
[n bits]
15
0 15
CY
00000000
[n]
0 0 0 0
Upper 8 bits
are invalid
0 0 0 0
K0 to K255(H00 to HFF)
When [n] is specified using K0, the contents of D and D+1 and the special internal relay R9009 (carry flag) do
not change.
When [n] is specified using K32 or higher, the contents of D and D+1 change to 0.
Flag conditions
Error flag (R9007):
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Error flag (R9008): Turns on for an instant when the area specified using the index modifier
exceeds the limit.
Carry flag (R9009): Content in the nth bit from LBS (least significant bit) turns on for an instant
when the bit transferred to R9009 is recognized as 1.
3 - 234
F103 (DSHL)
P103 (PDSHL)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
11
R0
10
ST
F103
(DSHL)
DT
10
DT
DT 2
Operands
Relay
Timer/Counter
Operand
WX WY WR WL
Index
register
Register
SV
EV
DT
FL
LD
(*1)
N/A
Constant
K
N/A
Index Integer
modifier device
A
N/A
N/A
A: Available
N/A: Not Available
Description
Shifts n bits of the 32-bit area specified by D to the left (to the higher bit position) when the trigger turns on.
[D+1]
[D]
[n bits]
15
0 15
CY
00000000
3 - 235
Only the lower eight bits of the 16-bit data [n] are effective. Select the amount of the shift within the range 1 to
255 bits.
15
[n]
- - - - - - - Upper 8 bits
are invalid
0 0 0 0
0 0 0 0
K0 to K255(H00 to HFF)
When [n] is specified using K0, the contents of D and D+1 and the carry flag do not change.
When [n] is specified using K32 or higher, the contents of D and D+1 change to 0.
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Error flag (R9008): Turns on for an instant when the area specified using the index modifier
exceeds the limit.
Carry flag (R9009): Content in the nth from LSB (least significant bit) turns on for an instant when
the bit transferred to R9009 is recognized as 1.
3 - 236
F105 (BSR)
P105 (PBSR)
Shifts one hexadecimal digit (4 bits) of the specified 16-bit data to the
right.
For the FP/FP - M/FP0/FP1, the P type high- level instruction
P105 (PBSR) is not available.
Outline
Program example
Boolean
Ladder Diagram
Address
10
ST
11
Trigger
F105
DT
R0
10
Instruction
0
(BSR)
0
F105 BSR , DT 0
D
16-bit area to be shifted to the right
Operands
Relay
Operand
D
(*1)
(*2)
(*3)
(*4)
Timer/Counter
WL
WX WY WR
(*1)
N/A
SV
A
EV
A
Index
register
Register
LD FL
DT
(*1) (*2)
A
Constant
IX
(*3)
IY
(*4)
N/A
N/A
Index
modifier
A
A: Available
N/A: Not Available
Explanation of example
Shifts one hexadecimal digit (4 bits) in data register DT0 to the right when trigger R0 turns on.
The data in hexadecimal digit position 1 (bit positions 0 to 3) is shifted out and transferred to the lower digit
position (bit positions 0 to 3) of special data register DT9014 (with the FP0 T32, FP, FP2, FP2SH and
FP10SH: DT90014).
DT0
(H9999)
R0: on
Bit position 15 1211 8 7 4 3 0
0 0 0 0 1 0 0 1 1 0 0 1 1 0 0 1
Binary
DT0
(H999)
Hexadecimal
9
0
9
9
Bit position 15 1211 8 7 4 3 0
0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1
Binary
DT9014/
0
0
0
9
(H9)
DT90014 Hexadecimal
3 - 237
Description
Shifts one hexadecimal digit (4 bits) of the 16-bit area specified by D to the right (to the lower digit position).
D
Hexadecimal
Digit 1
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
3 - 238
F106 (BSL)
P106 (PBSL)
Shifts one hexadecimal digit (4 bits) of the specified 16-bit data to the
left.
For the FP/FP - M/FP0/FP1, the P type high- level instruction
P106 (PBSL) is not available.
Outline
Program example
Boolean
Ladder Diagram
Address
10
ST
11
Trigger
F106
DT
R0
10
Instruction
0
(BSL)
0
F106 BSL, DT 0
D
16-bit area to be shifted to the left
Operands
Relay
Operand
D
(*1)
(*2)
(*3)
(*4)
Timer/Counter
WL
WX WY WR
(*1)
N/A
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
A
Constant
IX
(*3)
IY
(*4)
N/A
N/A
Index
modifier
A
A: Available
N/A: Not Available
Explanation of example
Shifts one hexadecimal digit (4 bits) in data register DT0 to the left when trigger R0 turns on.
The data in hexadecimal digit position 4 (bit positions 12 to 15) is shifted out and transferred to the lower digit
position (bit positions 0 to 3) of special data register DT9014 (with the FP0 T32, FP, FP2, FP2SH and
FP10SH: DT90014).
Bit position 15 1211 8 7 4 3 0
Binary
1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
DT0
Hexadecimal
8
1
0
0
(H8100)
R0: on
Bit position 15 1211 8 7 4 3 0
0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
Binary
DT0
Hexadecimal
1
0
0
0
(H1000)
Bit position 15 1211 8 7 4 3 0
0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
DT9014/ Binary
DT90014 Hexadecimal
0
0
0
8
(H8)
3 - 239
Description
Shifts one hexadecimal digit (4 bits) of the 16-bit area specified by D to the left (to the higher digit position).
D
DT9014/
Hexadecimal
DT90014
Digit 4
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
3 - 240
F108 (BITR)
P108 (PBITR)
Outline
Program example
Boolean
Ladder Diagram
Address
10
ST
11
Trigger
F108
0
(BITR)
DT
10
DT
R0
10
Instruction
12
D1
D2
D1
D2
Operands
Relay
Timer/Counter
Operand
WX WY WR WL
Index
register
Register
SV
EV
DT
FL
LD
(*1)
Constant
K
Index Integer
modifier device
D1
N/A
N/A
D2
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
Shifts 4 bits in data range (3 words) from DT10 through DT12 to the right when trigger R0 turns on.
3 words
DT12
H0212
DT11
H0030
DT10
H0232
4 bits becomes 0.
H0010
H9001
H8011
3 - 241
Description
Shifts n bits of the data range specified by D1 (starting) and D2 (ending) to the right (to the lower bit position)
when the trigger turns on.
Specified data range
D2
D1
The n bits are
shifted out.
Trigger: on
n bits
Flag conditions
3 - 242
F109 (BITL)
P109 (PBITL)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
11
R0
10
ST
F109
D2
10
12
D2
(BITL)
DT
D1
10
DT
Operands
Relay
Timer/Counter
Operand
WX WY WR WL
Index
register
Register
SV
EV
DT
FL
LD
(*1)
Constant
K
Index Integer
modifier device
D1
N/A
N/A
D2
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
Shifts 4 bits in the data range (3 words) from DT10 through DT12 to the left when trigger R0 turns on.
3 words
DT12
H0212
DT11
H0030
DT10
H0232
H0300
H2320
3 - 243
Description
Shifts n bits of the data range specified by D1 (starting) and D2 (ending) to the left (to the higher bit position)
when the trigger turns on.
Specified data range
D2
Trigger: on
D1
n bits
Flag conditions
3 - 244
F110 (WSHR) Right shift of one word (16 bits) of 16-bit data range
P110 (PWSHR)
Shifts one word (16 bits) of a specified 16-bit data range to the right.
For the FP/FP - M/FP0/FP1, the P type high- level instruction
P110 (PWSHR) is not available.
Outline
Program example
Boolean
Ladder Diagram
Address
Instruction
10
ST
11
F110
(WSHR)
DT
DT
Trigger
R0
10
F110 WSHR , DT 0 , DT 2
D2
D1
D1
D2
Operands
Relay
Operand
Register
Index
register
LD FL
DT
(*1) (*2)
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Constant
Index
modifier
D1
N/A
N/A
N/A
N/A
D2
N/A
N/A
N/A
N/A
A
A: Available
N/A: Not Available
Explanation of example
Shifts one word (16 bits) of the data range (3 words) from DT0 through DT2 to the right when trigger R0 turns
on.
Specified data range (3 words)
Data register
DT2
DT1
DT0
Hexadecimal
0 2 1 2
0 0 3 0
0 2 3 2
DT2
DT1
DT0
Hexadecimal
0 0 0 0
0 2 1 2
0 0 3 0
3 - 245
Description
Shifts one word (16 bits) of the data range specified by D1 (starting) and D2 (ending) to the right (to the lower
word address).
Specified data range
D2
D1
The starting word is shifted out.
D2
0
D1
Flag conditions
3 - 246
F111 (WSHL)
P111 (PWSHL)
Shifts one word (16 bits) of a specified 16-bit data range to the left.
For the FP/FP - M/FP0/FP1, the P type high- level instruction
P111 (PWSHL) is not available.
Outline
Program example
Boolean
Ladder Diagram
Address
Instruction
10
ST
11
F111
(WSHL)
DT
DT
Trigger
R0
10
F111 WSHL , DT 0 , DT 2
D2
D1
D1
D2
Operands
Relay
Operand
Register
Index
register
LD FL
DT
(*1) (*2)
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Constant
D1
N/A
N/A
N/A
N/A
D2
N/A
N/A
N/A
N/A
Index
modifier
A
A
A: Available
N/A: Not Available
Explanation of example
Shifts one word (16 bits) of the data range (3 words) from DT0 through DT2 to the left when trigger R0 turns on.
Specified data range (3 words)
Data register
DT2
DT1
DT0
Hexadecimal
0 2 1 2
0 0 3 0
0 2 3 2
The data in
DT2 is shifted out.
Data register
DT2
DT1
DT0
Hexadecimal
0 0 3 0
0 2 3 2
0 0 0 0
3 - 247
Description
Shifts one word (16 bits) of the data range specified by D1 (starting) and D2 (ending) to the left (to the higher
word address).
Specified data range
D2
D1
D2
D1
0
The ending
word is shifted out.
Flag conditions
3 - 248
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
ST
11
F112
(WBSR)
R0
10
DT
DT
F112 WBSR , DT 0 , DT 9
D2
D1
D1
D2
Operands
Relay
Operand
Register
Index
register
LD FL
DT
(*1) (*2)
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Constant
D1
N/A
N/A
N/A
N/A
D2
N/A
N/A
N/A
N/A
Index
modifier
A
A
A: Available
N/A: Not Available
Explanation of example
Shifts one hexadecimal digit (4 bits) of the data range (10 words) from DT0 through DT9 to the right when
trigger R0 turns on.
Specified data range (10 words = 40 digits)
DT9
DT0
15
1211 8 7 4 3 0 15 0 15
1211 8 7 4 3 0
0
2
1
2
0
0
2
3
2
R0: on
DT9
DT0
15
1211 8 7 4 3 0 15 0 15
1211 8 7 4 3 0
0
0
2
1
2
0
0
2
3
3 - 249
Description
Shifts one hexadecimal digit (4 bits) of the data range specified by D1 (starting) and D2 (ending) to the right (to
the lower digit position).
Specified data range
D2
D1
15 1211 8 7 4 3 0 15 0 15 1211 8 7 4 3 0
D2
D1
15 1211 8 7 4 3 0 15 0 15 1211 8 7 4 3 0
0
Flag conditions
3 - 250
F113 (WBSL)
P113 (PWBSL)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
ST
11
F113
R0
10
(WBSL)
DT
DT
F113 WBSL , DT 0 , DT 9
D2
D1
D1
D2
Operands
Relay
Operand
Register
Index
register
LD FL
DT
(*1) (*2)
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Constant
D1
N/A
N/A
N/A
N/A
D2
N/A
N/A
N/A
Index
modifier
A
N/A
A
A: Available
N/A: Not Available
Explanation of example
Shifts one hexadecimal digit (4 bits) of the data range (10 words) from DT0 through DT9 to the left when
trigger R0 turns on.
Specified data range (10 words = 40 digits)
DT9
DT0
15
1211 8 7 4 3 0 15 0 15 1211 8 7 4 3 0
0
2
1
2
1
0
2
3
2
R0: on
DT9
DT0
15
1211 8 7 4 3 0 15 0 15 1211 8 7 4 3 0
2
2
1
0
2
3
2
0
1
3 - 251
Description
Shifts one hexadecimal digit (4 bits) of the data range specified by D1 (starting) and D2 (ending) to the left (to
the higher digit position).
Specified data range
D2
D1
15 1211 8 7 4 3 0 15 0 15 1211 8 7 4 3 0
D2
D1
15 1211 8 7 4 3 0 15 0 15 1211 8 7 4 3 0
0
The lower hexadecimal digit
(bit positions 0 to 3) becomes 0.
Flag conditions
3 - 252
F115 (FIFT)
P115 (PFIFT)
Outline
Program example
Boolean
Ladder Diagram
Address
Instruction
Trigger
10
ST
11
DF
R0
12
F115
10
DF
0
(FIFT)
256
DT
n
n
16-bit equivalent constant or 16- bit area for specifying the memory size of
FIFO buffer
Operands
Relay
Timer/Counter
Operand
WX WY WR WL
Index
register
Register
SV
EV
DT
LD
FL
(*1)
Constant
IX
(*2)
IY
(*3)
Index
modifier
N/A
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
When the execution condition (trigger) R0 is on, the area headed by DT0 is defined in the FIFO buffer area.
The size of the FIFO buffer (K256) is stored in DT0, the number of data items stored is stored in DT1 (with a
default value of K0), and the FIFO pointer (with a default value of H0000) is stored in DT2.
When n = K256, the 256 words from DT3 to DT258 are defined as the data storage area.
15
DT0
K256
DT1
K0
DT2
FIFO pointer
DT3
DT257
DT258
3 - 253
Description
This defines the area used as the FIFO buffer. A data storage area of n words (n = K1 to K256) is defined for
the area specified by D.
Definition of the area using the F115 (FIFT) instruction should be carried out only once, before writing to or
reading from the FIFO buffer. Normally, reading and writing are disabled while this instruction is being
executed.
When the F115 (FIFT) instruction is executed, the FIFO buffer area is defined as follows.
15
Kn
D+1
K0
D+2
D+3
FIFO pointer
0
1
Data
storage
area
(n words)
15
Writing pointer
(0 to 255/H00 to HFF)
n-2
n-1
D+2+n
Reading pointer
(0 to 255/H00 to HFF)
When the F115 (FIFT) instruction is executed, the following are stored as default values: D = n (the value
specified by the F115 (FIFT) instruction), D+1 = K0, and D+2 = H0000.
Flag conditions
3 - 254
The area specified using the index modifier exceeds the limit.
n = 0.
n > 256.
The area specified by n exceeds the limit.
F116 (FIFR)
P116 (PFIFR)
Outline
Program example
Boolean
Ladder Diagram
Address
Instruction
10
DF
12
R10
ST
11
Trigger
F116
10
(FIFR)
DF
F116 FIFR,
DT
DT 0, DT 100
DT
10
100
S
S
Operands
Relay
Timer/Counter
Operand
WX WY WR WL
Index
register
Register
SV
EV
DT
LD
FL
(*1)
Constant
IX
(*2)
IY
(*3)
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
Index
modifier
A
A
A: Available
N/A: Not Available
3 - 255
Explanation of example
When the execution condition (trigger) R10 is on, data is read from the FIFO buffer area headed by DT0, and
is stored in DT100.
When the reading pointer is 2
15
Reading DT0
pointer
DT1
K 5
K 2
DT2
(H0204)
DT3
K100
DT4
K101
DT5
K102
DT6
K103
DT7
DT100
4Writing pointer
F116 (FIFR) execution
15
DT0
K 5
DT1
K 1
DT2
(H0304)
Reading DT3
pointer
DT4
moved
DT5
K100
K101
K102
DT100
K102
DT6
K103
Read out
DT7
The contents of DT5, which is indicated by the reading pointer 2 are sent to DT100.
After the data has been read, 1 is subtracted to the contents of DT1 (the number of stored data items), and the
reading pointer moves to 3.
(The next time that reading is carried out, the contents of DT100 are sent to DT6, indicated by the 3.)
Description
These instructions read data from the FIFO buffer headed by the area specified by S, and store it in the area
specified by D.
S should specify the beginning of the FIFO buffer defined by the F115 (FIFT) instruction.
Reading of data is done starting from the address specified by the reading pointer when the instruction is
executed.
15
S+1
S+2
(0)
Reading
pointer
(n- 2)
(n- 1)
3 - 256
The reading pointer is stored in the upper eight bits of the third word of the FIFO buffer area, and is indicated
by an address in the data storage area.
The actual address is the value of the leading address in the FIFO buffer area specified by S, plus 3, plus the
value of reading pointer (the value of which only the first byte is a decimal value).
When the reading is executed, 1 is subtracted from the number of stored data items, and the reading pointer is
incremented by 1.
Notes
An error occurs if this is executed when the number of stored
data items is 0.
No data is set for D.
Reading is only carried out when the reading pointer is not
equal to the writing pointer.
If this is executed when the reading pointer is indicating the
final address in the FIFO buffer (the n defined by the FIFO
instruction minus 1), the reading pointer is set to 0.
Flag conditions
The area specified using the index modifier exceeds the limit.
The size (n) of the FIFO specified by S is n = 0, or when n > 256.
The number of stored data items of the FIFO = 0.
The number of stored data items of the FIFO >FIFO size (n).
The final address of the FIFO based on the FIFO size (n) exceeds the area.
The FIFO reading pointer > FIFO size (n).
The FIFO reading pointer is K256 (H100) or higher after the data has been
read.
3 - 257
FIFO definition
DF
R9010
X2
R900B
DF
Usage procedure
The area to be used is defined as the FIFO buffer using the F115 (FIFT) instruction. (This should be done only
once, before reading or writing is done.)
Data should be written using the F117 (FIFW) instruction, and read using the F116 (FIFR) instruction.
Writing data
When data is written, the data items are stored in sequential order, starting from the first data storage area.
The writing pointer indicates the next area to which data is to be written.
If the data storage area becomes full, further data writing is inhibited.
Reading data
When data is read, data is transferred starting from the first data item stored. The reading pointer indicates the
next area from which data is to be read.
An error occurs if an attempt is made to read data when no data has been written to the data storage area.
Example of data storage area
Reading 15
pointer
0
K100
K101
K102
2
3 Writing pointer
4
If data is written in the status shown above, the data will be stored in the area indicated by 3. The writing
pointer moves to 4 (the next data item will be written to 4).
If data is read, it will be read from the area indicated by 0. The reading pointer moves to 1 (the next data item
will be read from 1).
3 - 258
F117 (FIFW)
P117 (PFIFW)
Outline
Program example
Boolean
Ladder Diagram
Address
Instruction
10
DF
12
R10
ST
11
Trigger
F117
10
(FIFW)
DF
DT
110
DT
10
S
S
16-bit equivalent constant or 16- bit area for storing data to write in FIFO buffer
Operands
Relay
Timer/Counter
Operand
WX WY WR WL
Index
register
Register
SV
EV
DT
LD
FL
(*1)
Constant
IX
(*2)
IY
(*3)
N/A
N/A
N/A
N/A
N/A
Index
modifier
A
A
A: Available
N/A: Not Available
3 - 259
Explanation of example
When the execution condition (trigger) R10 is on, the contents of DT110 are written to the FIFO buffer area
headed by DT0.
When the writing pointer is 3
15
DT0
DT1
Read
pointer
K 5
K 3
DT2
Writing pointer
(H0003)
DT3
K100
DT4
K101
DT5
K102
DT6
K500
DT7
DT110
K103
Writing
Writing pointer
DT0
K 5
DT1
K 4
DT2
(H0004)
DT3
K100
DT4
K101
DT5
K102
DT6
K103
DT7
DT110
K103
The contents 103 of DT110 are sent to DT6, which is indicated by the pointer 3.
After the data has been written, 1 is added to the contents of DT1 (the number of stored data items), and the
writing pointer moves to 4.
(The next time that writing is carried out, the contents of DT110 are written to DT7, indicated by the 4.)
3 - 260
Description
The 16 - bit data specified by S will be stored in the FIFO buffer headed by the area specified by D.
D should specify the beginning of the FIFO buffer defined by the F115 (FIFT) instruction.
The specified data is written to the address indicated by the writing pointer when the instruction is executed.
15
D+1
D+2
(0)
Writing pointer
Data storage area
(n- 2)
(n- 1)
[S]
The writing pointer is stored in the lower eight bits of the third word of the FIFO buffer area, and is indicated by
a relative position in the data storage area.
The actual address is the value of the leading address in the FIFO buffer area specified by D, plus 3, plus the
value of writing pointer (the value of which only the lower byte is a decimal value).
When the writing is executed, 1 is added to the number of stored data items, and the writing pointer is
incremented by 1.
Notes
An error occurs if this is executed when the FIFO buffer is full
(the number of stored data items = the size n of the FIFO
defined by the FIFT instruction). Writing is inhibited.
If this is executed when the writing pointer is indicating the
final address in the FIFO buffer (the n value defined by the
FIFT instruction), the writing pointer will be set to 0.
3 - 261
Flag conditions
The area specified using the index modifier exceeds the limit.
The size (n) of the FIFO specified by D is n = 0, or when n > 256.
The number of stored data items of the FIFO > FIFO size (n).
The final address of the FIFO based on the FIFO size (n) exceeds the area.
The writing pointer of the FIFO > FIFO size (n).
The FIFO writing pointer is K256 (H100) or higher after the data has been
written.
Usage procedure
The area to be used is defined as the FIFO buffer using the F115 (FIFT) instruction. (This should be done only
once, before reading or writing is done.)
Data should be written using the F117 (FIFW) instruction, and read using the F116 (FIFR) instruction.
Writing data
When data is written, the data items are stored in sequential order, starting from the first data storage area.
The writing pointer indicates the next area to which data is to be written.
If the data storage area becomes full, further data writing is inhibited.
Reading data
When data is read, data is transferred starting from the first data item stored. The reading pointer indicates the
next area from which data is to be read.
An error occurs if an attempt is made to read data when no data has been written to the data storage area.
Example of data storage area
Reading 15
pointer
0
K100
K101
K102
2
3 Writing pointer
4
If data is written in the status shown above, the data will be stored in the area indicated by 3. The writing
pointer moves to 4 (the next data item will be written to 4).
If data is read, it will be read from the area indicated by 0. The reading pointer moves to 1 (the next data item
will be read from 1).
3 - 262
Example:
K 5
DT1
K 4
DT2
Reading
pointer DT3
0
K100
DT4
K101
DT5
K102
DT6
K103
DT7
WR0
K104
Writing
K 5
DT1
K 5
DT2
Writing pointer
DT3
K100
DT4
K101
DT5
K102
DT6
K103
DT7
K104
3 - 263
Example:
K 5
DT1
K 5
DT2
Reading
pointer DT3
0
K100
DT4
K101
DT5
K102
DT6
K103
DT7
K104
Writing
WR0
K105
4
Execution of F117 (FIFW) instruction
DT0
K 5
DT1
K 5
DT2
DT3
K100
DT4
K101
DT5
K102
DT6
K103
DT7
K104
3 - 264
DF
R9010
F60, DT0, DT1
R900B
R0
X1
R0
F117 FIFW, WR0, DT0
DF
Execute the F117 (FIFW) instruction after executing the F116 (FIFR) instruction.
X0
DF
R9010
F60, DT0, DT1
R900B
R0
X1
R0
F117 FIFW, WR0, DT0
DF
R9010
F60, DT1, K 0
R900B
R1
X2
R1
DF
R0
3 - 265
F118 (UDC)
Outline
UP/DOWN counter
Program example
Boolean
Ladder Diagram
Address
Instruction
50
50
51
52
R1 Count input
R2
=,
Reset input
DT 0,
ST
52
ST
53
F118
(UDC)
10
DT
DT 10
51
F118 UDC
DT
R0 UP/DOWN input
ST
DT 0
ST=
58
K0
Y50
DT
63
OT
50
Operands
Relay
Operand
Register
Index
register
LD FL
DT
(*1) (*2)
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Constant
Index
modifier
N/A
N/A
N/A
N/A
N/A
N/A
N/A
3 - 266
A: Available
N/A: Not Available
Explanation of example
The program on the preceding page shows an example in which initial values are set, and when the target
value is 0, external output Y50 goes on.
This can be used, for example, in programs such as those that cause a display lamp to light when the work
being added or subtracted has reached a certain quantity.
1)
When the trailing edge of rest input X2 is detected (on off), data (target value) in data register DT10 is
transferred to DT0.
2)
One is subtracted from value of DT0 when the count input R1 turns on while R0 is in the off state.
(DOWN counter operation)
One is added to DT0 when the count input R1 turns off while the UP/DOWN input R0 is in the on state.
(Up counter operation)
3)
If the counter elapsed value area DT0 = K0, external output Y50 turns on.
on
R2 off
on
R0 off
on
R1 off
on
Y50 off
Value
of DT0
Reset
Preset
Time
Description
The counter is switched between an incremental count (addition) or decremental count (subtraction) by
turning the relay specified for up/down input on or off.
When the up/down input is on, the incremental counter (+1) is effective, and when it is off, the decremental
counter ( - 1) is effective. The elapsed value is stored in the area specified by the D.
The preset value in S is transferred to D when the trailing edge of the reset input is detected (on off). Set
value range K-32768 to K32767 (H8000 to H7FFF)
When the count input is switched from off to on (the reset input is in off state), the value specified for the D is
initialized, and the counting operation begins.
The elapsed value area of D is cleared when the reset input turns on.
The results of the counting operation can be determined by comparing the elapsed value of D with the
specified value, using the data comparison instruction.
The data comparison instruction should be executed immediately following execution of F118 (UDC)
instruction.
3 - 267
No count done
Count done
When you use the F118 (UDC) instruction with one of the following instructions that changes the order of the
execution of instructions, be aware that the operation of the instructions will differ depending on the timing of
their execution and their count input.
- MC to MCE instructions
- JP to LBL instructions
- F19 (SJP) to LBL instructions
- LOOP to LBL instructions
- CNDE instruction
- Step ladder instructions
- Subroutine instructions
3 - 268
F119 (LRSR)
Shifts one bit of the 16-bit data range to the left or right.
Outline
Program example
Boolean
Ladder Diagram
50
51
52
53
50
R2
51
ST
52
ST
53
ST
54
F119
(LRSR)
DT
D2
DT 0
D1
ST
DT
R1 Data input
R3
Instruction
F119 LRSR
Left/right input
R0 (on: left, off: right)
Shift input
Address
DT
Reset input
D1
Starting 16-bit area whose one bit is shifted to the left or to the
right
D2
Ending 16-bit area whose one bit is shifted to the left or to the
right
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
IY
Index
modifier
D1
N/A
N/A
N/A
N/A
N/A
N/A
D2
N/A
N/A
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
3 - 269
Explanation of example
Left shift operation
DT9
DT0
Bit position 15 . . 12 11 . . 8 7 . . 4 3 . . 0
Data
0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1
15 . . 12 11 . . 8 7 . . 4 3 . . 0
1 0 0 0 1 0 0 0 1 0 0 0 1 1 0 0
R0: on
R2: off on
15 . . 12 11 . . 8 7 . . 4 3 . . 0
0 0 0 1 0 0 0 1 0 0 0 1 1 0 0 0
DT9
DT0
DT0
15 . .12 11 . . 8 7 . . 4 3 . . 0
1000 1000 1000 1100
R0: off
R2: off on
Bit position 15 . . 12 11 . . 8 7 . . 4 3 . . 0
1000 1000 1000 1000
Data
15 . .12 11 . . 8 7 . . 4 3 . . 0
0100 0100 0100 0110
DT9
DT0
Shifted-out bit is
transferred to
R9009 (carry flag).
Description
This shift register changes direction, either left (direction of MSB) or right (direction of LSB), in which a
shift of one bit is made, based on the on/off status of the relay specified by the left/right shift input.
The shift operation is made to the left when the left/right shift input is on, and to the right when off.
Specify D1 and D2 so they are in the same type data area and be sure to set the data area addresses so
D2.
that D1
When the shift input changes from off to on (the reset input is off), the contents of the area specified by
D1 and D2 are shifted one bit to the left or right.
When the data is shifted, 1 will be set in the empty bit left by the shift (the uppermost or lowermost bit) if
the data input is on, and 0 if the data input is off. Also, the bit extracted by the shift (the uppermost bit
for a shift to the left, and the lowermost bit for a shift to the right) will be set in the special internal relay
R9009 (carry flag).
If the reset input is on, the contents of the specified area are cleared to 0.
3 - 270
Flag conditions
Turns on and stays on when the area specified using the starting 16-bit area
(D1) is larger than the area specified by the ending 16-bit area (D2)
(when D1 > D2).
Turns on for an instant when the area specified using the starting 16-bit area
(D1) is larger than the area specified by the ending 16-bit area (D2)
(when D1 > D2).
Carry flag (R9009): Turns on for an instant when the bit shifted-out is 1.
Shift made
When you use the F119 (LRSR) instruction with one of the following instructions that changes the order of the
execution of instructions, be aware that the operation of the instructions will differ depending on the timing of
their execution and their shift input.
- MC to MCE instructions
- JP to LBL instructions
- F19 (SJP) to LBL instructions
- LOOP to LBL instructions
- CNDE instruction
- Step ladder instructions
- Subroutine instructions
3 - 271
3 - 272
F120 (ROR)
P120 (PROR)
Outline
Program example
Boolean
Ladder Diagram
Address
Instruction
10
ST
11
Trigger
F120
0
(ROR)
DT
F120 ROR , DT 0 , K 4
R0
10
D
D
16-bit area
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
(*4)
Index
modifier
N/A
N/A
n
(*1)
(*2)
(*3)
(*4)
N/A
A
A: Available
N/A: Not Available
Explanation of example
Rotates 4 bits in data register DT0 to the right when trigger R0 turns on.
Bit position 15 12 11 8 7 4 3 0
DT0
0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0
R0: on
Bit position 15 12 11 8 7 4 3 0
DT0
0 1 0 0 0 0 0 1 0 0 1 0 0 0 1 1
0
Data in bit position 3
3 - 273
Description
Rotates n bits of the 16-bit data specified by D to the right.
Example:
0 0 0 00 0 0 0
Upper 8 bits
are invalid
Range of n: K0 to K255
(H00 to HFF)
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
Carry flag (R9009): Turns on for an instant when the data in bit position n-1 is recognized as 1.
3 - 274
F121 (ROL)
P121 (PROL)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
ST
11
F121
R0
10
0
(ROL)
DT
F121 ROL , DT 0 , K 4
16-bit area
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
(*4)
Index
modifier
N/A
N/A
n
(*1)
(*2)
(*3)
(*4)
N/A
A
A: Available
N/A: Not Available
Explanation of example
Rotates 4 bits in data register DT0 to the left when trigger R0 turns on.
Bit position 15 12 11 8 7 4 3 0
DT0
0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0
R0: on
Bit position 15 12 11 8 7 4 3 0
DT0
0 0 1 0 0 0 1 1 0 1 0 0 0 0 0 1
3 - 275
Description
Rotates n bits of the 16-bit data specified by D to the left.
Example:
Bit position 15 12 11 8 7 4 3 0
D
1 0 1 0 1 0 1 0 1 0 1 0 1 0 10
0 0 0 00 0 0 0
Upper 8 bits
are invalid
Range of n: K0 to K255
(H00 to HFF)
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
Carry flag (R9009): Turns on for an instant when the data in bit position 16-n is recognized as 1.
3 - 276
F122 (RCR)
P122 (PRCR)
Rotates a specified number of bits in the specified 16-bit data to the right
together with carry flag data.
For the FP/FP - M/FP0/FP1, the P type high- level instruction
P122 (PRCR) is not available.
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
ST
11
F122
R0
10
0
(RCR)
DT
K
F122 RCR , DT 0 , K 4
D
0
4
16-bit area
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
(*4)
N/A
N/A
n
(*1)
(*2)
(*3)
(*4)
N/A
A
Index
modifier
A
A
A: Available
N/A: Not Available
Explanation of example
Rotates 4 bits in data register DT0 together with carry flag data 1 to the right when trigger R0 turns on.
Bit position 15 12 11 8 7 4 3 0
0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0
DT0
R0: on
n-1: 3 bits
Bit position 15 12 11 8 7 4 3 0
1 0 0 1 0 0 0 1 0 0 1 0 0 0 1 1
DT0
Carry flag data 1
Special internal relay
R9009 (carry flag)
0
Data in bit position 3
3 - 277
Description
Rotates n bits of the 16-bit data specified by D, including carry flag data, to the right.
Example:
When n bits with carry flag data are rotated to the right,
- The data in bit position n-1 (n th bit starting from bit position 0) is transferred to special internal relay
R9009 (carry flag).
- n bits starting from bit position 0 are shifted out to the right and then carry flag data and the n-1 bits
starting from bit position 0 are shifted into the higher bit positions of the 16-bit data specified by D.
For n, only the lower 8 bits in the 16 bit data are valid.
15
n
0 0 0 00 0 0 0
Upper 8 bits
are invalid
Range of n: K0 to K255
(H00 to HFF)
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
Carry flag (R9009): Turns on for an instant when the data in bit position n-1 is recognized as 1.
3 - 278
F123 (RCL)
P123 (PRCL)
Rotates a specified number of bits in the specified 16-bit data to the left
together with carry flag data.
For the FP/FP - M/FP0/FP1, the P type high- level instruction
P123 (PRCL) is not available.
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
ST
11
F123
R0
10
0
(RCL)
DT
F123 RCL , DT 0 , K 4
16-bit area
Operands
Relay
Operand
WX WY WR
Timer/Counter
Index
register
Register
WL
(*1)
SV
EV
DT
LD FL
(*1) (*2)
Constant
IX
(*3)
IY
(*4)
Index
modifier
N/A
N/A
n
(*1)
(*2)
(*3)
(*4)
N/A
A
A
A: Available
N/A: Not Available
Explanation of example
Rotates 4 bits in data register DT0 together with carry flag data 1 to the left when trigger R0 turns on.
Bit position 15 12 11 8 7 4 3 0
0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0
DT0
R0: on
Bit position 15 12 11 8 7 4 3 0
DT0
0 0 1 0 0 0 1 1 0 1 0 0 1 0 0 0
Carry flag data 1
Special internal relay
R9009 (carry flag)
3 - 279
Description
Rotates n bits of the 16-bit data specified by D, including carry flag data, to the left.
Example:
Bit position 15 12 11 8 7 4 3 0
D
1 0 1 0 1 0 1 0 1 0 1 0 1 0 10
When n bits with carry flag data are rotated to the left,
- The data in bit position 16-n (n th bit starting from bit position 15) is transferred to special internal
relay R9009 (carry flag).
- n bits starting from bit position 15 are shifted out to the left and then carry flag data and the n-1 bits
starting from bit position 15 are shifted into the lower bit positions of the 16-bit data specified by D.
For n, only the lower 8 bits in the 16 bit data are valid.
15
n
0 0 0 00 0 0 0
Upper 8 bits
are invalid
Range of n: K0 to K255
(H00 to HFF)
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
Carry flag (R9009): Turns on for an instant when the data in bit position 16-n is recognized as 1.
3 - 280
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
11
R0
10
F125 DROR,
DT10,
F125
DT
K4
ST
(DROR)
10
Operands
Relay
Timer/Counter
Index
register
Register
Operand
SV
WX WY WR WL
EV
DT
LD
FL
(*1)
N/A
Constant
K
N/A
Index Integer
modifier device
A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
Rotates 4 bits in data registers DT11 and DT10 to the right when trigger R0 turns on.
When 4 bits are rotated to the right, the data in bit position 3 is transferred to special internal relay R9009
(carry flag).
31
[DT11, DT10]
28 27
8 7
1010
1100
43
1011
CY
R0: on
[DT11,DT10]
1011
1010
1100
3 - 281
Description
Rotates n bits of the 32-bit data specified by D to the right when the trigger turns on.
[D+1]
15
[D]
0 15
Trigger:
on
CY
0 0 0 0
0 0 0 0
Flag conditions
Error flag (R9007):
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Error flag (R9008): Turns on for an instant when the area specified using the index modifier
exceeds the limit.
Carry flag (R9009): Content in the nth bit from LSB (least significant bit) turns on for an instant
when the data in bit position n-1 is recognized as 1.
3 - 282
Outline
Program example
Boolean
Ladder Diagram
Address
Instruction
10
ST
11
Trigger
F126
R0
DT
10
F126 DROL,
DT10,
K4
(DROL)
10
Operands
Relay
Timer/Counter
Operand
WX WY WR WL
Index
register
Register
SV
EV
DT
FL
LD
(*1)
N/A
Constant
K
N/A
Index Integer
modifier device
A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
Rotates 4 bits in data registers DT11 and DT10 to the left when trigger R0 turns on.
The data in bit position 28 is transferred to special internal relay R9009 (carry flag).
31
28 27
24 23 4 3
[DT11, DT10] 1 0 1 0 1 1 0 0
R0: on
1 0 1 1
CY
[DT11, DT10]
1100
1011
1010
3 - 283
Description
Rotates n bits of the 32-bit data specified by D to the left when the trigger turns on.
[D+1]
15
[D]
0 15
Trigger:
on
CY
Content of MSB
When n bits are rotated to the left,
- The data in bit position 32-n (nth bit starting from bit position 31) is transferred to special internal
relay R9009 (carry flag).
- n bits starting from bit position 31 are shifted out to the left and then shifted into the lower bit
positions of the 16-bit data specified by D.
Only the lower eight bits of the 16-bit data n are effective.
15
0 0 0 0
0 0 0 0
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Error flag (R9008): Turns on for an instant when the area specified using the index modifier
exceeds the limit.
Carry flag (R9009): Content in the nth bit from MBS (most significant bit) turns on for an instant
when the data in bit position 32-n is recognized as 1.
3 - 284
F127 (DRCR) 32-bit data right rotation with carry flag data
P127 (PDRCR)
Rotates a specified number of bits in the specified 32-bit data to the right
together with carry flag data.
For the FP/FP - M/FP0/FP1, the P type high- level instruction
P127 (PDRCR) is not available.
Outline
Program example
Boolean
Ladder Diagram
Address
Instruction
10
ST
11
Trigger
F127
DT
R0
10
F127 DRCR,
DT10,
(DRCR)
10
K4
Operands
Relay
Timer/Counter
Operand
WX WY WR WL
Index
register
Register
SV
EV
DT
FL
LD
(*1)
N/A
Constant
K
N/A
Index Integer
modifier device
A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
Rotates 4 bits in data registers DT11 and DT10 together with carry flag data to the right when trigger R0 turns
on.
The data in bit position 3 is transferred to the carry flag (special internal relay R9009).
The data of the carry flag (special internal relay R9009) is transferred to the bit position 28.
31
28 27
Carry flag
43
1100 0
[DT11, DT10] 1 0 1 0
8 7
011
@
Carry flag
[DT11, DT10]
R0: on
0
0111
1010
1100
3 - 285
Description
Rotates n bits of the 32-bit data specified by D, including carry flag data, to the right when the trigger turns
on.
[D+1]
15
[D]
0 15
0
Carry flag
Trigger:
on
Data in bit position 0 of D
When n bits with carry flag data are rotated to the right,
- The data in bit position n-1 (nth bit starting from bit position 0) is transferred to special internal relay
R9009 (carry flag).
- n bits starting from bit position 0 are shifted out to the right and then carry flag data and the n-1 bits
starting from bit position 0 are shifted into the higher bit positions of the 32-bit data specified by D.
Only the lower eight bits of the 16-bit data n are effective.
15
0 0 0 0
Upper 8 bits
are invalid
0 0 0 0
K0 to K255(H00 to HFF)
When n is specified using K0, the contents of D+1 and D and the carry flag do not change.
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Error flag (R9008): Turns on for an instant when the area specified using the index modifier
exceeds the limit.
Carry flag (R9009): Content in the nth bit from LSB (least significant bit) turns on for an instant
when the data in bit position n-1 (nth bit starting from bit position 0) is
recognized as 1.
3 - 286
F128 (DRCL) 32-bit data left rotation with carry flag data
P128 (PDRCL)
Rotates a specified number of bits in the specified 32-bit data to the left
together with carry flag data.
For the FP/FP - M/FP0/FP1, the P type high- level instruction
P128 (PDRCL) is not available.
Outline
Program example
Boolean
Ladder Diagram
Address
Instruction
10
ST
11
Trigger
F128
DT
R0
10
0
(DRCL)
10
K4
Operands
Relay
Timer/Counter
Operand
WX WY WR WL
Index
register
Register
SV
EV
DT
FL
LD
(*1)
N/A
Constant
K
N/A
Index Integer
modifier device
A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
Rotates 4 bits in data registers DT11 and DT10 together with carry flag data to the left when trigger R0 turns
on.
The data in bit position 28 is transferred to carry flag (special internal relay R9009).
The data of the carry flag is transferred to the bit position 3.
31
[DT11, DT10]
28 27
101 0
24 23
4 3
1100
1011
@
Carry flag
[DT11, DT10]
Carry flag
1100
1011
R0: on
1101
3 - 287
Description
Rotates n bits of the 32-bit data specified by D, including carry flag data, to the left when the trigger turns on.
[D+1]
Carry flag
15
[D]
0 15
Trigger:
on
Content of MSB
When n bits with carry flag data are rotated to the left,
- The data in bit position 32-n (nth bit starting from bit position 31) is transferred to special internal
relay R9009 (carry flag).
- n bits starting from bit position 31 are shifted out to the left and then carry flag data and the n-1 bits
starting from bit position 31 are shifted into the lower bit positions of the 32-bit data specified by D.
Only the lower eight bits of the 16-bit data n are effective.
15
0 0 0 0
0 0 0 0
Flag conditions
Error flag (R9007):
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Error flag (R9008): Turns on for an instant when the area specified using the index modifier
exceeds the limit.
Carry flag (R9009): Content in the nth bit from MSB (most significant bit) turns on for an instant
when the data in bit position 31-n is recognized as 1.
3 - 288
F130 (BTS)
P130 (PBTS)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
ST
11
F130
R0
10
0
(BTS)
DT
DT
F130 BTS , DT 0 , DT 2
D
D
16-bit area
Operands
Relay
Operand
WX WY WR
Timer/Counter
Index
register
Register
WL
(*1)
SV
EV
DT
LD FL
(*1) (*2)
Constant
IX
(*3)
IY
(*4)
Index
modifier
N/A
N/A
n
(*1)
(*2)
(*3)
(*4)
N/A
A
A: Available
N/A: Not Available
Explanation of example
Turns on bit position specified by DT2 in data register DT0 when trigger R0 turns on.
When the DT2 = K7, as shown below.
[n] DT2: K7
[D]
Bit position 15 12 11 8 7 4 3 0
0 1 0 0 0 0 1 1 0 0 1 0 0 0 0 1
DT0
R0: on
Bit position 15 12 11 8 7 4 3 0
0 1 0 0 0 0 1 1 1 0 1 0 0 0 0 1
DT0
[D]
Bit position 7 is turned on (1) when R0 turns on.
(Bits other than the specified bit do not change.)
3 - 289
Description
Turns on the bit of 16-bit data specified by D and n.
Bits other than the specified bit do not change.
The n is decimal data specifying the bit position to be turned on. Range of n: K0 to K15
Bit position 15 12 11 8 7 4 3 0
n
The data in bit
positions 4 through 15
are invalid.
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
3 - 290
F131 (BTR)
P131 (PBTR)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
ST
11
F131
R0
10
0
(BTR)
DT
DT
F131 BTR , DT 0 , DT 2
D
D
16-bit area
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
(*4)
Index
modifier
N/A
N/A
n
(*1)
(*2)
(*3)
(*4)
N/A
A
A: Available
N/A: Not Available
Explanation of example
Turns off the bit specified by DT2 of data register DT0 when trigger R0 turns on.
When the DT2 = K7, as shown below.
[n] DT2: K7
Bit position 15
[D]
DT0
12 11 8 7 4 3 0
1 1 0 1 1 1 0 0 1 0 1 1 1 0 1 0
R0: on
Bit position 15 12 11 8 7 4 3 0
1 1 0 1 1 1 0 0 0 0 1 1 1 0 1 0
[D]
DT0
Bit position 7 is turned off (0) when R0 turns on.
(Bits other than the specified bit do not change.)
3 - 291
Description
Turns off the bit of 16-bit data specified by D and n.
Bits other than the specified bit do not change.
The n is decimal data specifying the bit position to be turned off. Range of n: K0 to K15
Bit position 15 12 11 8 7 4 3 0
n
The data in bit
positions 4 through 15
are invalid.
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
3 - 292
F132 (BTI)
P132 (PBTI)
Outline
Program example
Boolean
Ladder Diagram
Address
Instruction
10
ST
11
Trigger
F132
0
(BTI)
DT
F132 BTI , DT 0 , DT 10
DT
R0
10
10
D
D
16-bit area
Operands
Relay
Operand
WX WY WR
Timer/Counter
Index
register
Register
WL
(*1)
SV
EV
DT
LD FL
(*1) (*2)
Constant
IX
(*3)
IY
(*4)
Index
modifier
N/A
N/A
n
(*1)
(*2)
(*3)
(*4)
N/A
A
A: Available
N/A: Not Available
Explanation of example
Inverts the state of bit specified by DT10 in data register DT0 when trigger R0 turns on.
When the DT10 = K7, as shown below.
[n] DT10: K7
[D]
Bit position 15 12 11 8 7 4 3 0
0 0 0 0 0 0 0 1 0 0 1 1 0 0 1 0
DT0
R0: on
[D]
Bit position 15 12 11 8 7 4 3 0
0 0 0 0 0 0 0 1 1 0 1 1 0 0 1 0
DT0
Condition of bit position 7 is inverted [off (0) on (1)] when R0 turns on.
3 - 293
Description
Inverts [off (0) on (1) or on (1) off (1)] the state at bit position specified by n in the 16-bit area specified
by D.
Bits other than the specified bit are not inverted.
The n is decimal data specifying the bit position to be inverted. Range of n: K0 to K15
Bit position 15 12 11 8 7 4 3 0
n
0 0 0 0
The data in bit
positions 4 through 15
are invalid.
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
3 - 294
F133 (BTT)
P133 (PBTT)
Checks the state [on (1) or off (0)] of the specified bit in 16-bit data.
For the FP/FP - M/FP0/FP1, the P type high- level instruction P133
(PBTT) is not available.
Outline
Program example
Boolean
Ladder Diagram
Address
10
R0
ST
11
Trigger
10
Instruction
R
F133
0
(BTT)
DT
DT
F133 BTT , DT 0 , DT 2
0
2
16
16
R10
R900B
ST
17
AN
R 900B
18
R0
OT
10
16-bit area
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
(*4)
Index
modifier
N/A
N/A
n
(*1)
(*2)
(*3)
(*4)
N/A
A
A: Available
N/A: Not Available
Explanation of example
Checks the state [on (1) or off (0)] of bit specified by DT2 in data register DT0 when trigger R0 turns on. If bit
specified by DT2 is in the off (0) state, internal relay R10 goes on.
When the DT2 = K7, as shown below.
[n] DT2:K7
[D]
Bit position 15 12 11 8 7 4 3 0
0 1 0 0 0 0 1 1 0 0 1 0 0 0 0 1
DT0
The state of bit position 7 is checked.
If bit position 7 is in the off state (0), R900B turns on and internal relay R10 goes on.
3 - 295
Description
Checks the state [on (1) or off (0)] of bit position specified by n in the 16-bit data specified by D. The judgment
result is output to special internal relay R900B (=flag).
The specified bit is checked by special internal relay R900B.
- When the specified bit is on (1), special internal relay R900B (= flag) turns off.
- When the specified bit is off (0), special internal relay R900B (= flag) turns on.
The n is decimal data specifying the bit position to be checked. Range of n: K0 to K15
Bit position 15 12 11 8 7 4 3 0
0 0 0 0
n
The data in bit positions
4 through 15 are invalid.
Precaution when the judgement flag R900B is used two or more times
The judgment flag R900B is updated each time an operation instruction or comparison instruction is
executed.
If the judgment flag is used two or more times,
- the program in which the judgment flag is used should be input immediately following the instruction
which executes the judgment.
- the flag should be output to output relays or internal relays for each separate instruction.
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
= flag (R900B):
Turns on for an instant when the specified bit to be checked is in the off (0)
state.
3 - 296
F135 (BCU)
P135 (PBCU)
Counts the number of bits in the on (1) state in the specified 16-bit data.
For the FP/FP - M/FP0/FP1, the P type high- level instruction P135
(PBCU) is not available.
Outline
Program example
Boolean
Ladder Diagram
Address
10
R0
ST
11
Trigger
10
Instruction
R
F135
0
(BCU)
DT
10
DT
20
S
S
16-bit area (destination) for storing the number of bits in the on (1) state
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
(*4)
Index
modifier
D
(*1)
(*2)
(*3)
(*4)
A
N/A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
Counts the number of bits in the on (1) state in data register DT10 when trigger R0 turns on. The number of on
(1) bits is stored in data register DT20.
DT10
Bit position 15 12 11 8 7 4 3 0
Binary data 0 0 0 0 0 0 0 1 0 0 1 1 0 1 0 1
The number of on (1) bits is 5.
3 - 297
Description
Counts the number of bits in the on (1) state in the 16-bit data specified by S. The counted result (number of on
(1) bits) is stored in the 16-bit area specified by D.
The results are stored in decimal number.
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
3 - 298
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
10
Instruction
10
11
R0
ST
F136
(DBCU)
DT
10
DT
20
16-bit area (destination) for storing the number of bits in the on (1) state
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
Index
modifier
N/A
N/A
N/A
N/A
N/A
A
A: Available
N/A: Not Available
Explanation of example
Counts the number of bits in the on (1) state in data register DT11 and DT10 when trigger R0 turns on. The
number of on (1) bits is stored in data register DT20.
DT11
DT10
Bit position 15 12 11 8 7 4 3 0 15 12 11 8 7 4 3 0
Binary data 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 1 1 0 1 1 0
The number of on (1) bits is 9.
3 - 299
Description
Counts the number of bits in the on (1) state in the 32-bit data specified by S. The counted result (number of on
(1) bits) is stored in the 16-bit area specified by D.
The results are stored in decimal number.
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
3 - 300
F137 (STMR)
Sets the 16 - bit on - delay timer for 0.01 s units (0.01 to 327.67 s)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
10
Instruction
10
11
R5
R0
F137 STMR ,
ST
F137
(STMR)
DT
10
DT
DT10 , DT20
S
20
OT
16
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
(*4)
D
(*1)
(*2)
(*3)
(*4)
A
N/A
N/A
N/A
N/A
N/A
Index
modifier
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
When the execution condition (trigger) has been fulfilled, the auxiliary timer is activated, and when the value
stored in DT10 x 0.01 seconds has elapsed, R5 goes on.
Description
This functions as a 0.01 - second unit on delay timer. When the execution condition (trigger) is on, subtraction
is carried out for the specified time, and when the elapsed value D reaches 0, the special internal relay R900D
turns on. (The special internal relay R900D turns off when the execution condition (trigger) is off, and while
subtraction is being carried out.)
With FP3 CPU Ver. 4.0 or later and FP2/FP2SH/FP10SH, the OT instruction can be stated immediately
following the auxiliary timer. When the execution condition (trigger) goes on, the set time is subtracted, and
when the elapsed value D reaches 0, the relay being used with the OT instruction goes on at the same time
that the special internal relay R900D goes on.
When the execution condition (trigger) is off, the elapsed value area is cleared to 0, and relays being used are
turned off by the OT instruction.
3 - 301
When the time set for the special internal relay R900D has elapsed, the relay is turned on.
R900D can also be used as a timer contact. (The relay is off when the execution condition (trigger) is off, and
while subtraction is being carried out.)
R0
R900D
R5
When the execution condition (trigger) R0 changes from off to on, the set value specified by the S is
sent to the elapsed value area D.
R0
R5
F137 STMR, DT10, DT20
DT10
K500
1
R900D
F0 MV, DT30, DT40
S
Sent to D.
DT20
K500
If the execution condition (trigger) R0 stays on, every scan, the value in the elapsed value area D is
subtracted.
R0
R5
F137 STMR, DT10, DT20
R900D
F0 MV, DT30, DT40
DT20
K500
2 Subtraction
499
498
497
next page
3 - 302
If the value in the elapsed value area D reaches 0, relay being used is turned on by the OT instruction
which comes next in the program. The special internal relay R900D also goes on at this point.
R0
R5
F137 STMR, DT10, DT20
DT20
0
R900D
F0 MV, DT30, DT40
3
Subtraction completed
(a)
R900D
R1
(b)
Pair
R900D
Y11
Pair
When timer (a), which is activated by R0 turns on, expires, Y10 goes on. When timer (b), which is activated by
R1 turns on, expires, Y11 goes on.
Describe the program as shown below will result in incorrect operation.
X0
F137 STMR, DT10, DT20
X1
F137 STMR, DT30, DT40
R900D
Y10
R900D
Y11
3 - 303
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
10
Instruction
10
R0
F138 HMSS ,
ST
11
F138
(HMSS)
DT
DT
DT 0 , DT10
S
10
Starting 16-bit area for storing hours, minutes, and seconds data (source)
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
Index
modifier
N/A
N/A
N/A
N/A
N/A
N/A
N/A
A
A: Available
N/A: Not Available
Explanation of example
Converts the hour, minute, and second data stored in data registers DT1 and DT0 to seconds data when
trigger R0 turns on. The converted seconds data is stored in data registers DT11 and DT10.
DT0
0
Hours data
Minutes data
Seconds data
DT10
0
Seconds data
3 - 304
Description
Converts the hour, minute, and second data stored in the 32-bit area specified by S to seconds data. The
converted seconds data is stored in the 32-bit area specified by D.
Composition of data
Format of S+1 and S
32 bits (2 words) S+1 and S are allocated to express hour, minute, and second data. The data is expressed
in BCD format.
The BCD H data should be used for setting the hour (4 digits), minute (2 digits), and second (2 digits) data as
follows. (The max. time data that can be specified is 9,999 hours, 59 minutes and 59 seconds.)
BCD 8 digits (2 words)
S+1
Example:
D+1
H
Converted seconds data: H00000000 to H99999999 (BCD)
Example:
Note
The maximum time data that can be specified is 9,999 hours, 59
minutes and 59 seconds, so the maximum value of the time data
Flag conditions
Program example
Boolean
Ladder Diagram
Address
Instruction
10
ST
11
Trigger
F139
R0
10
F139 SHMS ,
(SHMS)
DT
DT
DT 0 , DT10
10
S
S
Starting 16-bit area for storing converted hours, minutes, and seconds data
(destination)
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
N/A
N/A
N/A
N/A
N/A
N/A
N/A
Index
modifier
A
A
A: Available
N/A: Not Available
Explanation of example
Converts the seconds data stored in data registers DT1 and DT0 to hour, minute, and second data when
trigger R0 turns on. The converted hour, minute, and second data is stored in data registers DT11 and DT10.
DT0
0
Seconds data
F139 (SHMS) instruction execution
DT10
0
Hours data
3 - 306
Minutes data
Seconds data
Description
Converts the seconds data stored in the 32-bit area specified by S to hour, minute, and second data. The
converted hour, minute, and second data is stored in the 32-bit area specified by D.
Composition of data
Format of S+1 and S
32 bits (2 words) S+1 and S are allocated to express the seconds data. The data is expressed in BCD
format.
The BCD H data (8 digits) should be used for setting seconds data as follows:
BCD 8 digits (2 words)
S+1
H
Seconds data: H00000000 to H35999999 (BCD)
Example:
Note
The maximum value that can be stored in D is 9,999 hours, 59
minutes and 59 seconds, so the maximum value that can be
specified for the time data for the seconds unit is 35,999,999
seconds.
Format of D+1 and D
32 bits (2 words) D+1 and D are allocated to express the converted hours, minutes and seconds data.
The converted hours (4 digits), minutes (2 digits) and seconds (2 digits) data is expressed in BCD format as
follows:
BCD 8 digits (2 words)
D+1
H
Converted seconds data: H00 to H59 (BCD)
Converted minutes data: H00 to H59 (BCD)
Converted hours data: H0000 to H9999 (BCD)
Example:
3 - 307
Flag conditions
3 - 308
F140 (STC)
P140 (PSTC)
Outline
Program example
Ladder Diagram
R0
Instruction
10
ST
11
Trigger
10
Boolean
Address
F140
0
(STC)
F140 STC
Description
Special internal relay R9009 (carry flag) goes on.
Flag condition
Carry flag (R9009): Turns on when this instruction is executed.
3 - 309
F141 (CLC)
P141 (PCLC)
Outline
Program example
Ladder Diagram
R0
F141 CLC
Flag condition
Carry flag (R9009): Turns off when this instruction is executed.
ST
11
Description
3 - 310
Instruction
10
Trigger
10
Boolean
Address
F141
0
(CLC)
F142 (WDT)
P142 (PWDT)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
10
Instruction
10
11
R0
F142 WDT ,
ST
F142
K
K 128
0
(WDT)
128
S
Constant for specifying the watching dog timer value
Operands
Relay
Operand
Timer/Counter
Register
WX WY WR WL
S
SV
EV
DT
LD
FL
N/A
N/A
Index
register
Constant
IX
IY
N/A
N/A
Explanation of example
Index
modifier
N/A
A: Available
N/A: Not Available
The watching dog timer value is changed to K128 (12.8 ms) when R0 turns on.
Description
This is a set value specified by S, and presets the time - out time for the operation delay watching dog timer.
Operation processing blocks which occur after a preset specified by this instruction will be monitored at the
time - out time specified here.
S can be specified within the ranges given below.
K4 to K6400
The time - out time is S 0.1(ms)
Example:
The time - out time of operation delay watching dog timer is updated at the start of each scan by referring to
system register 30.
If you need to change the time - out time of watching dog timer for all scans, change the value in system
register 30.
Using the F142 (WDT)/P142 (PWDT) instruction, you can change the time - out time (watching dog timer
value) only for that scan.
3 - 311
3 - 312
FP0/FP
F143 (IORF)
Availability
FP0/FP
Outline
Program example
Boolean
Ladder Diagram
Address
Input update
Trigger
10
10
D1
R10
Instruction
11
F143
(IORF)
WX
WX
D2
ST
F143 IORF , WX 0 , WX 0
Output update
R20
F143 IORF , WY 0 , WY 0
20
D1
20
ST
21
F143
(IORF)
WY
WY
D2
D1
20
D2
10
Operands
Relay
Operand
Timer/Counter Register
WX WY WR
Index
register
Constant
SV
EV
DT
Index
modifier
D1
N/A
N/A
N/A
N/A
N/A
N/A
N/A
D2
N/A
N/A
N/A
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
Updates external input relays WX0 (X0 to XF) immediately when the execution condition (trigger) R10 turns
on and updates external output relays WY0 (Y0 to YF) immediately when the execution condition (trigger)
R20 turns on.
Description
Updates the external inputs X and external outputs Y specified by D1 and D2 immediately even in the
program execution stage.
Refreshing (Updating) initiated by the F143 (IORF) instruction is done only for the control unit.
With input refreshing (updating), WX0 should be specified for [D1] and [D2].
With output refreshing (updating), WY0 should be specified for [D1] and [D2].
For FP0, I/O refreshing (updating) is not possible with expansion units.
3 - 313
F143 (IORF)
FP1/FPM
Availability
FP1/FP - M
Outline
Program example
Boolean
Ladder Diagram
Address
Input update
Trigger
10
10
D1
R10
Instruction
F143
(IORF)
WX
WX
D2
ST
11
F143 IORF , WX 0 , WX 3
ST
21
F143
(IORF)
WY
WY
D2
D1
20
D2
10
20
Output update
R20
F143 IORF , WY 0 , WY 5
20
D1
Operands
Relay
Operand
Timer/Counter Register
WX WY WR
Index
register
Constant
SV
EV
DT
IX
IY
Index
modifier
D1
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
D2
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
Updates external input relays WX0 to WX3 (X0 to X3F) immediately when the trigger R10 turns on and
updates external output relays WY0 to WY5 (Y0 to Y5F) immediately when the trigger R20 turns on.
Output updating when the trigger R20 turns on.
Y0 to Y7
Y30 to Y37
FP1 C24
E16
I/O
X0 to XF
X30 to X37
Y50 to Y53
E8
I/O
X50 to X53
3 - 314
FP1/FPM
Description
Updates the external inputs X and external outputs Y specified by D1 and D2 immediately after the trigger
turns on even in the program execution stage.
The input processing is carried out when the D1 and D2 are specified WX. The output processing is carried
out when the D1 and D2 are specified WY.
The F143 (IORF) instruction is available for FP1 control units, FP1 expansion units, FP - M control boards,
and FP - M expansion I/O boards.
It is not available for FP1 intelligent units and FP - M intelligent boards, including the I/O link board.
The same type of operand should be specified for D1 and D2.
Specify the word address as D1
D2
Set the same word address in D1 and D2 to update only one word.
3 - 315
FP2/FP2SH/FP3/FP10SH
F143 (IORF)
P143 (PIORF)
Availability
FP2/FP2SH/FP3/FP10SH
Outline
Program example
Boolean
Ladder Diagram
Address
10
R10
F143 IORF ,
K0,
D1
ST
11
Trigger
10
Instruction
R
F143
10
(IORF)
K1
D2
D1
D2
Operands
Relay
Operand
Timer/Counter
Register
WX WY WR WL
SV
EV
DT
D1
N/A
N/A
D2
N/A
N/A
LD
FL
Index
register
Constant
IX
IY
N/A
N/A
N/A
N/A
Explanation of example
Index
modifier
A
A
A: Available
N/A: Not Available
Updates the input and output relay of word no. 0 to 1 (2 words, 32 points) immediately when the trigger R10
turns on.
When the configuration shown below is being used:
When the instruction is executed, the WX0 (X0 to XF) input processing and the WY1 (Y10 to Y1F) output
processing are carried out.
3 - 316
1
16- point output unit
CPU
0
16- point input unit
Outline
4 (Slot no.)
FP2/FP2SH/FP3/FP10SH
Description
Updates the input and output relays (X and Y) specified by D1 and D2 immediately even in the program
execution stage.
Refreshing (updating) initiated by the F143 (IORF) instruction is done only for the unit on the master and
expansion backplanes. No update is performed for the input/output relay of the MEWNET-F (remote I/O)
system slave station.
How to specify D1 and D2:
- Set the starting address D1 and the ending address D2 (D1
- Specify the word address with K0
D1
D2
D2).
K255.
- Set the same word address in both D1 and D2 to update only one word.
3 - 317
F144 (TRNS)
FP0
Availability
FP0
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
10
DF
12
DF
ST
11
R0
10
Instruction
F144
DT
F144 TRNS,
(TRNS)
100
DT 100, K 8
S
Operands
Relay
Operand
Timer/Counter Register
Index
register
Constant
Index
modifier
WX WY WR
S
n
3 - 318
SV
EV
DT
N/A
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
FP0
Description
Use this instruction for communication (transmission and reception) of command and data when an external
device (personal computer, measuring instrument, bar code reader, etc.) is connected to the RS232C port.
Transmission
The n bytes of the data stored in the data table with the starting area specified by S are transmitted from the
RS232C port to an external device by serial transmission.
A start code and end code can be automatically added before transmission.
Reception
Reception is controlled by the reception completed flag (R9038) being turned on and off.
When the reception completed flag (R9038) is off, the data sent to the RS232C port is stored in the reception
buffer specified in system registers 417 and 418.
When an F144 (TRNS) instruction is executed, the reception completed flag (R9038) goes off.
DF
R9032
When executed when computer link is selected, the setting will change to general purpose port.
R0
DF
R9032
Set to H8000.
Note
When the power is turned on, the port use will revert to the
setting of system register 412.
Flag conditions
3 - 319
FP0
[S+1]
[S+2]
2n
2n - 1
Write the transmission data to the transmission data storage area selected with S (from the second word on)
using an F0 (MV) or F95 (ASC) instruction.
- Do not include an end code in the transmission data as it will be added automatically.
- If the start code is set to Yes, do not include a start code in the transmission data as it will be added
automatically.
- There is no restriction on the number of bytes [n] that can be transmitted. Following the initial area of
the data [S], transmission is possible up to the data range that can be used by the data register.
When the F144 (TRNS) instruction is executed, the number of data bytes not yet transmitted is stored in the
starting area of the data table.
Note
Take care that the transmission data table and reception buffer
areas (set in system registers 417 and 418) do not overlap.
Example:
Transmitting the eight characters A, B, C , D, E, F, G and H (8
bytes of data)
In this example, the data table is DT100 to DT104.
DT100
K8
DT101
H42
(B)
H41
(A)
DT102
H44
(D)
H43
(C)
DT103
H46
(F)
H45
(E)
DT104
H48
(H)
H47
(G)
Data is transmitted
in order from the
lower byte.
FP0
Program
Select the starting address of the transmission data table with S and the number of transmission data bytes
with n.
R0
R1
DF
Operation
If the execution condition (trigger) for the F144 (TRNS) instruction is on when sending completed flag
(R9039) goes on, operation will proceed as follows:
1) The n is preset in S (the number of bytes not yet transmitted). Furthermore, reception completed
flag (R9038) is turned off and the reception data number is cleared to zero.
2) The data in the data table is transmitted in order from the lower byte in S+1.
- As each byte is transmitted, the value in S (the number of bytes not yet transmitted) decrements by 1.
- During transmission, the sending completed flag (R9039) goes off.
- If the start code STX is set to Yes using system register 413, the start code will be automatically
added to the beginning of the data.
- The end code selected is automatically added to the end of the data.
DT101
Sending data
Number of bytes not
8
yet transmitted (DT100)
DT102
DT103
DT104
H (CR)
R9039
on
off
Trigger R1
on
off
F144 (TRNS)
execution
3) When the specified quantity of data has been transmitted, the value in S (the number of bytes not yet
transmitted) will be zero and the sending completed flag (R9039) will go on.
Example:
Program for transmitting 8 bytes of data without an end code
R0
DF
Set to K - 8.
3 - 321
FP0
Area used
for storing
received
data
Number of words
specified in system
register 418
Reception buffer
Word
(address) 0
2n
2n - 1
Each time data is received, the amount of data received (number of bytes) is stored as a count in the leading
address of the reception buffer. The initial value is zero.
The data received is stored in order in the reception data storage area beginning from the lower byte of the
second word of the area.
3 - 322
FP0
Example:
Reception of the eight characters A, B, C, D, E, F, G, and H (8
bytes of data) from an external device
The reception buffer is DT200 to DT204 in this example.
System register settings are as follows:
- System register 417: K200
- System register 418: K5
DT200
K8
DT201
H42
(B)
H41
(A)
DT202
H44
(D)
H43
(C)
DT203
H46
(F)
H45
(E)
DT204
H48
(H)
H47
(G)
Program
When reception of data from an external device has been completed, the reception completed flag (R9038)
goes on and further reception of data is not allowed.
To receive more data, an F144 (TRNS) instruction must be executed to turn off the reception completed flag
(R9038) and clear the byte number to zero.
R0
F144 TRNS, DT100, K 0
3 - 323
FP0
Operation
When the reception completed flag (9038) is off and data is sent from an external device, operation will
proceed as follows. (After RUN, R9038 is off during the first scan.)
1) The data received is stored in order in the reception data storage area of reception buffer beginning
from the lower byte of the second word of the area.
Start and end codes will not be stored.
With each one byte received, the value in the leading address of the reception buffer is incremented
by 1.
Reception operation
Reopening
start
Received data
Number of bytes 0
received
on
R9038
off
Trigger R0
F144 (TRNS)
execution
B T (CR)
2 20
U
0
on
off
Reception
possible
Reception Reception
not
possible
possible
2) When an end code is received, the reception completed flag (R9038) goes on. After this, no further
reception of data is allowed.
3) When an F144 (TRNS) instruction is executed, the reception completed flag (R9038) goes off and
the number of received data bytes is cleared to zero. Further data received is stored in order in the
reception data storage area beginning from the lower byte of the second word of the area.
Note
For repeated reception of data, refer to the following procedure 1)
to 5).
1) Receive data
2) Reception completed (R9038: on, Reception: not allowed)
3) Process received data
4) Execute F144 (TRNS) instruction (R9038: off, Reception: enable)
5) Receive further data
3 - 324
FP1/FPM
F144 (TRNS)
Availability
FP1/FP - M
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
11
10
DF
DF
12
R0
ST
F144
DT
F144 TRNS,
(TRNS)
100
DT 100, K 8
S
Operands
Relay
Operand
Timer/Counter Register
Index
register
Constant
Index
modifier
WX WY WR
S
n
SV
EV
DT
N/A
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
3 - 325
FP1/FPM
Transmission
The n bytes of the data stored in the data table with the starting area specified by S are transmitted from the
RS232C port to an external device by serial transmission.
A start code and end code can be automatically added before transmission.
RS232C port
Transmission
External device
(Personal computer)
Reception
Reception is controlled by the reception completed flag (R9038) being turned on and off.
When reception completed flag (R9038) is off, the data sent to the COM. port or RS232C port is stored in the
reception buffer selected in system registers 417 and 418. When an F144 (TRNS) instruction is executed,
reception completed flag (R9038) goes off.
RS232C port
Reception
External device
(Bar code reader)
Flag conditions
Switching the use of RS232C port (for CPU Ver. 2.9 or later)
To switch between computer link communication and serial data communication (general purpose port),
execute an F144 (TRNS) instruction. Set n (the number of transmission bytes) to H8000, and then execute
the instruction.
R0
Set to H8000.
When executed when computer link is selected, the setting will change to general purpose port.
Note
When the power is turned on, the port use will revert to the
setting of system register 412.
3 - 326
FP1/FPM
Set value
H0
H1
H2
H3
H4
H5
H6
Baud rate
19,200 bps
9,600 bps
4,800 bps
2,400 bps
1,200 bps
600 bps
300 bps
3 - 327
FP1/FPM
Number of
bytes received
Area used
for storing
received
data
3 - 328
Number of words
specified in system
register 418
FP1/FPM
[S+1]
[S+2]
2n
2n - 1
Write the transmission data to the transmission data storage area selected with S (from the second word on)
using an F0 (MV) or F95 (ASC) instruction.
- Do not include an end code in the transmission data as it will be added automatically.
- If the start code is set to Yes, do not include a start code in the transmission data as it will be added
automatically.
When the F144 (TRNS) instruction is executed, the number of data bytes not yet transmitted is stored in the
starting area of the data table.
Note
Take care that the transmission data table and reception buffer
areas (set in system registers 417 and 418) do not overlap.
Example:
Transmitting the eight characters A, B, C , D, E, F, G and H (8
bytes of data)
In this example, the data table is DT100 to DT104.
DT100
K8
DT101
H42
(B)
H41
(A)
DT102
H44
(D)
H43
(C)
DT103
H46
(F)
H45
(E)
DT104
H48
(H)
H47
(G)
Data is transmitted
in order from the
lower byte.
FP1/FPM
Program
Select the starting address of the transmission data table with S and the number of transmission data bytes
with n.
R0
R1
Operation
If the execution condition (trigger) for the F144 (TRNS) instruction is on when sending completed flag
(R9039) goes on, operation will proceed as follows:
1) The n is preset in S (the number of bytes not yet transmitted). Furthermore, reception completed
flag (R9038) is turned off and the reception data number is cleared to zero.
2) The data in the data table is transmitted in order from the lower byte in S+1.
- As each byte is transmitted, the value in S (the number of bytes not yet transmitted) decrements by 1.
- During transmission, the sending completed flag (R9039) goes off.
- If the start code STX is set to Yes using system register 413, the start code will be automatically
added to the beginning of the data.
- The end code selected is automatically added to the end of the data.
DT101
Sending data
Number of bytes not
8
yet transmitted (DT100)
DT102
DT103
DT104
H (CR)
R9039
on
off
Trigger R1
on
off
F144 (TRNS)
execution
3) When the specified quantity of data has been transmitted, the value in S (the number of bytes not yet
transmitted) will be zero and the sending completed flag (R9039) will go on.
The F144 (TRNS) instruction cannot be executed and the R9039 is not turned on unless pin number 5 of
RS232C port is turned on.
Example:
Program for transmitting 8 bytes of data without an end code
R1
F144 TRNS, DT100, K - 8
Set to K - 8.
3 - 330
FP1/FPM
Area used
for storing
received
data
Number of words
specified in system
register 418
Reception buffer
Word
(address) 0
2n
2n - 1
Each time data is received, the amount of data received (number of bytes) is stored as a count in the leading
address of the reception buffer. The initial value is zero.
The data received is stored in order in the reception data storage area beginning from the lower byte of the
second word of the area.
3 - 331
FP1/FPM
Example:
Reception of the eight characters A, B, C, D, E, F, G, and H (8
bytes of data) from an external device
The reception buffer is DT200 to DT204 in this example.
System register settings are as follows:
- System register 417: K200
- System register 418: K5
DT200
K8
DT201
H42
(B)
H41
(A)
DT202
H44
(D)
H43
(C)
DT203
H46
(F)
H45
(E)
DT204
H48
(H)
H47
(G)
Program
When reception of data from an external device has been completed, the reception completed flag (R9038)
goes on and further reception of data is not allowed.
To receive more data, an F144 (TRNS) instruction must be executed to turn off the reception completed flag
(R9038) and clear the byte number to zero.
R0
F144 TRNS, DT100, K 0
3 - 332
FP1/FPM
Operation
When the reception completed flag (9038) is off and data is sent from an external device, operation will
proceed as follows. (After RUN, R9038 is off during the first scan.)
1) The data received is stored in order in the reception data storage area of reception buffer beginning
from the lower byte of the second word of the area.
Start and end codes will not be stored.
With each one byte received, the value in the leading address of the reception buffer is incremented
by 1.
Reception operation
Reopening
start
Received data
Number of bytes 0
received
on
R9038
off
Trigger R0
F144 (TRNS)
execution
B T (CR)
2 20
U
0
on
off
Reception Reception
not
possible
possible
2) When an end code is received, the reception completed flag (R9038) goes on. After this, no further
reception of data is allowed.
Reception
possible
3) When an F144 (TRNS) instruction is executed, the reception completed flag (R9038) goes off and
the number of received data bytes is cleared to zero. Further data received is stored in order in the
reception data storage area beginning from the lower byte of the second word of the area.
Note
For repeated reception of data, refer to the following procedure 1)
to 5).
1) Receive data
2) Reception completed (R9038: on, Reception: not allowed)
3) Process received data
4) Execute F144 (TRNS) instruction, Reception: enable (R9038: off)
Number of received data is cleared to zero.
5) Receive further data
3 - 333
F144 (TRNS)
FP2/FP2SH/FP3/FP10SH
Availability
FP2/FP2SH/FP3/FP10SH
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
11
10
DF
DF
12
R0
ST
F144
DT
F144 TRNS,
(TRNS)
100
DT 100, K 8
S
Operands
Relay
Operand
Timer/Counter Register
Index
register
Constant
Index
modifier
WX WY WR
S
n
SV
EV
DT
N/A
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
When the trigger R0 turns on, 8 bytes of the data stored in data registers DT101 through DT104 are
transmitted from the COM. port.
3 - 334
FP2/FP2SH/FP3/FP10SH
Description
Use this instruction for communication (transmission and reception) of command and data when an external
device (personal computer, measuring instrument, bar code reader, etc.) is connected to the COM. port of
CPU.
Transmission
The n bytes of the data stored in the data table with the starting area specified by S are transmitted from the
COM. port to an external device by serial transmission.
A start code and end code can be automatically added before transmission.
FP10SH
Transmission
External device
(Personal computer)
COM. port
Reception
Reception is controlled by the reception completed flag (R9038) being turned on and off.
When reception completed flag (R9038) is off, the data sent to the COM. port stored in the reception buffer
selected in system registers 417 and 418. When an F144 (TRNS) instruction is executed, reception
completed flag (R9038) goes off.
FP10SH
Reception
External device
(Bar code reader)
Flag conditions
COM. port
3 - 335
FP2/FP2SH/FP3/FP10SH
Preparation of transmission
1) Setting the transmission format
For FP10SH
The initial settings for the transmission format are as follows:
- Data length: 8 bits
- Parity check: Yes, odd
- Stop bits: 1 bit
- End code: CR
- Start code: No STX
To change the transmission format to match the external device connected to the COM. port, set the
parameters with the upper row of operation mode switches.
off
on
Functions
Settings
SW1
SW2
SW3
SW4
SW6
SW7
None
off
off
CR (H0D) and LF
(H0A)
on
off
CR (H0D)
off
on
EXT (H03)
on
on
Invalid
off
off
Even parity
on
off
Odd parity
on
on
MODEM
control
t l
Disabled
on
Start code
STX (H02)
invalid
off
SW8
off
Enabled
SW5
on
End code
Stop bit
p
Data length
(character
bit)
off
1 bit
Parity check
y
2 bits
on
7 bits
off
8 bits
on
For FP2/FP2SH
Set the transmission format parameter so that the Transmission Format Setting of system register 413
matches the external device connected to the COM. port. The default setting is the same as that of the
FP10SH.
The selected end code is automatically added during transmission. To disable the end code, set the number
of transmission bytes using a negative value before the F144 (TRNS) instruction.
If the start code is set to STX valid, STX will be automatically added.
3 - 336
FP2/FP2SH/FP3/FP10SH
Settings
SW1
SW2
SW3
SW4
SW5
SW6
SW7
SW8
115,200 bps
off
off
off
57,600 bps
on
off
off
38,400 bps
off
on
off
19,200 bps
on
on
off
9,600 bps
off
off
on
4,800 bps
on
off
on
2,400 bps
off
on
on
1,200 bps
Transmission
speed
d
on
on
on
For FP2/FP2SH
Set the transmission speed so that the COM Port Baud Rate Setting of system register 414 matches the
external device connected to the COM. port. The default setting is 19200 bps.
DF
R9032
Set to H8000.
When executed when general purpose port is selected, the setting will change to computer link.
X0
DF
R9032
Note
When the power is turned on, the port use will revert to the
setting of system register 412.
3 - 337
FP2/FP2SH/FP3/FP10SH
[S+1]
[S+2]
2n
2n - 1
Write the transmission data to the transmission data storage area selected with S (from the second word on)
using an F0 (MV) or F95 (ASC) instruction.
- Do not include an end code in the transmission data as it will be added automatically.
- If the start code is set to Yes, do not include a start code in the transmission data as it will be added
automatically.
When the F144 (TRNS) instruction is executed, the number of data bytes not yet transmitted is stored in the
starting area of the data table.
Note
Take care that the transmission data table and reception buffer
areas (set in system registers 417 and 418) do not overlap.
Example:
Transmitting the eight characters A, B, C , D, E, F, G and H (8
bytes of data)
In this example, the data table is DT100 to DT104.
DT100
K8
DT101
H42
(B)
H41
(A)
DT102
H44
(D)
H43
(C)
DT103
H46
(F)
H45
(E)
DT104
H48
(H)
H47
(G)
Data is transmitted
in order from the
lower byte.
FP1/FP - M
Program
Select the starting address of the transmission data table with S and the number of transmission data bytes
with n.
R0
R1
Operation
If the execution condition (trigger) for the F144 (TRNS) instruction is on when sending completed flag
(R9039) goes on, operation will proceed as follows:
1) The n is preset in S (the number of bytes not yet transmitted). Furthermore, reception completed
flag (R9038) is turned off and the reception data number is cleared to zero.
2) The data in the data table is transmitted in order from the lower byte in S+1.
- As each byte is transmitted, the value in S (the number of bytes not yet transmitted) decrements by 1.
- During transmission, the sending completed flag (R9039) goes off.
- If the start code STX is set to Yes using system register 413, the start code will be automatically
added to the beginning of the data.
- The end code selected is automatically added to the end of the data.
DT101
Sending data
Number of bytes not
8
yet transmitted (DT100)
DT102
DT103
DT104
H (CR)
R9039
on
off
Trigger R1
on
off
F144 (TRNS)
execution
3) When the specified quantity of data has been transmitted, the value in S (the number of bytes not yet
transmitted) will be zero and the sending completed flag (R9039) will go on.
The F144 (TRNS) instruction cannot be executed and the R9039 is not turned on unless pin number 5 of
RS232C port is turned on.
Example:
Program for transmitting 8 bytes of data without an end code
X0
DF
Set to K - 8.
3 - 339
FP2/FP2SH/FP3/FP10SH
Preparation of reception
1) Setting the transmission format
For FP10SH
The initial settings for the transmission format are as follows:
- Data length: 8 bits
- Parity check: Yes, odd
- Stop bits: 1 bit
- End code: CR
- Start code: No STX
To change the transmission format to match the external device connected to the COM. port, set the
parameters with the upper row of operation mode switches.
off
on
Functions
Settings
SW1
SW2
SW3
SW4
SW6
SW7
None
off
off
CR (H0D) and LF
(H0A)
on
off
CR (H0D)
off
on
EXT (H03)
on
on
Invalid
off
off
Even parity
on
off
Odd parity
on
on
MODEM
control
t l
Disabled
on
Start code
STX (H02)
invalid
off
SW8
off
Enabled
SW5
on
End code
Stop bit
p
Data length
(character
bit)
off
1 bit
Parity check
y
2 bits
on
7 bits
off
8 bits
on
For FP2/FP2SH
Set the transmission format parameter so that the Transmission Format Setting of system register 413
matches the external device connected to the COM. port. The default setting is the same as that of the
FP10SH.
When the start code is vaild, the data from the reception of STX to the reception of the selected end code is
considered to be one frame.
3 - 340
FP2/FP2SH/FP3/FP10SH
Settings
SW1
SW2
SW3
SW4
SW5
SW6
SW7
SW8
115,200 bps
off
off
off
57,600 bps
on
off
off
38,400 bps
off
on
off
19,200 bps
on
on
off
9,600 bps
off
off
on
4,800 bps
on
off
on
2,400 bps
off
on
on
1,200 bps
Transmission
speed
d
on
on
on
For FP2/FP2SH
Set the transmission speed so that the COM Port Baud Rate Setting of system register 414 matches the
external device connected to the COM. port. The default setting is 19200 bps.
Number of
bytes received
Area used
for storing
received
data
Number of words
specified in system
register 418
3 - 341
FP2/FP2SH/FP3/FP10SH
Reception buffer
Word
(address) 0
2n
2n - 1
Each time data is received, the amount of data received (number of bytes) is stored as a count in the leading
address of the reception buffer. The initial value is zero.
The data received is stored in order in the reception data storage area beginning from the lower byte of the
second word of the area.
Example:
Reception of the eight characters A, B, C, D, E, F, G, and H (8
bytes of data) from an external device
The reception buffer is DT200 to DT204 in this example.
System register settings are as follows:
- System register 417: K200
- System register 418: K5
DT200
K8
DT201
H42
(B)
H41
(A)
DT202
H44
(D)
H43
(C)
DT203
H46
(F)
H45
(E)
DT204
H48
(H)
H47
(G)
3 - 342
FP2/FP2SH/FP3/FP10SH
Program
When reception of data from an external device has been completed, the reception completed flag (R9038)
goes on and further reception of data is not allowed.
To receive more data, an F144 (TRNS) instruction must be executed to turn off the reception completed flag (R9038) and
clear the byte number to zero.
R0
DF
F144 TRNS, DT100, K 0
Operation
When the reception completed flag (9038) is off and data is sent from an external device, operation will
proceed as follows. (After RUN, R9038 is off during the first scan.)
1) The data received is stored in order in the reception data storage area of reception buffer beginning
from the lower byte of the second word of the area.
Start and end codes will not be stored.
With each one byte received, the value in the leading address of the reception buffer is incremented
by 1.
Reception operation
Reopening
start
Received data
Number of bytes 0
received
on
R9038
off
Trigger R0
F144 (TRNS)
execution
B T (CR)
2 20
U
0
on
off
Reception
possible
Reception Reception
not
possible
possible
2) When an end code is received, the reception completed flag (R9038) goes on. After this, no further
reception of data is allowed.
3) When an F144 (TRNS) instruction is executed, the reception completed flag (R9038) goes off and
the number of received data bytes is cleared to zero. Further data received is stored in order in the
reception data storage area beginning from the lower byte of the second word of the area.
Note
For repeated reception of data, refer to the following procedure 1)
to 5).
1) Receive data
2) Reception completed (R9038: on, Reception: not allowed)
3) Process received data
4) Execute F144 (TRNS) instruction (R9038: off, Reception: enable)
5) Receive further data
3 - 343
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
ST
11
F145
R0
10
(SEND)
DT
S1
S2
20
DT
10
DT
100
S1
S2
Starting 16-bit area for storing source data (data area at the local station)
Type of destination operands for storing data in the remote station. Be sure to
select the area by setting address 0 (destination data area at another station).
Starting 16-bit area address for the destination operand specified in D above
(destination data area in another station).
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
IX
IY
Index
modifier
S1
N/A
N/A
N/A
N/A
S2
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
A
A: Available
N/A: Not Available
Explanation of example
1
5 words
DT11(S1+1)=H010A
Unit No.10
Route No.1
the 5 words of data from DT20 to DT24 are sent to DT100 to DT104 of unit No. 10, which is
connected to route No. 1, when the execution condition (trigger) R0 turns on.
3 - 344
DT11(S1+1)=H010A
Unit No.10
Route No.1
the on and off information of Bit No. 13 of DT20 is sent to Bit No. 5 of DT100 of Unit No. 10, which is
connected to route No. 1, when the execution condition (trigger) R0 turns on.
If the network is configured only of the FP2, FP2SH, and FP10SH, specifying [FF] (HFF) for the unit number
sends the same contents to all of the link stations on the same network.
If the FP3 connected to the network, global transmission using the HFF specification should never be used.
Description
This sends the local station data for the area specified by S2 to the areas specified by the D and N of the
remote stations connected with the MEWNET - W, MEWNET - P, and MEWNET - H.
The remote stations (routes and unit numbers), the transmission unit (bit unit or word unit), the transmission
method, and other parameters are specified by the control data S1.
F145 (SEND) execution
S2
Local
station
DN
Link unit
Remote
station
CPU
3 - 345
Specifying the memory area of the remote station (D) and (N)
Specify the memory area of the remote station in which the data to be transmitted is stored, specifying the
type D and the address N in combination.
Example:
D: DT0, N: K100
DT100
Flag conditions
S1
Specifying the
remote station
Specifying the
transmission unit and
method
3 - 346
11
S1:
Number of transmission words: H001 to H3FC (1 to 1020)
Specifies H0.
Example:
If 10 words of data are being sent, K10(H000A) should be
specified in S1.
(2) Specifying bit unit transmission
If bit unit transmission is being used, the information of the specified bit in the memory area of the local station
specified by S2 is sent to the specified bit of the memory area of the remote station specified by D and N.
15
11
S1:
Bit No. of local station: H0 to HF(0 to 15)
Specifies H0
Bit No. of remote station: H0 to HF(0 to 15)
Specifies H8
Example:
If the data of Bit No. 15 of the local station memory area is
being sent to Bit No. 0 of the memory area in the remote
station, H800F should be specified in S1.
(3) Specifying the remote station (common to both word/bit transmission)
15
11
S1+1:
Unit No.: H01 to H40 (0 to 64)
Route No.: H1 to H8(1 to 8)
Specifies H0.
3 - 347
Power
CPU
Link
Example:
Local
station
Relay
station
Power
CPU
Link
Depth 0
Depth 1
Remote
station
Link
Unit of relay
destination
Power
CPU
Link
In this way, by passing data through a relay station, communication is possible to a depth of 3.
Note
When using the MEWNET- P and MEWNET- W, data can only be
relayed one network deeper in the hierarchy.
3 - 348
Link
Power
CPU 2
Link
Link
Depth 1
Power
CPU 4
Power
CPU 3
Link
Link
Depth 0
Link
Power
CPU 1
Link
Example:
Depth 3
Link
Power
CPU 5
Depth 2
Example:
Depth (H03)
CPU1
Relay destination
CPU2
Relay destination
CPU3
Relay destination
CPU4
H00
Specifying the
remote station
CPU5
: Same network
- - - - - - - : Same backplane
The relay source is specified by a unit No. in the network, and
the relay destination is specified by a route number on the
backplane.
3 - 349
11
S1:
Number of transmission words: H001 to H3FC (1 to 1020)
Specifies H0
Example:
If 10 words of data are being sent, K10(H000A) should be
specified in S1.
(2) Specifying bit unit transmission
If bit unit transmission is being used, the information of the specified bit in the memory area of the local station
specified by S2 is sent to the specified bit of the memory area of the remote station specified by D and N.
15
11
S1:
Bit No. of local stations memory area: H0 to HF(0 to 15)
Specifies H0
Bit No. of remote stations memory area: H0 to HF(0 to 15)
Specifies H8
Example:
If the data of Bit No. 15 of the local station memory area is
being sent to Bit No. 0 of the memory area in the remote
station, H800F should be specified in S1.
(3) Specifying the remote station (common to both word/bit transmission)
1
S1+1:
Depth of remote station: H01 to H03
Route No. of local station: H1 to H8
Specifies H8.
3 - 350
S1+2:
Route No. of relay destination in depth 1: H01 to H08
Unit No. of relay source in depth 1: H01 to H40 (1 to 64)
3
S1+n:
Specifies H00
(n = depth + 2)
No.2
1 2
Link
3 4
Power
CPU 3
Link
Link
1 2
Power
CPU 4
No.1
Link
1 2
Power
CPU 2
Link
Link
Power
CPU 1
Link
No.4
No.16
Link
DT20
to
DT24
Power
CPU 5
Example:
No.10
DT100
to
DT104
3 - 351
In this example, the control data beginning with DT10 (depth 3 6 words) should be specified as shown
below. To send the 5 words of data DT10 = H0005
CPU1
Route 1
DT11=H8103
CPU2
CPU2
No.2
Route 3
DT12=H0203
CPU3
CPU3
No.4
Route 1
DT13=H0401
CPU4
CPU4
No.16
Route 2
DT14=H1002
CPU5
No.10
DT15=H0A00
3
: Depth
The F145 (SEND) instruction only requests that the data be sent, but the actual processing takes place when
the ED instruction is executed. The MEWNET send/receive completed flag (R9031) can be used to check
whether or not the transmission has been completed.
R9031
0: Completed normally
1: Completed with error (The error code is stored in DT9039.)
DT9039
(DT90039)
If the transmission has been completed with an error (R9031 is on), the contents of the error (error
code) are stored.
For information on the contents of error codes, refer to the manual for that particular link unit. If the error code
is H71 to H73, a communication time - out error has occurred. The time - out time can be changed within a
range of 10.0 ms to 81.9 seconds (in units of 10 ms), using the setting of system register 32. The default value
is set to 2 seconds for FP3 and 10 seconds for FP2/FP2SH/FP10SH.
Error code (HEX)
Description
H71
H72
H73
If there is any CPU other than the FP2SH and FP10SH connected to the network, global transmission
(sending data using the HFF specification for the unit No.) should never be used.
The F145 (SEND) instruction cannot be executed if the target is a special internal relay (from R9000) or a
special data register (from DT9000/DT90000).
3 - 352
10
Do not specify DT9**** even if the destination is the FP2, FP2SH or FP10SH.
Sending FP2, FP2SH or FP10SH special data registers (source issuing the command: FP2/FP2SH/
FP10SH)
X10
F145 SEND, S, DT9****, DT0, Kn
10
3 - 353
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
ST
11
F146
R0
10
(RECV)
DT
S1
S2
10
DT
100
DT
50
S1
S2
Type of source operands for storing data in the remote station. Be sure to
select the area by setting address 0 (source data area at another station).
Starting 16-bit area address for the source operand specified in S2 above
(source data area at another station).
Starting 16-bit area address for storing data received (destination data area at
local station).
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
Index
modifier
SV
EV
DT
LD
FL
IX
IY
S1
N/A
N/A
N/A
N/A
S2
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
A
A: Available
N/A: Not Available
Explanation of example
1
5 words
DT11(S1+1)=H010A
Unit No.10
Route No.1
the data from DT100 to DT104 of the unit No. 10 connected to route No. 1 is sent to DT50 to DT54 of
the local station when the execution condition (trigger) R0 turns on.
3 - 354
DT11(S1+1)=H010A
Unit No.10
Route No.1
the on and off information of Bit No. 13 of DT100 of the unit No. 10 connected to route No. 1 is sent
to Bit No. 5 of DT50 when the execution condition (trigger) R0 turns on.
Description
This reads the data in the area specified by S2 and N of a remote station connection with the MEWNET - W,
MEWNET - P, MEWNET - H, and stores it in the area specified by D of the local station.
The remote stations (routes and unit numbers), the transmission unit (bit unit or word unit), the transmission
method, and other parameters are specified by the control data S1.
(Receiving request)
D
Local
station
S2 N
Link
unit
Data
Remote
station
CPU
3 - 355
Specifying the memory area of the remote station (S2) and (N)
Specify the memory area of the remote station in which the data being received is to be stored, specifying the
type S2 and the address N in combination.
Example:
DT100
Flag conditions
S1
Specifying the
remote station
Specifying the
transmission unit and
method
3 - 356
11
S1:
Number of words received: H001 to H3FC (1 to 1020)
Specifies H0.
Example:
If 10 words of data are being received, K10(H000A) should be
specified in S1.
(2) Specifying bit unit reception
When data is being sent in bit units, the information for the specified bit of the memory area of the remote
station specified by S2 and N is stored in the specified bit of the memory area of the local station specified by
D.
15
11
S1:
Bit No. of remote station: H0 to HF(0 to 15)
Specifies H0
Bit No. of local station: H0 to HF(0 to 15)
Specifies H8.
Example:
If the data from Bit No. 0 of the memory area in the remote
station is being sent to Bit No. 15 of the local station memory
area, H8F00 should be specified in S1.
(3) Specifying the remote station (common to both word/bit transmission)
15
11
S1+1:
Unit No.: H01 to H40 (0 to 64)
Route No.: H1 to H8(1 to 8)
Specifies H0.
3 - 357
Example:
Local
station
Relay
station
Power
CPU
Link
Depth 0
Depth 1
Remote
station
Link
Unit of relay
destination
Power
CPU
Link
In this way, by passing data through a relay station, communication is possible to a depth of 3.
Note
When using the MEWNET- P and MEWNET- W, data can only be
relayed one network deeper in the hierarchy.
3 - 358
Link
Power
CPU 2
Link
Link
Depth 1
Power
CPU 4
Power
CPU 3
Link
Link
Depth 0
Link
Power
CPU 1
Link
Example:
Depth 3
Link
Power
CPU 5
Depth 2
Example:
Depth (H03)
CPU1
Relay destination
CPU2
Relay destination
CPU3
Relay destination
CPU4
H00
Specifying the
remote station
CPU5
: Same network
- - - - - - - : Same backplane
The relay source is specified by a unit No. in the network, and
the relay destination is specified by a route number on the
backplane.
3 - 359
11
S1:
Number of words received : H001 to H3FC (1 to 1020)
Specifies H0.
Example:
11
S1:
Bit No. of remote stations memory area: H0 to HF(0 to 15)
Specifies H0
Bit No. of local stations memory area: H0 to HF(0 to 15)
Specifies H8.
Example:
If the data from Bit No. 0 of the memory area in the remote station
is being sent to Bit 15 of the local station memory area, H8F00
should be specified in S1.
S1+1:
Depth of remote station: H01 to H03
Route No. of local station: H1 to H8
Specifies H8.
3 - 360
S1+2:
Route No. of relay destination in depth 1: H01 to H08
Unit No. of relay source in depth 1: H01 to H40 (1 to 64)
3
S1+n:
Specifies H00
(n = depth + 2)
1 2
Link
No.2
Power
CPU 3
Link
Link
3 4
Power
CPU 4
1 2
Link
1 2
Power
CPU 2
Link
Link
Power
CPU 1
Link
No.4
No.16
Link
DT50
to
DT54
Power
CPU 5
Example:
No.10
DT100
to
DT104
3 - 361
In this example, the control data beginning with DT10 (depth 3 6 words) should be specified as shown
below. To receive the 5 words of data DT10 = H0005
CPU1
Route 1
DT11=H8103
CPU2
CPU2
No.2
Route 3
DT12=H0203
CPU3
CPU3
No.4
Route 1
DT13=H0401
CPU4
CPU4
No.16
Route 2
DT14=H1002
CPU5
No.10
DT15=H0A00
3
: Depth
The F146 (RECV) instruction only requests that the data be received, but the actual processing takes place
when the ED instruction is executed. The MEWNET send/receive completed flag (R9031) can be used to
check whether or not the reception has been completed.
R9031
0: Completed normally
1: Completed with error (The error code is stored in DT9039.)
DT9039
(DT90039)
If the transmission has been completed with an error (R9031 is on), the contents of the error (error
code) are stored.
For information on the contents of error codes, refer to the manual for that particular link unit. If the error code
is H71 to H73, a communication time - out error has occurred. The time - out time can be changed within a
range of 10.0 ms to 81.9 seconds (in units of 10 ms), using the setting of system register 32. The default value
is set to 2 seconds for FP3 and 10 seconds for FP2/FP2SH/FP10SH.
Error code (HEX)
Description
H71
H72
H73
The F146 (RECV) instruction cannot be executed if the target is a special internal relay (from R9000) or a
special data register (from DT9000/DT90000).
3 - 362
10
Do not specify DT9**** even if the destination is the FP2, FP2SH or FP10SH.
Receiving special data registers in the FP2 , FP2SH or FP10SH (source issuing the command:
FP2/FP2SH/FP10SH)
X10
F146 RECV, S, DT90000, Kn, DT0
10
3 - 363
F147 (PR)
Printout
Outputs ASCII codes to the printer (for transistor output type only).
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
10
12
R10
Instruction
10
11
F147 PR , DT 0 , WY 0
R9033
DF
12
OR
14
(DF )
ST
F147
10
R 9033
(PR)
DT
WY
Printout flag
Starting 16-bit area for storing 12 bytes (6 words) of ASCII codes (source)
Word external output relay used for output of ASCII codes (destination)
Operands
Relay
Operand
WX WY WR
S
N/A
Timer/Counter
WL
(*1)
SV
EV
DT
N/A
N/A
N/A N/A
LD FL
(*1) (*2)
A
3 - 364
Index
register
Register
Constant
Index
modifier
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
The ASCII codes stored in data registers DT0 to DT5 are output through word external output relay WY0
when trigger R10 turns on.
Source: ASCII code for 12 character A, B, C, D, E, F, G, H, I and J
Data register
DT5
DT4
0D 0A 4A
ASCII character CR LF
J
DT3
49
I
48
H
Destination
DT2
47
G
46
F
45
E
DT1
44
D
43
C
DT0
42
B
41
A
ASCII codes
R10: on
YF YE YD YC YB YA Y9 Y8 Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0
WY0
Y0 to YF: for data signals of printer
(Y0 to Y7 correspond to DATA1 to DATA8 of printer.)
Y8: for strobe signal of printer
Y9 to YF: not used
Description
Outputs the ASCII codes for 12 characters stored in the 6-word area specified by S through the word external
output relay WY specified by D.
15
S
0
WY
S+1
D1 to D8
STROBE
S+2
S+3
S+4
S+5
If the specified output is connected to a commercial printer, the characters corresponding to the output ASCII
code are printed.
Only bit positions 0 to 8 of WY are used in the actual printout.
YF YE YD YC YB YA Y9 Y8 Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0
WY0
Y0 to YF: for data signals of printer
(Y0 to Y7 correspond to DATA1 to DATA8 of printer.)
Y8: for strobe signal of printer
Y9 to YF: not used
ASCII code is output in order starting from the lower byte of the starting area.
Be sure to set the control code (LF and CR) for the printer as the final word of the data.
Three scans are required for 1 character constant output. Therefore, 37 scans are required until 12 character
constants are output. (See Time chart)
3 - 365
Flag conditions
- The ending area for storing ASCII codes exceeds the limit.
- The trigger of another F147 (PR) instruction turns on while one F147 (PR)
instruction is being executed.
Printout flag (R9033): Turns on and stays on while a F147 (PR) instruction is being executed.
Connection example
Transistor output type
(output: 9 points or more)
Y0
Y1
Y2
Y3
Y4
Y5
Y6
Y7
Y8
:
COM
Printer
(centronics interface)
DATA1
DATA2
DATA3
DATA4
DATA5
DATA6
DATA7
DATA8
STROBE
GND
Data setting
Example:
DT5
DT4
0D 0A 4A
ASCII character CR LF
J
3 - 366
49
I
DT3
48
H
DT2
47
G
46
F
45
E
ASCII codes
DT1
44
D
43
C
DT0
42
B
41
A
Time chart
A
Signal of
output unit
CR
LF
H41
H42
H43
H44
H45
H0D
H0A
on
off
on
off
Number of scans
3233 34353637
Y0
Y1
Y2
Y3
Y4
Y5
Y6
Y7
COM
Printer
(centronics interface)
DATA1
DATA2
DATA3
DATA4
DATA5
DATA6
DATA7
DATA8
STROBE
GND
Program example
X10
R9033
Y8
Y7
3 - 367
F148 (ERR)
P148 (PERR)
Outline
Program example
Boolean
Ladder Diagram
Address
10
ST
11
R0
Instruction
R
F148
0
(ERR)
100
ST
F148
K
1
(ERR)
0
Trigger
Operands
Operand
Relay
Timer/Counter
Register
WX WY WR WL
n
SV
EV
DT
LD
FL
N/A
N/A
Index
register
Constant
IX
IY
N/A
N/A
Index
modifier
N/A
A: Available
N/A: Not Available
Explanation of example
The self - diagnosis error 100 is set when the execution condition (trigger) R0 turns on. For FP0/FP, the
ERROR (ERROR/ALARM) LED on the control unit blinks and for FP1/FP - M/FP2/FP2SH/FP3/FP10SH,
ERROR LED on CPU lights, and operation stops.
(If a situation occurs in which you wish to set the self - diagnosis error 100, set up the program so that input R0
turns on.)
When the execution condition (trigger) R1 turns on, self - diagnostic errors of error codes 43 and higher are
cleared.
3 - 368
Description
Along with self - diagnostic error codes specified by n being stored in the special data register DT9000 on
DT90000, the self - diagnostic error flag (R9000) is turned on. Also, for FP0/FP, the ERROR/ALARM on the
control unit blinks and for FP1/FP - M/FP2/FP2SH/FP3/FP10SH, ERROR LED on the CPU lights.
The specified value n is what determines whether operation stops or continues when the instruction is
executed.
n setting
K100 to K199
Operation stops
K200 to K299
Operation continues
If n is set to a value between K200 and K299, if several F148 (ERR) instructions are processed at one time,
codes are received in sequential order, starting with the lowest number.
If n is set to 0 and the F148 (ERR) instruction is executed, self - diagnostic errors with error codes of 43 and
higher are cleared. (for FP - M/FP1 controller Ver. 2.7 or later, FP3 CPU Ver. 4.4 or later)
- For FP0/FP, ERROR/ALARM LED: turned off
- For FP1/FP - M/FP2/FP2SH/FP3/FP10SH, ERROR LED: turned off
- R9000, R9005, R9006, R9007, R9008: off
- DT9000, DT9017, DT9018: Cleared to 0
DT90000, DT90017, DT90018: Cleared to 0
F148 (ERR) instructions which specify the same error code can be notated in duplicate in the program.
FP0 T32/FP/FP2/FP2SH/FP10SH
DT9000
DT90000
DT9017
DT90017
DT9018
DT90018
Flag conditions
Turns on and stays on when the value of n exceeds the limit of specified
range K0, or K100 to K299.
Turns on and stays on when the value of n exceeds the limit of specified
range K0, or K100 to K299.
3 - 369
F149 (MSG)
P149 (PMSG)
Message display
Outline
Program example
Boolean
Ladder Diagram
Address
Instruction
10
10
R10
ST
11
Trigger
F149
10
(MSG)
M TEST PROGRAM
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
SV
EV
DT
Index
register
Register
N/A
N/A
LD
FL
Constant
IX
IY
N/A
N/A
N/A
N/A
Index
modifier
N/A
A: Available
N/A: Not Available
Explanation of example
Displays the message TEST PROGRAM on the programming tool when trigger R10 turns on.
Description
This instruction is used for displaying message specified by S on the programming tool.
The character constants (M) can be input only with programming tool software.
When the F149 (MSG) instruction is executed, the message flag (R9026) turns on and the message
specified by S is set in special data registers DT9030 to DT9035/DT90030 to DT90035.
Type
DT9030 to DT9035
FP0 T32/FP
FP2/FP2SH/FP10SH
DT90030 to DT90035
Once the message is set in the special data registers, the message cannot be changed even if the F149
(MSG) instruction is executed again.
To clear the message in the special data registers, click on the Cancel button on Display PLC Message
screen using the programming tool software.
3 - 370
0
Control unit
Expansion unit
Intelligent unit
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
Power supply
10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F
3 - 371
Board
number =1
Power
supply
Expansion
CPU
Power
supply
00
Board
number =2
Power
supply
Expansion
Board
number =3
Power
supply
Expansion
3 - 372
01
02
03
04
05
06
07
08
09
0A
0B
0C
0D
0E
0F
10 11 12 13 14 15
10
11
12
13
14
15
16
17
16 17 18 19 20 21 22 23
18
19
1A
1B
1C
1D
1E
1F
24 25 26 27 28 29 30 31
Outline
Program example
Boolean
Ladder Diagram
Address
Instruction
10
ST
11
Trigger
F150
10
(READ)
S1
S2
19
4
DT
K
K
10
R10
S1
16-bit equivalent constant for specifying the bank number in the shared
memory of the intelligent unit.
S2
16-bit equivalent constant for specifying the starting address in the shared
memory of the intelligent unit (source data address).
Starting 16-bit area address for storing read data (destination data address).
Operands
Relay
Timer/Counter
Operand
WX WY WR WL
SV
EV
DT
S1
N/A
N/A
S2
N/A
N/A
N/A
Index
register
Register
Index
modifier
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
LD
FL
(*1)
Constant
A: Available
N/A: Not Available
3 - 373
Explanation of example
Reads four words of data stored in the addresses starting from K19 to K22 of the intelligent unit shared
memory (located in slot 3) and stores them in data registers DT0 to DT3 of CPU when trigger R10 turns on.
1
(Slot No.)
CPU
Power
CPU
Intelligent unit
0
DT0
17
18
19
20
21
22
23
24
DT2
DT3
DT4
DT1
4 words
DT5
Description
The n words of the data stored in the shared memory of the intelligent unit/board specified by S1 is read from
the address specified by S2, and is stored in the area specified by D of the CPU.
Initial readout address of the shared memory for the intelligent unit (S2)
Specify this referring to the shared memory tables for the various intelligent units.
To specify address 2, specify K2.
Flag conditions
3 - 374
Specifying S1
Intelligent unit without bank
Specify the slot number in which the target intelligent unit has been installed.
Upper byte
Lower byte
S1
H00
Lower byte
S1
Slot No.: H00 to H1F
Bank No.: H00 to HFF
Order No.
AFP32091
AFP32092
3 - 375
F151 (WRT)
P151 (PWRT)
Outline
Program example
Boolean
Ladder Diagram
Address
Instruction
10
10
ST
11
Trigger
F151
10
(WRT)
R10
DT
0
10
S2
S1
5
0
S1
16-bit equivalent constant for specifying the bank number in the shared
memory of the intelligent unit.
S2
Starting 16-bit area address for storing data written in the shared memory.
16-bit equivalent constant for specifying the number of words written in the
shared memory.
Starting 16-bit area address for storing data written (destination data address).
Operands
Relay
Timer/Counter
Index
register
Register
Operand
WX WY WR WL
S1
SV
EV
DT
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
3 - 376
Index
modifier
S2
LD
FL
(*1)
Constant
A: Available
N/A: Not Available
Explanation of example
Five words of data stored in data registers DT10 to DT14 of CPU are written into the addresses starting from
K0 to K4 of the intelligent unit shared memory (located in slot 0) when trigger R10 turns on.
1
4 (Slot No.)
CPU
Power
CPU
DT0
DT1
Intelligent unit
0
1
2
DT10
DT11
DT12
DT13
DT14
5 words
4
5
6
Description
Writes n words of the initial data from the area specified by S2 of the CPU to the address specified by D of the
shared memory of the intelligent unit specified by S1.
Initial address written to the shared memory of the intelligent unit (D)
Specify this referring to the table of shared memories for the various intelligent units.
To specify address 2, specify K2.
Flag conditions
3 - 377
Specifying S1
Intelligent unit without bank
Specify the slot number in which the target intelligent unit has been installed.
Upper byte
Lower byte
S1
H00
Lower byte
S1
Slot No.: H00 to H1F
Bank No.: H00 to HFF
Order No.
AFP32091
AFP32092
3 - 378
Outline
Program example
Boolean
Ladder Diagram
Address
10
ST
11
Trigger
10
Instruction
F152
DT
R10
S2
10
DT
10
(RMRD)
10
S1
Lower 16-bit area of two 16-bit areas for storing control data for
F152 (RMRD)/P152 (PRMRD)
S2
16-bit equivalent constant or 16-bit area for specifying starting shared memory
address in the intelligent unit
16-bit equivalent constant or 16-bit area for specifying number of read data
words
Operands
Relay
Timer/Counter
Index
register
Register
Operand
WX WY WR WL
SV
EV
DT
LD
FL
IX
(*1)
Constant
IY
(*2)
Index
modifier
S1
N/A
N/A
N/A
N/A
S2
N/A
N/A
N/A
N/A
N/A
A
A: Available
N/A: Not Available
3 - 379
Explanation of example
Ten words of data stored at address 0 to 9 in the shared memory of the intelligent unit of the slave station
specified by DT0 and DT1 are read and the read data stored in data registers DT10 to DT19 of the master
station CPU when R10 turns on.
0
Master station 1
0
1
2
Slave
Power
Master 2
Power
CPU
Master 1
No.5
DT0=H105
DT1=H0
Intelligent unit
(shared memory)
CPU
DT10
DT11
DT12
8
9
DT18
DT19
Description
This reads n words of the data stored in the shared memory of the intelligent unit of the slave station on the
MEWNET - F (remote I/O system) specified by S1 and S1+1 from the address specified by S2, and stores it in
the area of the master station CPU specified by D.
Initial readout address of the shared memory for the intelligent unit (S2)
Enter the specification, referring to the shared memory tables for the various intelligent units.
To specify address 2, specify K2.
Flag conditions
3 - 380
Lower byte
S1
Slave station No.H01 to H20 (1 to 32)
Master station No. H01 to H04 (1 to 4)
Upper byte
Lower byte
S1+1
H00
Lower byte
S1
Slave station No.H01 to H20 (1 to 32)
Master station No. H01 to H04 (1 to 4)
Upper byte
Lower byte
S1+1
Slot No.H00 to H1F
Bank No.H00 to HFF
Order No.
AFP32091
AFP32092
Example of setting
When specifying the intelligent unit installed in slot number 0 of the No. 5 slave station on the path of the No. 1
master station, using the program example on page 3 - 379, the program will be structured as follows.
R10
0 , DT1
3 - 381
The F152 (RMRD) instruction only enables a request to be accepted. The actual processing is carried out
with the ED instruction. The F152 (RMRD)/F153 (RMWT) instruction completed flag (R9036) can be used to
confirm whether or not the instruction has been executed.
R9036
0: Completed normally
1: Completed with error (The error code is stored in DT9036/DT90036)
DT9036
If the transmission has been completed with an error (R9036 is on), the contents of the error (error
(DT90036) code) are stored.
Time - out error (no intelligent unit found at the specified location.)
H68
H71
H72
H73
If the error code is H71 to H73, a communication time - out error has occurred. The time - out time can be
changed within a range of 10.0 ms to 81.9 s (in units of 10 ms), using the setting of system register 32. The
default value is set to 2 seconds for FP3 and 10 seconds for FP2/FP2SH/FP10SH.
3 - 382
Outline
Program example
Boolean
Ladder Diagram
Address
10
ST
11
Trigger
10
Instruction
F153
10
(RMWT)
DT
S2
DT
R10
250
K
K
20
500
S1
Lower 16-bit area of two 16-bit areas for storing control data of
F153 (RMWT)/P153 (PRMWT)
S2
Starting 16-bit area for storing data transferred to the shared memory
16-bit equivalent constant or 16-bit area for specifying number of data words
written
16-bit equivalent constant or 16-bit area for storing the starting address of the
shared memory in the intelligent unit
Operands
Relay
Timer/Counter
Index
register
Register
Operand
WX WY WR WL
SV
EV
DT
LD
FL
IX
(*1)
Constant
IY
(*2)
Index
modifier
S1
N/A
N/A
N/A
S2
N/A
N/A
N/A
A
A: Available
N/A: Not Available
3 - 383
Explanation of example
Twenty words of data stored in data registers DT250 to DT269 of the master station CPU are written into the
shared memory of the intelligent unit of slave station starting from address 500 to 519 specified by DT0 and
DT1 when R10 turns on.
0
Slave
Power
Master 2
CPU
Master 1
Power
No.10
Master station 2
DT0=H20A
DT1=H 2
Intelligent unit
(shared memory)
CPU
DT250
DT251
DT252
500
501
502
DT267
DT268
DT269
517
518
519
Description
This writes the initial n words of the data from the area specified by S2 of the CPU to the address specified by
D of the shared memory of the intelligent unit of the slave station on the MEWNET - F (remote I/O system)
specified by S1 and S1+1.
Flag conditions
3 - 384
Lower byte
S1
Slave station No.: H01 to H20 (1 to 32)
Master station No.: H01 to H04 (1 to 4)
Upper byte
Lower byte
H00
S1+1
Lower byte
S1
Slave station No.: H01 to H20 (1 to 32)
Master station No.: H01 to H04 (1 to 4)
Upper byte
Lower byte
S1+1
Slot No.: H00 to H1F
Bank No.: H00 to HFF
Order No.
AFP32091
AFP32092
Example of setting
When specifying the intelligent unit installed in slot number 2 of the No. 10 slave station on the path of the No.
2 master station, using the program example on page 3 - 383, the program will be structured as follows.
R10
2, DT1
3 - 385
R9035
1: Execution enabled
The F152 (RMRD) instruction only enables a request to be sent. The actual processing is carried out with the
ED instruction. The F152 (RMRD)/F153 (RMWT) instruction completed flag (R9036) can be used to confirm
whether or not the instruction has been executed.
0: Completed normally
R9036
If the transmission has been completed with an error (R9036 is on), the contents of the error (error
code) are stored.
Description
H5B
Time - out error (no intelligent unit found at the specified location.)
H68
H71
H72
H73
If the error code is H71 to H73, a communication time - out error has occurred. The time - out time can be
changed within a range of 10.0 ms to 81.9 s (in units of 10 ms), using the setting of system register 32. The
default value is set to 2 seconds for FP3 and 10 seconds for FP2/FP2SH/FP10SH.
3 - 386
F155 (SMPL)
P155 (PSMPL)
Sampling start
Outline
Program example
Boolean
Ladder Diagram
Address
Instruction
10
ST
11
Trigger
F155
10
(SMPL)
R10
F155 SMPL
10
Explanation of example
When the execution condition (trigger) R10 turns on, sampling of a relay (contact) and register registered in
advance is carried out.
on
R10 off
Sampling
on
off
Sample
off
on
on
off
Registration of the data to be sampled, specification of the sampling method (such as the cable and the time
interval), and specification of the sampling trace can be done using only the programming tool software.
Description
During a sampling trace, sampling of the specified data (relay contacts and registers) is carried out, and the
data contents at the time of sampling are stored in the sampling trace memory.
If the sampling trace settings and the startup have not been specified using the programming tool software,
processing will not be carried out, even if the execution condition (trigger) is fulfilled.
3 - 387
Sampling traces
This is a function which samples the on/off status of the registered relay and the data stored in the register,
either periodically or when the appropriate conditions have been fulfilled, and stores the results in memory. It
can be used to confirm changes in the data.
16 relays points and 3 words of registers can be set.
3 - 388
F156 (STRG)
P156 (PSTRG)
Sampling stop
Outline
Program example
Ladder Diagram
Trigger
Boolean
Address
Instruction
10
ST
11
F156
10
(STRG)
R10
10
F156 STRG
Explanation of example
When the execution condition (trigger) R10 turns on, a sampling trace stop command trigger is applied.
on
R10 off
Sampling
on
off
Delay times
Sampling trace stops
Stop command trigger
Registration of the data to be sampled, specification of the sampling method (such as the cable and the time
interval), and specification of the sampling trace can be done using only the programming tool software.
Description
This instruction applies a sampling trace stop command trigger. When a trigger is applied, sampling of the
specified delay is carried out, and then sampling trace stops.
If the sampling trace settings and the startup have not been specified using the programming tool software,
processing will not be carried out, even if the execution condition (trigger) is fulfilled.
3 - 389
Sampling traces
This is a function which samples the on/off status of the registered relay and the data stored in the register,
either periodically or when the appropriate conditions have been fulfilled, and stores the results in memory. It
can be used to confirm changes in the data.
16 relays points and 3 words of registers can be set.
3 - 390
F157 (CADD)
P157 (PCADD)
Time addition
Adds specified time data (hours, minutes, and seconds) to date (years,
months, and days) and clock (hours, minutes, and seconds) data.
For the FP/FP - M/FP1, the P type high- level instruction P157
(PCADD) is not available.
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
ST
11
10
10
F157
R0
(CADD)
DT
S1*
S2
10
DT
9054
DT
30
Starting 16-bit area for storing date/clock data (3 words are occupied in form of
BCD).
S2
Starting 16-bit area for storing time data (2 words are occupied in form of BCD).
Starting 16-bit area for storing result (3 words are occupied in form of BCD).
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
Index
modifier
IX
(*3)
IY
N/A
N/A
N/A
N/A
S2
N/A
N/A
N/A
N/A
N/A
N/A
S1
A: Available
N/A: Not Available
3 - 391
Explanation of example
Adds the time data stored in data registers DT11 and DT10 to the clock/calendar data stored in special data
registers DT9054 to DT9056 (DT90054 to DT90056) when trigger R0 turns on. The result is stored in data
registers DT32, DT31, and DT30.
DT9054 (DT90054)
0
DT9055 (DT90055)
Years
Months
Days
Hours
Minutes
Seconds
(Addition)
DT10
2
Hours
Minutes
Seconds
DT30
0
DT31
Years
Months
Days
Hours
Minutes
Seconds
Description
The date/clock data (3 words) specified by S1 and the time data (2 words) specified by S2 are added together.
The result (time of elapsed value) is stored in the area (3 words) specified by D.
Date/clock data
S1+2
H00 to H99
H01 to H12
H01 to H31
S1
H00 to H23
H00 to H59
H00 to H59
BCD H code
S1+1
Years
Months
Days
Hours
Time data
Minutes
(Addition)
S2+1
S2
H0000 to H9999
H00 to H59
H00 to H59
BCD H code
Seconds
Hours
Minutes
Seconds
Date/clock data
D+2
H00 to H99
H01 to H12
H01 to H31
D
H00 to H23
H00 to H59
H00 to H59
BCD H code
D+1
Years
3 - 392
Months
Days
Hours
Minutes
Seconds
Flag conditions
The area specified using the index modifier exceeds the limit.
The data specified by S1 and S2 is not BCD data.
The data specified by S1 is not the date/clock data.
The data specified by S2 is not the time data.
The specified data exceeds the area.
DT90054
DT90056
Years
Months
Days
Hours
Minutes
Seconds
FP - M/FP1/FP3
DT9055
DT9054
DT9056
Years
Months
Days
Hours
Minutes
Seconds
3 - 393
F158 (CSUB)
P158 (PCSUB)
Time substruction
Subtracts specified time data (hours, minutes, and seconds) from date
(years, months, and days) and clock (hours, minutes, and seconds)
data.
For the FP/FP - M/FP1, the P type high- level instruction P158
(PCSUB) is not available.
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
ST
11
10
10
F158
R0
S2
(CSUB)
DT
10
DT
9054
DT
30
Starting 16-bit area for storing date/clock data (3 words are used in form of
BCD).
S2
Starting 16-bit area for storing time data (2 words are used in form of BCD).
Starting 16-bit area for storing result (3 words are used in form of BCD).
Operands
Relay
Operand
Timer/Counter
WL
WX WY WR
(*1)
SV
EV
Index
register
Register
LD FL
DT
(*1) (*2)
Constant
IX
(*3)
IY
Index
modifier
S1
N/A
N/A
N/A
N/A
S2
N/A
N/A
N/A
N/A
N/A
N/A
3 - 394
A
A: Available
N/A: Not Available
Explanation of example
Subtracts the time data stored in data registers DT11 and DT10 from the date/clock data stored in data
registers DT9054 to DT9056/ DT90054 to DT90056) when trigger R0 turns on. The result is stored in data
registers DT32, DT31, and DT30.
DT9055 (DT90055)
DT9054 (DT90054)
Years
Months
Days
Hours
Minutes
Seconds
(Subtraction)
DT10
Hours
Minutes
Seconds
DT31
0
DT30
0
Years
Months
Days
Hours
Minutes
Seconds
Description
Subtracts time data (2 words) specified by S2 from the date/clock data (3 words) specified by S1. The result is
stored in the area (3 words) specified by D.
Date/clock data
S1+2
H00 to H99
S1+1
H01 to H12
H01 to H31
S1
H00 to H23
H00 to H59
H00 to H59
BCD H code
Years
Months
Days
Hours
Time data
Minutes
(Subtraction)
S2+1
S2
H0000 to H9999
H00 to H59
H00 to H59
BCD H code
Seconds
Hours
Minutes
Seconds
Date/clock data
D+2
H00 to H99
H01 to H12
H01 to H31
D
H00 to H23
H00 to H59
H00 to H59
BCD H code
D+1
Years
Months
Days
Hours
Minutes
Seconds
3 - 395
Flag conditions
The area specified using the index modifier exceeds the limit.
The data specified by S1 and S2 is not BCD data.
The data specified by S1 is not the date/clock data.
The data specified by S2 is not the time data.
The specified data exceeds tha area.
DT90054
DT90056
Years
Months
Days
Hours
Minutes
Seconds
FP - C/FP - M/FP1/FP3
DT9055
DT9054
DT9056
Years
3 - 396
Months
Days
Hours
Minutes
Seconds
S1
0
BCD H code
S1+1
Years
Months
Days
Hours
Minutes
Seconds
S2+1
1
S2
1
BCD H code
Years
Months
Days
Hours
Minutes
Seconds
The data to be subtracted is taken from the starting time data, as shown below.
(8: 02 15)
0
BCD H code
Hours
Minutes
Seconds
DT31
1
DT30
0
BCD H code
Years
Months
Days
Hours
Minutes
Seconds
The section indicating the hour, minutes and seconds is read as 2 hours, 28 minutes, 10 seconds, and this is
the elapsed time.
3 - 397
F159 (MTRN)
FP
Availability
FP
Outline
Program example
Boolean
Ladder Diagram
Address
10
DF
DF
12
R0
ST
11
Trigger
10
Instruction
F159
DT
(MTRN)
100
F159 MTRN,
DT 100, K 8, K 1
S
8
1
Area for storing the number of bytes of data to be transmitted, or constant data.
When the value is positive, an end code is added.
When the value is negative, an end code is not added.
When the value is H8000, the transmission mode of the RS232C port is
changed.
Operands
Relay
Timer/Counter Register
Operand
Index
register
Constant
Index
modifier
WX WY WR WL
S
n
D
(*1) I0 to ID.
3 - 398
SV
EV
DT
LD
IX
(*1)
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A N/A
IY
A: Available
N/A: Not Available
FP
Description
This instruction is used to send and receive instructions and data when an external device (computer,
measuring instrument, bar code reader, etc.) has been connected to the specified RS232C port.
1) Transmission
Transmits n bytes of the data stored in the data table that begins from the starting area specified in S
through the communication port specified in D to an external device. A start code and end code can be
automatically added to the transmission. The maximum number of bytes that can be transmitted is 2048.
2) Reception
Reception is controlled by the reception done flag (R9038/R9048) turning on and off. When the reception
done flag is off, reception can take place at any time and data coming into the RS232C port is stored in the
data register specified in system registers 416 to 419.
The F159(MTRN) instruction is used to turn off (enable reception) the reception done flag (R9038/R9048).
The maximum number of bytes that can be received is 4094.
Flag conditions
DF
R9032
DF
R9032
Specify H8000
Note
When the power is turned on, the mode of use selected in system
register 412 takes effect.
3 - 399
FP
[S+2]
[S+n]
2n
2n - 1
Example:
Transmitting the eight characters A, B, C, D, E, F, G, H (8 bytes
of data)
This example uses DT100 to DT104 as the data table.
DT100
K8
DT101
H42
(B)
H41
(A)
DT102
H44
(D)
H43
(C)
DT103
H46
(F)
H45
(E)
DT104
H48
(H)
H47
(G)
Data is transmitted
in order from the
lower - order byte.
Notes
When using a RS232C 1 ch type communication cassette,
transmission does not take place until CS (Clear to Send)
turns on. If you are not going to connect to the other device,
connect to RS (Request to Send).
The reception done flag (R9038/R9048) also changes during
scanning.
3 - 400
FP
Program
Specify the starting address of the transmission data table in S, and the number of data bytes to be
transmitted in n.
R0
R1
DF
Operation
When the execution condition of the F159(MTRN) instruction turns on, operation is as follows when the
transmission done flag (R9039/R9049) is on:
1) n is preset in S. The reception done flag (R9038/R9048) is turned off, and the reception data
number is cleared to 0.
2) The set data is transmitted in order from the lower - order byte in S+1 of the table.
- During transmission, the transmission done flag (R9039/R9049) turns off.
- If system register 413 or 414 is set to start code with STX, a start code is automatically added to the
beginning of the data.
- The end code specified in system register 413 or 414 is automatically added to the end of the data.
DT101
DT102
DT103
DT104
Transmission
data
H (CR)
R9039
R9049
Execution condition
(trigger) R0
on
off
on
off
F159 (MTRN)
execution
During transmission
During this interval the F159(MTRN) instruction cannot be executed.
3) When all of the specified quantity of data has been transmitted, the S value is cleared to 0 and the
transmission done flag (R9039/R9049) turns on.
When you do not wish to add an end code to transmissions, use one of the
following methods:
Specify the number of bytes to be transmitted using a negative number.
If you also do not wish to add an end code to receptions, set system register 413 or 414 to no end code.
Example:
Program for transmitting 8 bytes of data without adding an end
code
R0
DF
Specify K - 8.
3 - 401
FP
The area of data registers DT0 up to DT2047 is the default reception buffer.
The maximum number of bytes that can be received is 4094 bytes.
No. of received
bytes
Reception
data
storage
area
Specified number of
words for No. 417
The area of data registers DT2048 up to DT4095 is the default reception buffer.
The maximum number of bytes that can be received is 4094 bytes.
Specify start area as
No. 418.
No. of received
bytes
Reception
data
storage
area
3 - 402
Specified number of
words for No. 419
FP
Reception buffer
2n
2n - 1
Example:
Receiving eight bytes of data, A, B, C, D, E, F, G, H, from an
external device through the COM1 port
DT200 to DT204 are used as the reception buffer.
System register settings are as follows:
- System register 416: K200
- System register 417: K5
DT200
K8
DT201
H42
(B)
H41
(A)
DT202
H44
(D)
H43
(C)
DT203
H46
(F)
H45
(E)
DT204
H48
(H)
H47
(G)
3 - 403
FP
For COM1
For COM2
R9032
R9042
R9038
R9048
R9039
R9049
Beginning of reception
buffer
Specified in 416
Specified in 418
Specified in 417
Specified in 419
Program
The reception done flag (R9038/9048) turns on when data reception from the external device is completed.
Reception of any further data is prohibited.
To receive subsequent data, you must execute an F159(MTRN) instruction to turn off the reception done flag
(R9038/R9048) and clear the byte number to 0.
R0
F159 MTRN, DT100, K 0, K 1
Operation
When the reception done flag (R9038/R9048) is off, operation takes place as follows when data is sent from
an external device.
(R9038/R9048 are off during the first scan after RUN. 0 is set in the starting area of the reception buffer
specified in the system registers.)
1) Incoming data is stored in order from the lower - order byte of the 2nd - word area of the reception
buffer.
Start and end codes are not stored.
Beginning of reception
Received data
R9038
R9048
Execution condition
(trigger) R0
Execution of
F159(MTRN)
instruction
B T (CR)
Reopening
U
on
off
on
off
Reception
is possible
Reception Reception is
is not
possible
possible
2) When the end code is received, the reception done flag (R9038/9048) turns on. Reception of any
further data is prohibited.
3) When an F159(MTRN) instruction is executed, the reception done flag (R9038/9048) turns off, the
number of received bytes is cleared, and subsequent data is stored in order from the lower - order
byte.
3 - 404
FP
Notes
To perform repeated reception of data, refer to the following
steps.
1) Receive data
2) Reception done (R9038/R9048: on, reception prohibited)
3) Process received data
4) Execute F159(MTRN) instruction (R9038/R9048: off, reception
possible)
5) Receive subsequent data
The reception done flag (R9038/R9048) also changes during
scanning.
3 - 405
FP2/FP2SH
Availability
FP2/FP2SH
Outline
Program example
Boolean
Ladder Diagram
Address
10
DF
DF
12
X4
ST
11
Trigger
10
Instruction
F159
(MTRN)
F159 MTRN,
DT 0,
DT
10
C1
K 10, H C1
Area or constant data in which the byte number of the transmitted data stored
- When it is positive value, the terminal code is added in transmission.
- When it is negative value, the terminal code is not added in trasmission.
- In case of H8000, the application of the MCU port specified in transmission is
changed.
Specification of the slot number and port number of the MCU unit which the
data is transmitted.
Operands
Relay
Timer/Counter
Index
register
Register
Operand
WX WY WR WL
SV
EV
DT
LD
FL
I
(*1)
Constant
K
Index
modifier
N/A
N/A
N/A
(*1) I0 to ID.
3 - 406
A: Available
N/A: Not Available
FP2/FP2SH
Description
1) It is used to transmit commands or data to the COM port (COM1 or COM2) of the specified MCU unit
connecting with external equipment (such as PC, measuring insrument, barcode reader).
Note: The operation mode of the communication port of the MCU should be set to the general - purpose serial
communication mode.
2) [n] bytes of the data stored in the data table which is headed with the area specified by [S] is transmitted to
external equipment from the communication port of the CPU or MCU unit specified by [D].
Data table (transmitted buffer)
S
*1
S+1
S+2
S+3
S+4
Transmitted data
storage area
S+n/2
*1: Nothing is specified for the initial address of the transmitted buffer.
3) The slot number and the communication port number specified by [D] is set as below.
[D]:
Specify slot number.
Specify communication port number.
Specify from H00 to H1F. HC1/HD1: COM1 port
HC2/HD2: COM2 port
* Caution:
1. Specify to K1 (H1) for the COM port of the CPU.
2. When specifying [D] with the K constant,
ex.) if the slot number is set to 3, and the COM2 (2) is selected for the communication port of the
MCU,
set as follows.
H03C2 to K962 (*convert the content specified in hexadecimal to decimal)
4) The starting code and the terminal code can be added automatically in transmission.
5) The transmitted byte number is maximum of 2048 bytes (including starting code and terminal code).
6) When a negative value is specified for the transmitted byte number, the data will be transmitted without the
terminal code.
7) When 8000H is specified for the transmitted byte number, the operation mode of the specified
communicaton port can be switched between the computer link and the general - purpose communication
mode.
8) The communication parameter for the communication port can be set by specifying the communicating
port number to HD1 or HD2.
When HD1 is designated: the communication parameter is registered for the COM 1 port.
When HD2 is designated: the communication parameter is registered for the COM 2 port.
Example
R0
3 - 407
FP2/FP2SH
Baud rate
300
600
1200
2400
4800
9600
19200
38400
57600
115K
230K
Note
The execution for switching the operation mode of the
communication (between the computer link and the
general - purpose serial communication mode) or the setting for
the communication parameter should be carried out when no
communication is performed.
If these operations are executed in communicating, the data
which is being transmitted will be cancelled, and the reception
error will occur for the data which is being received and this data
may not be received properly.
When the communication parameter is specified, the received
byte number should be specified to the even data of 22 bytes or
smaller. If it is specified to the value larger than 22 bytes or odd
byte, an error occurs in the parameter settings of the MCU.
3 - 408
FP2/FP2SH
Flag conditions
It turns on, when the specified address using the index modifier exceeds a limit.
It turns on, when the MCU unit does not exist in the slot No. specified by [D].
It turns on, when the MCU unit does not exist in the slot No. specified by [D]
It turns on, when the data device specified by [S] exceeds the area.
It turns on, when the transmitted byte number specified by [n] is outside of
the specified area.
It turns on, when the transmitted byte number specified by [n] exceeds the
area of the data table.
It turns on, when H8000 is designated in the PC link mode.
It turns on, when an additional parameter is registered in executing the
parameter registration.
It turns on, when H8000 is designated in the parameter registration.
It turns on, when a negative value is designated in the parameter
registration.
3 - 409
FP2/FP2SH
Availability
FP2/FP2SH
Data is received from external equipment via the COM port of the
specified MCU.
Outline
Program example
Boolean
Ladder Diagram
Address
10
DF
DF
12
X0
ST
11
Trigger
10
Instruction
F161
H
(MRCV)
C1
DT
F161 MRCV,
DT
0
100
D2
D1
Specification of the slot number and port number of the MCU unit which the
data is received.
D1
D2
Operands
Relay
Timer/Counter
Index
register
Register
Operand
WX WY WR WL
SV
EV
DT
LD
FL
I
(*1)
Constant
K
Index
modifier
D1
N/A
N/A
N/A
D2
N/A
N/A
N/A
(*1) I0 to ID.
Explanation of example
A: Available
N/A: Not Available
When the reception done signal X0 of the COM 1 port is on, the received data is readout, and stored in DT0 to
DT100.
Flag conditions
FP2/FP2SH
Description
1) It is used to receive commands or data for the COM port (COM1 or COM2) of the specified MCU unit
connecting with external equipment (such as PC, measuring insrument, barcode reader).
Note: The operation mode of the communication port of the MCU should be set to the general - purpose
communication mode.
2) The received data is readout to the communication port of the MCU unit in the slot No. specified by [S], and
stored in the specified data area of [D1] to [D2].
3) The slot number and the communication port number specified by [S] is set as below.
[D]:
Specify slot number.
Specify from H00 to H1F.
4) The received byte number is set for the initial address of the data area specified by [D1].
* If the received data exceeds the ending address specified by [D2], the operation error is detected.
At that time, the data which has been received up to the area of [D2] is stored.
Data table (received buffer)
D1
D1+1
D1+2
D1+3
D1+4
Received data
storage area
D2- 3
D2- 2
D2- 1
D2
example:
R0
6) There are eight 2048 - byte buffers in the received buffer of the MCU unit, and eight data can be received
sequentially.
3 - 411
FP2/FP2SH
If nine or more data should be received, the MCU unit detects the received buffer full error.
If the received buffer FULL error is detected, the MCU unit prohibits the reception of data in that channel
and inform about the error.
The byte number which can be received in one buffer is maximum of 2048 bytes (including terminal code).
However, the data which can be received with the MRCV do not include terminal code.
<Configuration of communication parameter>
7) The communication parameter data consists of 11 words.
1)
2)
Baud rate
300
600
1200
2400
4800
9600
19200
38400
57600
115K
230K
3)
4)
5)
6)
7)
Waiting time for starting transmission (K: 0=Time for about three characters/effective time=Kn*0.01 ms (0 to 100
ms))
8)
9)
2)
3)
4)
Number of times reception errors (number of times which the reception errors to be stored in the above lower byte
are detected)
5)
6)
7)
Modem initialization
(h0000=deinitialized h0100=now initializing h0200=initialization completed. h02FF=initialization failed.)
3 - 412
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
ST
11
10
10
F160
R0
(DSQR)
DT
DT
10
20
S
S
32-bit equivalent constant or lower 16-bit area of 32-bit area for storing data to
be calculated
Lower 16-bit area of 32-bit area for storing the calculated result
Operands
Relay
Timer/Counter
Operand
WX WY WR WL
Index
register
Register
SV
EV
DT
LD
FL
(*1)
Constant
IX
(*2)
IY
Index
modifier
N/A
N/A
N/A
N/A
N/A
A
A: Available
N/A: Not Available
Explanation of example
The square root of 32 - bit data stored in DT11 and DT10 is calculated and stored in DT21 and DT20 when R0
turns on.
When K64 is stored in DT11 and DT10, the following occurs.
Source data [S+1, S]: K64
DT11
DT10
Bit position 15 1211 8 7 4 3 0 15 1211 8 7 4 3 0
Binary data 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0
K64
Decimal data
K8
Description
The square root of 32-bit data specified by S1 is calculated and stored in the 32-bit area specified by D.
In the result, the digits beyond the decimal point are disregarded.
(S+1, S) (D+1, D)
Flag conditions
3 - 414
FP1/FPM
Availability
F0 (MV)
FP1/FP - M
Controls the software reset, disabling of the counter, and stops pulse
outputs.
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
10
DF
F0 MV ,
H1
S
DF
12
ST
11
X3
10
Instruction
X
F0
3
(MV)
, DT9052
DT
9052
Operands
Relay
Operand
Timer/Counter Register
WX WY WR
S
Index
register
Constant
SV
EV
DT
IX
IY
Index
modifier
A:
Available
Description
Controls the high - speed counter according to the control code specified at S.
This instruction is used when performing the following operations while using the high - speed counter.
- When performing a software reset.
- When disabling the count.
- When temporarily disabling the hardware reset by the external input X2.
- When stopping the pulse outputs.
- When resetting and turns off the pattern output and cam output.
- When clearing the controls executed with the F162 (HC0S), F163 (HC0R), F164 (SPD0) and F165
(CAM0) instructions.
When a control code is programmed once, it is saved until the next time it is programmed.
Special data register DT9052 stores control code and high - speed counter modes as follows:
Bit position 15 1211 8 7 4 3 0
DT9052
High - speed counter
modes specified in
system register 400
(H0 to H8)
3 - 415
FP1/FPM
Software reset
0: Does not perform software reset
1: Does perform software reset
Hardware reset
0: Enabled
1: Disabled
Count
0: Enable
1: Disable
Example:
Perform software reset . . . . . . . . . . . . . . . . . . . . . . . . . H1(0001)
Count disable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . H2(0010)
Stop pulse output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . H8(1000)
Turn off pulse output and reset elapsed value . . . H9(1001)
When the mode is changed from PROG. to RUN, the lower - byte of DT9052 is set to H0.
H0 (0000):
- Software reset operation is not performed.
- Count inputs are accepted.
- Reset input X2 enabled.
- The high - speed counter instructions continue to operate.
Flag conditions
3 - 416
FP1/FPM
When 1 is set to bit position 0 of DT9052, the elapsed value of the high - speed counter becomes 0 and keeps
its value.
Elapsed
value
Time
0
Trigger for highon
speed counter (X0) off
Bit position 0 of
DT9052
Counting
Software reset
(The elapsed value is kept 0.)
While 1 is set to bit position 1 of DT9052, the count input are disabled (no counting) and the current elapsed
value is kept.
Elapsed
value
Time
0
Counting
1
No counting
0
Counting
3 - 417
FP1/FPM
The hardware reset input is enabled when 0 is set to bit position 2 of DT9052.
You can use reset operation only after system register 400 is set using X2 as the reset input (set value is even
number: H2, H4, H6, or H8).
Elapsed
value
Time
Reset
on
off
Reset operation
enabled
Reset operation
disabled
3 - 418
FP1/FPM
Program example
Example 1: The elapsed value of the high speed counter is set to 0 when
trigger X7 turns on, and counting begins again.
X7
>1
DF
1>
Example 2: The count input of high - speed counter is disabled (no counting)
when trigger X6 turns on.
X6
>1
DF
1>
>1
DF/
1>
3 - 419
Availability
F1 (DMV)
Outline
FP1/FPM
FP1/FP - M
Program example
Boolean
Ladder Diagram
Address
Setting
Trigger
10
F1 DMV ,
DT4 ,
S
Reading
Trigger
F1
Elapsed value
area of
high- speed
counter
(DMV)
:
:
4
9044
:
:
DF
22
F1 DMV , DT9044 , DT 6
ST
21
DT
DT9044
20
DF
DT
R10
20
DF
12
DF
ST
11
X4
10
Instruction
F1
10
(DMV)
DT
9044
DT
32-bit equivalent constant or lower 16-bit area of 32-bit data for storing a new
elapsed value of high-speed counter to be changed (source)
Operands
Relay
Operand
Timer/Counter Register
WX WY WR
Index
register
Constant
Index
modifier
SV
EV
DT
IX
IY
N/A
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
When execution condition (trigger) X4 turns on, DT4 and DT5 are written into the high - speed counter
elapsed value area.
When the execution condition (trigger) R10 turns on, the elapsed value of the high - speed counter is
transferred to data registers DT6 and DT7.
3 - 420
FP1/FPM
Flag conditions
Program examples
Example 1: Set the value of the data register DT4 for the high - speed counter
at the input of X4.
X4
DF
Down input
X0
X4
Value in DT4
Time
Setting set value
3 - 421
FP1/FPM
Example 2: Store the elapsed value of the high - speed counter into data
register DT100 at the input of X8.
X8
DF
Example 3: Internal relay R0 turns on when the elapsed value of the high speed counter exceeds K10000.
R9010
F1
DT9044, DT0
3 - 422
R0
FP1/FPM
F162 (HC0S)
Availability
FP1/FP - M
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
10
DF
ST
11
R3
10
Instruction
DF
F162
(HC0S)
1000
32-bit equivalent constant or lower 16-bit area of 32-bit area for storing target
value of high-speed counter
Operands
Relay
Operand
Timer/Counter Register
WX WY WR
A
Index
register
Constant
Index
modifier
SV
EV
DT
IX
IY
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
Target value
10000
Elapsed value
R3
R903A
Completion (clear) of
F162 control
Y0
Turns on when target value is matched
3 - 423
FP1/FPM
Description
Sets the numerical value specified by S as the target value for the high - speed counter. When the elapsed
value matches this target value, the specified output Yn turns on (executed as an interrupt process).
The control of the target value setting and target value match output is cleared when the target value is
matched.
Set the value of the 32 - bit specified by the target value S within the range given below.
K - 8,388,608 to K8,388,607 (H FF800000 to H 007FFFFF)
The value S is stored in special data registers DT 9047 and DT 9046 at the time of execution of the instruction.
The range that can be specified by Yn is from Y0 to Y7.
Flag conditions
3 - 424
FP1/FPM
F163 (HC0R)
Availability
FP1/FP - M
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
10
DF
ST
11
R3
10
Instruction
DF
F163
(HC0R)
- 200
32-bit equivalent constant or lower 16-bit area of 32-bit area for storing target
value of high-speed counter
Operands
Relay
Operand
Timer/Counter Register
WX WY WR
A
Index
register
Constant
Index
modifier
SV
EV
DT
IX
IY
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
Elapsed value
0
Target value
- 200
R3
R903A
Completion (clear) of
F163 control
Y0
Turns off when target value is matched
3 - 425
FP1/FPM
Description
Sets the numerical value specified by S as the target value for the high - speed counter. When the elapsed
value matches this target value, the specified output Yn turns off (executed as an interrupt process).
The control of the target value setting and target value match output is cleared when the target value is
matched.
Set the value of the 32 - bit specified by the target value S within the range given below.
K - 8,388,608 to K8,388,607 (H FF800000 to H 007FFFFF)
The value S is stored in special data registers DT9047 and DT9046 at the time of execution of the instruction.
The range that can be specified by Yn is from Y0 to Y7.
Flag conditions
3 - 426
FP1/FPM
F164(SPD0)
Availability
FP1/FP - M
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
10
DF
ST
11
R3
10
Instruction
DF
F164
DT
3
(SPD0)
100
S
Starting 16- bit area for storing control data
Operands
Relay
Operand
Timer/Counter Register
Index
register
Constant
WX WY WR
EV
DT
IX
IY
SV
N/A
N/A
N/A
N/A
N/A
N/A
Index
modifier
A
A: Available
N/A: Not Available
Description
The pulse output control mode is selected by settings in the contents of the 16 - bit area specified by S. The
pulse oscillation frequency range and external output relay Y for pulse output are decided by S. The pulse
output operation starts at the frequency specified by the contents of S+1 when the trigger turns on.
When the elapsed value of the high - speed counter agrees with target value, the output pulse frequency
changed from the initial output pulse frequency to the output pulse frequency.
When speed data of K0 is specified, this is regarded as last speed data, and the target value specified at the
address just before the last speed data is regarded as last target value. When the elapsed value of the
high - speed counter agrees with the last target value, the pulse output operation finishes.
Use the F0 (MV) instruction to control the high - speed counter to force the pulse output control to stop. Refer
to the description of the F0 (MV) instruction for high - speed counter control.
Pulse
output
Motor
Driver
Y7
Motor
R0
High- speed
counter input
3 - 427
FP1/FPM
H0
H0
Frequency data 1
Target value 1
Frequency data 2
Target value 2
Frequency data n
Last target value (Target value n)
K0
3 - 428
FP1/FPM
Selects the frequency range, pulse wide and the outputs for pulse output used for the instruction using
hexadecimal data as follows:
[S] = H 0
Selection of on pulse wide
H0: Duty ratio 50%
H1: to HF: on pulse wide fixing
Selection of pulse output terminal
H0: Pulse output Y7 (available for transistor output type FP - M and
FP1 C14, C16, C24 and C40 series)
H1: Pulse output Y6 (available for transistor output type FP - M and
FP1 C56 and C72 series)
Selection of frequency range
H0: 360 Hz to 5000 Hz
H1: 180 Hz to 5000 Hz
H2: 90 Hz to 5000 Hz
H3: 45 Hz to 5000 Hz
H4: 1440 Hz to 5000 Hz
H5: 720 Hz to 5000 Hz
Note
Selection of frequency range is available for
- H0 to H3: CPU version 2.7 or later.
- H0 to H5: CPU version 2.9 or later.
2
Frequency data
Use the speed data to specify the output pulse frequency for the pulse output.
Speed data specification range: K0 to K255
When set the frequency data(value) K0: Pulse output stops.
3
Target value
Set K0 at the final address of the control data to stop pulse output.
3 - 429
Flag conditions
FP1/FPM
Program example
Time chart
Speed data
(output pulse
frequency)
Speed data 1
K193
(1460 Hz)
Initial speed
data K152
(890 Hz)
0
1000
3000
Target
value 1
Trigger
X3
on
off
R903A
on
off
Program
R9013
F0 MV , H
0, DT100
F0 MV , K
152, DT101
F0 MV , K
193, DT104
F0 MV , K
152, DT107
F0 MV , K
0, DT110
X3
DF
1
3 - 430
FP1/FPM
F164(SPD0)
Availability
FP1/FP - M
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
10
R3
1
Instruction
10
DF
DF
12
ST
11
F164
DT
3
(SPD0)
100
S
Starting 16- bit area for storing control data
Operands
Relay
Operand
Timer/Counter Register
Index
register
Constant
WX WY WR
EV
DT
IX
IY
SV
N/A
N/A
N/A
N/A
N/A
N/A
Index
modifier
A
A: Available
N/A: Not Available
Description
The pattern output control mode is selected by settings in the contents of the 16 - bit area specified by S. The
number of target values and of outputs used are decided by S. The pattern output operation starts in the on/off
output pattern specified by the contents of S+1 when the trigger turns on.
When the elapsed value of the high - speed counter agrees with target value 1 specified by S+3 and S+2, the
output pattern is changed from the output pattern 1 to output pattern 2 specified by S+4.
When the elapsed value of the high - speed counter agrees with the last target value, the output pattern is
changed to the last output pattern. The output pattern operation then stops.
Target value 4
Elapsed value
Target value 3
Target value 2
Target value 1
Time
0
Y0
Pattern
output
Y1
Y2
1
3 - 431
FP1/FPM
Flag conditions
H0
H0
H0
H0
Output pattern 1
Target value 1
H0
H0
Output pattern 2
Target value 2
H0
H0
Output pattern n
Last target value (Target value n)
H0
3 - 432
H0
FP1/FPM
Sets the number of target values and outputs used for the instruction using hexadecimal data as follows:
[S] = H 0 0
Number of outputs used
Setting range: H1 to H8 (1 to 8)
Number of target values
Setting range: H1 to HF (1 to 15)
Example: S = H33
Three outputs (Y0 and Y2)
Three target values
The outputs are used starting from Y0.
2
Target value
Output pattern
When pattern output is performed using output contacts Y0 to Y7, the output is specified by a hex constant
with each bit corresponding to one output contact.
Bit position
15
12 11 8 7 4 3 0
Y7Y6Y5Y4 Y3Y2Y1Y0 1: on
0: off
Output contact
Example:
Output pattern HA
Y1 and Y3: on
Y0, Y2, Y4 to Y7: off
Bit position
15
12 11 8 7 4 3 0
Y7Y6Y5Y4 Y3Y2Y1Y0
Output contact
Output pattern 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0
Hexadecimal
3 - 433
FP1/FPM
Program example
To perform the following type of variable speed control (inverter control) using pattern output.
Connection
Pattern output
Inverter
Y0
Y1
Y2
X1
High- speed
counter input
Encoder
AC motor
Time chart
Target value 1 (K10000)
Speed
R3
Movement
on
off
on
R903A off
Y0
on
off
Y1
on
off
Y2
on
off
Output
pattern 1
(high speed
mode)
Output
pattern 2
(middle
speed
mode)
Program
R9013
F0 MV , H
33, DT100
F0 MV , H
Output
pattern 3
(low
speed
mode)
3, DT101
Target value 1
F0 MV , H
Output pattern 2
2, DT104
Target value 2
F0 MV , H
Output pattern 3
1, DT107
Target value 3
F0 MV , H
4, DT110
DF
1
3 - 434
FP1/FPM
Notes
The speed on the time chart (high speed/ medium speed/low
speed) differs according to the type and settings of the
inverter used.
Use the RST instruction to turn off the output contacts after
the final pattern output.
While the R3 turns on, the high - speed counter control flag
R903A is in the on state.
3 - 435
F165(CAM0)
FP1/FPM
Availability
Cam control
FP1/FP - M
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
10
Instruction
DF
DF
12
ST
11
R3
10
F165
DT
(CAM0)
100
S
Starting 16- bit area for storing control data
Operands
Relay
Operand
Index
register
Timer/Counter Register
Constant
WX WY WR
S
SV
EV
DT
IX
IY
N/A
N/A
N/A
N/A
N/A
N/A
Index
modifier
A
A: Available
N/A: Not Available
Description
This instruction enables you to use an FP - M or FP1 as a programmable cam switch taking encoder signals
into the high - speed counter of the FP - M or FP1.
Be sure to prevent down input to the high - speed counter during the cam control operation. If down input is
applied to the high - speed counter, outputs cannot operate as set in the cam output setting table.
A maximum of 8 cam control outputs are available starting from Y0.
A maximum patterns available are
- FP1 C14 and C16:
Total of 16 pairs (16 on targets and 16 off targets)
- FP1 C24, C40, C56, and C72 and FP - M C20, C32:
Total of 32 pairs (32 on targets and 32 off targets)
Be sure to reset the elapsed value of the high - speed counter (special data registers DT9045 and DT9044)
using F1 (DMV) instruction before executing the F165 (CAM0) instruction since the elapsed value of the
high - speed counter cannot be cleared by the trigger of the F165 (CAM0) instruction.
The cam control operation starts immediately after the trigger turns on. The cam control operation is cyclically
repeated. To stop the cam control operation, clear the F165 (CAM0) instruction using the F0 (MV) instruction
and special data register DT9052.
3 - 436
FP1/FPM
Elapsed value of
high- speedcounter
K14000
K12000
K10000
K8000
K6000
K4000
K2000
0
Y1: on
Y1: off
Y0: off
Y1: on
Time
X3
Cam 0
Y0
Cam 1
Y1
Initial pattern
3 - 437
FP1/FPM
H0
HFFFF
HFFFF
[S+(n - 7)]
[S+(n - 6)]
[S+(n - 5)]
[S+(n - 4)]
[S+(n - 3)]
[S+(n - 2)]
[S+(n - 1)]
[ S+n ]
1
H0
On target value
Off target value
HFFFF
HFFFF
In the 16 - bit area specified by S, the modes of the cam control operation are specified as follows using a
hexadecimal data:
- the maximum target value is decided in the cam control data table
- the number of outputs used for the cam control operation
[S] = H 0 0
Note
When you control the cam output cycle using a reset input signal
for X2, use of the maximum default target value is recommended.
3 - 438
FP1/FPM
These are the output patterns when the trigger of the F165 (CAM0) instruction is detected. The output
patterns are specified by setting on (1) or off (0) to the bit corresponding to the output used for the cam control
operation.
Bit position
15
12 11 8 7 4 3 0
Y7Y6Y5Y4 Y3Y2Y1Y0 1: on
0: off
Output contact
15
12 11 8 7 4 3 0
Y7Y6Y5Y4 Y3Y2Y1Y0
Output contact
Output contact 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1
Hexadecimal
3
(H9)
Target values for turning the output on and off should be specified as a pair.
A 32 - bit area is allocated for each target value and the setting range of the target value is:
- K1 to K8388607 (H21 to H7FFFF) when the target is not specified in the cam control data table (in
default setting)
- K1 to the maximum target value specified in the cam control data table
The number of on/off target value sets available are:
- FP1 C14 and C16:
Total of 16 pairs (16 on targets and 16 off targets)
- FP1 C24, C40, C56, C72 and FP - M C20, C32:
Total of 32 pairs (32 on targets and 32 off targets)
Notes
Specify a pair of on/off target values in the order of on and off
regardless of their value.
Be sure to set the target values starting from those for Y0 in
order.
Be sure to set an end code for each output pattern setting
(HFFFFFFFF) in the next available data register after the target
values for each output are finished.
4
The maximum target value can be specified only when H1 is set in hexadecimal digit position 3 in the 16 - bit
area specified by S.
When the elapsed value of the high - speed counter reaches the maximum target value, the elapsed value of
the high - speed counter is cleared and the same cam control operation is repeated.
The setting range of the maximum target value is K1 to K8388607 (H21 to H7FFFFF).
3 - 439
Flag condition
FP1/FPM
On target value
Cam output
more than
1 ms
more than
1 ms
When using special internal relay R9008 as the flag for this instruction, be sure to program the flag at the
address immediately after the instruction.
3 - 440
FP1/FPM
State
Target value
Y0
on
K12000
off
K4000
on
K2000, K8000
off
K6000, K12000
on
K4000
off
K10000
on
K12000
off
K2000
Y1
Y2
Y3
Program
R9013
F0 MV , H
1004, DT100
F0 MV , H
9, DT101
F1 DMV, K
12000, DT102
F1 DMV, K
4000, DT104
F1 DMV, K
2000, DT108
F1 DMV, K
6000, DT110
F1 DMV, K
8000, DT112
F1 DMV, K
12000, DT114
F1 DMV, K
4000, DT118
F1 DMV, K
10000, DT120
F1 DMV, K
12000, DT124
F1 DMV, K
2000, DT126
F1 DMV, K
DF
14000, DT130
0, DT9044
1
3 - 441
FP1/FPM
Time chart
Elapsed value
Max. target value (K14000)
K14000
K12000
K10000
K8000
K6000
K4000
K2000
0
R3
R903A
and R903B
on
off
on
off
Y0
on
off
Y1
on
off
Y2
on
off
Y3
on
off
3 - 442
Time
FP1/FPM
3 - 443
FP0/FP
Availability
F0 (MV)
FP0/FP
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
10
DF
DF
12
ST
11
R0
10
Instruction
F0
DT
(MV)
1
9052
F0
17
F0 MV , H 0, DT9052 or DT90052
(MV)
F0 MV , H 1, DT9052 or DT90052
DT
0
9052
Pulse output
Operands
Relay
Timer/Counter Register
Operand
WX WY WR
S
Index
register
SV
EV
DT
IX
(*1)
Constant
IY
(*2)
Index
modifier
A
A:
Available
(*1) I0 to IC on FP
(*2) ID on FP
Description
Performs high - speed counter control according to the control code specified in S.
This instruction is used to perform the following operations when using a high - speed counter:
<Function>
1) Performing a software reset
2) Disabling the count
3) Temporarily disables reset input setting using external inputs X2 and X5
4) Clearing control executed with high - speed counter and pulse output instructions F166 or F167.
Once written, a control code is retained until the next write operation.
3 - 444
FP0/FP
Flag conditions
15
ch2
12 11
ch1
8 7
ch0
4 3
<Control code>
Written using an F0(MV)
instruction (H0 to HF)
Note:
At the reset input setting, you set
whether the reset input (X2 or X5),
which was assigned by the system
register high - speed counter setting,
will be enabled or disabled.
Example:
Perform software reset . . . . . . . . . . . . . . . . . . . . . . . H1(0001)
Prohibit count . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . H2(0010)
Clear high - speed counter instruction . . . . . . . . . H8(1000)
Clear high - speed counter instruction and reset
elapsed value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . H9(1001)
3 - 445
FP0/FP
Program example
Example:
Using the FP
High - speed counter and Pulse output controls flag area
The area DT90052 for writing channels and control codes is allocated as shown below.
Control codes written with an F0(MV) instruction are stored by channel in special registers DT90190 to
DT90193.
High - speed counter and Pulse output controls flag area of FP
15
12 11
8 7
4 3
DT90052:
Channel specification
H0 to H3: CH0 to CH3
Clear high- speed counter instruction
0: Continue
1: Clear
Reset input setting (See note.)
0: Enable
1: Disable
Count
0: Permit
1: Prohibit
Software reset
0: No
1: Yes
Note:
At the reset input setting, you set whether the reset input (X2 or X5), which was assigned by the
system register high - speed counter setting, will be enabled or disabled.
3 - 446
FP0/FP
Program example
Example 1: Software reset of channel 0 of high - speed counter
R0
DF
3 - 447
FP0/FP
Availability
F0 (MV)
FP0/FP
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
10
DF
DF
12
ST
11
R0
10
Instruction
F0
H
F0 MV , H 1, DT9052 or DT90052
DT
F0
17
F0 MV , H 0, DT9052 or DT90052
DT
0
(MV)
1
9052
(MV)
0
9052
Pulse output
Operands
Relay
Timer/Counter Register
Operand
WX WY WR
S
Index
register
SV
EV
DT
IX
(*1)
Constant
IY
(*2)
Index
modifier
A:
Available
(*1) I0 to IC on FP
(*2) ID on FP
Description
Performs Pulse output control according to the control code specified in S.
This instruction is used to perform the following operations when using a Pulse output:
<Function>
1) Performing a software reset
2) Disabling the count
3) Preemptively stopping positioning/pulse output
4) Clearing control executed with pulse output - related instructions F171 or F176.
5) Setting near home input when returning to home position and changing to deceleration.
Once written, a control code is retained until the next write operation.
3 - 448
FP0/FP
Flag conditions
15
12 11
8 7
ch0
4 3
<Control code>
Written using an F0(MV)
instruction (H0 to HF)
Example:
Perform software reset . . . . . . . . . . . . . . . . . . . . . . . H1(0001)
Prohibit count . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . H2(0010)
Stop pulse output . . . . . . . . . . . . . . . . . . . . . . . . . . . . H8(1000)
Turn off pulse output and reset elapsed value . H9(1001)
3 - 449
FP0/FP
Program example
Example 1: Software reset of channel 0 of Pulse output.
R0
DF
Example 2: Enable near home input during pulse output control and change
to deceleration.
X3
DF
Using the FP
High - speed counter and Pulse output controls flag area
The area DT90052 for writing channels and control codes is allocated as shown below.
Control codes written with an F0(MV) instruction are stored by channel in special registers DT90190 to
DT90192.
High - speed counter and Pulse output controls flag area of FP
15
12 11
DT90052:
Channel specification
H0, H2: CH0, CH2
Near home input
0: Enable
1: Disable
Stop pulse output
0: Continue
1: Stop
Count
0: Permit
1: Prohibit
Software reset
0: No
1: Yes
3 - 450
8 7
4 3
FP0/FP
Program example
Example 1: Software reset of Pulse output
(ch0)
R0
DF
(ch2)
R0
DF
Example 2: Enable near home input during pulse output control and change
to deceleration.
(ch0)
X3
DF
(ch2)
X3
DF
3 - 451
FP0/FP
Availability
F1 (DMV)
FP0/FP
This instruction is used to write and read the elapsed value of the
high- speed counter/pulse output.
Outline
Program example
Boolean
Ladder Diagram
Address
Writing
Trigger
10
DF
12
F1
3000
ST
DF
22
F1 DMV , DT9044 , DT 6
:
:
21
(DMV)
9044
:
:
R10
DF
DT
20
Reading
Trigger
DF
20
ST
11
R0
10
Instruction
F1
10
(DMV)
DT
DT
9044
6
* The high- speed counter and pulse output elapsed value area
varies dependinon the PLC type.
S
Writing
Area for storing the elapsed value (32 bits) write in the high-speed
counter/pulse output, or constant data
Reading
Area for reading the elapsed value of the high- speed counter/pulse output
Operands
Relay
Timer/Counter Register
Operand
WX WY WR
Index
register
SV
EV
DT
IX
(*1)
IY
Constant
K
Index
modifier
N/A
N/A
N/A
N/A
N/A
(*1) I0 to IC on FP
3 - 452
A: Available
N/A: Not Available
FP0/FP
FP0
K - 8,388,608 to K 8,388,607
FP
K - 2,147,483,648 to K 2,147,483,647
Writing is only possible using an F1(DMV) instruction. Writing is not possible using other applied instructions
such as the transfer instruction F0(MV) or arithmetic instructions.
When specifying the memory area in S or D (when reading), specify only the lower - order 16 bits of the
memory area number.
Explanation of example
When the execution condition R0 is on, K3000 is written to the elapsed value area of ch0 of the high - speed
counter and pulse output.
Explanation of example
When the execution condition R10 is on, the elapsed value of the high - speed counter and pulse output is
transferred to data registers DT6 and DT7.
Flag conditions
3 - 453
FP0/FP
Program examples
The elapsed value area varies depending on the model and channel number.
Example 1: On R0 input, the value in data register DT4 is set in the ch0
elapsed value area as the set value.
R0
DF
Decrement input
X0
R0
Value in DT4
Time
Setting set value
Example 3: When the elapsed value of the ch0 is greater than K10000, the
internal relay R0 turns on.
R9010
F1
DT9044, DT0
3 - 454
R0
FP0/FP
Pulse output
channel no.
ch0
ch0
DT9044 to DT9045
ch1
ch1
DT9048 to DT9049
ch2
DT9104 to DT9105
ch3
DT9108 to DT9109
For FP0(T32)
High - speed counter
channel no.
Pulse output
channel no.
ch0
ch0
DT90044 to DT90045
ch1
ch1
DT90048 to DT90049
ch2
DT90104 to DT90105
ch3
DT90108 to DT90109
For FP
High - speed counter
channel no.
Pulse output
channel no.
ch0
ch0
DT90044 to DT90045
ch1
DT90048 to DT90049
ch2
ch2
DT90200 to DT90201
ch3
DT90204 to DT90205
3 - 455
FP0/FP
F166(HC1S)
Availability
FP0/FP
Outline
Program example
Boolean
Ladder Diagram
Address
Instruction
10
10
DF
12
R0
ST
11
Trigger
F166
0
(HC1S)
10000
DF
The channel number of the high- speed counter that corresponds to the match
output (n: K0 to K3).
The high- speed counter target value data or the starting address of the area
that contains the data.
The output coil that is turned on when the values match (Yn n: 0 to 7).
Operands
Relay
Index
register
Timer/Counter Register
Operand
Constant
Index
modifier
WX WY WR
EV
DT
SV
IX
(*1)
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
IY
A: Available
N/A: Not Available
(*1) I0 to IC on FP
Explanation of example
Target value
10000
Elapsed value
R0
R903A
Y0
ON when matches target value
The number of the high - speed counter control flag (R903A to R903D) varies depending on the channel
used.
3 - 456
FP0/FP
Description
The number specified in S is set as the target value of the high - speed counter, and when the elapsed value
matches the target value, the specified output Yn turns on (by interrupt processing).
The target value setting and target value match output control are cleared when the elapsed value matches
the target value.
Specify a 32 - bit data value for the target value S within the following range:
FP0
K - 8,388,608 to K8,388,607
FP
K - 2,147,483,648 to K2,147,483,647
The S value is stored in the target value area when the instruction is executed.
Possible specification range for Yn: Y0 to Y7
Flag conditions
3 - 457
F167(HC1R)
FP0/FP
Availability
FP0/FP
Outline
Program example
Boolean
Ladder Diagram
Address
10
DF
12
R0
ST
11
Trigger
10
Instruction
F167
DF
0
(HC1R)
0
-
200
0
The channel number of the high- speed counter that corresponds to the match
output (n: K0 to K3).
The high- speed counter target value data or the starting address of the area
that contains the data.
The output coil that is turned off when the values match (Yn n: 0 to 7)
Operands
Relay
Timer/Counter Register
Operand
Index
register
Constant
Index
modifier
WX WY WR
EV
DT
SV
IX
(*1)
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
IY
A: Available
N/A: Not Available
(*1) I0 to IC on FP
Explanation of example
Elapsed value
0
Target value
- 200
R0
R903A
Y0
OFF when matches target value
The number of the high - speed counter control flag (R903A to R903D) varies depending on the channel
used.
3 - 458
FP0/FP
Description
The number specified in S is set as the target value of the high - speed counter, and when the elapsed value
matches the target value, the specified output Yn turns off (by interrupt processing).
The target value setting and target value match output control are cleared when the elapsed value matches
the target value.
Specify a 32 - bit data value for the target value S within the following range:
FP0
K - 8,388,608 to K8,388,607
FP
K - 2,147,483,648 to K2,147,483,647
The S value is stored in the target value area when the instruction is executed.
Possible specification range for Yn: Y0 to Y7
Flag conditions
3 - 459
F168(SPD1)
FP0
Availability
Positioning control
(trapezoidal control)
FP0
Outputs a pulse from the specified output (Y0 or Y1) according to the
specified parameter.
Program example
Outline
Boolean
Ladder Diagram
Address
Trigger
10
Instruction
10
R0
ST
11
F168
DT
0
(SPD1)
100
Starting address for the area that contains the data table.
Operands
Relay
Operand
Timer/Counter Register
WX WY WR
SV
EV
N/A
N/A
Index
register
Constant
Index
modifier
DT
IX
IY
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Description
When the corresponding control flag is off and the execution condition (trigger) is in the on state, a pulse is
output from the specified output (Y0 or Y1).
The control code, initial speed, maximum speed, acceleration/deceleration time, and target value, are
specified by a user program with a data table as shown on the following page.
The frequency is switched by the acceleration/deceleration time specified for changing from the initial speed
to the maximum speed. During deceleration (normally 30 steps), the frequency is changed based on the
same slope as during acceleration.
Control
flag
Directional
output
ch0
R903A
DT9044, DT9045
(For FP0 T32, DT90044, DT90045)
DT9046, DT9047
(For FP0 T32, DT90046, DT90047)
Y2
ch1
R903B
DT9048, DT9049
(For FP0 T32, DT90048, DT90049)
DT9050, DT9051
(For FP0 T32, DT90050, DT90051)
Y3
Notes
When this instruction is used, the setting for the channel
corresponding to system register 400 should be set to
High - speed counter not used.
By performing rewrite during RUN during pulse output, more
than the set number of pulses may be output.
3 - 460
FP0
Elapsed value
Positive
Addition
Negative
Subtraction
Target
value
Elapsed value
Target value
greater than
current value
Addition
Target value
less than
current value
Subtraction
Target
value
(*1)
S+1
Initial speed
Fmin (Hz)
S+2
Maximum speed
Fmax (Hz)
S+3
Acceleration/decele
K30 to K32767 (ms)
ration time t (ms)
S+4
S+5
S+6
Target value
(pulse number)
K0
K-8,388,608 K+8,388,607
K-8 388 608 to K+8 388 607
Specify K0
f
Fmax
Output pulse
number
Fmin
t
t
Acceleration
time
t
Deceleration
time
next page
3 - 461
FP0
Application example
R0
F0 MV, H 2, DT 0
F0 MV, K1000, DT 1
F0 MV, K7000, DT 2
F0 MV, K300, DT 3
F1 DMV, K100000, DT 4
F0 MV, K 0, DT 6
R1
F168 SPD1, DT 0, K 0
DT 0
1002
DT 1
1000
DT 2
7000
DT 3
300
DT 4
DT 5
DT 6
3 - 462
K100000
0
FP0
7kHz
Number of
output pulse
100,000
1kHz
300ms
300ms
Flag conditions
The area specified using the index modifier exceeds the limit.
n is number except 0 and 1.
The value of S exceeds the limit of specified range.
S+1 is less than K40
S+1 > S+2
The value of S+5, S+4 exceeds the limit of specified range.
3 - 463
F168(SPD1)
FP0
Availability
Positioning control
(home position return)
FP0
Outputs a pulse from the specified output (Y0 or Y1) according to the
specified parameter.
Program example
Outline
Boolean
Ladder Diagram
Address
Trigger
10
Instruction
10
11
R0
ST
F168
DT
0
(SPD1)
100
Starting address for the area that contains the data table.
Operands
Relay
Operand
Timer/Counter Register
Index
register
Constant
Index
modifier
WX WY WR
SV
EV
DT
IX
IY
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Description
When the corresponding control flag is off and the execution condition (trigger) is in the on state, a pulse is
output from the specified output (Y0 or Y1).
The control code, initial speed, maximum speed, and acceleration/deceleration time are specified by a user
program with a data table as shown on the following page.
The frequency is switched by the acceleration/deceleration time specified for changing from the initial speed
to the maximum speed. During deceleration (normally 30 steps), the frequency is changed based on the
same slope as during acceleration.
Directional
output
Home
input
ch0
R903A
DT9044, DT9045
(For FP0 T32,
DT90044, DT90045)
DT9046, DT9047
(For FP0 T32,
DT90046, DT90047)
Y2
DT9052 bit2
(For FP0 T32,
DT90052)
X0
ch1
R903B
DT9048, DT9049
(For FP0 T32,
DT90048, DT90049)
DT9050, DT9051
(For FP0 T32,
DT90050, DT90051)
Y3
DT9052
(For FP0 T32,
DT90052)
X1
Notes
When this instruction is used, the setting for the channel
corresponding to system register 400 should be set to
High - speed counter not used.
By performing rewrite during RUN during pulse output, more
than the set number of pulses may be output.
3 - 464
FP0
Fmax
home input
Fmin
t
Control code
(*1)
S+1
Initial speed
Fmin (Hz)
S+2
Maximum speed
Fmax (Hz)
S+3
Acceleration/decele
K30 to K32767 (ms)
ration time t (ms)
next page
3 - 465
FP0
Application example
R0
F0 MV, H 22, DT 0
F0 MV, K1000, DT 1
F0 MV, K7000, DT 2
F0 MV, K300, DT 3
R1
F168 SPD1, DT 0, K 0
DT 0
0022
DT 1
1000
DT 2
7000
DT 3
300
Flag conditions
3 - 466
The area specified using the index modifier exceeds the limit.
n is number except 0 and 1.
The value of S exceeds the limit of specified range.
S+1 is less than K40
S+1 > S+2
FP0
R0
DF
R0
F1 DMV, K0,
DT9044
F0 MV,
H2,
DT0
Incremental control
F0 MV,
K1000,
DT1
Initial speed
F0 MV,
K7000,
DT2
Maximum speed
F0 MV,
K300,
DT3
Acceleration/deceleration time
K0,
DT6
Positioning start
Pulse output stops when the upper limit of the internal elapse value is exceeded if rotation is in one direction
only.
As a countermeasure, reset the elapsed value (zero clear) before executing F168 (SPD1) or F169 (PLS)
instructions, as with the program, above.
3 - 467
F169(PLS)
FP0
Pulse output
(with channel specification)
(JOG operation)
Availability
FP0
Outputs the pulse of the specified parameter from the specified output
(Y0 or Y1).
Program example
Outline
Boolean
Ladder Diagram
Address
Trigger
10
Instruction
10
11
R10
ST
F169
DT
S
S
10
(PLS)
10
0
Starting address for the area that contains the data table.
Operands
Relay
Operand
Timer/Counter Register
Index
register
Constant
Index
modifier
WX WY WR
SV
EV
DT
IX
IY
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Description
When the corresponding control flag is off and the execution condition (trigger) is in the on state, a pulse is
output from the specified channel. The pulse is output while the execution condition (trigger) is in the on state.
By specifying either incremental counting or decremental counting in the control code, this instruction can be
used as an instruction for JOG operations. For that situation, set the control code with combinations such as
H12 (incremental, directional output off) and H22 (decremental, directional output on).
The frequency and duty can be changed each scan. (This becomes effective with the next pulse output after
this instruction is executed.)
See below for the corresponding areas.
Channel no.
Control flag
ch0
R903A
DT9044, DT9045
(For FP0 T32, DT90044, DT90045)
ch1
R903B
DT9048, DT9049
(For FP0 T32, DT90048, DT90049)
When using the incremental counting mode, the pulse stops when the elapsed value exceeds H7FFFFF.
When using the decremental counting mode, the pulse stops when the elapsed value exceeds HFF800000.
Notes
When this instruction is used, the setting for the channel
corresponding to system register 400 should be set to
High - speed counter not used.
By performing a rewrite during RUN while operating, the pulse
output will stop during rewriting.
3 - 468
FP0
Control code
S+1
Frequency (Hz)
(*1)
K40 to K10000 (Hz) (*2)
Flag conditions
3 - 469
F170(PWM)
FP0
Availability
PWM output
(with channel specification)
FP0
Outputs the PWM of the specified parameter from the specified output
(Y0 or Y1).
Program example
Outline
Boolean
Ladder Diagram
Address
Trigger
10
Instruction
10
11
R10
ST
F170
DT
S
S
10
(PWM)
20
0
Starting address for the area that contains the data table.
Operands
Relay
Operand
Timer/Counter Register
Index
register
Constant
Index
modifier
WX WY WR
SV
EV
DT
IX
IY
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Description
When the corresponding control flag is off and execution condition (trigger) is in the on state, a PWM is output
from the specified channel. The PWM is output while the execution condition (trigger) is in the on state.
The frequency and duty are specified with the data table on the right made by a user program.
Since the output is delayed near the maximum and minimum levels, the set duty ratio will differ.
The duty can be changed each scan. The frequency settings is only effective at the start of the execution of
the instruction (becomes effective after the next pulse output).
See below for the corresponding areas.
Channel no.
Control flag
ch0
R903A
ch1
R903B
Notes
When this instruction is used, the setting for the channel
corresponding to system register 400 should be set to
High - speed counter not used.
By performing a rewrite during RUN while operating, the pulse
output will stop during rewriting.
If both the regular program and the interrupt program contain
code for the same channel, make sure both are not executed
simultaneously.
3 - 470
FP0
Control code
S+1
Duty (%)
H0 to H16 (*1)
K1 to K999 (0.1% to 99.9%)
(Cycle 26ms)
H1: Frequency 19 Hz
(Cycle 52ms)
(Cycle 105ms)
(Cycle 210ms)
(Cycle 420ms)
(Cycle 840ms)
(Cycle 1.6s)
(Cycle 3.4s)
Flag conditions
The area specified using the index modifier exceeds the limit.
n is number except 0 and 1.
The frequency setting value set with (S) is outside the specification range.
100% or higher is set with (S + 1)
3 - 471
F171(SPDH)
FP
Pulse output
(with channel specification)
(trapezoidal control)
Availability
FP
This instruction outputs pulses from the specified channel (ch0 or ch2)
according to the specified parameters.
Program example
Outline
Boolean
Ladder Diagram
Address
Trigger
10
R10
Instruction
10
11
DF
DF
12
ST
F171
DT
10
(SPDH)
100
Operands
Relay
Operand
Timer/Counter Register
Index
register
Constant
Index
modifier
WX WY WR
SV
EV
DT
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Description
Pulses are output from the specified channel (ch0 or ch2) when the corresponding control flag turns off and
the excution condition is in on state.
Channel no.
Output
Output method
Y0
CW
PLS
Y1
ch0
CCW
SIGN
Y3
CW
PLS
Y4
ch2
CCW
SIGN
The control code, initial speed, maximum speed, acceleration/deceleration time, and target value are
specified by creating the data table S to S+11 on the following page using the user program.
The frequency is changed using the specified acceleration/deceleration time from the initial speed to the
maximum speed. During deceleration, the frequency is changed based on the same slope as during
acceleration.
If the frequency is set to 50 kHz or more, specify a duty of 1/4 (25%).
3 - 472
FP
Control
flag
Elapsed value
area
ch0
R903A
DT90044, DT90045
DT90046, DT90047
ch2
R903C
DT90200, DT90201
DT90202, DT90203
Operation modes
Incremental <relative value control>
Outputs the pulses set with the target value.
Target
value
Selected
mode
CW/CCW
PLS + SIGN
Forward off
Reverse on
PLS + SIGN
Forward on
Reverse off
Elapsed value
Positive
Pulse output
from CW
Pulse output on
direction output off
Pulse output on
direction output on
Addition
Negative
Pulse output
from CCW
Pulse output on
direction output on
Pulse output on
direction output off
Subtraction
Target
value
Selected
mode
CW/CCW
PLS + SIGN
Forward off
Reverse on
PLS + SIGN
Forward on
Reverse off
Elapsed value
Target value
greater than
current value
Pulse output
from CW
Pulse output on
direction output off
Pulse output on
direction output on
Addition
Target value
less than
current value
Pulse output
from CCW
Pulse output on
direction output on
Pulse output on
direction output off
Subtraction
3 - 473
FP
t
t
Acceleration time
t
Deceleration time
S
S+1
Control code
(*1)
S+2
S+3
Initial speed
Fmin (Hz)
(*2)
S+4
S+5
Maximum speed
Fmax (Hz)
(*2)
S+6
S+7
Acceleration/decele
(*3)
ration time t (ms)
S+8
S+9
Target value
(pulse number)
S+10
S+11
(*4)
K0
0: Fixed
Number of acceleration/deceleration steps
0: 30 steps
1: 60 steps (Can be specified for only C32T2 and C28P2.)
Duty (on width)
0: Duty 1/2 (50%)
1: Duty 1/4 (25%)
Frequency range
0: 1.5 Hz to 9.8 kHz
1: 48 Hz to 100 kHz
2: 191 Hz to 100 kHz
Operation mode and output method
00: Incremental CW/CCW
02: Incremental PLS + SIGN (forward off / reverse on)
03: Incremental PLS + SIGN (forward on / reverse off)
10: Absolute
CW/CCW
12: Absolute
PLS + SIGN (forward off / reverse on)
13: Absolute
PLS + SIGN (forward on / reverse off)
(*2): Frequency (Hz) K constant
Frequency range
0: 1.5 Hz to 9.8 kHz [K1 to K9800 (units: Hz)] (Max. error near 9.8 kHz: approx. - 0.9 kHz)
* Set 1 to specify 1.5 Hz.
1: 48 Hz to 100 kHz [K48 to K100000 (units: Hz)] (Max. error near 100 kHz: approx. - 3 kHz)
2: 191 Hz to 100 kHz [K191 to K100000 (units: Hz)] (Max. error near 100 kHz: approx. - 0.8 kHz)
Initial speed: Set to 30 kHz or lower.
(*3): Acceleration/deceleration time (ms) K constant
With 30 steps: K30 to K32760 (Set in units of 30 ms.)
With 60 steps: K60 to K32760 (C32T2 and C28P2 only) (Set in units of 60 ms.)
(*4): Target value
K - 2147483648 to K2147483647
3 - 474
FP
Application example
R0
F1 DMV, H1100, DT 0
F1 DMV, K1000, DT 2
F1 DMV, K7000, DT 4
F1 DMV, K300, DT 6
F1 DMV, K100000, DT 8
F1 DMV, K 0, DT 10
R1
(DF)
F171 SPDH, DT 0, K 0
7kHz
Output pulse
number
100,000
1kHz
300ms
300ms
With 30 steps:
f = (7000 - 1000) 30 steps = 200(Hz)
t = 300ms 30 steps = 10ms
Flag conditions
3 - 475
F171(SPDH)
FP
Pulse output
(with channel specification)
(home position return)
Availability
FP
This instruction outputs pulses from the specified channel (ch0 or ch2)
according to the specified parameters.
Program example
Outline
Boolean
Ladder Diagram
Address
Trigger
10
R10
Instruction
10
11
DF
DF
12
ST
F171
DT
10
(SPDH)
100
Operands
Relay
Operand
Timer/Counter Register
Index
register
Constant
Index
modifier
WX WY WR
SV
EV
DT
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Description
Pulses are output from the specified channel (ch0 or ch2) when the corresponding control flag turns off and
the excution condition is in on state.
Channel no.
Output
Output method
Y0
CW
PLS
Y1
ch0
CCW
SIGN
Y2
Y3
CW
PLS
Y4
ch2
CCW
SIGN
Y5
The control code, initial speed, maximum speed, acceleration/deceleration time, and deviation counter clear
signal are specified by creating a data table as described on the following page using the user program.
The frequency is changed using the specified acceleration/deceleration time from the initial speed to the
maximum speed. During deceleration, the frequency is changed based on the same slope as during
acceleration.
If the frequency is set to 50 kHz or more, specify a duty of 1/4 (25%).
3 - 476
FP
Control
flag
Elapsed value
area
Near home
Home input
ch0
R903A
DT90044, DT90045
DT90046, DT90047
DT90052 bit2
X2
ch2
R903C
DT90200, DT90201
DT90202, DT90203
DT90052 bit4
X5
Operation modes
Return to home position
Pulses are output continually until home input (X2 or X5) occurs. To decelerate at near home, set the
corresponding bit of special data register DT90052 off on off when near home input occurs.
The value in the elapsed value area during a home position return differs from the current value. When the
return is completed, the elapsed value changes to 0.
Home position return by means of near home input and home input
Deceleration occurs when near home input occurs, and pulse output stops after home input. Operation
varies depending on the control code (lower order) settings described on the following page.
f
Fmax
home input
Fmin
t
3 - 477
FP
Control code
(*1)
S+2
S+3
Initial speed
Fmin (Hz)
(*2)
S+4
S+5
Maximum speed
Fmax (Hz)
(*2)
S+6
S+7
Acceleration/deceleration
time t (ms)
(*3)
S+8
S+9
(*4)
0: Fixed
Number of acceleration/deceleration steps
0: 30 steps
1: 60 steps (Can be specified for only C32T2 and C28P2.)
Duty (on width)
0: Duty 1/2 (50%)
1: Duty 1/4 (25%)
Frequency range
0: 1.5 Hz to 9.8 kHz
1: 48 Hz to 100 kHz
2: 191 Hz to 100 kHz
Operation mode and output method
20: Home position return mode I
21: Home position return mode I
22: Home position return mode I
23: Home position return mode I
24: Home position return mode I
25: Home position return mode I
26: Home position return mode I
27: Home position return mode I
30: Home position return mode II
31: Home position return mode II
32: Home position return mode II
33: Home position return mode II
34: Home position return mode II
35: Home position return mode II
36: Home position return mode II
37: Home position return mode II
CW
CCW
Direction output off
Direction output on
CW + deviation counter clear
CCW + deviation counter clear
Direction output off + deviation counter clear
Direction output on + deviation counter clear
CW
CCW
Direction output off
Direction output on
CW + deviation counter clear
CCW + deviation counter clear
Direction output off + deviation counter clear
Direction output on + deviation counter clear
FP
Application example
R0
F1 DMV, H1125, DT 0
F1 DMV, K1000, DT 2
F1 DMV, K7000, DT 4
F1 DMV, K100, DT 6
F1 DMV, K10, DT 8
R1
(DF)
F171 SPDH, DT 0, K 2
3 - 479
Flag conditions
3 - 480
FP
F172 (PLSH)
Availability
Pulse output
(with channel specification)
(JOG operation)
FP
Outline
Program example
Boolean
Ladder Diagram
Address
Instruction
10
10
ST
11
Trigger
F172
DT
R10
10
(PLSH)
10
0
Starting number for the area that contains the data table
Operands
Relay
Operand
Timer/Counter Register
WX WY WR
SV
EV
N/A
N/A
Index
register
Constant
Index
modifier
DT
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Description
When the corresponding control flag is off and the execution condition is in the on state, pulses are output
from the specified channel (ch0 or ch2). The pulses are output while the execution condition is on.
Channel no.
Ch0
Ch2
Output
Output method
Y0
CW
PLS
Y1
CCW
SIGN
Y3
CW
PLS
Y4
CCW
SIGN
By specifying either addition counting or subtraction counting in the control code, this instruction can be used
as an instruction for JOG operations.
Frequency can be changed in each scan, and the target value can be changed asynchronously. However,
the control code cannot be changed during instruction execution.
If a frequency of 50 kHz or higher is specified, a duty of 1/4 (25%) should be specified.
3 - 481
FP
Control flag
Elapsed value
Ch0
R903A
DT90044, DT90045
Ch2
R903C
DT90200, DT90201
Flag conditions
Turns on when:
Turns on when:
- The S, S + 1 is outside the specified range.
- The specified area is exceeded when an index is modified.
- The n is any value other than 0 or 2.
3 - 482
FP
Control code
S+2
S+3
Frequency
(*1)
S
S+1
Control code
(*1)
(*2)
S+2
S+3
Frequency
(*2)
S+4
S+5
Target value
(*3)
0: Fixed
Target value setting
0: Mode with no target value
1: Target value match stop mode (Can be specified for only C32T2 and C28P2.)
Duty (on width)
0: Duty 1/2 (50%)
1: Duty 1/4 (25%)
Frequency range
0: 1.5 Hz to 9.8 kHz
1: 48 Hz to 100 kHz
2: 191 Hz to 100 kHz
Output method
00: No counting
01: No counting
10: Addition counting
12: Addition counting
13: Addition counting
21: Subtraction counting
22: Subtraction counting
23: Subtraction counting
CW
CCW
CW
Directional output off
Directional output on
CCW
Directional output off
Directional output on
3 - 483
F173(PWMH)
FP
Availability
PWM output
(with channel specification)
FP
Outputs the PWM of the specified parameter from the specified channel
(ch0, ch2).
Outline
Program example
Boolean
Ladder Diagram
Address
Instruction
10
ST
11
F173
(PWMH)
DT
Trigger
20
R10
10
10
S
S
Starting number for the area that contains the data table
Operands
Relay
Operand
Timer/Counter Register
Index
register
Constant
Index
modifier
WX WY WR
SV
EV
DT
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Description
When the corresponding control flag is off and the execution condition is in the on state, a PWM is output from
the specified channel (ch0 or ch2). The PWM is output while the execution condition is on.
The data table shown at below, indicating the frequency and duty, is created and the values are specified by
the user program.
The duty, particularly when it is close to the minimum or maximum value, may be off from the specified ratio,
depending on the load voltage and load current.
The duty can be changed for each separate scan. Control codes, however, cannot be changed while an
instruction is being executed.
Output
ch0
Y0
R903A
ch2
Y3
R903C
3 - 484
Output method
FP
Flag conditions
3 - 485
FP
Control code
(*1)
Duty
(*2)
S+1
Resolution of 100
Frequency
(Hz)
Timing
(ms)
K0
1.5
666.67
K20
15.6 k
0.06
K1
2.0
502.51
K21
20.8 k
0.05
K2
4.1
245.70
K22
25.0 k
0.04
K3
6.1
163.93
K23
31.3 k
0.03
K4
8.1
122.85
K24
41.7 k
0.02
K5
9.8
102.35
K6
19.5
51.20
K7
48.8
20.48
K8
97.7
10.24
K9
201.6
4.96
K10
403.2
2.48
K11
500.0
2.00
K12
694.4
1.44
K13
1.0 k
0.96
K14
1.3 k
0.80
K15
1.6 k
0.64
K16
2.1 k
0.48
K17
3.1 k
0.32
K18
6.3 k
0.16
K19
12.5 k
0.08
Frequency
(Hz)
Timing
(ms)
3 - 486
FP
F174(SP0H)
Pulse output
(with channel specification)
(Selectable data table control operation)
Availability
FP
Outputs the pulses from the specified channel (ch0 or ch2) according to
the specified data table.
Program example
Outline
Boolean
Ladder Diagram
Address
Trigger
10
R10
Instruction
10
11
DF
DF
12
ST
F174
DT
10
(SP0H)
100
Operands
Relay
Operand
Timer/Counter Register
Index
register
Constant
Index
modifier
WX WY WR
SV
EV
DT
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Description
When the corresponding control flag is off and the execution condition is in the on state, pulses are output
from the specified channel (ch0 or ch2) based on the contents set for the data table in which the first address
is that specified by S.
Channel no.
Output
Output method
Y0
PLS
CCW
SIGN
Y3
CW
PLS
Y4
ch2
CW
Y1
ch0
CCW
SIGN
When the elapsed value of the high - speed counter reaches the target value specified in the data table, the
pulse frequency is switched (interrupt processing is carried out).
When the elapsed value agrees with the last target value, the pulse output operation finishes.
Use the F0 (MV) instruction to control the high - speed counter to force the pulse output control to stop.
If the frequency is set to 50 kHz or more, specify a duty of 1/4 (25%).
Control
flag
ch0
R903A
DT90044, DT90045
DT90046, DT90047
ch2
R903C
DT90200, DT90201
DT90202, DT90203
3 - 487
FP
Flag conditions
3 - 488
FP
Control code
(*1)
[S+2]
Frequency 1
(*2)
[S+4]
Target value 1
(Number of pulses)
(*3)
[S+6]
Frequency 2
[S+8]
Target value 2
(Number of pulses)
[S+2n]
Frequency n
[S+2(n+1)]
Target value n
(Number of pulses)
[S+2(n+2)]
K0
End of table
(Pulse output stops.)
Frequency range
0: 1.5 Hz to 9.8 kHz
1: 48 Hz to 100 kHz
2: 191 Hz to 100 kHz
Operation mode
0: Incremental
Specifies the amount of travel (number of pulses)
1: Absolute
Specifies the target value (absolute value)
Output method
0: CW
(addition counting)
1: CCW
(subtraction counting)
2: PLS+SIGN (forward off) (addition counting)
3: PLS+SIGN (reverse on) (subtraction counting)
4: PLS+SIGN (forward on) (addition counting)
5: PLS+SIGN (reverse off) (subtraction counting)
(*2): Frequency (Hz) K constant
Frequency range
0: 1.5 Hz to 9.8 kHz [K1 to K9800 (units: Hz)] (Max. error near 9.8 kHz: approx. - 0.9 kHz)
* Set 1 to specify 1.5 Hz.
1: 48 Hz to 100 kHz [K48 to K100000 (units: Hz)] (Max. error near 100 kHz: approx. - 3 kHz)
2: 191 Hz to 100 kHz [K191 to K100000 (units: Hz)] (Max. error near 100 kHz: approx. - 0.8 kHz)
Initial speed: Set Frequency 1 to 30 kHz or less.
(*3): Target value (K - 2147483648 to K2147483647)
The value of the 32 - bit data specified for the target value should be within the range indicated in
the table below.
Specification of control code
Operation mode
Output method
Incremental
Addition counting
Subtraction counting
Absolute
Addition counting
Subtraction counting
3 - 489
FP
Program example
[Operation content]
Pulse output from the specified channel ch0 begins at 1,000 Hz when the F174
1.
2.
At the point when 1,000 pulses have been counted at a frequency of 1,000 Hz, the
frequency switches to 2,500 Hz.
At the point when 3,000 pulses have been counted at a frequency of 2,500 Hz, the
frequency switches to 5,000 Hz.
At the point when 8,000 pulses have been counted at a frequency of 5,000 Hz, the
frequency switches to 1,000 Hz.
At the point when 10,000 pulses have been counted, pulse output stops.
3.
4.
5.
8000 10000
Elapsed value of
high - speed
counter
(Amount of travel)
Trigger
R10
R903A
(R903C)
When the execution condition (trigger) R10 of the F174 (SP0H) instruction goes on, the
high - speed counter control flag R903A (R903C) goes on. When the elapsed value
reaches 10,000 and pulse output stops, R903A (R903C) goes off.
[Settings and program]
The frequency range is from 191 Hz to 100 kHz, the duty 1/4 (25%), the operation mode
is Incremental, and the output method is CW.
R0
F1 DMV , H 1200, DT100
Frequency 1: 1,000Hz
Frequency 2: 2,500Hz
Frequency 3: 5,000Hz
Frequency 4: 1,000Hz
F1 DMV , K
R10
DF
3 - 490
0, DT118
F174 SP0H,DT100,K0
FP
F175(SPSH)
Availability
Pulse output
(Linear interpolation)
FP Ver.2
Pulses are output from channel ch0 and ch2, in accordance with the
parameters in the designated data table, so that the path to the target
position forms a straight line.
Program example
Outline
Boolean
Ladder Diagram
Address
Trigger
10
R10
Instruction
10
11
DF
DF
12
ST
F175
DT
10
(SPSH)
100
0: Fixed
Operands
Relay
Operand
Timer/Counter Register
Index
register
Constant
Index
modifier
WX WY WR
SV
EV
DT
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Description
Pulses are output from channel ch0 (X - axis) and ch2 (Y - axis) when the corresponding control flag is off and
the execution conditions are on.
Channel no.
Output
Output method
ch0
(for X - axis)
Y0
CW
PLS
Y1
CCW
SIGN
ch2
(for Y - axis)
Y3
CW
PLS
Y4
CCW
SIGN
The control code, initial speed, maximum speed, acceleration/deceleration time, and target value are
specified by creating the data table S to S+11 on the following page using the user program.
If the frequency is set to 40 kHz or more, specify a duty of 1/4 (25%).
Control
flag
ch0
R903A
DT90044, DT90045
DT90046, DT90047
ch2
R903C
DT90200, DT90201
DT90202, DT90203
3 - 491
Flag conditions
3 - 492
FP C32T2
Control code
(*1)
[S+2]
Composite speed
Initial speed Fmin(Hz)
(*2)
[S+4]
Composite speed
Maximum speed Fmax(Hz)
(*2)
[S+6]
[S+8]
X - axis (CH0)
Target value (Movement distance)
(*4)
[S+10]
Y - axis (CH2)
Target value (Movement distance)
(*4)
[S+12]
[S+14]
[S+16]
[S+18]
[S+21]
[S+22]
(*5)
[S+20]
(*3)
[S+23]
(*6)
(*7)
Setting area
Designated with
user program
Operation result
storage area
Parameters for each
axis component,
calculated due to
instruction execution,
are stored here.
(*7)
0: Fixed
Duty (on width)
0: Duty 1/2 (50%)
1: Duty 1/4 (25%)
0: Fixed
Operation mode and output method
00: Incremental
CW/CCW
02: Incremental
PLS + SIGN (forward off / reverse on)
03: Incremental
PLS + SIGN (forward on / reverse off)
10: Absolute
CW/CCW
12: Absolute
PLS + SIGN (forward off / reverse on)
13: Absolute
PLS + SIGN (forward on / reverse off)
(*2): Composite speed (Initial speed, Maximum speed) (Hz) <K constant>
1.5Hz to 100kHz [K1 to K100000]
However, 1.5Hz is for an angle of 0deg or 90deg only.
Also, specify K1 when specifying 1.5 Hz.
If the component speed drops lower than the minimum speed for each frequency range, then the
speed will become the corrected component speed, so be careful. (See *6)
When simultaneously using a high-speed counter, periodical interrupt or PLC link, do not set to 60kHz
or higher.
If initial speed is set equal to maximum speed, pulses will be output with no acceleration/deceleration.
Set the composite speed so that component speed of each axis is 1.5 Hz or greater.
Composite speed (initial speed): 30 kHz or lower
3 - 493
FP C32T2
Note:
Cautions regarding specification of composite speed (initial speed)
The trajectory might not be linear if the initial composite speeds for CH0 and CH2 are not 1.5 Hz or
higher in the formula below (when the formula below cant be worked out).
1.5 (x2+y2)
f
x
x: Short CH of distance between target and current value
y: Long CH of distance between target and current value
(*3): Acceleration/deceleration time (ms) K constant
K0 to K32767
If this is 0, pulses will be output for the initial speed (composite speed) as is, with no
acceleration/deceleration.
(*4): Target value
K - 8388608 to K8388607
When operating only one axis,
a) In incremental mode, set the target value for the axis which will not be operated to 0.
b) In absolute mode, set the target value for the axis which will not be operated the same as the
current value.
Note: Infinite feed is not possible during linear interpolation.
(*5): Component speed (Initial speed and maximum speed of each axis)
This is stored as 2 words in real numbers type.
X - axis component speed =
Example:
Even if the initial speed is corrected (See *6), the calculation value will be stored as is in the
operation result storage area.
(*6): Frequency range
The system automatically selects the frequency range for each component of each axis.
Range 0: 1.5Hz to 9.8kHz
Range 1: 48Hz to 100kHz
Range 2: 191Hz to 100kHz
9800Hz
a) If maximum speed
If initial speed < 1.5Hz, initial speed is corrected to 1.5Hz, and range 0 is selected.
1.5Hz, range 0 is selected.
If initial speed
100000Hz,
b) If 9800Hz < maximum speed
If initial speed < 48Hz, initial speed is corrected to 48Hz, and range 0 is selected.
If 48Hz
initial speed < 191Hz, range 1 is selected.
If initial speed
191Hz, range 2 is selected.
(*7): Number of acceleration/deceleration steps
The system automatically calculates the number of acceleration/deceleration steps in the range 0
to 60 steps.
If the operation result is 0, pulses are output for the initial speed (composite speed) as is, with no
acceleration/deceleration.
The number of acceleration/deceleration steps is found using the formula:
acceleration/deceleration time (ms) x component initial speed (Hz).
3 - 494
FP C32T2
Example:
With incremental, initial speed 300Hz, maximum speed 5kHz, acceleration/deceleration time 0.5s,
CH0 target value 1000, CH2 target value 50
300 1000
= 299.626Hz
CH0 component initial speed =
(10002 + 502)
CH2 component initial speed =
300 50
(10002 + 502)
= 14.981Hz
147.8 60 steps
7.4 7 steps
3 - 495
F176(SPCH)
FP
Availability
Pulse output
(Circular interpolation)
FP Ver.2
Pulses are output from channel ch0 and ch2, in accordance with the
parameters in the designated data table, so that the path to the target
position forms an circular.
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
10
Instruction
10
R10
ST
11
F176
DT
10
(SPCH)
100
0: Fixed
Operands
Relay
Operand
Timer/Counter Register
Index
register
Constant
Index
modifier
WX WY WR
SV
EV
DT
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Description
Pulses are output from the channel ch0 (for X - axis) and ch2 (for Y - axis) when the corresponding control flag
turns off and the execution condition (trigger) turns on.
Channel no.
Output
Output method
ch0
(for X - axis)
Y0
CW
PLS
Y1
CCW
SIGN
ch2
(for Y - axis)
Y3
CW
PLS
Y4
CCW
SIGN
Designate the control code, composite speed, target position and pass position by creating the data table S
to S+11 on the next page with the user program.
Control
flag
ch0
R903A
DT90044, DT90045
DT90046, DT90047
ch2
R903C
DT90200, DT90201
DT90202, DT90203
3 - 496
FP C32T2
Flag conditions
FP C32T2
Control code
S+2
S+3
Composite speed
(Frequency) Fv (Hz)
S+4
S+5
X - axis (CH0)
Target position
S+6
S+7
Y - axis (CH2)
Target position
S+8
S+9
X - axis (CH0)
Pass position
S+10
S+11
Y - axis (CH2)
Pass position
S+12
S+13
Radius
S+14
S+15
X - axis (CH0)
Center position
S+16
S+17
Y - axis (CH0)
Center position
(*1)
S
S+1
Control code
(*1)
(*2)
S+2
S+3
Composite speed
(Frequency) Fv (Hz)
(*2)
S+4
S+5
X - axis (CH0)
Target position
(*3)
S+6
S+7
Y - axis (CH2)
Target position
(*3)
S+8
S+9
X - axis (CH0)
Center position
S+10
S+11
Y - axis (CH2)
Center position
S+12
S+13
Radius
Setting
area
(*3)
Designated
with user program
Operation result
storage area
Parameters for each
axis component, calculated due to instruction execution,
are stored here.
0: Fixed
Operation connection mode(*4)
0: Stop
1: Continue
Rotation direction (*5)
0: from CH2- CW axis to CH0- CW axis
1: from CH0- CW axis to CH2- CW axis
Circular method (*6)
0: Pass position setting method
1: Center position setting method
Operation mode and output method
00: Incremental CW/CCW
02: Incremental PLS + SIGN (forward off / reverse on)
03: Incremental PLS + SIGN (forward on / reverse off)
10: Absolute
CW/CCW
12: Absolute
PLS + SIGN (forward off / reverse on)
13: Absolute
PLS + SIGN (forward on / reverse off)
(*2): Composite speed (Frequency) K constant
100 Hz to 20 kHz [K100 to K20000]
As a guide, keep the composite speed within the range of the formula below.
Fv[Hz] <= radius[pulse] x 10/scantime[ms]
3 - 498
Setting
area
Operation result
storage area
FP C32T2
CH2
CW
Direction 1
Direction 0
CH0
CW
CH0
CW
Direction 0
Y (CH2)
Fy
Fv
X (CH0)
Center position O
(Xo, Yo)
Composite speed
X - axis component speed
Y - axis component speed
Radius
Fx= Fv sin = Fv
|Ye - Yo|
r
O (Xo, Yo):
S (Xs, Ys):
P (Xp, Yp):
E (Xe, Ye):
Fy= Fv cos = Fv
|Xe - Xo|
r
3 - 499
F180 (SCR)
FPe
Availability
FP - e
Outline
Program example
Boolean
Ladder Diagram
Address
10
ST
11
Trigger
10
Instruction
F180
H
R0
S3
S2
0
(SCR)
0
DT
100
DT
S4
10
DT
101
S1
S2
S3
S4
Operands
Relay
Operand
Index
register
Timer/Counter Register
WX WY WR
Constant
Index
modifier
SV
EV
DT
IX
IY
S1
S2
N/A
N/A
N/A
N/A
S3
N/A
N/A
S4
N/A
N/A
N/A
A: Available
N/A: Not Available
Description
Register FP - e screens specified with S1 with the method whereby S2 to S2+2 is specified.
For S3, specify the address where data for display in the upper is stored. For S4, specify the address where
data for display in the lower is stored.
When this instruction is executed, the registered screen is displayed in the FP - e panel.
To switch screens, use the mode switch on the FP - e, or instruction F180 or F181.
Specify the screens for setting with S1.
Specify the display method with S2, S2+1 and S2+2.
Specify the data to be displayed in the upper with S3.
Specify the data to be displayed in the lower with S4.
Note) For the numeric data display of S3 and S4, only 16 - bit data is available.
3 - 500
FPe
Flag conditions
How to specify S1
Specify the type of FP - e mode.
Value specified for S1
Type of mode
H0
H1
H2
H3
12 11
87
43
bit 0: Unit PV
bit 1: Unit SV
bit 2: Unit s
bit 3: Unit m
bit 4: Unit h
bit 5: Unit C
bit 6: Unit F
bit 7: Unit
3 - 501
FPe
12 11
87
Color designation
(bits 14 and 13)
00: Undefined (When
specifying, Green)
01: Green
10: Red
11: Orange
Zero suppress (bit 15)
[0: Yes, 1: No]
43
Remarks)
If displaying decimal point in the format of 5 - digit decimal
with sign, the value(s) before the decimal point should be
displayed.
Example:
To change the color to red, put 10 for bits 14 and 13.
Specify in this way: 0100 0000 0000 0000
H4000.
3 - 502
FPe
F181 (DSP)
Availability
FP - e
Outline
Program example
Boolean
Ladder Diagram
Address
10
ST
11
Trigger
10
Instruction
F181
DT
R0
0
(DSP)
0
F181 DSP, DT 0
S
FP - e screen mode and number (Specify between 0 and 7.)
Operands
Relay
Operand
Timer/Counter Register
WX WY WR
S
N/A
Index
register
Constant
SV
EV
DT
IX
IY
Index
modifier
A
A: Available
N/A: Not Available
Description
Switches the FP - e screen to the screen of the mode specified with S.
How to specify S
Specify the type of FP - e mode.
Value specified for S
Type of mode
K0
K1
K2
K3
K4
K5
K6
K7
Flag conditions
F183 (DSTM)
Outline
Sets the 32 - bit ON - delay timer for 0.01 s units (0.01 to 21474836.47 s)
Program example
Boolean
Ladder Diagram
Address
Trigger
10
ST
11
R5
R0
10
Instruction
F183
10
DT
16
OT
(DSTM)
DT
5
R
32-bit equivalent constant or lower 16-bit area of 32-bit data for timer set value
Operands
Relay
Timer/Counter Register
Operand
WX WY WR
SV
EV
DT
Index
register
IX
(*1)
IY
Constant
K
Index
modifier
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
(*1) With the FP, FP2, FP2SH, and FP10SH, this is I0 to IC.
Explanation of example
When the execution condition (trigger) has been satisfied, the auxiliary timer is activated, and the time equal
to the values stored in data registers DT10 and DT11 x 0.01 seconds has elapsed, R5 goes on.
Description
This functions as a 32 - bit addition - type On Delay timer set in 0.01 - second units.
When the execution condition (trigger) is on, the elapsed time is added, and when the elapsed value (D + 1, D)
(32 bits) exceeds the set value, the relays being used are turned on by the OT instruction which comes next in
the program.
When the execution condition (trigger) is off, the elapsed value area is cleared to 0, and relays being used are
turned off by the OT instruction.
When the time set for the special internal relay R900D has elapsed, the relay is turned on.
R900D can also be used as a timer contact.
(R900D is off when the execution condition (trigger) is off and while addition is being carried out.)
R0
R900D
3 - 504
When the execution condition (trigger) changes from off to on, values of 0 are sent to the elapsed
value area (D + 1, D).
R0
R5
F183 DSTM, K500, DT5
0
1
R900D
F0 MV, DT50, WR50
2
Sent to (D + 1, D)
DT5, DT6
0
If the execution condition (trigger) stays on, the values in the elapsed value area (D + 1, D) are added.
R0
R5
F183 DSTM, K500, DT5
DT5, DT6
K500
2
R900D
F0 MV, DT50, WR50
0
1
2
Addition
next page
3 - 505
If the values in the elapsed value area (D +1, D) reach (S + 1, S), relays being used are turned on by
the OT instruction which comes next in the program. The special internal relay R900D also goes on at
this point.
R5
R0
DT5
K500
R900D
F0 MV, DT50, WR50
3
Addition completed
Elapsed value
(D+1, D)
Set value
(S+1, S)
R0
on
off
R5
on
(R900D) off
R900D
X1
Y0
Pair
R900D
Y1
Pair
When timer a , which is activated by X0: on, expires, Y0 goes on. When timer
expires, Y1 goes on.
If written as indicated below, R900D will not function correctly.
X0
X1
R900D
Y0
R900D
Y1
3 - 506
3 - 507
F190 (MV3)
P190 (PMV3)
Outline
Program example
Boolean
Ladder Diagram
Address
Instruction
10
ST
11
Trigger
F190
R0
0
(MV3)
DT
10
DT
S1
S2
S3
S1
S3
40
S2
30
DT
20
DT
10
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
Index Integer
modifier device
S1
N/A
N/A
S2
N/A
N/A
S3
N/A
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
3 - 508
Explanation of example
When trigger R0 turns on,
- the contents of data register DT10 are copied to DT40.
- the contents of data register DT20 are copied to DT41.
- the contents of data register DT30 are copied to DT42.
[S3]16 bits
[S2]16 bits
[S1]16 bits
[D]
DT42
DT41
DT40
Description
The 16-bit data or 16-bit equivalent constant specified by S1, S2 and S3 is copied to the area (3 words)
specified by D when the trigger turns on.
Related instruction
To transfer two types of 16-bit data at once, use the F7 (MV2) instruction.
Flag conditions
Error flag (R9007):
Error flag (R9008):
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
3 - 509
Program example
Boolean
Ladder Diagram
Address
Instruction
10
ST
11
Trigger
F191 (DMV3)
R0
DT
DT
S1
S2
S3
20
30
DT
10
DT
10
40
S1
S2
S3
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
Index Integer
modifier device
S1
N/A N/A
N/A
S2
N/A N/A
N/A
S3
N/A N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
3 - 510
Explanation of example
When trigger R0 turns on,
- the contents of deta register DT11 and DT10 are copied to data registers DT41 and DT40.
- the contents of data register DT21 and DT20 are copied to DT43 and DT42.
- the contents of data register DT31 and DT30 are copied to DT45 and DT44.
Higher
16-bit area
Lower
16-bit area
Higher
16-bit area
Lower
16-bit area
[S2]
[S3]
Contents
of DT31
Contents
of DT30
Higher
16-bit area
Lower
16-bit area
Contents
of DT11
Contents
of DT10
[S1]
Contents
of DT21
Contents
of DT20
[D]
DT45
DT44
DT43
DT42
DT41
DT40
Description
The 32-bit data or 32-bit equivalent constant specified by S1, S2 and S3 is copied to the area (6 words)
specified by D when the trigger turns on.
Related instruction
To transfer two types of 32-bit data at once, use the F8 (DMV2) instruction.
Flag conditions
Error flag (R9007):
Error flag (R9008):
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
3 - 511
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
R0
10
ST
11
F215
S2
(DAND)
DT
20
DT
10
DT
30
S1
S2
Lower 16-bit area of 32-bit data for storing AND operation result
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
Index Integer
modifier device
S1
N/A
N/A
S2
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
15
0
[DT10] 1 0 0 1 0 1 1 0 0 0 1 0 0 0 0 1
[DT11] 1 1 0 0 0 1 1 0 1 0 1 0 1 0 0 1
AND operation
15
0
[DT20] 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
[DT21] 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
15
0
[DT30] 1 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0
[DT31] 0 0 0 0 0 0 0 0 1 0 1 0 1 0 0 1
3 - 512
Description
Performs AND operation on each bit in the 32-bit equivalent constant or 32-bit data specified by S1+1 and
S1 and S2+1 and S2 when the trigger turns on. The AND operation result is stored in the 32-bit area
specified by D.
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the calculated result is recognized as 0.
3 - 513
F216 (DOR)
P216 (PDOR)
Outline
32-bit data OR
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
R0
ST
11
F216
0
(DOR)
DT
S1
S2
20
DT
10
DT
10
30
S1
S2
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
Index Integer
modifier device
S1
N/A
N/A
S2
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
15
0
[DT10] 1 0 0 1 0 1 1 0 0 0 1 0 0 0 0 1
[DT11] 1 1 0 0 0 1 1 0 1 0 1 0 1 0 0 1
OR operation
15
0
[DT20] 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
[DT21] 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
15
0
[DT30] 1 1 1 1 1 1 1 1 0 0 1 0 0 0 0 1
[DT31] 1 1 0 0 0 1 1 0 1 1 1 1 1 1 1 1
3 - 514
Description
Performs OR operation on each bit in the 32-bit equivalent constant or 32-bit data specified by S1+1 and S1
and S2+1 and S2 when the trigger turns on. The OR operation result is stored in the 32-bit area specified by
D.
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the calculated result is recognized as 0.
3 - 515
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
R0
10
ST
11
F217
S2
(DXOR)
DT
20
DT
10
DT
30
S1
S2
Lower 16-bit area of 32-bit data for storing exclusive OR operation result
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
Index Integer
modifier device
S1
N/A
N/A
S2
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
[S1]: HC6A99621
15
0
[DT10] 1 0 0 1 0 1 1 0 0 0 1 0 0 0 0 1
[DT11] 1 1 0 0 0 1 1 0 1 0 1 0 1 0 0 1
[S2]: H00FFFF00
Exclusive OR
15
0
[DT20] 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
[DT21] 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
[D]: H6921C656
15
0
[DT30] 0 1 1 0 1 0 0 1 0 0 1 0 0 0 0 1
[DT31] 1 1 0 0 0 1 1 0 0 1 0 1 0 1 1 0
3 - 516
Description
Performs exclusive OR operation on each bit in the 32-bit equivalent constant or 32-bit data specified by
S1+1 and S1 and S2+1 and S2 when the trigger turns on. The exclusive OR operation result is stored in
the 32-bit area specified by D.
You can use this instruction to check how many bits in two 32-bit data items are the same.
Flag conditions
Error flag (R9007):
Error flag (R9008):
= flag (R900B):
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the calculated result is recognized as 0.
3 - 517
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
10
ST
11
R0
10
Instruction
F218
S2
(DXNR)
DT
20
DT
10
DT
30
S1
S2
Lower 16-bit area of 32-bit data for storing exclusive NOR operation result
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
Index Integer
modifier device
S1
N/A
N/A
S2
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
[S1]: HC6A99621
15
0
[DT10] 1 0 0 1 0 1 1 0 0 0 1 0 0 0 0 1
[DT11] 1 1 0 0 0 1 1 0 1 0 1 0 1 0 0 1
Exclusive NOR
[S2]: H00FFFF00
15
0
[DT20] 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
[DT21] 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
[D]: H39A996DE
15
0
[DT30] 1 0 0 1 0 1 1 0 1 1 0 1 1 1 1 0
[DT31] 0 0 1 1 1 0 0 1 1 0 1 0 1 0 0 1
3 - 518
Description
Performs exclusive NOR operation on each bit in the 32-bit equivalent constant or 32-bit data specified by
S1+1 and S1 and S2+1 and S2 when the trigger turns on. The exclusive NOR operation result is stored in
the 32-bit area specified by D.
You can use this instruction to check how many bits in two 32-bit data items are the same.
Flag conditions
Error flag (R9007):
Error flag (R9008):
= flag (R900B):
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the calculated result is recognized as 0.
3 - 519
F219 (DUNI)
P219 (PDUNI)
Outline
Program example
Boolean
Ladder Diagram
Address
Instruction
10
ST
11
Trigger
F219
R0
0
(DUNI)
DT
DT
S1
S2
S3
30
DT
20
DT
10
10
40
S1
S2
S3
Lower 16-bit area of 32-bit data which stores master data for combination or
32-bit equivalent constant
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
Index Integer
modifier device
S1
N/A
N/A
S2
N/A
N/A
S3
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
3 - 520
Explanation of example
[S1+1, S1]: HCCCCAAAA
[S2+1, S2]:H33335555
[DT10]
[DT11]
[DT20]
[DT21]
Inverted
[S3+1, S3]:H0F0F0FF0
[S3+1, S3]:HF0F0F00F
[DT30]
[DT31]
[Inverted DT30]
[Inverted DT31]
HC0C0A00A
H03030550
[D+1, D]:HC3C3A55A
[DT40]
[DT41]
Description
The two groups of double word data specified by S1+1 and S1 and S2+1 and S2 are combined by bit unit
processing using the master data specified by S3+1 and S3 and stored in the 32 - bit area specified by D.
([S1+1, S1] AND [S3+1, S3]) OR ([S2+1, S2] AND [S3+1, S3]) [D+1, D]
When [S3+1 and S3]) is H0, ([S2+1, S2] [D+1, D]
When [S3+1, S3]) is HFFFFFFFF, ([S1+1, S1] [D+1, D]
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the calculated result is recognized as 0.
3 - 521
second conversion
The specified time data (a date and time) is changed into the number of
seconds.
Outline
Program example
Boolean
Ladder Diagram
Address
10
ST
11
Trigger
10
Instruction
F230
(TMSEC)
DT
10
DT
R0
20
S
S
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
Index
modifier
N/A
N/A
N/A
N/A
N/A
A
A: Available
N/A: Not Available
Explanation of example
When the internal relay (R0) is on, conversion to the number of seconds from standard time is performed for
the time data of the data registers DT10 to DT12, and the conversion result is stored in DT20 and DT21.
ex.)
(higher)
H37
H03
DT10
DT11
(lower)
H26
H12
H12
DT12 H02
(DEC.3,02 - 12:37:26)
(2002)
ex.)
(higher)
(lower)
DT10
DT11
H59
H31
H59
H23
DT12
H00
H12
(DEC.31,00 - 23:59:59)
(2100)
3 - 522
H039CDD06 DT20
(Binary value) DT21
(60,611,846 seconds)
HBC19137F DT20
(Binary value) DT21
(3,155,759,999 seconds)
Description
1)
Conversion to the number of seconds from standard time *1 is performed for the input time data [S ~
S+2], and a conversion result is stored in [D, D+1] by the 32 - bit binary.
2)
3)
Time data (S) must be specified in the data sequence of BCD, and the value within the limits must be
registered.
S:
S+1:
S+2:
(lower)
D:
D+1:
Seconds data
(H00000000 - HBC19137F)
Flag conditions
3 - 523
The specified number of seconds is changed into time data (a date and
time).
Outline
Program example
Boolean
Ladder Diagram
Address
10
ST
11
Trigger
10
Instruction
F231
(SECTM)
10
DT
F231 SECTM, DT 0, DT 10
DT
R0
10
S
S
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
Index
modifier
N/A
N/A
N/A
N/A
N/A
N/A
N/A
A
A: Available
N/A: Not Available
Explanation of example
When the internal relay (R0) is on, the number of seconds for the data registers DT0 and DT1 is converted to
the time data based on the standard time, and stored in DT10 to 12.
ex.)
(higher)
DT0
DT1
H039D0A6A
(Binary value)
(60,623,466)
H51
H03
H02
(lower)
H06
H15
H12
DT10
DT11
DT12
(Dec.3,02 - 15:51:06)
(2002)
ex.)
(higher)
HBC19137F
(Binary value)
DT0
DT1
(3,155,759,999 seconds)
H59
H31
H00
(lower)
H59
H23
H12
DT10
DT11
DT12
(Dec.31,00 - 23:59:59)
(2100)
3 - 524
Description
1)
The input number of seconds (S) is converted to the time data based on standard time *1, and stored in
(D).
2)
3)
The range which can specify the number of seconds (S) is 100 years which can be expressed by time
data.
H00000000 - HBC19137F
- - - Normal conversion
HBC191380 - HFFFFFFFF
- - - Conversion error
(lower)
(H00000000 - HBC19137F)
S:
S+1:
(higher)
D:
D+1:
D+2:
(lower)
2001
:
:
:
:
:
:
:
:
2099
:
:
2100
Flag conditions
3 - 525
F235 (GRY)
P235 (PGRY)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
R0
0
ST
F235
0
(GRY)
DT
10
DT
20
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
Index Integer
modifier device
SV
EV
DT
LD
FL
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Description
Converts the 16-bit data specified by S to gray codes when the trigger turns on. The converted result is stored
in the 16-bit area specified by D.
For detailed information about the gray code
page 3 - 530
Flag conditions
Error flag (R9007):
Error flag (R9008):
3 - 526
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
R0
0
ST
F236
(DGRY)
DT
10
DT
20
Lower 16-bit area of 32-bit data for storing gray code (destination)
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
Index Integer
modifier device
SV
EV
DT
LD
FL
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Description
Converts the 32-bit data specified by S to gray code when the trigger turns on. The converted data is stored in
D+1 and D.
For detailed information about the gray code
page 3 - 530
Flag conditions
Error flag (R9007):
Error flag (R9008):
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
3 - 527
F237 (GBIN)
P237 (PGBIN)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
R0
F237 GBIN,
ST
F237
0
(GBIN)
DT
10
DT
DT10, DT20
S
20
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
S
D
Register
Index
register
Index
Integer
modifier device
SV
EV
N/A
N/A
N/A A
N/A
DT LD FL
Constant
A: Available
N/A: Not Available
Description
Converts the gray codes in 16-bit are specified by S to 16-bit data when the trigger turns on. The converted
result is stored in the area specified by D.
For detailed information about the gray code
Flag conditions
3 - 528
page 3 - 530
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
R0
F238 DGBIN,
ST
F238
(DGBIN)
DT
10
DT
DT10, DT20
S
20
Lower 16-bit area of 32-bit data for storing converted data (destination)
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
Index Integer
modifier device
SV
EV
DT
LD
FL
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Description
Converts gray code to 32-bit data when the trigger turns on. The converted result is stored in the 32-bit area
specified by D+1 and D.
For detailed information about the gray code
Flag conditions
page 3 - 530
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
3 - 529
Binary data
Gray code
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
63
255
3 - 530
3 - 531
F240 (COLM)
P240(PCOLM)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
R0
F240 COLM,
DT10,
K10,
n
F240
(COLM)
DT
10
DT
10
DT20
10
ST
11
20
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
Index Integer
modifier device
N/A
N/A
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
3 - 532
Explanation of example
When the specified bit position n = 10
S
15
0
0 1 0 1 0 0 0 1 1 1 0 1 1 0 0 1
15
10
1
D+1
D+2
D+3
D+4
D+5
D+6
D+7
D+8
D+9
D+10
D+11
D+12
D+13
D+14
D+15
Description
The bit data at the position specified by n of the 16-word data area with the head address D is rewritten using
the 16-bit data of the area specified by S.
The contents of the bits of the 16-word data area with head address D that are not specified do not change.
n can be between 0 and 15.
Flag conditions
Error flag (R9007):
Error flag (R9008):
15.
- If the result of the conversion overflows the storage area specified with D.
3 - 533
F241 (LINE)
P241(PLINE)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
R0
ST
11
F241
0
(LINE)
DT
20
10
DT
10
10
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
SV
EV
DT
LD
FL
N/A
Constant
K
Index Integer
modifier device
A
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
3 - 534
Explanation of example
When the specified bit position n = 10
15
S
10
1
S+1
S+2
S+3
S+4
S+5
S+6
S+7
S+8
S+9
S+10
S+11
S+12
S+13
S+14
S+15
15
0
0 1 0 1 0 0 0 1 1 1 0 1 1 0 0 1
Description
Reads the bit data at the position specified by n from the area specified by S and stores it in the area
specified by D.
n can be set between 0 and 15.
Flag conditions
15.
3 - 535
S+1
S+2
Character 2
(Byte 1)
Character 1
(Byte 0)
S+3
Character 4
(Byte 3)
Character 3
(Byte 2)
S+4
Character 6
(Byte 5)
Character 5
(Byte 4)
Character data
Example:
The example shows a character string data table specifying
the following: Character string size: 10. Number of characters:
5. Character data: ABCDE.
10
DT0
DT1
DT2
DT3
DT4
B
D
A
C
E
DT5
DT6
Higher Lower
16 bits 16 bits
3 - 536
Example:
The example shows (character string size 16 characters, no
specification of characters) for DT0.
R0
F0(MV) ,
K16,
DT0
Example:
The example shows a data table specifying the following for
DT0: (character string size 20 characters, number of
characters 12 characters, and character data
ABCDEFGHIJKL).
R0
F0(MV),
K20,
DT0
K12,
DT1
Number of characters
(12 characters)
F95 ASC, M ABCDEFGHIJKL, DT2
Character data
3 - 537
F257 (SCMP)
P257 (PSCMP)
Outline
With the FP, the differential execution type instruction P257 (PSCMP) cannot be specified.
Program example
Boolean
Ladder Diagram
Address
10
ST
11
Trigger
F257
10
(SCMP)
DT
F257 SCMP, DT 0, DT 10
S1
DT
R10
10
Instruction
10
S2
S1
S2
Operands
Relay
Timer/Counter
Operand
WX WY WR WL
Index
register
Register
SV
EV
DT
LD
FL
(*1)
Constant
I
(*2)
Index
modifier
S1
N/A
N/A
N/A
N/A
S2
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
When internal relay R10 is on, data register DT1 and DT11 are compared.
In this case, it is determined that S1 < S2, and R900C goes on.
DT0
DT1
DT2
DT3
10
(Character string size)
4
(Number of characters)
B
A
(Byte 1)
(Byte 0)
D
C
(Byte 3)
(Byte 2)
DT10
DT11
DT12
DT13
DT4
(Byte 5)
(Byte 4)
DT14
DT5
(Byte 7)
(Byte 6)
DT15
DT6
3 - 538
(Byte 9)
Higher
16 bits
(Byte 8)
Lower
16 bits
8
(Character string size)
5
(Number of characters)
B
A
(Byte 1)
(Byte 0)
D
C
(Byte 3)
(Byte 2)
E
(Byte 5)
(Byte 4)
(Byte 7)
(Byte 6)
Higher
16 bits
Lower
16 bits
Description
The character string specified for S1 is compared to that specified for S2, and the judgment result is output to
special internal relays R9009 to R900C (judgment flags for comparison instructions).
R9009 to R900C are assigned based on whether S1 or S2 is larger, as shown in the table below.
Relationship
of S1 and S2
Flag
R900A
R900B
R900C
R9009
>
<
Carry
S1<S2
OFF
OFF
ON
Fluctuates
S1=S2
OFF
ON
OFF
OFF
S1>S2
ON
OFF
OFF
Fluctuates
Greater/lesser
S2
ABCDE
ABCDE
ABCD
<
ABCDE
>
ABCDE
Comparison of character strings is performed in sequence from byte 0, one character at a time.
If one character string has fewer characters than the other, it may still be handled as larger if a large character
code is used when the comparison is made.
Example: B > ABCDE
To specify a character string, indicate the number of the area in which the character size and number of
characters have been specified.
For detailed information about the table configuartion of data area
see page 3 - 536.
Flag conditions
3 - 539
F258 (SADD)
P258 (PSADD)
Outline
With the FP, the differential execution type instruction P258 (PSADD) cannot be specified.
Program example
Boolean
Ladder Diagram
Address
10
ST
11
Trigger
10
Instruction
F258
10
(SADD)
DT
S1
10
DT
DT
R10
20
S2
S1
S2
Operands
Relay
Timer/Counter
Operand
WX WY WR WL
Index
register
Register
SV
EV
DT
LD
FL
(*1)
Constant
I
(*2)
Index
modifier
S1
N/A
N/A
N/A
N/A
S2
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
3 - 540
A: Available
N/A: Not Available
Description
The character string specified for S1 is coupled to that specified for S2, and the result is stored in the
character string specified by D.
At the starting address of the area for storing results D, designate the character string size using the user
program.
Explanation of example
DT0
10
5
10
DT10
DT1
DT11
DT2
DT3
B
D
DT4
A
C
E
3
2
DT12
DT13
DT14
DT5
DT15
DT6
DT16
Higher Lower
16 bits 16 bits
DT20
10
DT21
1
3
Higher Lower
16 bits 16 bits
B
D
DT24 1
DT25 3
DT22
DT23
DT26
Higher Lower
16 bits 16 bits
Flag conditions
3 - 541
F259 (LEN)
P259 (PLEN)
Outline
With the FP, the differential execution type instruction P259 (PLEN) cannot be specified.
Program example
Boolean
Ladder Diagram
Address
10
ST
11
Trigger
10
Instruction
F259
10
(LEN)
DT
DT
R10
100
Character string
Operands
Relay
Timer/Counter
Operand
WX WY WR WL
Index
register
Register
SV
EV
DT
LD
FL
(*1)
Constant
I
(*2)
Index
modifier
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
3 - 542
A: Available
N/A: Not Available
Explanation of example
10
DT0
DT1
DT2
DT3
DT4
DT5
B
D
1
3
A
C
E
2
DT100
DT6
Higher Lower
16 bits 16 bits
Description
The number of characters in the character string specified by S is determined, and the result is stored in D.
Flag conditions
3 - 543
F260 (SSRC)
P260 (PSSRC)
Outline
With the FP, the differential execution type instruction P260 (PSSRC) cannot be
specified.
Program example
Boolean
Ladder Diagram
Address
10
ST
11
Trigger
10
Instruction
F260
10
(SSRC)
DT
S1
10
DT
DT
R10
120
S2
S1
S2
Operands
Relay
Timer/Counter
Operand
WX WY WR WL
Index
register
Register
SV
EV
DT
LD
FL
(*1)
Constant
I
(*2)
Index
modifier
S1
N/A
N/A
N/A
N/A
S2
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
3 - 544
A: Available
N/A: Not Available
Explanation of example
The DT0 character is searched from the character string of DT10, and the result is stored in DT120.
DT0
DT1
DT2
DT3
DT10
DT11
Search
DT12
DT13
DT4
(Byte 5)
(Byte 4)
DT14
DT5
(Byte 7)
(Byte 6)
DT15
DT6
(Byte 9)
Higher
16 bits
(Byte 8)
Lower
16 bits
DT16
1
5
DT120
DT121
(Byte 8)
Lower
16 bits
Description
The character data specified by S1 is searched using the character string specified by S2.
The number of characters that are the same, as resulting from the search, is stored in D, and the first
detected relative position (byte unit) is stored in D + 1.
Flag conditions
3 - 545
Outline
With the FP, the differential execution type instruction P261 (PRIGHT) cannot be
specified.
Program example
Boolean
Ladder Diagram
Address
10
ST
11
Trigger
10
Instruction
F261
10
(RIGHT)
DT
F261 RIGHT, DT 0, K 5, DT 20
S1
R10
DT
20
S2
S1
Character string
S2
Operands
Relay
Timer/Counter
Operand
WX WY WR WL
Index
register
Register
SV
EV
DT
LD
FL
(*1)
Constant
I
(*2)
Index
modifier
S1
N/A
N/A
N/A
N/A
S2
N/A
N/A
N/A
N/A
N/A
N/A
N/A
3 - 546
A: Available
N/A: Not Available
Explanation of example
A character is retrieved from the end of the character string of DT0, and is sent to DT20.
DT0
10
DT20
10
DT1
DT21
DT2
DT3
B
D
DT4
1
3
DT5
A
C
E
2
E
2
DT22
DT25
DT6
Higher Lower
16 bits 16 bits
DT23
DT24
1
3
DT26
Higher Lower
16 bits 16 bits
Description
The number of characters specified by S2 is searched starting from the right side (the end of the character
data) of the character string specified by S1, and is sent to the character string specified by D.
At the starting address of the area for storing results D, designate the character string size using the user
program.
Flag conditions
3 - 547
F262 (LEFT)
P262 (PLEFT)
Outline
With the FP, the differential execution type instruction P262 (PLEFT) cannot be
specified.
Program example
Boolean
Ladder Diagram
Address
10
ST
11
Trigger
10
Instruction
F262
10
(LEFT)
DT
F262 LEFT, DT 0, K 5, DT 20
S1
R10
DT
20
S2
S1
Character string
S2
Operands
Relay
Timer/Counter
Operand
WX WY WR WL
Index
register
Register
SV
EV
DT
LD
FL
(*1)
Constant
I
(*2)
Index
modifier
S1
N/A
N/A
N/A
N/A
S2
N/A
N/A
N/A
N/A
N/A
N/A
N/A
3 - 548
A: Available
N/A: Not Available
Explanation of example
A character is retrieved from the beginning of the character string of DT0, and is sent to DT20.
DT0
10
DT20
10
DT1
DT21
DT2
DT3
B
D
DT4
1
3
DT5
A
C
E
DT22
B
D
DT25
DT6
DT23
DT24
DT26
Higher Lower
16 bits 16 bits
Higher Lower
16 bits 16 bits
Description
The number of characters specified by S2 is searched starting from the left side (the beginning of the
character data) of the character string specified by S1, and is sent to the character string specified by D.
At the starting address of the area for storing results D, designate the character string size using the user
program.
Flag conditions
3 - 549
F263 (MIDR)
P263 (PMIDR)
Outline
With the FP, the differential execution type instruction P263 (PMIDR) cannot be
specified.
Program example
Boolean
Ladder Diagram
Address
10
ST
11
Trigger
10
Instruction
R
F263
10
(MIDR)
DT
S1
S2 S3
F263 MIDR, DT 0, K 1, K 3, DT 20
R10
DT
20
S1
Character string
S2
S3
Operands
Relay
Timer/Counter
Operand
WX WY WR WL
Index
register
Register
SV
EV
DT
LD
FL
(*1)
Constant
I
(*2)
Index
modifier
S1
N/A
N/A
N/A
N/A
S2
N/A
N/A
S3
N/A
N/A
N/A
N/A
N/A
N/A
N/A
3 - 550
A: Available
N/A: Not Available
Explanation of example
Three characters are retrieved from the position byte 1 (second character) of the character string of DT0, and
are sent to DT20.
DT0
10
DT20
10
DT1
DT21
DT2
DT3
B
D
DT4
1
3
DT5
A
C
E
DT22
DT25
DT6
DT23
DT24
DT26
Higher Lower
16 bits 16 bits
Higher Lower
16 bits 16 bits
Description
The number of characters specified by S3 is retrieved starting from the position specified by S2 in the
character string specified by S1, and is sent to the character string specified by D.
At the starting address of the area for storing results D, designate the character string size using the user
program.
Flag conditions
3 - 551
F264 (MIDW)
P264 (PMIDW)
Outline
With the FP, the differential execution type instruction P264 (PMIDW) cannot be
specified.
Program example
Boolean
Ladder Diagram
Address
10
ST
11
Trigger
10
Instruction
R
F264
10
(MIDW)
DT
S2
R10
DT
20
S1
Character string
S2
Area in which the position of the character string is stored, or constant data
Operands
Relay
Timer/Counter
Operand
WX WY WR WL
Index
register
Register
SV
EV
DT
LD
FL
(*1)
Constant
I
(*2)
Index
modifier
S1
N/A
N/A
N/A
S2
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
3 - 552
A: Available
N/A: Not Available
Explanation of example
Three characters are retrieved from the character string of DT0, and are sent to the position byte 1 (second
character) of the character string block of DT20.
10
DT0
DT1
DT2
DT3
DT4
A
C
E
G
B
D
F
H
DT5
DT6
Higher
16 bits
Lower
16 bits
DT20
10
DT21
DT22
DT23
DT24
DT25
DT26
1
(Byte 0)
3
(Byte 2)
5
(Byte 4)
7
(Byte 6)
(Byte 9)
Higher
16 bits
DT21
DT24
A
(Byte 1)
C
(Byte 3)
6
(Byte 5)
DT25
8
(Byte 7)
1
(Byte 0)
B
(Byte 2)
5
(Byte 4)
7
(Byte 6)
(Byte 9)
Higher
16 bits
(Byte 8)
Lower
16 bits
DT22
DT23
2
(Byte 1)
4
(Byte 3)
6
(Byte 5)
8
(Byte 7)
10
DT20
(Byte 8)
Lower
16 bits
DT26
Description
The number of characters specified by S2 is retrieved from the character string specified by S1, and is sent
to the n position of the character string specified by D.
Flag conditions
F265 (SREP)
P265 (PSREP)
Outline
With the FP, the differential execution type instruction P265 (PSREP) cannot be
specified.
Program example
Boolean
Ladder Diagram
Address
10
ST
11
Trigger
10
Instruction
F265
10
(SREP)
DT
DT
R10
20
K
K
1
3
Area storing the head byte position of the character to be replaced, or constant
data
Area storing the number of characters to be replaced from the source data, or
constant data
Operands
Relay
Timer/Counter
Operand
WX WY WR WL
Index
register
Register
SV
EV
DT
LD
FL
(*1)
Constant
I
(*2)
Index
modifier
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
3 - 554
A: Available
N/A: Not Available
Explanation of example
The DT0 character string is replaced with the number of characters in DT1 (5 characters) from byte p=1 in
DT20. In this case, n=3 characters of the data stored in the source are deleted in the replacement.
10
DT0
DT1
DT2
DT3
DT4
A
C
E
G
B
D
F
H
DT5
DT6
Higher
16 bits
Lower
16 bits
DT20
10
DT21
DT22
DT23
DT24
DT25
DT26
1
(Byte 0)
3
(Byte 2)
5
(Byte 4)
7
(Byte 6)
(Byte 9)
Higher
16 bits
DT21
DT24
A
(Byte 1)
C
(Byte 3)
6
(Byte 5)
DT25
8
(Byte 7)
1
(Byte 0)
B
(Byte 2)
5
(Byte 4)
7
(Byte 6)
(Byte 9)
Higher
16 bits
(Byte 8)
Lower
16 bits
DT22
DT23
2
(Byte 1)
4
(Byte 3)
6
(Byte 5)
8
(Byte 7)
10
DT20
(Byte 8)
Lower
16 bits
DT26
Description
The character string specified by S replaces the character string specified by D, for the number of
characters specified by n, starting from the position specified by P.
Flag conditions
F270 (MAX)
P270(PMAX)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
R0
ST
11
F270
S1
S2
0
(MAX)
DT
20
DT
10
DT
10
30
S1
S2
Lower 16-bit area of 32-bit data for storing maximum value and relative address
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
SV
EV
DT
LD
FL
Constant
K
Index Integer
modifier device
S1
N/A
S2
N/A
N/A
N/A
A: Available
N/A: Not Available
Description
This instruction searches for the maximum value in the 16-bit data table between the area selected with S1
and the area selected with S2, and stores it in the area selected with D. The address relative to S1 is stored in
D+1.
16-bit data table
S1:
D:
S1+1:
D+1:
Maximum value
Relative address
2
3
4
S2:
Relative address
If there are several values which are a maximum value, the relative address of the first value found searching
from S1 is stored in D+1.
3 - 556
Flag conditions
3 - 557
F271 (DMAX)
P271(PDMAX)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
R0
ST
11
F271
(DMAX)
DT
10
DT
20
S1
10
DT
30
S2
S1
S2
Starting 16-bit area for storing maximum value and relative address (3 words)
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
SV
EV
DT
LD
FL
Constant
K
Index Integer
modifier device
S1
N/A
S2
N/A
N/A
N/A
A: Available
N/A: Not Available
Description
This instruction searches for the maximum value in the double word data table between the area selected
with S1 and the area selected with S2, and stores it in the area selected with D. The address relative to S1 is
stored in D+2.
Double word data table
S1:
Lower word
D:
Lower word
D+2:
S1+3:
3 - 558
Relative address
Maximum value
Relative address
If S2 specifies a higher word of double word data, processing will take place over the same area as if the lower
word had been specified.
Double word data table
S1:
S1+1:
Lower word 0
1
S1+2:
D:
Lower word
D+1:
Higher word
Higher word
D+2:
Maximum value
Relative address
S1+3:
S2 - 1:
Lower word
Relative address
If there are several values which are a maximum value, the relative address of the first value found searching
from S1 is stored in D+2.
Flag conditions
3 - 559
F272 (MIN)
P272 (PMIN)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
R0
ST
11
F272
S1
S2
0
(MIN)
DT
20
DT
10
DT
10
30
S1
S2
Starting 16-bit area for storing minimum value and relative address (2 words)
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
SV
EV
DT
LD
FL
Constant
K
Index Integer
modifier device
S1
N/A
S2
N/A
N/A
N/A
A: Available
N/A: Not Available
Description
This instruction searches for the minimum value in the 16-bit data table between the area selected with S1
and the area selected with S2, and stores it in the area selected with D. The address relative to S1 is stored in
D+1.
Word data table
S1:
D:
S1+1:
D+1:
Minimum value
Relative address
2
3
4
S2:
Relative address
If there are several values which are a minimum value, the relative address of the first value found searching
from S1 is stored in D+1.
3 - 560
Flag conditions
3 - 561
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
R0
ST
11
F273
S1
S2
0
(DMIN)
DT
20
DT
10
DT
10
30
S1
S2
Starting 16-bit area for storing minimum value and relative address (3 words)
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
SV
EV
DT
LD
FL
Constant
K
Index Integer
modifier device
S1
N/A
S2
N/A
N/A
N/A
A: Available
N/A: Not Available
Description
This instruction searches for the minimum value in the double word data table between the area selected with
S1 and the area selected with S2, and stores it in the area selected with D. The address relative to S1 is stored
in D+2.
Double word data table
S1:
Lower word
D:
Lower word
D+2:
S1+3:
3 - 562
Relative address
Minimum value
Relative address
If S2 specifies a higher word of double word data, processing will take place over the same area as if the lower
word had been specified.
Double word data table
S1+1:
Lower word 0
Higher word
D+1:
S1+2:
D+2:
S1:
D:
Lower word
Higher word
Minimum value
Relative address
S1+3:
S2 - 1:
Lower word
Relative address
If there are several values which are a minimum value, the relative address of the first value found searching
from S1 is stored in D+2.
Flag conditions
Error flag (R9007):
Error flag (R9008):
3 - 563
F275 (MEAN)
P275(PMEAN)
Calculates the total and mean numbers in the specified word data table.
For the FP, the P type high- level instruction P275 (PMEAN) is not
available.
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
R10
ST
11
F275
S1
S2
10
(MEAN)
DT
S1
30
S2
20
DT
10
DT
10
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
SV
EV
DT
LD
FL
Constant
K
Index Integer
modifier device
S1
N/A
S2
N/A
N/A
N/A
A: Available
N/A: Not Available
Description
The total value and the average value of the word data (signed) from the area selected with S1 to the area
selected with S2 are obtained and stored in the area selected with D.
15
D
D+1
D+2
Decimals of the average value are rounded off so that the average value is an integer.
3 - 564
Flag conditions
3 - 565
F276 (DMEAN) Total and mean numbers calculation in 32-bit data table
P276(PDMEAN)
Calculates the total and mean numbers in the specified double word
data table.
For the FP, the P type high- level instruction P276 (PDMEAN) is not
available.
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
11
F276
(DMEAN)
DT
10
DT
20
DT
R0
ST
30
10
S1
S2
S1
S2
Starting 16-bit area for storing total and mean numbers (5 words)
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
SV
EV
DT
LD
FL
Constant
K
Index Integer
modifier device
S1
N/A
S2
N/A
N/A
N/A
A: Available
N/A: Not Available
Description
The total value and the average value of the double word data (signed) from the area selected with S1 to the
area selected with S2 are obtained and stored in the area selected with D.
15
D
D+1
D+2
D+3
D+4
D+5
3 - 566
If S2 specifies a higher word of double word data, processing will take place over the same area as if the lower
word had been specified.
Double word data table
Lower word 0
S1+1: Higher word
S1:
S1+2:
S1+3:
S2 - 1:
Specified areas
Lower word n
Decimals of the average value are rounded off so that the average value is an integer.
Flag conditions
3 - 567
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
F277
(SORT)
DT
10
DT
R0
ST
11
19
10
S1
S2
S3
S1
S2
S3
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
SV
EV
DT
LD
FL
Constant
Index Integer
modifier device
S1
N/A
N/A
S2
N/A
N/A
S3
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
When the S3 is K0 (ascending order)
DT10
K300
DT10
K - 30
DT10
K300
DT10
11
K10
11
K-3
11
K10
11
K1000
K300
12
13
K3
K-1
12
13
K-1
K1
12
13
K3
K-1
12
13
K100
K30
14
K1000
14
K3
14
K1000
14
K10
15
K - 30
15
K10
15
K - 30
15
K3
16
K100
16
K30
16
K100
16
K1
17
K30
17
K100
17
K30
17
K-1
18
K1
18
K300
18
K1
18
K-3
19
K-3
19
K1000
19
K-3
19
K - 30
3 - 568
Description
The data words (signed) from the area specified by S1 to the area specified by S2 are sorted in ascending
order (the smallest word is first) or descending order (the largest word is first) depending on the condition set
with S3.
If S1 = S2, sorting does not take place.
The sort condition is specified as follows in S3:
- K0: Ascending order
- K1: Descending order
Double sorting is used for the sorting method. Data is sorted from S1 to S2 in order following the sorting
procedure. Note that the number of word comparisons increases in proportion to the square of the number of
words, thus more time will be required for execution when there are a large number of words.
Flag conditions
Error flag (R9007):
Error flag (R9008):
3 - 569
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
F278
(DSORT)
DT
10
DT
R0
10
ST
11
19
S2
S3
S1
S2
S3
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
SV
EV
DT
LD
FL
Constant
Index Integer
modifier device
S1
N/A
N/A
S2
N/A
N/A
S3
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
When the S3 is K0 (ascending order)
DT10, 11
K25000
DT10, 11
K - 4000
DT10, 11
K25000
DT10, 11
K100000
12, 13
K - 4000
12, 13
K - 2600
12, 13
K - 4000
12, 13
K25000
14, 15
K1500
14, 15
K1500
14, 15
K1500
14, 15
K1500
16, 17
K - 2600
16, 17
K25000
16, 17
K - 2600
16, 17
K - 2600
18, 19
K100000
18, 19
K100000
18, 19
K100000
18, 19
K - 4000
3 - 570
Description
The double data words (signed) from the area specified by S1 to the area specified by S2 are sorted in
ascending order (the smallest word is first) or descending order (the largest word is first) depending on the
condition set with S3.
If S1 = S2, sorting does not take place.
The sort condition is specified as follows in S3:
- K0: Ascending order
- K1: Descending order
Double sorting is used for the sorting method. Data is sorted from S1 to S2 in order following the sorting
procedure. Note that the number of word comparisons increases in proportion to the square of the number of
words, thus more time will be required for execution when there are a large number of words.
If S2 specifies a higher word of double word data, processing will take place over the same area as if the lower
word had been specified.
Double word data table
S1:
Lower word 0
S1+2:
S1+3:
S2 - 1:
Specified areas
Lower word n
Flag conditions
3 - 571
F282 (SCAL)
P282 (PSCAL)
The output value Y is found for the input value X by performing scaling
for the given data table.
Outline
With the FP, the differential execution type instruction P282 (PSCAL) cannot be specified.
Program example
Boolean
Ladder Diagram
Address
10
ST
11
Trigger
10
Instruction
F282
10
(SCAL)
DT
R10
DT
S2
10
DT
0
120
S1
16- bit data of the source corresponding to the input value X, or area storing data
S2
Operands
Relay
Timer/Counter
Operand
WX WY WR WL
Index
register
Register
SV
EV
DT
LD
FL
(*1)
Constant
I
(*2)
Index
modifier
S1
N/A
S2
N/A
N/A
N/A
N/A
N/A
N/A
N/A
A
A: Available
N/A: Not Available
Explanation of example
The output value Y for the input value X stored in DT0 is found by accessing the data table starting from DT10,
and the result is stored in DT120.
3 - 572
Description
The output value for the input value X is found by performing scaling according to the data table, where the
16 - bit data designated in S1 is designated in S2.
The number n of items in the data table is determined by the value n designated for the head S2 of the
data table.
Configuration of the data table used for scaling
When S2 = DT10 and n = K10
n
x1
x2
x3
DT10
DT11
DT12
DT13
S2+n - 1:
S2+n:
S2+n+1:
S2+n+2:
S2+n+3:
xn - 1
xn
y1
y2
y3
DT19
DT20
DT21
DT22
DT23
S2+2n - 1:
S2+2n:
yn - 1
yn
DT29
DT30
S2:
S2+1:
S2+2:
S2+3:
Output value
(xn - 1,yn - 1)
(x4,y4)
(xn,yn)
Y=D
(x3,y3)
(x1,y1)
(x2,y2)
X=S1
Input value
Flag conditions
3 - 573
Outline
With the FP, the differential execution type instruction P283 (PDSCAL) cannot be specified.
Program example
Boolean
Ladder Diagram
Address
10
ST
11
Trigger
10
Instruction
F283
(DSCAL)
10
DT
R10
DT
S2
10
DT
0
120
S1
32- bit data of the source corresponding to the input value X, or area storing data
S2
Operands
Relay
Timer/Counter
Operand
WX WY WR WL
Index
register
Register
SV
EV
DT
LD
FL
(*1)
Constant
I
(*2)
Index
modifier
S1
N/A
S2
N/A
N/A
N/A
N/A
N/A
N/A
N/A
A
A: Available
N/A: Not Available
Explanation of example
The output value Y for the input value X stored in DT0 is found by accessing the data table starting from DT10,
and the result is stored in DT120 and DT121.
3 - 574
Description
The output value for the input value X is found by performing scaling according to the data table, where the
32 - bit data designated in S1 is designated in S2.
The number n of items in the data table is determined by the value n designated for the head S2 of the
data table.
Configuration of the data table used for scaling
When S2 = DT10 and n = K10
S2:
S2+1:
S2+2:
S2+3:
S2+4:
DT10
DT11
DT12
DT13
DT14
n+1
x1
x2
S2+2n - 1:
S2+2n:
S2+2n+1:
S2+2n+2:
S2+2n+3:
S2+2n+4:
y1
S2+4n - 1:
S2+4n:
yn
DT29
DT30
DT31
DT32
DT33
DT34
xn
y2
DT49
DT50
Output value
(xn - 1,yn - 1)
(x4,y4)
(xn,yn)
Y=D
(x3,y3)
(x1,y1)
(x2,y2)
X=S1
Input value
Flag conditions
3 - 575
F285 (LIMT)
P285 (PLIMT)
This instruction carries out upper and lower limit control for 16-bit data.
For the FP, the P type high- level instruction P285 (PLIMT) is not
available.
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
ST
11
F285
(LIMT)
DT
10
DT
20
DT
30
DT
40
R0
10
S2
S3
S1
The area where the upper limit is stored or the upper limit data.
S3
The area where the input value is stored or the input value data.
The area where the lower limit is stored or the lower limit data.
S2
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
Index Integer
modifier device
S1
N/A
N/A
S2
N/A
N/A
S3
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
3 - 576
Description
The 16-bit output value stored in the area specified by D is controlled based on whether or not the 16-bit input
value specified by S3 falls within the range bounded by the upper and lower limits set in S2 and S1.
The output value is determined based on the following conditions:
- When the lower limit S1 is greater than the input value S3, the lower limit value S1 is stored in D as the
output value.
- When the upper limit S2 is less than the input value S3, the upper limit value S2 is stored in D as the
output value.
Input value S3
Upper limit S2, the input value S3 is stored in D as the
- When Lower limit S1
output value.
Output value D
Lower limit S1
[S2]
Input value S3
[S1]
Upper limit S2
To perform upper limit control only, set K - 32768 (or H8000) for the lower limit S1.
To perform lower limit control only, set K32767 (or H7FFF) for the upper limit S2.
Flag conditions
Error flag (R9007):
Error flag (R9008):
= flag (R900B):
3 - 577
F286 (DLIMT)
P286 (PDLIMT)
This instruction carries out upper and lower limit control for 32-bit data.
For the FP, the P type high- level instruction P286 (PDLIMT) is not
available.
Outline
Program example
Boolean
Ladder Diagram
Address
Instruction
10
ST
11
F286
(DLIMT)
DT
10
DT
20
DT
30
DT
Trigger
40
R0
10
S2
S3
S1
The area where the lower limit is stored or the lower limit data. (2 words)
S2
The area where the upper limit is stored or the upper limit data. (2 words)
S3
The area where the input value is stored or the input value data. (2 words)
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
Index Integer
modifier device
S1
N/A
N/A
S2
N/A
N/A
S3
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
3 - 578
Description
The output value (double words data) stored in the area specified by D is controlled based on whether or not
the input value (double words data) specified by S3 falls within the range bounded by the upper and lower
limits set in S2 and S1.
The output value is determined based on the following conditions:
- When the lower limits S1+1 and S1 are greater than the input value S3+1 and S3, the lower limit value
S1+1 and S1 are stored in D+1 and D as the output value.
- When the upper limits S2+1 and S2 are less than the input value S3+1 and S3, the upper limit value
S2+1 and S2 are stored in D+1 and D as the output value.
Input value S3+1 and S3
Upper limit S2+1 and S2, the input
- When Lower limit S1+1 and S1
value S3+1 and S3 are stored in D+1 and D as the output value.
Output value D+1 and D
(S2+1, S2)
Lower limit
S1+1 and S1
Input value S3+1 and S3
Upper limit S2+1 and S2
(S1+1, S1)
To perform upper limit control only, set K - 2147483648 (or H80000000) for the lower limit S1+1 and S1.
To perform lower limit control only, set K2147483647 (or H7FFFFFFF) for the upper limit S2+1 and S2.
Flag conditions
Error flag (R9007):
Error flag (R9008):
= flag (R900B):
3 - 579
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
ST
11
F287
(BAND)
DT
10
DT
20
DT
30
DT
40
R0
10
S2
S3
S1
The area where the upper limit is stored or the upper limit data.
S3
The area where the input value is stored or the input value data.
The area where the lower limit is stored or the lower limit data.
S2
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
Index Integer
modifier device
S1
N/A
N/A
S2
N/A
N/A
S3
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
When the DT10 is K - 100 and DT20 is K100.
Value of DT30
Value of DT40
K - 300
K - 200
K - 200
K - 100
K0
K - 100 to K100
K200
K300
3 - 580
K100
K200
Description
The output value (word data) stored in the area specified by D is controlled based on whether or not the input
value (word data) specified by S3 falls within the dead-band bounded by the upper and lower limits set in S1
and S2.
The output value is determined based on the following conditions:
When the lower limit S1 is greater than the input value S3, the input value S3 minus the lower limit value S1 is
stored in D as the output value.
When the upper limit S2 is less than the input value S3, the input value S3 minus the upper limit value S2 is
stored in D as the output value.
When Lower limit S1
Input value S3
Output value D
Lower limit of
deadband S1
Input value S3
Flag conditions
Error flag (R9007):
Error flag (R9008):
3 - 581
Outline
Program example
Boolean
Ladder Diagram
Address
Instruction
10
ST
11
F288
(DBAND)
DT
10
DT
20
DT
30
DT
Trigger
40
R0
10
S2
S3
S1
The area where the lower limit is stored or the lower limit data. (2 words)
S2
The area where the upper limit is stored or the upper limit data. (2 words)
S3
The area where the input value is stored or the input value data. (2 words)
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
Index Integer
modifier device
S1
N/A
N/A
S2
N/A
N/A
S3
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
When DT10 and DT11 is K - 10000and DT20 and DT21 is K10000.
Value of DT30 and DT31
K - 30000
K - 20000
K - 20000
K - 10000 to K10000
K20000
K - 10000
K0
K30000
3 - 582
K10000
K20000
Description
The output value (double word data) stored in the area specified by D is controlled based on whether or not
the input value (double word data) specified by S3 falls within the dead-band bounded by the upper and lower
limits set in S1 and S2.
The output value is determined based on the following conditions:
When the lower limit S1+1 and S1 are greater than the input value S3+1 and S3, the input value S3+1 and S3
minus the lower limit value S1+1 and S1 are stored in D+1 and D as the output value.
When the upper limit S2+1 and S2 are less than the input value S3+1 and S3, the input value S3+1 and S3
minus the upper limit value S2+1 and S2 are stored in D+1 and D as the output value.
When Lower limit S1+1 and S1
and D as the output value.
Flag conditions
Error flag (R9007):
Error flag (R9008):
3 - 583
Outline
Program example
Boolean
Ladder Diagram
Address
Instruction
10
ST
11
F289
(ZONE)
DT
10
DT
20
DT
30
DT
Trigger
40
R0
F289 ZONE, DT10, DT20, DT30, DT40
10
S1
S2
S3
S1
Area where positive bias value is stored or positive bias value data
S3
Area where negative bias value is stored or negative bias value data
S2
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
Index Integer
modifier device
S1
N/A
N/A
S2
N/A
N/A
S3
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
When the DT10 is K - 100 and DT20 is K100.
Value of DT30
Value of DT40
K - 300
K - 400
K - 200
K - 300
K - 100
K - 200
K0
K100
K200
K200
K300
K300
3 - 584
K0
K400
Description
The bias value specified by S1 or S2 is added to the input value (word data) specified by S3, and the output
value is stored in the area specified by D.
The output value is determined by the following conditions:
When the input value S3 is less than zero, the input value S3 plus the negative bias value S1 is stored in D as
the output value.
When the input value S3 equals zero, zero is stored in D as the output value.
When the input value S3 is greater than zero, the input value S3 plus the positive bias value S2 is stored in D
as the output value.
Output value D
Positive bias value S2
Input value S3
Negative bias value S1
Flag conditions
Error flag (R9007):
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Error flag (R9008): Turns on for an instant when the area specified using the index modifier
exceeds the limit.
Carry flag (R9009): Turns on for an instant when the calculated result is overflowed or
underflowed.
= flag (R900B):
Turns on for an instant when the input value S3 is recognized as 0.
3 - 585
Outline
Program example
Boolean
Ladder Diagram
Address
Instruction
10
ST
11
F290
(DZONE)
DT
10
DT
20
DT
30
DT
Trigger
40
R0
10
S2
S3
S1
Area where negative bias value is stored or negative bias value data (double
words)
S2
Area where positive bias value is stored or positive bias value data (double
words)
S3
Area where input value is stored or input value data (double words)
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
Index Integer
modifier device
S1
N/A
N/A
S2
N/A
N/A
S3
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
When the DT10 and DT11 is K - 10000 and the DT20 and DT21 is K10000.
Value of DT30 and DT31 Value of DT40 and DT41
K - 40000
K - 30000
K - 20000
K - 30000
K - 10000
K - 20000
K0
K10000
K20000
K20000
K30000
K30000
K40000
3 - 586
K0
Description
The bias value specified by S1 or S2 is added to the input value (double word data) specified by S3, and the
output value is stored in the area specified by D.
The output value is determined by the following conditions:
When the input value S3+1 and S3 are less than zero, the input value S3+1 and S3 plus the negative bias
value S1+1 and S1 are stored in D+1 and D as the output value.
When the input value S3+1 and S3 equals zero, zero is stored in D+1 and D as the output value.
When the input value S3+1 and S3 is greater than zero, the input value S3+1 and S3 plus the positive bias
value S2+1 and S2 are stored in D+1 and D as the output value.
Output value D+1 and D
Positive bias value
S2+1 and S2
Flag conditions
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Error flag (R9008): Turns on for an instant when the area specified using the index modifier
exceeds the limit.
Carry flag (R9009): Turns on for an instant when the calculated result is overflowed or
underflowed.
= flag (R900B):
Turns on for an instant when the input value S3 is recognized as 0.
3 - 587
F300 (BSIN)
P300 (PBSIN)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
11
10
F300
(BSIN)
DT
10
DT
R0
ST
20
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
Index Integer
modifier device
SV
EV
DT
LD
FL
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
Calculates the SIN ( ) of the angle 45 degrees.
DT10:
H45
DT20:
DT21:
H0
H0
DT22:
H7071
H270
DT20:
DT21:
H1
H1
DT22:
H0
3 - 588
Description
The SIN([S]) of an angle data (units are degrees) specified by S is calculated and the result stored in the
3-word area beginning at D.
SIN[S] [D] [D+1]. [D+2]
D: Sign
D+1: Integer value
D+2: Decimal
Select a BCD value for S within the range 0 to 360 in units of 1 degree. Be sure to specify the value using
BCD H data.
The sign stored in D is 0 when the result of processing is positive, and 1 when the result is negative.
The result of processing stored in D+1 and D+2 is a BCD value within the range - 1.0000 to 1.0000.
The decimal stored in D+2 is rounded off to four digits.
Flag conditions
Error flag (R9007):
Error flag (R9008):
= flag (R900B):
3 - 589
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
11
F301
(BCOS)
DT
10
DT
R0
ST
20
10
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
Index Integer
modifier device
SV
EV
DT
LD
FL
N/A
N/A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
Calculates the COS ( ) of the angle 30 degrees.
DT10:
H30
DT20:
DT21:
H0
H0
DT22:
H8660
H135
DT20:
DT21:
H1
H1
DT22:
H7071
3 - 590
Description
The COS([S]) of an angle data (units are degrees) specified by S is calculated and the result stored in the
3-word area beginning at D.
COS[S] [D] [D+1]. [D+2]
D: Sign
D+1: Integer value
D+2: Decimal
Select a BCD value for S within the range 0 to 360 in units of 1 degree. Be sure to specify the value using
BCD H data.
The sign stored in D is 0 when the result of processing is positive, and 1 when the result is negative.
The result of processing stored in D+1 and D+2 is a BCD value within the range - 1.0000 to 1.0000.
The decimal stored in D+2 is rounded off to four digits.
Flag conditions
= flag (R900B):
3 - 591
F302 (BTAN)
P302 (PBTAN)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
11
10
F302
(BTAN)
DT
10
DT
R0
ST
20
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
N/A
N/A
Index Integer
modifier device
A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
Calculates the TAN ( ) of the angle 60 degrees.
DT10:
H60
DT20:
DT21:
H0
H1
DT22:
H7321
H135
DT20:
DT21:
H1
H1
DT22:
H0
3 - 592
Description
The TAN([S]) of an angle data (units are degrees) specified by S is calculated and the result stored in the
3-word area beginning at D.
TAN[S] [D] [D+1]. [D+2]
D: Sign
D+1: Integer value
D+2: Decimal
Select a BCD value for S within the range 0 to 360 in units of 1 degree. Be sure to specify the value using
BCD H data.
The sign stored in D is 0 when the result of processing is positive, and 1 when the result is negative.
The result of processing stored in D+1 and D+2 is a BCD value within the range - 57.2900 to 57.2900.
The decimal stored in D+2 is rounded off to four digits.
Flag conditions
= flag (R900B):
3 - 593
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
10
ST
11
F303
(BASIN)
DT
20
DT
R0
10
Instruction
10
Starting 16-bit area where angle data is stored or angle data (3 words)
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
SV
EV
DT
LD
FL
Constant
K
N/A
Index Integer
modifier device
A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
Calculates the arc SIN of the value 0.7071.
DT21:
H0
H0
DT22:
H7071
DT10:
H45
DT20:
H1
H0
DT22:
H5000
DT10:
H330
DT20:
3 - 594
Description
SIN - 1 (the arcsine) of the value specified in S, S+1, and S+2 is calculated, and the result (an angle) is stored
in D.
SIN - 1 ([S] [S+1]. [S+2]) [D]
S: Sign
S+1: Integer value
S+2: Decimal
Set 0 for the sign in S when the data to be processed is positive, and set 1 for the sign when the data is
negative.
Set the integer and decimal parts of the data each within a range of 0 to 1.0000 in S+1 and S+2.
The result of the calculation will be stored in D as a BCD value within the range 0 to 90 or 270 to 360 (in
degrees).
Flag conditions
Error flag (R9007):
Error flag (R9008):
= flag (R900B):
3 - 595
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
F304
(BACOS)
DT
20
DT
R0
10
ST
11
10
Starting 16-bit area where angle data is stored or angle data (3 words)
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
SV
EV
DT
LD
FL
Constant
K
Index Integer
modifier device
N/A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
Calculates the arc COS of the value 0.8660.
DT21:
H0
H0
DT22:
H8660
DT10:
H30
DT20:
H1
H0
DT22:
H5000
DT10:
H120
DT20:
3 - 596
Description
COS - 1 (the arccosine) of the value specified in S, S+1, and S+2 is calculated, and the result (an angle) is
stored in D.
COS- 1 ([S][S+1]. [S+2]) [D]
S: Sign
S+1: Integer value
S+2: Decimal
Set 0 for the sign in S when the data to be processed is positive, and set 1 for the sign when the data is
negative.
Set the integer and decimal parts of the data each within a range of 0 to 1.0000 in S+1 and S+2.
The result of the calculation will be stored in D as a BCD value within the range 0 to 180 (in degrees).
Flag conditions
Error flag (R9007):
Error flag (R9008):
= flag (R900B):
3 - 597
F305 (BATAN)
P305 (PBATAN)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
10
F305
(BATAN)
DT
20
DT
R0
ST
11
10
Starting 16-bit area where angle data is stored or angle data (3 words)
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
SV
EV
DT
LD
FL
Constant
K
Index Integer
modifier device
N/A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
Calculates the arc TAN of the value 1.7321.
DT21:
H0
H0
DT22:
H7321
DT10:
H60
DT20:
H1
H1
DT22:
H0
DT10:
H315
DT20:
3 - 598
Description
TAN - 1 (the arctangent) of the value specified in S, S+1, and S+2 is calculated, and the result (an angle) is
stored in D.
TAN - 1 ([S][S+1]. [S+2]) [D]
S: Sign
S+1: Integer value
S+2: Decimal
Set 0 for the sign in S when the data to be processed is positive, and set 1 for the sign when the data is
negative.
Set the integer and decimal parts of the data each within a range of 0 to 9999.9999 in S+1 and S+2.
The result of the calculation will be stored in D as a BCD value within the range 0 to 90 or 270 to 360 (in
degrees).
Flag conditions
Error flag (R9007):
Error flag (R9008):
= flag (R900B):
3 - 599
F309 (FMV)
P309 (PFMV)
Outline
Copies floating point data (32 bits) to the specified 32-bit area.
For the FP/FP0, the P type high- level instruction P309 (PFMV) is not
available.
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
11
R0
10
F309 FMV,
ST
F309
f
f 1.234, DT10
S
0
(FMV)
1.234
DT
10
Floating point data (32 bits) or lower 16-bit area of 32-bit data (source)
Operands
Relay
Operand
Timer/Counter
Index
register
Register
WX WY WR WL
SV
EV
DT
N/A
N/A
N/A
LD
FL
I
N/A
A
Constant
K
N/A N/A
f
A
Index Integer
modifier device
N/A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
The floating point data f 1.234 are copied to data registers DT11 and DT10 when trigger R0 turns on.
DT10:
DT11:
3 - 600
(f1.234)
Description
The floating point data (32 bits) specified by S is copied to the 32-bit area specified by D when the trigger turns
on.
Floating point data
15
Lower word
D+1:
Higher word
Flag conditions
Error flag (R9007):
Error flag (R9008):
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
3 - 601
F310 (F+)
P310 (PF+)
Adds two real number data items and stores the result in the specified
area.
For the FP/FP0, the P type high- level instruction P310 (PF+) is not
available.
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
11
10
F310
(F+)
DT
10
DT
20
DT
R0
ST
30
S2
S1
Real number data (2 words) or lower 16-bit area of 32-bit data (for augend)
S2
Real number data (2 words) or lower 16-bit area of 32-bit data (for addend)
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
Index Integer
modifier device
S1
A*
S2
A*
N/A
A: Available
N/A: Not Available
Description
The real number data (2 words) specified by S1 and S2 are added together when the trigger turns on. The
added result is stored in D+1 and D.
[S1+1, S1] + [S2+1, S2] [D+1, D]
Specifying the integer device with [S1] and[S2], the integer data is internally converted to real numbers
before operations continue.
R0
F310 F+, % DT 0, % DT 2, DT 4
3 - 602
Specifying the integer device with [D], the real numbers are automatically converted into integer data.
R0
F310 F+, DT 0, DT 2, % DT 4
When the constant K is specified in S1 and S2, the operations are the same as when a integer device is
specified.
Program example
The f4.554 is stored to DT30 and DT31 when the R0 turns on.
R0
F310 F+, f1.414, f3.14, DT30
The f135.795 is stored to DT30 and DT31 when the R0 turns on.
R0
F309 FMV, f12.345 DT10
F309 FMV, f12.345, DT20
F310 F+, DT10, DT20, DT30
Flag conditions
Error flag (R9007):
Error flag (R9008):
3 - 603
F311 (F - )
P311 (PF - )
Subtracts real nuumber data from the minuend and stores the result in
the specified area.
For the FP/FP0, the P type high- level instruction P311 (PF - ) is not
available.
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
11
10
F311
(F-)
DT
10
DT
20
DT
R0
ST
30
S2
S1
Real number data (2 words) or lower 16-bit area of 32-bit data (for minuend)
S2
Real number data (2 words) or lower 16-bit area of 32-bit data (for subtrahend)
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
Index Integer
modifier device
S1
A*
S2
A*
N/A
A: Available
N/A: Not Available
Description
Subtracts the real number data (2 words) specified by S2 from the real number data (32-bit) specified by S1
when the trigger turns on. The subtracted result is stored in D+1 and D.
[S1+1, S1] - [S2+1, S2] [D+1, D]
Specifying the integer device with [S1] and [S2], the integer data is internally converted to real numbers
before operations continue.
R0
F311 F - , % DT 0, % DT 2, DT 4
3 - 604
Specifying the integer device with [D], the real numbers are automatically converted into integer data.
R0
F311 F - , DT 0, DT 2, % DT 4
When the constant K is specified in S1 and S2, the operations are the same as when a integer device is
specified.
Program example
The f0.445 is stored to DT30 and DT31 when the R0 turns on.
R0
F311 F - , f1, f0.555, DT30
The f100.15 is stored to DT30 and DT31 when the R0 turns on.
R0
F309 FMV, f100.1, DT10
F309 FMV, f0.05, DT20
F311 F - , DT10, DT20, DT30
Flag conditions
3 - 605
F312 (F*)
P312 (PF*)
Multiplies two real number data items and stores the result in the
specified 32-bit area.
For the FP/FP0, the P type high- level instructions are not available.
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
11
10
F312
(F*)
DT
10
DT
20
DT
R0
ST
30
S2
S1
Real number data (2 words) or lower 16-bit area of 32-bit data (for
multiplicand)
S2
Real number data (2 words) or lower 16-bit area of 32-bit data (for multiplier)
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
Index Integer
modifier device
S1
A*
S2
A*
N/A
A: Available
N/A: Not Available
Description
Multiplies the real number data (2 words) specified by S1 and the one specified by S2 when the trigger turns
on.
The multiplied result is stored in D+1 and D (32-bit area).
[S1+1, S1] [S2+1, S2] [D+1, D]
Specifying the integer device with [S1] and [S2], the integer data is internally converted to real numbers
before operations continue.
R0
F312 F*, % DT 0, % DT 2, DT 4
3 - 606
Specifying the integer device with [D], the real numbers are automatically converted into integer data.
R0
F312 F*, DT 0, DT 2, % DT 4
When the constant K is specified in S1 and S2, the operations are the same as when a integer device is
specified.
Program example
The f123.4000 is stored to DT30 and DT31 when the R0 turns on.
R0
Flag conditions
Error flag (R9007):
Error flag (R9008):
3 - 607
F313 (F%)
P313 (PF%)
Divides real number data by the divisor and stores the divided result in
the specified 32-bit area.
For the FP/FP0, the P type high- level instruction P313 (PF%) is not
available.
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
11
10
F313 F%,
F313
(F%)
DT
10
DT
20
DT
R0
ST
30
S2
S1
Real number data (2 words) or lower 16-bit area of 32-bit data (for dividend)
S2
Real number data (2 words) or lower 16-bit area of 32-bit data (for divisor)
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
Index Integer
modifier device
S1
A*
S2
A*
N/A
A: Available
N/A: Not Available
Description
The real number data (2 words) specified by S1 is divided by the real number data (2 words) specified by S2
when the trigger turns on. The result is stored in D+1 and D.
[S1+1, S1] [S2+1, S2] [D+1, D]
Specifying the integer device with [S1] and [S2], the integer data is internally converted to real numbers
before operations continue.
R0
F313 F%, % DT 0, % DT 2, DT4
3 - 608
Specifying the integer device with [D], the real numbers are automatically converted into integer data.
R0
F313 F%, DT 0, DT 2, % DT 4
When the constant K is specified in S1 and S2, the operations are the same as when a integer device is
specified.
Program example
The f5.432100 is stored to DT30 and DT31 when the R0 turns on.
R0
F312 F%, f54.321, f10, DT30
Flag conditions
Error flag (R9007):
Error flag (R9008):
3 - 609
F314 (SIN)
P314 (PSIN)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
11
F314
(SIN)
DT
10
DT
R0
ST
20
10
Angle data (2 words) or lower 16-bit area of 32-bit data where angle data is
stored
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
N/A
Index Integer
modifier device
A*
A: Available
N/A: Not Available
Description
The SIN([S+1 and S]) of an angle data (units are radians) specified by S+1 and S is calculated and the result
stored in D+1 and D.
SIN ([S+1, S]) [D+1, D]
Specifying the integer device with [S], the integer data is internally converted to real numbers before
operations continue.
R0
F314 SIN, % DT 0, DT 4
3 - 610
Specifying the integer device with [D], the real numbers are automatically converted into integer data.
R0
F314 SIN, DT 0, % DT 4
When the constant K is specified in S, the operations are the same as when a integer device is specified.
Program example
The f0.4999999 is stored to DT20 and DT21 when the R0 turns on.
Radians of 30 deg.
R0
[S+1, S]
2 (radians)
For FP0, this instruction F314 (SIN) cannot be programmed in the interrupt program.
Flag conditions
Error flag (R9007):
Error flag (R9008):
3 - 611
F315 (COS)
P315 (PCOS)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
11
10
F315 COS,
F315
(COS)
DT
10
DT
R0
ST
20
DT10, DT20
S
Angle data (2 words) or lower 16-bit area of 32-bit data where angle data is
stored
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
N/A
Index Integer
modifier device
A*
A: Available
N/A: Not Available
Description
The COS ([S+1 and S]) of an angle data (units are radians) specified by S+1 and S is calculated and the result
stored in D+1 and D.
COS ([S+1, S]) [D+1, D]
Specifying the integer device with [S], the integer data is internally converted to real numbers before
operations continue.
R0
F315 COS,
3 - 612
% DT 0,
DT 4
Specifying the integer device with [D], the real numbers are automatically converted into integer data.
R0
F315 COS,
DT 0,
% DT 4
When the constant K is specified in S, the operations are the same as when a integer device is specified.
Program example
The f0.7071068 is stored to DT20 and DT21 when the R0 turns on.
Radians of 45
R0
F315 COS, f0.7853981, DT20
[S+1, S]
2 (radians)
For FP0, this instruction F315 (COS) cannot be programmed in the interrupt program.
Flag conditions
Error flag (R9007):
Error flag (R9008):
3 - 613
F316 (TAN)
P316 (PTAN)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
11
10
F316
(TAN)
DT
10
DT
R0
ST
20
Angle data (2 words) or lower 16-bit area of 32-bit data where angle data is
stored
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
N/A
Index Integer
modifier device
A*
A: Available
N/A: Not Available
Description
The TAN([S+1 and S]) of an angle data (units are radians) specified by S+1 and S is calculated and the result
stored in D+1 and D.
TAN ([S+1, S]) [D+1, D]
Specifying the integer device with [S], the integer data is internally converted to real numbers before
operations continue.
R0
F316 TAN, % DT 0, DT 4
Specifying the integer device with [D], the real numbers are automatically converted into integer data.
R0
F316 TAN, DT 0, % DT 4
When the constant K is specified in S, the operations are the same as when a integer device is specified.
3 - 614
Program example
The f1.732048 is stored to DT20 and DT22 when the R0 turns on.
Radians of 60
R0
F316 TAN, f1.047197, DT20
[S+1, S]
2 (radians)
For FP0, this instruction F316 (TAN) cannot be programmed in the interrupt program.
Flag conditions
Error flag (R9007):
Error flag (R9008):
3 - 615
F317 (ASIN)
P317 (PASIN)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
11
10
F317
(ASIN)
DT
10
DT
R0
ST
20
Angle data (2 words) or lower 16-bit area of 32-bit data where angle data is
stored
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
N/A
Index Integer
modifier device
A*
A: Available
N/A: Not Available
Description
SIN of the value specified in S+1 and S is calculated, and the result [an angle (radians)] is stored in D+1 and
D.
SIN - 1 ([S+1, S]) [D+1, D]
Specifying the integer device with [S], the integer data is internally converted to real numbers before
operations continue.
R0
F317 ASIN,
% DT 0,
DT 4
Specifying the integer device with [D], the real numbers are automatically converted into integer data.
R0
F317 ASIN, DT 0, % DT 4
When the constant K is specified in S, the operations are the same as when a integer device is specified.
3 - 616
Program example
The f0.5235986 (radians of 30 degrees) is stored to DT20 and DT21 when the R0 turns on.
R0
F317 ASIN, f0.4999999, DT20
[D+1, D]
/2 (radians)
For FP0, this instruction F317 (ASIN) cannot be programmed in the interrupt program.
Flag conditions
[S+1, S]
1.0
3 - 617
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
11
R0
10
ST
F318 (ACOS)
DT
10
DT
20
Angle data (2 words) or lower 16-bit area of 32-bit data where angle data is
stored
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
N/A
Index Integer
modifier device
A*
A: Available
N/A: Not Available
Description
COS of the value specified in S+1 and S is calculated, and the result [an angle data (units and radians)] is
stored in D+1 and D.
COS - 1 ([S+1, S]) [D+1, D]
Specifying the integer device with [S], the integer data is internally converted to real numbers before
operations continue.
R0
F318 ACOS, % DT 0, DT 4
Specifying the integer device with [D], the real numbers are automatically converted into integer data.
R0
F318 ACOS,
DT 0,
% DT 4
When the constant K is specified in S, the operations are the same as when a integer device is specified.
3 - 618
Program example
The f0.7853980 (radians of 45 degrees) is stored to DT20 and DT21 when the R0 turns on.
R0
F318 ACOS, f0.7071069, DT20
[D+1, D]
(radians)
For FP0, this instruction F318 (ACOS) cannot be programmed in the interrupt program.
Flag conditions
[S+1, S]
1.0
3 - 619
F319 (ATAN)
P319 (PATAN)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
11
F319
(ATAN)
DT
10
DT
R0
ST
20
10
Angle data (2 words) or lower 16-bit area of 32-bit data where angle data is
stored
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
N/A
Index Integer
modifier device
A*
A: Available
N/A: Not Available
Description
TAN - 1 (the arctangent) of the value specified in S+1 and S is calculated, and the result [an angle data (units
and radians)] is stored in D+1 and D.
TAN - 1 ([S+1, S]) [D+1, D]
Specifying the integer device with [S], the integer data is internally converted to real numbers before
operations continue.
R0
F319 ATAN,
% DT 0,
DT 4
Specifying the integer device with [D], the real numbers are automatically converted into integer data.
R0
F319 ATAN,
DT 0,
% DT 4
When the constant K is specified in S, the operations are the same as when a integer device is specified.
3 - 620
Program example
The f1.047197 (radians of 60 degres) is stored to DT20 and DT21 when the R0 turns on.
R0
F319 ATAN, f1.73205, DT20
Flag conditions
3 - 621
F320 (LN)
P320 (PLN)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
11
10
F320
(LN)
DT
10
DT
R0
ST
20
Angle data (2 words) or lower 16-bit area of 32-bit data where angle data is
stored
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
N/A
Index Integer
modifier device
A*
A: Available
N/A: Not Available
Description
The natural logarithm LN(S+1 and S) is calculated of the data specified in S+1 and S, and the result is stored
in D+1 and D.
LN ([S+1, S]) [D+1, D]
Specifying the integer device with [S], the integer data is internally converted to real numbers before
operations continue.
R0
F320 LN, % DT 0, DT 4
Specifying the integer device with [D], the real numbers are automatically converted into integer data.
R0
F320 LN, DT 0, % DT 4
3 - 622
Program example
The f1.6094379 is stored to DT20 and DT21 when the R0 turns on.
R0
F320 LN, K 5, DT20
The f - 0.3160815 is stored to DT30 and DT31 when the R0 turns on.
R0
F320 LN, f0.729, DT30
Flag conditions
Error flag (R9007):
Error flag (R9008):
3 - 623
F321 (EXP)
P321 (PEXP)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
11
10
F321
(EXP)
DT
10
DT
R0
ST
20
Angle data (2 words) or lower 16-bit area of 32-bit data where angle data is
stored
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
N/A
Index Integer
modifier device
A*
A: Available
N/A: Not Available
Description
The exponent EXP(S+1 and S) is calculated from the real number data specified in S+1 and S, and the result
is stored in D+1 and D.
EXP ([S+1, S]) [D+1, D]
The calculation is performed with the exponent base (e) equal to 2.718282.
Specifying the integer device with [S], the integer data is internally converted to real numbers before
operations continue.
R0
F321 EXP,
% DT 0,
DT 4
Specifying the integer device with [D], the real numbers are automatically converted into integer data.
R0
F321 EXP, DT 0, % DT 4
3 - 624
Program example
The f7.389056 is stored to DT20 and DT21 when the R0 turns on.
R0
F321 EXP, K 2, DT20
The f221.406402 is stored to DT30 and DT31 when the R0 turns on.
R0
F321 EXP, f5.4, DT30
Flag conditions
Error flag (R9007):
Error flag (R9008):
3 - 625
F322 (LOG)
P322 (PLOG)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
11
10
F322 LOG,
F322
(LOG)
DT
10
DT
R0
ST
20
DT10, DT20
S
Angle data (2 words) or lower 16-bit area of 32-bit data where angle data is
stored
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
N/A
Index Integer
modifier device
A*
A: Available
N/A: Not Available
Description
The logarithm LOG(S+1 and S) is calculated of the data specified in S+1 and S, and the result is stored in D+1
and D.
LOG ([S+1, S]) [D+1, D]
Specifying the integer device with [S], the integer data is internally converted to real numbers before
operations continue.
R0
F322 LOG, % DT 0, DT 4
Specifying the integer device with [D], the real numbers are automatically converted into integer data.
R0
F322 LOG, DT 0, % DT 4
When the constant K is specified in S, the operations are the same as when a integer device is specified.
3 - 626
Program example
The f1.30103 is stored to DT20 and DT21 when the R0 turns on.
R0
F322 LOG, K20, DT20
The f0.0108932 is stored to DT30 and DT31 when the R0 turns on.
R0
F322 LOG, f1.0254, DT30
Flag conditions
Error flag (R9007):
Error flag (R9008):
3 - 627
F323 (PWR)
P323 (PPWR)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
11
10
F323
(PWR)
DT
10
DT
20
DT
R0
ST
30
S2
S1
Real number data (2 words) or lower 16-bit area of 32-bit data (for
multiplicand)
S2
Real number data (2 words) or lower 16-bit area of 32-bit data (for multiplier)
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
Index Integer
modifier device
S1
A*
S2
A*
N/A
A: Available
N/A: Not Available
Description
The real number data specified by S1+1 and S1 is raised to the power specified by the real number data of
S2+1 and S2, and the result is stored in D+1 and D.
[S1+1, S] ^ [S2+1, S2] [D+1, D]
Specifying the integer device with [S1] and [S2], the integer data is internally converted to real numbers
before operations continue.
R0
F323 PWR, % DT 0, % DT 2, DT 4
3 - 628
Specifying the integer device with [D], the real numbers are automatically converted into integer data.
R0
F323 PWR, DT 0, DT 2, % DT4
When the constant K is specified in S1 and S2, the operations are the same as when a integer device is
specified.
Program example
The f625.0 is stored to DT20 and DT21 when the R0 turns on.
R0
F323 PWR, K 5, K 4, DT20
The f30.51758 is stored to DT30 and DT31 when the R0 turns on.
R0
F323 PWR, f3.125, K 3, DT30
Flag conditions
3 - 629
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
11
10
F324 FSQR,
F324
(FSQR)
DT
10
DT
R0
ST
20
DT10, DT20
S
Real number data (2 words) or lower 16-bit area of 32-bit area for storing data
to be calculated
Lower 16-bit area of 32-bit area for storing the calculated result
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
N/A
Index Integer
modifier device
A*
A: Available
N/A: Not Available
Description
The square root of real number data specified by S is calculated and stored in the 32-bit area specified by D.
[S1+1, S] [D+1, D]
Specifying the integer device with [S], the integer data is internally converted to real numbers before
operations continue.
R0
F324 FSQR, % DT 0, DT 4
Specifying the integer device with [D], the real numbers are automatically converted into integer data.
R0
F324 FSQR, DT 0, % DT 4
When the constant K is specified in S, the operations are the same as when a integer device is specified.
3 - 630
Program example
The f1.41421 is stored to DT20 and DT21 when the R0 turns on.
R0
F324 FSQR, K 2, DT20
Flag conditions
3 - 631
F325 (FLT)
P325 (PFLT)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
11
10
F325
(FLT)
DT
10
DT
R0
ST
20
16-bit integer data or 16-bit area for storing integer data (source)
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
Index Integer
modifier device
SV
EV
DT
LD
FL
N/A
N/A
A: Available
N/A: Not Available
Description
Converts the 16-bit integer data with sign specified by S to real number data when the trigger turns on.
The converted data is stored in D.
Signed 16-bit
integer data
15
S:
15
Floating point
real number data D:
D+1:
Lower word
Higher word
3 - 632
Flag conditions
Error flag (R9007):
Error flag (R9008):
=lag (R900B):
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the converted data is recognized as 0.
3 - 633
F326 (DFLT)
P326 (PDFLT)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
11
10
F326
(DFLT)
DT
10
DT
R0
ST
20
Lower 16-bit area for 32-bit data floating point real number (destination)
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
N/A
N/A
Index Integer
modifier device
A
N/A
N/A
A: Available
N/A: Not Available
Description
Converts the 32-bit integer data with sign specified by S to real number data when the trigger turns on. The
converted data is stored in D+1 and D.
32-bit integer
data with sign
Floating point
real number
data
15
S:
Lower word
S+1:
Higher word
D:
D+1:
15
Lower word
Higher word
3 - 634
Flag conditions
Error flag (R9007):
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Error flag (R9008): Turns on for an instant when the area specified using the index modifier
exceeds the limit.
= flag (R900B):
Turns on for an instant when the converted data is recognized as 0.
Carry flag (R9009): There are too many significant digits in mantissa of converted real number
data.
3 - 635
F327 (INT)
P327 (PINT)
Outline
Converts real number data to 16-bit integer data (the largest integer not
exceeding the floating point real number data).
For the FP/FP0, the P type high- level instruction P327 (PINT) is not
available.
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
11
10
F327
(INT)
DT
10
DT
R0
ST
20
Real number data (2 words) or lower 16-bit area of 32-bit data (source)
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
N/A
N/A
Index Integer
modifier device
A*
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
When the real number data 1.234 is in DT10 and DT11, as shown below.
DT10:
DT11:
DT20:
(f1.234)
(K1)
When the real number data - 1.234 is in DT10 and DT11, as shown below.
DT10:
DT11:
DT20:
3 - 636
(f - 1.234)
(K - 2)
Description
Converts real number data range: (+32767.99 to - 32767.99) specified by S to signed 16-bit integer data (the
largest integer not exceeding the floating point data) when the trigger turns on. The converted data is stored
in D.
Real number
data
15
Lower word
S+1:
Signed 16-bit
integer data
S:
Higher word
15
D:
Flag conditions
Error flag (R9007):
Error flag (R9008):
= flag (R900B):
3 - 637
F328 (DINT)
P328 (PDINT)
Outline
Converts real number data to 32-bit integer data (the largest integer not
exceeding the floating point real number data).
For the FP/FP0, the P type high- level instruction P328 (PDINT) is not
available.
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
11
10
F328
(DINT)
DT
10
DT
R0
ST
20
Real number data (2 words) or lower 16-bit area of 32-bit data (source)
Lower 16-bit area of 32-bit data for storing converted data (destination)
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
N/A
N/A
Index Integer
modifier device
A*
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
When the real number data 12345.67 is in DT10 and DT11, as shown below.
DT10:
DT11:
DT20:
DT21:
(f12345.67)
(K12345)
When the real number data - 12345.67 is in DT10 and DT11, as shown below.
DT10:
DT11:
DT20:
DT21:
3 - 638
(f - 12345.67)
(K - 12346)
Description
Converts real number data (range: +2147483000 to - 2147483000) specified by S+1 and S to signed 32-bit
integer data (the largest integer not exceeding the floating point data) when the trigger turns on. The
converted data is stored in D+1 and D.
Real number
data
15
Lower word
S+1:
Signed 32-bit
integer data
S:
Higher word
15
D:
Lower word
D+1:
Higher word
Flag conditions
Error flag (R9007):
Error flag (R9008):
= flag (R900B):
3 - 639
F329 (FIX)
P329 (PFIX)
Converts real number data to 16-bit integer data (rounding the first
decimal point down to integer).
For the FP/FP0, the P type high- level instruction P329 (PFIX) is not
available.
Program example
Outline
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
11
10
F329
(FIX)
DT
10
DT
R0
ST
20
Real number data (2 words) or lower 16-bit area of 32-bit data (source)
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
N/A
N/A
Index Integer
modifier device
A*
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
When the real number data 1.234567 is in DT10 and DT11, as shown below.
DT10:
DT11:
DT20:
(f1.234567)
(K1)
When the real number data - 1.234567 is in DT10 and DT11, as shown below.
DT10:
DT11:
DT20:
3 - 640
(f - 1.234567)
(K - 1)
Description
Converts real number data (range: 32767.99 to - 32768.99) specified by S to signed 16-bit integer data
(rounding the first decimal point down to integer) when the trigger turns on. The converted data is stored in D.
Real number
data
15
Lower word
S+1:
Signed 16-bit
integer data
S:
Higher word
15
D:
Flag conditions
Error flag (R9007):
Error flag (R9008):
= flag (R900B):
3 - 641
F330 (DFIX)
P330 (PDFIX)
Converts real number data to 32-bit integer data (rounding the first
decimal point down to integer).
For the FP/FP0, the P type high- level instruction P330 (PDFIX) is not
available.
Program example
Outline
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
F330
(DFIX)
DT
10
DT
R0
10
ST
11
20
Real number data (2 words) or lower 16-bit area of 32-bit data (source)
Lower 16-bit area of 32-bit data for storing converted data (destination)
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
N/A
N/A
Index Integer
modifier device
A*
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
When the real number data 123456.7 is in DT10 and DT11, as shown below.
DT10:
DT11:
DT20:
DT21:
(f123456.7)
(K123456)
When the real number data - 123456.7 is in DT10 and DT11, as shown below.
DT10:
DT11:
DT20:
DT21:
3 - 642
(f - 123456.7)
(K - 123456)
Description
Converts real number data (range: - 2,147,483,000 to 2,147,483,000) specified by S+1 and S to signed
32-bit integer data (rounding the first decimal point down to integer) when the trigger turns on. The converted
data is stored in D+1 and D.
Real number
data
15
Lower word
S+1:
Signed 32-bit
integer data
S:
Higher word
15
D:
Lower word
D+1:
Higher word
Flag conditions
Error flag (R9007):
Error flag (R9008):
= flag (R900B):
3 - 643
F331 (ROFF)
P331 (PROFF)
Converts real number data to 16-bit integer data (rounding the first
decimal point off to integer).
For the FP/FP0, the P type high- level instruction P331 (PROFF) is
not available.
Program example
Outline
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
11
10
F331
(ROFF)
DT
10
DT
R0
ST
20
Real number data (2 words) or lower 16-bit area of 32-bit data (source)
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
N/A
N/A
Index Integer
modifier device
A*
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
When the real number data 1234.567 is in DT10 and DT11, as shown below.
DT10:
DT11:
DT20:
(f1234.567)
(K1235)
When the real number data - 1234.567 is in DT10 and DT11, as shown below.
DT10:
DT11:
DT20:
3 - 644
(f - 1234.567)
(K - 1235)
Description
Converts real number data (range: +32767.49 to - 32768.49) specified by S to signed 16-bit integer data
(rounding the first decimal point off to integer) when the trigger turns on. The converted data is stored in D.
Real number
data
15
Lower word
S+1:
Signed 16-bit
integer data
S:
Higher word
15
D:
Flag conditions
Error flag (R9007):
Error flag (R9008):
= flag (R900B):
3 - 645
F332 (DROFF)
P332 (PDROFF)
Converts real number data to 32-bit integer data (rounding the first
decimal point off to integer).
For the FP/FP0, the P type high- level instruction P332 (PDROFF) is
not available.
Program example
Outline
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
11
10
F332
(DROFF)
DT
10
DT
R0
ST
20
Real number data (2 words) or lower 16-bit area of 32-bit data (source)
Lower 16-bit area of 32-bit data for storing converted data (destination)
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
N/A
N/A
Index Integer
modifier device
A*
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
When the real number data 45678.51 is in DT10 and DT11, as shown below.
DT10:
DT11:
DT20:
DT21:
(f45678.51)
(K45679)
When the real number data - 45678.51 is in DT10 and DT11, as shown below.
DT10:
DT11:
DT20:
DT21:
3 - 646
(f - 45678.51)
(K - 45679)
Description
Converts real number data (range: - 2,147,483,000 to 2,147,483,000) specified by S+1 and S to signed
32-bit integer data (rounding the first decimal point off to integer) when the trigger turns on. The converted
data is stored in D+1 and D.
Real number
data
15
Lower word
S+1:
Signed 32-bit
integer data
S:
Higher word
15
D:
Lower word
D+1:
Higher word
Flag conditions
Error flag (R9007):
Error flag (R9008):
= flag (R900B):
3 - 647
F333 (FINT)
P333 (PFINT)
This instruction rounds down the decimal part of real number data.
For the FP/FP0, the P type high- level instruction P333 (PFINT) is not
available.
Program example
Outline
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
11
10
F333
(FINT)
DT
10
DT
R0
ST
20
Real number data (2 words) or lower 16-bit area of 32-bit data (source)
Lower 16-bit area of 32-bit data for storing converted data (destination)
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
N/A
N/A
Index Integer
modifier device
A*
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
When the real number data 1234.567 is in DT10 and DT11, as shown below.
DT10:
DT11:
DT20:
DT21:
(f1234.567)
(f1234.000)
When the real number data - 1234.567 is in DT10 and DT11, as shown below.
DT10:
DT11:
DT20:
DT21:
3 - 648
(f - 1234.567)
(f - 1235.000)
Description
The decimal part of the real number data specified in S+1 and S is rounded down, and the result is stored in
D+1 and D.
Real number
data
15
Lower word
S+1:
Real number
data
S:
Higher word
15
D:
Lower word
D+1:
Higher word
Flag conditions
Error flag (R9007):
Error flag (R9008):
3 - 649
F334 (FRINT)
P334 (PFRINT)
This instruction rounds off the decimal part of real number data.
For the FP/FP0, the P type high- level instruction P334 (PFRINT) is
not available.
Program example
Outline
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
10
F334
(FRINT)
DT
10
DT
R0
ST
11
20
Real number data (2 words) or lower 16-bit area of 32-bit data (source)
Lower 16-bit area of 32-bit data for storing converted data (destination)
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
N/A
N/A
Index Integer
modifier device
A*
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
When the real number data 1234.567 is in DT10 and DT11, as shown below.
DT10:
DT11:
DT20:
DT21:
(f1234.567)
(f1235.000)
When the real number data - 1234.567 is in DT10 and DT11, as shown below.
DT10:
DT11:
DT20:
DT21:
3 - 650
(f - 1234.567)
(f - 1235.000)
Description
The decimal part of the real number data stored in S+1 and S is rounded off, and the result is stored in D+1
and D.
Real number
data
15
Lower word
S+1:
Real number
data
S:
Higher word
15
D:
Lower word
D+1:
Higher word
Flag conditions
Error flag (R9007):
Error flag (R9008):
3 - 651
F335 (F+/ - )
P335 (PF+/-)
Outline
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
10
F335
(F+/-)
DT
10
DT
R0
ST
11
20
Real number data (2 words) or lower 16-bit area of 32-bit data (source)
Lower 16-bit area of 32-bit data for storing converted data (destination)
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
N/A
Index Integer
modifier device
A*
N/A
A: Available
N/A: Not Available
Explanation of example
When the real number data - 60000.00 is in DT10 and DT11, as shown below.
DT10:
DT11:
DT20:
DT21:
(f - 60000.00)
(f60000.00)
When the real number data - 30000.00 is in DT10 and DT11, as shown below.
DT10:
DT11:
DT20:
DT21:
3 - 652
(f - 30000.00)
(f30000.00)
Description
The real number data stored in S+1 and S is changed sign bit, and the result is stored in D+1 and D.
Real number
data
15
S+1:
Real number
data
S:
Lower word
Higher word
15
D:
Lower word
D+1:
Higher word
Flag conditions
Error flag (R9007):
Error flag (R9008):
3 - 653
F336 (FABS)
P336 (PFABS)
Outline
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
11
10
F336
(FABS)
DT
10
DT
R0
ST
20
Real number data (2 words) or lower 16-bit area of 32-bit data (source)
Lower 16-bit area of 32-bit data for storing converted data (destination)
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
N/A
Index Integer
modifier device
A*
N/A
A: Available
N/A: Not Available
Explanation of example
When the real number data 1234.567 is in DT10 and DT11, as shown below.
DT10:
DT11:
DT20:
DT21:
(f1234.567)
(f1234.567)
When the real number data - 1234.567 is in DT10 and DT11, as shown below.
DT10:
DT11:
DT20:
DT21:
3 - 654
(f - 1234.567)
(f1234.567)
Description
Takes the absolute value of real number data specified by S when the trigger turns on. The result (absolute
value) is stored in D+1 and D.
Real number
data
15
Lower word
S+1:
Real number
data
S:
Higher word
15
D:
Lower word
D+1:
Higher word
Specifying the integer device with [S], the integer data is internally converted to real numbers before
operations continue.
When the constant K is specified in [S], the operations are the same as when a integer device is specified.
Flag conditions
Error flag (R9007):
Error flag (R9008):
3 - 655
F337 (RAD)
P337 (PRAD)
Outline
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
10
F337
(RAD)
DT
10
DT
R0
ST
11
20
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
N/A
Index Integer
modifier device
A*
N/A
A: Available
N/A: Not Available
Description
The data in degrees of an angle specified in S+1 and S is converted to radians (real number data) and the
result is stored in D+1 and D.
Angle data (degrees)
(Real number data)
15
Lower word
S+1:
S:
Higher word
15
D:
Lower word
D+1:
Higher word
Specifying the integer device with [S], the integer data is internally converted to real numbers before
operations continue.
When the constant K is specified in S, the operations are the same as when a integer device is specified.
3 - 656
Program example
The f0.7853981 is stored to DT20 and DT21 when the R0 turns on.
R0
F337 RAD, f45, DT20
Flag conditions
Error flag (R9007):
Error flag (R9008):
3 - 657
F338 (DEG)
P338 (PDEG)
Outline
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
10
F338 DEG,
F338
(DEG)
DT
10
DT
R0
ST
11
20
DT10, DT20
S
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
N/A
Index Integer
modifier device
A*
A: Available
N/A: Not Available
Description
The angle data in radians (real number data) specified in S+1 and S is converted to angle data in degrees and
the result is stored in D+1 and D.
Angle data (radians)
(Real number data)
15
Lower word
S+1:
S:
Higher word
15
D+1:
3 - 658
D:
Lower word
Higher word
Specifying the integer device with [S], the integer data is internally converted to real numbers before
operations continue.
R0
F338 DEG, % DT 0, DT 4
Specifying the integer device with [D], the real numbers are automatically converted into integer data.
R0
F338 DEG, DT 0, % DT 4
When the constant K is specified in S, the operations are the same as when a integer device is specified.
Program example
The f30.00000 is stored to DT20 and DT21 when the R0 turns on.
R0
F338 DEG, f0.5235987, DT20
Flag conditions
Error flag (R9007):
Error flag (R9008):
3 - 659
Ladder Diagram
Address
Trigger
Instruction
10
11
R0
10
ST
F345 (FCMP)
DT
10
DT
20
S2
S1
Real number data (2 words) or lower 16-bit area of 32-bit data to be compared
S2
Real number data (2 words) or lower 16-bit area of 32-bit data to be compared
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
Index Integer
modifier device
S1
A*
S2
A*
A:
Available
Description
Compares the real number data (floating point data) specified by S1 with that specified by S2 when the trigger
turns on. The comparison result is stored in special internal relays R9009, and R900A to R900C.
The following table lists the states of the carry flag (R9009), > flag (R900A), = flag (R900B), and < flag
(R900C), depending on the relative sizes of (S1+1, S1) and (S2+1, S2).
Flag
Comparison between
R900A R900B R900C
R9009
(S1+1, S1) and (S2+1, S2)
(> flag) (= flag) (< flag) (carry flag)
(S1+1, S1) < (S2+1, S2)
off
off
on
(S1+1, S1) = (S2+1, S2)
on
off
off
off
(S1+1, S1) > (S2+1, S2)
on
off
off
: turns on or off according to the conditions
Specifying the integer device with [S1] and [S2], the integer data is internally converted to real numbers
before operations continue.
When the constant K is specified in S1 and S2, the operations are the same as when a integer device is
specified.
3 - 660
Flag conditions
Error flag (R9007):
Error flag (R9008):
3 - 661
F346 (FWIN)
P346 (PFWIN)
Compares one real number data item with the data band specified by
two other real number data items.
Program example
Outline
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
F346
(FWIN)
DT
10
DT
20
DT
R0
10
ST
11
30
S2
S3
S1
Real number data (2 words) or lower 16-bit area of 32-bit data to be compared
S2
Real number data (2 words) or lower 16-bit area of 32-bit data for lower limit
S3
Real number data (2 words) or lower 16-bit area of 32-bit data for upper limit
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
Index Integer
modifier device
S1
A*
S2
A*
S3
A*
A:
Available
Description
Compares the floating point real number data specified by S1 with the data band specified by S2 and S3,
when the trigger turns on. This instruction checks whether S1 is in the data band between S2 (lower limit) and
S3 (upper limit), larger than S3, or smaller than S2. The comparison result is stored in special internal relays
R900A, R900B, and R900C.
The following table lists the states of the carry flag (R9009), > flag (R900A), = flag (R900B), and < flag
(R900C).
Comparison between
(S1+1, S1), (S2+1, S2)
and (S3+1, S3)
Flag
R9009
R900A R900B R900C (Carry
(> flag) (= flag) (< flag) flag)
off
off
on
(S1+1, S1)
(S2+1, S2)
off
on
off
on
off
3 - 662
off
X
X: Not changed
Specifying the integer device with [S1], [S2] and [S3], the integer data is internally converted to real numbers
before operations continue.
When the constant K is specified in S1, S2 and S3, the operations are the same as when a integer device is
specified.
Flag conditions
Error flag (R9007):
3 - 663
F347 (FLIMT) Floating point data upper and lower limit control
P347 (PFLIMT)
This instruction carries out upper and lower limit control for real number
data.
Program example
Outline
Boolean
Ladder Diagram
Address
Instruction
10
ST
11
F347
(FLIMT)
DT
10
DT
20
DT
30
DT
Trigger
40
R0
10
S2
S3
S1
The area where the lower limit is stored or the lower limit data. (2 words)
S2
The area where the upper limit is stored or the upper limit data. (2 words)
S3
The area where the input value is stored or the input value data. (2 words)
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
Index Integer
modifier device
S1
A*
S2
A*
S3
A*
N/A
A: Available
N/A: Not Available
Description
The output value (real number data) stored in the area specified by D is controlled based on whether or not
the input value (real number data) specified by S3 falls within the range bounded by the upper and lower limits
(real number data) set in S1 and S2.
The output value is determined based on the following conditions:
When the lower limit S1+1 and S1 are greater than the input value S3+1 and S3, the lower limit value S1+1
and S1 stored in D+1 and D as the output value.
When the upper limit S2+1 and S2 are less than the input value S3+1 and S3, the upper limit value S2+1 and
S2 are stored in D+1 and D as the output value.
3 - 664
Specifying the integer device with [S1], [S2] and [S3], the integer data is internally converted to real numbers
before operations continue.
R0
Specifying the integer device with [D], the real numbers are automatically converted into integer data.
R0
When the constant K is specified in S1, S2 and S3, the operations are the same as when a integer device is
specified.
Flag conditions
Error flag (R9007):
Error flag (R9008):
= flag (R900B):
3 - 665
Ladder Diagram
Address
Trigger
Instruction
10
ST
11
F348(FBAND)
R0
DT
S1
S2
S3
20
30
DT
10
DT
DT
10
40
S1
The area where the lower limit is stored or the lower limit data. (2 words)
S2
The area where the upper limit is stored or the upper limit data. (2 words)
S3
The area where the input value is stored or the input value data. (2 words)
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
Index Integer
modifier device
S1
A*
S2
A*
S3
A*
N/A
A: Available
N/A: Not Available
3 - 666
Description
The output value (real number data) stored in the area specified by D is controlled based on whether or not
the input value (real number data) specified by S3 falls within the dead-band bounded by the upper and lower
limits (real number data) set in S1 and S2.
The output value is determined based on the following conditions:
When the lower limit S1+1 and S1 are greater than the input value S3+1 and S3, the input value S3+1 and S3
minus the lower limit value S1+1 and S1 are stored in D+1 and D as the output value.
When the upper limit S2+1 and S2 are less than the input value S3+1 and S3, the input value S3+1 and S3
minus the upper limit value S2+1 and S2 are stored in D+1 and D as the output value.
When Lower limit S1+1 and S1
and D as the output value.
Specifying the integer device with [S1], [S2] and [S3], the integer data is internally converted to real numbers
before operations continue.
R0
F348 FBAND, % DT10, % DT20, % DT30, DT40
Specifying the integer device with [D], the real numbers are automatically converted into integer data.
R0
When the constant K is specified in S1, S2 and S3, the operations are the same as when a integer device is
specified.
Flag conditions
Error flag (R9007):
Error flag (R9008):
3 - 667
F349 (FZONE)
P349 (PFZONE)
Outline
This instruction carries out zone control for real number data.
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
ST
11
F349
(FZONE)
DT
10
DT
20
DT
30
DT
40
R0
10
S2
S3
S1
Area where negative bias value is stored or negative bias value data (double
words)
S2
Area where positive bias value is stored or positive bias value data (double
words)
S3
Area where input value is stored or input value data (double words)
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
Index Integer
modifier device
S1
A*
S2
A*
S3
A*
N/A
A: Available
N/A: Not Available
3 - 668
Description
The bias value specified by S1 or S2 is added to the input value (real number data) specified by S3, and the
output value is stored in the area specified by D.
The output value is determined by the following conditions:
When the input value S3+1 and S3 are less than 0.0, the input value S3+1 and S3 plus the negative bias value
S1+1 and S1 are stored in D+1 and D as the output value.
When the input value S3+1 and S3 are equals 0.0, zero is stored in D+1 and D as the output value.
When the input value S3+1 and S3 are greater than 0.0, the input value S3+1 and S3 plus the positive bias
value S2+1 and S2 are stored in D+1 and D as the output value.
Output value D+1 and D
Positive bias value
S2+1 and S2
Specifying the integer device with [S1], [S2] and [S3], the integer data is internally converted to real numbers
before operations continue.
R0
Specifying the integer device with [D], the real numbers are automatically converted into integer data.
R0
When the constant K is specified in S1, S2 and S3, the operations are the same as when a integer device is
specified.
Flag conditions
Error flag (R9007):
Error flag (R9008):
3 - 669
Ladder Diagram
Address
Trigger
Instruction
10
11
R0
10
ST
F350
S2
(FMAX)
DT
20
DT
10
DT
30
S1
S2
Starting 16-bit area for storing maximum value and relative address (3 words)
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
SV
EV
DT
LD
FL
Constant
K
Index Integer
modifier device
N/A
S2
N/A
N/A
N/A
S1
A: Available
N/A: Not Available
Description
This instruction searches for the maximum value in the real number data table between the area selected
with S1 and the area selected with S2, and stores it in the area selected with D+1 and D. The address relative
to S1 is stored in D+2.
Real number data table
S1:
Lower word
D:
Lower word
D+2:
S1+3:
3 - 670
Relative address
Maximum value
Relative address
If S2 specifies a higher word of real number data, processing will take place over the same area as if the lower
word had been specified.
Real number data table
S1:
S1+1:
Lower word 0
1
S1+2:
D:
Lower word
D+1:
Higher word
Higher word
D+2:
Maximum value
Relative address
S1+3:
S2 - 1:
Lower word
Relative address
If there are several values which are a maximum value, the relative address of the first value found searching
from S1 is stored in D+2.
Flag conditions
Error flag (R9007):
Error flag (R9008):
3 - 671
F351 (FMIN)
P351 (PFMIN)
Outline
Searches for a minimum value in a table of real number.
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
11
R0
10
F351 FMIN,
ST
F351
S2
0
(FMIN)
DT
20
DT
10
DT
30
S1
S2
Starting 16-bit area for storing minimum value and relative address (3 words)
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
SV
EV
DT
LD
FL
Constant
K
Index Integer
modifier device
S1
N/A
S2
N/A
N/A
N/A
A: Available
N/A: Not Available
Description
This instruction searches for the minimum value in the real number data table between the area selected with
S1 and the area selected with S2, and stores it in the area selected with D+1 and D. The address relative to
S1 is stored in D+2.
Real number data table
S1:
Lower word
D:
Lower word
D+2:
S1+3:
3 - 672
Relative address
Minimum value
Relative address
If S2 specifies a higher word of real number data, processing will take place over the same area as if the lower
word had been specified.
Real number data table
S1:
S1+1:
Lower word 0
1
S1+2:
D:
Lower word
D+1:
Higher word
Higher word
D+2:
Minimum value
Relative address
S1+3:
S2 - 1:
Lower word
Relative address
If there are several values which are a minimum value, the relative address of the first value found searching
from S1 is stored in D+2.
Flag conditions
Error flag (R9007):
Error flag (R9008):
3 - 673
F352 (FMEAN)
P352 (PFMEAN)
Calculates the total and mean numbers in the specified real number
data table
Program example
Outline
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
10
F352
(FMEAN)
DT
10
DT
20
DT
R0
ST
11
30
S2
S1
S2
Starting 16-bit area for storing total and mean numbers (4 words)
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
SV
EV
DT
LD
FL
Constant
K
Index Integer
modifier device
S1
N/A
S2
N/A
N/A
N/A
A: Available
N/A: Not Available
Description
The total value and the average value of the real number data from the area selected with S1 to the area
selected with S2 are obtained and stored in the area selected with D.
15
D
D+1
D+2
D+3
3 - 674
0
Lower word
Higher word
Total
Lower word
Higher word
Mean
If S2 specifies a higher word of real number data, processing will take place over the same area as if the lower
word had been specified.
Real number data table
S1:
Lower word 0
S1+3:
S2 - 1:
Specifies areas
Lower word n
Flag conditions
3 - 675
F353 (FSORT)
P353 (PFSORT)
Outline
Sorts a string of real number data (in smaller or larger number order).
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
11
10
F353
(FSORT)
DT
10
DT
R0
ST
20
S2
S3
S1
S2
S3
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
SV
EV
DT
LD
FL
Constant
K
Index Integer
modifier device
S1
N/A
N/A
S2
N/A
N/A
S3
N/A
N/A
A: Available
N/A: Not Available
Description
The real number data from the area specified by S1 to the area specified by S2 are sorted in ascending order
(the smallest word is first) or descending order (the largest word is first) depending on the condition set with
S3.
If S1 = S2, sorting does not take place.
The sort condition is specified as follows in S3:
- K0: Ascending order
- K1: Descending order
Double sorting is used for the sorting method. Data is sorted from S1 to S2 in order following the sorting
procedure. Note that the number of word comparisons increases in proportion to the square of the number of
words, thus more time will be required for execution when there are a large number of words.
3 - 676
If S2 specifies a higher word of real number data, processing will take place over the same area as if the lower
word had been specified.
Real number data table
S1:
S1+1:
Lower word 0
Higher word
1
S1+2:
S1+3:
S2 - 1:
Specified areas
Lower word n
Flag conditions
Error flag (R9007):
Error flag (R9008):
3 - 677
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
10
F354
(FSCAL)
S1
100
10
Real numerical value or area which shows the input value (X)
S2
DT
DT100
S2
DT
DT
DT10,
S1
11
R0
ST
Operands
Timer/
Counter
Relay
Operand
WX WY WR WL
Index
register
Register
Constant
SV
EV
DT
LD
FL
N/A
S1
S2
N/A
Index Integer
modifier device
A
N/A
A: Available
N/A: Not Available
Explanation of example
The output value Y is calcuated for the input value stored in DT0 referring to the data table which starts with
DT10, and the result is stored in DT100.
Description
1)
Scaling (linearization) is performed according to the data table of the real number specified by [S2] in the
inputted real numerical value [S1], and an output value is stored in [D].
2)
An output value is calculated by searching the linear section of an input value [S1], and computing the
linear interpolation between these two points from the linear table specified by [S2].
When the specified input value is out of the registration range of an linear table, the output value (Y0 or
Yn) over a starting point (x0) or an ending point (xn) is stored, respectively.
[S1] <= x0 - - - [D] = y0
[S1] >= xn - - - [D] = yn
3 - 678
3)
The linear table [S2] must be having the section of two or more points registered.
Moreover, the linear table must be registered in ascending order, from small to large number of the x
sequences.
2 <= Registration mark (m) <= 99
(m=n+1)
xt - 1 < xt
(1 <= t <= n)
4)
When the distance between two points of a scaling table is very large, an operation error occurs.
for example)
Point1: (x0,y0)=(HFF000000, HFF000000) =( - 1.7*1034, - 1.7*1034)
Point2: (x1,y1)=(H7F000000, H7F000000) =(+1.7*1034, +1.7*1034)
5)
The error of an output result is proportional to the distance between two points of a scaling table.
6)
When the integer modifier is specified to be an input value [S1], scaling processing is performed after
changing it into a real numerical value.
7)
An output result is changed into an integer value and stored when the integer modifier is specified to be
an output value [S2].
Data table(linear table) (S2)
S2:
S2+1:
S2+2:
S2+3:
S2+4:
S2+2n+1:
S2+2n+2:
S2+2n+3:
S2+2n+4:
S2+2n+5:
S2+2n+6:
S2+4n+3:
S2+4n+4:
x0
(real numerical value)
x1
(real numerical value)
xn
(real numerical value)
y0
(real numerical value)
y1
(real numerical value)
yn
(real numerical value)
DT10
DT11
DT12
DT13
DT14
DT29
DT30
DT31
DT32
DT33
DT34
S2 = DT10, n = K10
Output (Y)
yn - 1
yn - 2
yn
Y=[D]
y2
y1
y0
X=[S1]
X0 X1
X2
Xn - 2
Xn - 1
Xn
Input (X)
DT49
DT50
Flag conditions
3 - 679
F355 (PID)
PID processing
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
10
ST
11
F355
(PID)
DT
R0
10
Instruction
10
F355 PID, DT 10
S
Starting number of PID parameter area (30 words)
Operands
Relay
Operand
Timer/Counter Register
Index
register
Constant
WX WY WR WL
S
SV
EV
DT
N/A
N/A
N/A
N/A
N/A
N/A
Index
modifier
N/A
A: Available
N/A: Not Available
Description
PID processing is performed to hold the measured value specified by S+2 at the set value S+1, and the result
is output to S+3.
Derivative control or proportional - derivative control can be selected for the PID processing mode.
Set the PID processing coefficients (proportional gain, integral time and derivative time) and the processing
mode and cycle in the parameter table. PID processing will be performed based on these settings.
next page
3 - 680
Flag conditions
Error flag (R9007):
Error flag (R9008):
Control mode
[S+1]
[S+2]
[S+3]
[S+4]
[S+5]
[S+6]
[S+7]
[S+8]
[S+9]
[S+10]
Auto-tuning progress
[S+11]
PID processing work area (*)
[S+29]
* For the FP0 use the 20 words, [S+11] to [S+30], as the work area.
3 - 681
Explanation of parameters
1
Select the type of PID processing and auto-tuning on/off with the H constants.
Control mode
Value of [S]
Auto- tuning
when not executed
Reverse operation
H0
H8000
Forward operation
Derivative type
Auto- tuning
when executed
H1
H8001
Reverse operation
H2
H8002
Forward operation
H3
H8003
Auto-tuning
The optimum values for the Kp, Ti, and Td of the PID parameters can be measured by measuring the process
response. When auto tuning is executed, the estimated results are reflected in the parameter area after auto
tuning has been completed. (There may be cases in which auto tuning cannot be executed, depending on the
process. If this happens, processing returns to the original parameter operation.)
For precautions concerning execution of auto tuning, refer to the following page.
Set the target value which determines the amount of process control within the following range.
K0 to K10000
3 Measured value (PV) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [S+2]
Input the current process control value with the A/D converter. Adjust so that it falls within the following range.
K0 to K10000
4 Output value (MV) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [S+3]
The result of PID processing is stored. Use the D/A converter or other device to output it to the process.
K0 to K10000
5 Output lower limit value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [S+4]
K0 to K9999 (< upper limit value)
3 - 682
10000.
3 - 683
(Reason)
Because the PID instructions are internally operating using the specified table, even if the execution
condition has not been effected.
In such a case, specify the table in separate addresses.
3 - 684
1) Proportional operation
Proportional operation generates an output which is proportional to the input.
Setting signal SV
Offset e
Kp
Output MV
Measurement
signal PV
e
Kp=2
MV 2
Kp=1
1
.5
0
t Kp=.5
2) Integral operation
Integral operation generates an output which is proportional to the integral time of the input.
Setting signal SV
+
-
mi=1/Tiedt
e
Offset e
Integral
operation
Output mi
Measurement
signal PV
mi
In combination with proportional operation or proportional - derivative operation, integral operation removes
the offset produced by these methods.
Integral operation grows stronger as the integral time (Ti) is shortened.
3 - 685
3) Derivative operation
Derivative operation generates an output which is proportional to the derivative time of the input.
Setting signal SV
Offset e
mD=TD
Derivative
operation
Output mD
Measurement
signal PV
de
dt
mD
The advancing characteristic of derivative control alleviates the adverse effect which the delaying
characteristic of the process exerts on control.
Derivative control grows stronger as the derivative time (Td) is increased.
In the case of pure derivative operation, control can temporarily become ineffective if noise is input, and this
can have an adverse effect on the process being controlled. For this reason, incomplete differential operation
is executed.
e
mD
4) PID operation
PID operation is a combination of proportional, integral, and derivative operation.
Setting signal SV + Offset e
-
Measurement signal PV
Integral
operation
+
+
+
Kp
Output MV
Derivative
operation
If the parameters are set to the optimum values, PID control can quickly bring the amount of control to the
target value and maintain it there.
3 - 686
3 - 687
F373 (DTR)
P373 (PDTR)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
10
F373 DTR,
ST
11
F373
(DTR)
DT
10
DT
R0
10
Instruction
20
DT10, DT20
S
17
R0 R9009
AN
20
R10
ST
18
Trigger
OT
0
R9009
10
17
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
SV
EV
DT
LD
FL
Constant
K
N/A
Index Integer
modifier device
A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
When the trigger R0 turns on, R9009 will turn on if there has been a change in data register DT10 since the
previous execution. Following this, the internal relay R10 will also turn on.
Description
If the data in the 16-bit area specified by S has changed since the previous execution, internal relay R9009
(carry flag) will turn on.
D is used to store the data of the previous execution, and when the current execution has been completed,
the current data is stored in D.
3 - 688
Flag conditions
Error flag (R9007):
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Error flag (R9008): Turns on for an instant when the area specified using the index modifier
exceeds the limit.
Carry flag (R9009): Turns on if a change has occurred in the specified data area.
3 - 689
F374 (DDTR)
P374 (PDDTR)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
10
Instruction
10
F374 DDTR,
F374
(DDTR)
DT
10
DT
R0
ST
11
20
DT10, DT20
17
R0 R9009
R10
AN
20
ST
18
Trigger
OT
0
R9009
10
17
Lower 16-bit area of 32-bit data where data of previous execution is stored.
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
Index
register
Register
SV
EV
DT
LD
FL
Constant
K
N/A
Index Integer
modifier device
A
N/A
N/A
A: Available
N/A: Not Available
Explanation of example
When the trigger R0 turns on, R9009 will turn on if there has been a change in data register DT10 since the
previous execution. Following this, the internal relay R10 will also turn on.
Description
If the data in the 32-bit area specified by S has changed since the previous execution, internal relay R9009
(carry flag) will turn on.
D+1 and D is used to store the data of the previous execution, and when the current execution has been
completed, the current data is stored in D+1 and D.
3 - 690
Flag conditions
Error flag (R9007):
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Error flag (R9008): Turns on for an instant when the area specified using the index modifier
exceeds the limit.
Carry flag (R9009): Turns on if a change has occurred in the specified data area.
3 - 691
F410 (SETB)
P410 (PSETB)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
R0
10
ST
11
F410
0
(SETB)
F410 SETB, K 1
n
Constant data or area where register bank number is stored.
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
n
Index
register
Register
Constant
SV
EV
DT
LD
FL
N/A
Index Integer
modifier device
A
N/A
A: Available
N/A: Not Available
Description
This instruction selects the current index register bank number.
3 - 692
Program example
Changing the index register banks
0
1
I0 to ID of
bank 0
R9010
F410 SETB, H 11
SETB, H
2
I0 to ID of
bank 1
R9010
F410 SETB, H 2
3
I0 to ID of
bank 2
R9010
F410 SETB, H 3
I0 to ID of
bank 3
Flag conditions
Error flag (R9007):
Error flag (R9008):
3 - 693
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
11
R0
10
F411 CHGB,
ST
F411 (CHGB)
K
K2
n
Constant data or area where register bank number is stored.
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
n
Index
register
Register
Constant
SV
EV
DT
LD
FL
N/A
Index Integer
modifier device
A
N/A
A: Available
N/A: Not Available
Description
This instruction selects the current index register bank number.
At this time, the current index bank number is stored in the push area (the push area has only one effective
level, thus previous data is overwritten).
The bank numbers of index registers used in interrupt programs, subroutines, and other sub programs
should be specified in such a way that the F411 (CHGB) instruction is executed at the beginning of the sub
program, and the F412 (POPB) instruction is executed at the end of the sub program.
3 - 694
Program example
This is a program in which the index register bank is switched to 2 at the beginning of the interrupt program,
and is then switched back again to the original index register bank just before the end of the interrupt program
(before the IRET instruction).
Main program
END
INT 0
R9010
F411 CHGB, H2
Sub program
R9010
F412 POPB
IRET
Flag conditions
Error flag (R9007):
Error flag (R9008):
3 - 695
F412 (POPB)
P412 (PPOPB)
Changes index register bank number back to the bank before F411
(CHGB)/P411 (PCHGB) instructions.
Outline
Program example
Ladder Diagram
Trigger
Instruction
10
ST
11
R0
10
Boolean
Address
F412
0
(POPB)
F412 POPB
Description
The current index register bank number is changed to the number stored in the push area.
The contents of the push area are not changed at this time.
The bank numbers of index registers used in interrupt programs, subroutines, and other sub programs
should be specified in such a way that the F411 (CHGB) instruction is executed at the beginning of the sub
program, and the F412 (POPB) instruction is executed at the end of the sub program.
Program example
This is a program in which the index register bank is switched to 2 at the beginning of the interrupt program,
and is then switched back again to the original index register bank just before the end of the interrupt program
(before the IRET instruction).
Main program
END
INT 0
R9010
F411 CHGB, H2
Sub program
R9010
F412 POPB
IRET
3 - 696
F414 (SBFL)
P414 (PSBFL)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
F414
(SBFL)
DT
R0
10
ST
11
F414 SBFL, DT 1
n
Constant data or area where register bank number is stored.
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
n
Index
register
Register
Constant
SV
EV
DT
LD
FL
Index Integer
modifier device
N/A
N/A
A: Available
N/A: Not Available
Description
This instruction selects the current file register bank number.
File register bank number: 0 to 2.
Flag conditions
Error flag (R9007):
Error flag (R9008):
3 - 697
F415 (CBFL)
P415 (PCBFL)
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
Instruction
10
F415
(CBFL)
DT
X10
10
ST
11
F415 CBFL, DT 1
10
n
Constant data or area where register bank number is stored.
Operands
Relay
Operand
Timer/Counter
WX WY WR WL
n
Index
register
Register
Constant
SV
EV
DT
LD
FL
Index Integer
modifier device
N/A
N/A
A: Available
N/A: Not Available
Description
This instruction selects the current file register bank number.
At this time, the current file bank number is stored in the push area (the push area has only one effective level,
thus previous data is overwritten).
File register bank number: 0 to 2.
Flag conditions
Error flag (R9007):
Error flag (R9008):
3 - 698
F416 (PBFL)
P416 (PPBFL)
Changes file register bank number back to the bank before F415
(CBFL)/P415 (PCBFL) instructions.
Outline
Program example
Boolean
Ladder Diagram
Address
Trigger
10
ST
11
R0
10
Instruction
F416
0
(PBFL)
F416 PBFL
Description
The current file register bank number is changed to the number stored in the push area. The contents of the
push area are not changed at this time.
The user must manage the push area data so that the desired data is restored. This instruction only checks
the data range, it does not check changes made with the F415 (CBFL) instruction.
The push area has only one effective level.
3 - 699
3 - 700
Chapter 4
Precautions Concerning Programs
4-2
4.1
4.1.1
TMX5, K 30
T5
Y10
Place the cursor on the value of K30 set for the timer 0.
2.
3.
2.
TM
T-SV
ST
X-WX
SRC
READ
READ
3.
WRT
4-3
4-4
4.1.2
TMX5, K30
SV5
30
Y10
Rewriting method:
4-5
2.
ENT
Read SV0.
TM
T-SV
3.
READ
Clear SV0.
(HELP)
CLR
4.
4-6
WRT
X1
T3
TMX3 K50
Y10
With the FP2SH and FP10SH, it is possible to specify the data register DT, as well the
relay WR for handling word data, and other similar areas, as the set value area. The set
value can be changed by changing the value to be transmitted, using the F0 (MV)
instruction or a similar instruction.
4-7
4.2
4.2.1
Duplicated Output
(- )
OP
ENT
READ
If there are any duplicated outputs, an error message (DUP USE) and the address will
be displayed.
Using programming tool software (NPST-GR):
Excute the TOTALLY CHECK A PROGRAM on CHECK A PROGRAM.
If there are any duplicated outputs, an error message (DUPLICATED OUTPUT
ERROR) and the address will be displayed. If you execute SEARCH AN ERROR, the
error message will be displayed, and the first address number will be displayed.
Enabling Duplicated Output
If you need to use output repeatedly due to the content of the program, duplicated
output can be enabled.
In this case, change the setting of system register 20 to enable (when using FP
programmer II, set K1).
When this is done, an error will not occur when the program is executed.
4-8
4.2
4.2.2
R0
S
R0
X1
R0
Output to the same output relay Y10 with OT, SET and RST
instructions.
X0
Y10
Y10: on
X1
X2
Y10
S
Y10: on
Y10
R
Y10: off
4.3
4.3.1
on
off
Trigger
on
off
Operation of
instruction
Executed every scan
on
off
on
off
The condition of the previous execution and the condition of the current execution are
compared, and the instruction is executed only if the previous condition was off and the
current condition is on. In any other case, the instruction is not executed.
4 - 10
4.3.2
Executed
If you need to execute an instruction when the trigger (execution condition) is on prior
to switching to RUN mode, use the special internal relay R9014 in your program as
follows. (R9014 is a special internal relay which is off during the first scan and turns on
at the second scan.)
next page
4 - 11
Y10
DF
Add R9014
X0
R9014
Y10
DF
RUN
(Power on)
X0
Y10
200
X1
Add R9014
X0
R9014
CT
200
X1
RUN
(Power on)
X0
CT200
counting
operation
4 - 12
4.3.3
Instructions which leading edge detection compare the condition of the previous
execution and the condition of the current execution, and execute the instruction only
if the previous condition was off and the current condition is on. In any other case, the
instruction is not executed.
When a leading edge detection instruction is used with an instruction which changes
the order of instruction execution such as MC, MCE, JP or LBL, the operation of the
instruction may change as follows depending on input timing. Take care regarding this
point.
Example 1: Using the DF instruction between MC and MCE instructions
X0
MC
X1
DF
0
Y10
MCE 0
Time chart 1
X0
X1
Y10
Previous
execution of
DF instruction
Time chart 2
X0
X1
Y10
Previous
execution of
DF instruction
4 - 13
X0
CT 200
X1
LBL
Time chart 1
R0
X0
Counting
operation
Final timing at
which the
previous JP
instruction was
not executed
Time chart 2
R0
X0
Counting
operation
Final timing at
which the
previous JP
instruction
was not
executed
4 - 14
4.4
4.4
Operation Errors
4.4.1
Operation Errors
Operation Errors
4 - 15
4.4.2
3.
4.
5.
3.
4 - 16
ENT
Specify the register number (26) for the parameter to be set and read
the parameter.
The value set in the selected system register 26 will be displayed.
2
4.
(- )
OP
READ
To change a set value, press the (HELP) CLR key and write the K1
parameter.
4.4
4.4.3
Operation Errors
Procedure:
1.
2.
(- )
OP
ENT
SHIFT (DELT)
SC
INST
An error can be cleared by turning the power off and on in PROG. mode,
however, the contents of the operation memory except the hold type data
will be cleared.
An error can also be cleared by executing the self-diagnostic error set
instruction F148 (ERR).
4 - 17
4.4.4
In this case, index register (IX) modifies the address of data register DT0. If data in IX
is larger than the last address of the data register, an operation error will occur. The
same is true when the contents of IX are negative value.
Is there any data which cannot be converted using BCD e BIN data conversion?
When BCD - to - BIN conversion is attempted
X0
F81 BIN, DT0, DT100
In this case, if DT0 contains a hexadecimal number with one of the digits A through F
such as 12A4, the data conversion will be impossible and an operation error will result.
When BIN - to - BCD conversion is attempted
X0
F80 BCD, DT1, DT101
In this case, if DT1 contains a negative value or a value greater than K9999, an
operation error will occur.
Check if the divisor of a division instruction is K0.
X0
F32 %, DT0, DT100, DT200
In this case, if the content of DT100 is K0, an operation error will occur.
4 - 18
4.5
4.5.1
Index Registers
Index registers are used for indirect specification of values to number (addresses) and
operands in relays and memory areas. (This is also called index modification.)
Add the index register to the relay, memory area, or constant you want to modify, and
then write the modifying value (16-bit data) to the index register. The FP0, FP - e, FP1
and FP3 have two points, IX and IY. The FP, FP2, FP2SH and FP10SH have 14 points,
I0 to ID.
To modify a 32-bit constant, write the 32-bit data to two words of the index register.
Example:
In this example, the number of the destination data register varies depending on the
contents of IX with DT0 acting as a base. For example, when IX is K10, the destination
will be DT10, and when IX is K20, the destination will be DT20.
In this way, index registers allow the specification of multiple memory areas with a single
instruction, and thus index registers are very convenient when handling large amounts
of data.
Changing banks in an index register of the FP2SH and FP10SH makes it possible to
increase the number of points used in a program from 14 to a maximum of 224 (14
points, 16 banks).
Bank
0
Bank
1
Bank
2
Bank
F
I0
I1
I2
I3
I4
I5
I6
I7
I8
I9
IA
IB
IC
ID
4 - 19
4.5.2
Index registers can be used to modify other types of memory areas in addition to data
registers DT.
IXWX0, IXWY1, IXWR0, IXSV0, IXEV2, I0WX10, I2WY1, I3WR0, IASV0, IBEV2
Constants can also be modified.
IXK10, IXH1001
In the FP2SH/FP10SH, the relay numbers can be modified.
I0X0, IAR10
In the FP2/FP2SH/FP10SH, an index register can be modified using another index
register.
In the FP0/FP- e/FP1/FP3, an index register cannot modify another index register.
Possibility:
I0ID
Contents of IY
Contents of IX
When using index modification with an instruction which handles 32-bit data, specify
with IX.
In the FP/FP2/FP2SH/FP10SH (example of specify with I0)
Higher 16-bit area
Contents of I1
Contents of I0
When modifying a 32-bit number, do not specify ID. Be aware that a syntax error will
not occur even if this is not specified.
4 - 20
4.5.3
F35 +1, IX
X1
DF
Add 1 to IX.
In this case, the contents of IX will change successively,
and the destination data register will be as follows.
Input times of X1
Contents of IX
1st
01
DT0
2nd
12
DT1
3rd
23
DT2
4 - 21
I0Y10
X0
2
X0
F35 +1, I0
When the X0 turns on, the first time Y10 will turn on.
Add 1 to the value of I0. From this point on, the output
destinations successively change as follows each time X0
turns on.
Input times of X0
Output destination
Y10
2nd
Y11
3rd
Y12
4 - 22
Content of I0
1st
Programmable
controller
Timer
number
setting
WX1
Timer time
setting
WX0
Digital
switches
R0
DF
4 - 23
7-segment
indicator
Timer elapsed
value display
Programmable
controller
Timer
number
setting
Digital
switches
WX1
R1
DF
4 - 24
4.6
4.6
4.6.1
BCD Data
BCD is an acronym for binary - coded decimal, and means that each digit of a decimal
number is expressed as a binary number.
Example:
4.6.2
0110
0100
0101
When inputting data from a digital switch to the programmable controller or outputting
data to a 7 - segment display (with decoder), the data must be in BCD form. In this case,
use a data conversion instruction as shown in the examples at below.
BCD arithmetic instructions (F40 through F58), also exist which allow direct operation
on BCD data, however, it is normally most convenient to use BIN operation instructions
(F20 through F38) as operation in the programmable controller takes place in binary.
Input from a digital switch
Use the BCD - to - BIN conversion instruction F81 (BIN).
Digital
switch
Programmable
controller
1
1
BCD
BIN
(Conversion
using F81
(BIN)
instruction)
0 0 0 1 1 0 0 1 1 0 0 1 0 0 1 0
0 0 0 0 0 1 1 1 1 1 0 0 1 0 0 0
4 - 25
7-segment
display
4 - 26
BIN
BCD
(Conversion
using F80
(BCD)
instruction)
Data processed in
the programmable
controller (BIN data)
Data outputted from
programmable
controller (BCD data)
0 0 0 0 0 1 1 1 1 1 0 0 1 0 0 0
0 0 0 1 1 0 0 1 1 0 0 1 0 0 1 0
1
4.7
4.7
X1
ANS
Y10
DF
X0
DF
X0
X2
X1
Y10
X2
Program example 2:
X0
X1
ANS
K30
Y10
X2
X0
X1
X0
TMX5,
X2
TMX 5, K 30
Y10
Program example 3:
X0
X1
Y10
X2
DF
ANS
X3
PSHS
Y11
X0
X1
Y10
X2
DF
Y11
X3
4 - 27
4 - 28
Chapter 5
Special Functions of FP0
5-2
5.1
5.1
5.1.1
There are three functions available when using the high - speed counter built into the
FP0.
High - speed counter function
The high - speed counter function counts external inputs such as those from sensors or
encoders. When the count reaches the target value, this function turns on/off the
desired output.
Roller
Cutter
Inverter
START
STOP signal
Encoder output is
input to the high speed counter
FP0
Pulse output
Y0
Y2
CW/CCW output
Motor
driver
1
Stepping motor
Servo motor
Motor
driver
2
Stepping motor
Servo motor
Pulse output
Y1
CW/CCW output
Y3
5-3
5-4
5.1
5.1.2
5.1.2.1
Input/output contact
number being used
On/off Count
output mode
Input
contact
number
(value
in parenthesis is
reset
input)
Performance
specifications
Minimum
input
pulse
width
Maximum
counting
speed
Using
only 1
channel
Using
multiple
channels
50s
Max.
10kHz
Total of
4 CH
with
max.
max
10kHz
Specify
the
desired
output
from
Y0 to
Y7
2 - phas
e input,
Incremental/
decremental
input,
Directional
distinction
Note
CH0
R903A
DT9044
to
DT9045
DT9046
to
DT9047
X1
(X2)
CH1
R903B
DT9048
to
DT9049
DT9050
to
DT9051
Max.
10kHz
CH2
R903C
DT9104
to
DT9105
DT9106 100s
to
DT9107
Max.
5kHz
X4
(X5)
Incremental
input,
DecreDecre
mental
input
X0
(X2)
X3
(X5)
Specify
the
desired
output
from
Y0 to
Y7
Related
instructions
CH3
R903D
DT9108
to
DT9109
DT9110
to
DT9111
Max.
5kHz
X0
X1
(X2)
CH0
R903A
DT9044
to
DT9045
DT9046 250s
to
DT9047
Max.
2kHz
X3
X4
(X5)
CH2
R903C
DT9104
to
DT9105
DT9106 500s
to
DT9107
Max.
1kHz
F0 (MV),
F1 (DMV),
F166
(HC1S),
(HC1S)
F167
(HC1R)
Total of
2 CH
with
max.
2kHz
5-5
5.1.2.2
Control
flag
Performance
p
specificafor
Elapsed Target tions f
maximum
value
value
output frearea
area
quency
Related
instructions
F0 (MV),
F1 (DMV),
F168
(SPD1),
(SPD1)
F169 (PLS)
Y0
Y2
X0
DT9052
<bit2>
CH0
R903A
DT9044
to
DT9045
Y1
Y3
X1
DT9052
<bit6>
CH1
R903B
DT9048
to
DT9049
Note
The maximum 1-point output for F168 (SPD1) instruction is 9.5kHz.
5.1.2.3
Built - in
high - speed
counter
channel no.
Related
instructions
Y0
CH0
R903A
Y1
CH1
R903B
F0 (MV),
F1 (DMV),
F170 (PWM)
Frequency:
0.15Hz to 38Hz
(CPU ver. 2.0 or later: 100 to 1kHz)
Duty: 0.1% to 99.9%
5-6
5.1
5.1.2.4
Restrictions
Channel
The same channel cannot be used by more than one function.
Example of prohibited application:
You cannot share CH0 with the high - speed counter and pulse output functions.
I/O number (input/output contact point)
The number allocated to each function cannot be used for normal input or outputs.
Example of prohibited application:
When using CH0 for 2 - phase inputting with the high - speed counter function, you
cannot allot X0 and X1 to normal inputs.
When using Y0 for the pulse output function, you cannot allot origin input X0 to a normal
input.
When using Y0 for the pulse output (with directional output operating) function, you
cannot allot Y2 (directional output) to a normal input or output.
When using the high - speed counter with a mode that does not use the reset input, you
can allot the inputs listed in parenthesis in the specifications table on section 5.1.2.1
to a normal input.
Example of allowable application:
When using the high - speed counter with no reset input and 2 - phase input,
you can allot X2 to a normal input.
Restrictions on the execution of related instructions (F166 to F170)
When any of the instructions related to the high - speed counter (F166 to F170) are
executed, the control flag (special internal relay: R903A to R903D) corresponding to the
used channel turns on.
When the flag for a channel turns on, another instruction cannot be executed using that
same channel.
Example of prohibited application:
While executing F166 (target value match on instruction) and flag R903A is in the on
state, F167 (target value match off instruction) cannot be executed with CH0.
5-7
5-8
5.1
5.1.3
5.1.3.1
The high - speed counter function counts the input signals, and when the count reaches
the target value, turns on and off the desired output.
The high - speed counter function is able to count high - speed pulses of frequencies up
to 10kHz.
To turn on an output when the target value is matched, use the target value match on
instruction (F166). To turn off an output, use the target value match off instruction
(F167).
Preset the output to be turned on and off with the SET/RET instruction.
Setting the system register
In order to use the high - speed counter function, it is necessary to set system registers
400 and 401.
5.1.3.2
X0
Count 0
n-3
n-2
n-1
X0
Count n
n-1
n-2
n-3
n-4
next page
5-9
on
off
X1
on
off
Count
n-1
on
off
X1
on
off
Count
n-1
n-3
n-2
X0
on
off
X1
Count 0
Increasing
Decreasing
Increasing
3
Decreasing
X0
on
off
X1
Count 0
Increasing
5 - 10
Decreasing
5.1
5.1.3.3
I/O Allocation
The inputting, as shown in the table on section 5.1.2.1, will differ depending on the
channel number being used.
The output turned on and off can be specified from Y0 to Y7 as desired with instructions
F166 and F167.
When using CH0 with incremental input and reset input
Count input
Reset input
X0
X2
Yn *
* The output turned on and off when values match can be specified from Y0 to Y7 as
desired.
When using CH0 with 2 - phase input and reset input
A phase input
B phase input
Reset input
X0
X1
X2
Yn *
* The output turned on and off when values match can be specified from Y0 to Y7 as
desired.
5 - 11
5.1.3.4
F0 MV, H 1 , DT9052
F0 MV, H 0 , DT9052
5 - 12
5.1
Example 2:
Reads the elapsed value of the high - speed counter and
copies it to DT100.
X7
DF
If the elapsed value (DT9104 and DT9105) for channel 2 matches K20000, output Y6
turns on.
XB
DF
If the elapsed value (DT9108 and DT9109) for channel 3 matches K40000, output Y5
turns off.
XD
DF
5 - 13
5.1.3.5
Sample Program
Wiring examples
FP0
Input terminal
Encoder
input
Operation
start
X0
X5
COM
Encoder
Output terminal
Operation
Inverter
Y0
Operation/Stop
+
-
COM
Speed
Y0
5 - 14
Number of pulse
Motor
5,000
5.1
X5
R100
R102
DF
R100
R101
R100
DF
R101
F1 DMV,
K 0,
DT 9044
Y0
Y0
S
R903A
R100
T0
R102
Completion pulse (0.5 seconds)
DF/
R102
TMX 0, K 5
5 - 15
Wiring example
FP0
Input terminal
Encoder
input
Operation
start
X0
X5
COM
Encoder
Output terminal
High - speed
switching
Inverter
Run/Stop
Fast/Slow
Y0
Y1
+
-
COM
Speed
Y0
Y1
5 - 16
Number of pulse
4,500
5,000
Motor
5.1
X5
R103
R100
Positioning operations running
DF
R100
R101
R100
DF
R101
F1 DMV,
K 0,
DT 9044
Y0
R101
Y0
S
Y1
S
R100
F61 DCMP,
K 4500,
DT 9044
R102
R100 R900C
R102
DF
R903A
R100
T0
R103
Completion pulse (0.5 seconds)
DF/
R103
Deceleration
TMX 0, K 5
5 - 17
5.1.4
5.1.4.1
5 - 18
5.1
5.1.4.2
Control Mode
5 - 19
5.1.4.3
Single pulse input driver (pulse input and directional switching input)
One output point is used as a pulse output and the other output is used as a directional
output.
The pulse output terminal, directional output terminal, and home input I/O allocation is
determined by the channel used.
Near home input is substituted by allocating the desired contact point and turning on
and off the specified bit of DT9052.
Up to two driver systems can be connected.
When using CH0
FP0
Home input
X0
X2
Near home
input
Driver
Pulse output
Y0
Y2
Directional
switching output
* The near home input specifies the desired input, such as X2.
When using CH1
FP0
Home input
X1
X3
Near home
input
Driver
Y1
Y3
Pulse output
Directional
switching output
* The near home input specifies the desired input, such as X3.
5 - 20
5.1
Double pulse input driver (CW pulse input and CCW pulse input)
Since a double pulse input is used, switching must be performed by an external relay.
One output contact is used as a pulse output for relay switching.
The pulse output terminal and home input I/O allocation is determined by the channel
used.
Set the control code for F168 (SPD1) instruction to No directional output.
When using CH0
FP0
Home input
X0
X2
Near home
input
Pulse
output
Y0
Y4
CW
input
Driver
CCW
input
**
* X2 or other desired input can be specified for the near home input.
** Y4 or other desired output can be specified for the relay switching. At this time, the
relay must be switched earlier by the amount of its operation time.
Caution when using a double pulse input driver
When using the FP0 pulse outputs Y0 and Y1 for direct connection to the CW input and
CCW input of a driver, the counter elapsed values for the separate channels (ch0 and
ch1) increase and decrease in response to the individual outputs. The elapsed values
can thus be sent to the program as necessary.
FP0
Y0
Y1
Driver
CW input
CCW input
5 - 21
5.1.4.4
500Hz
0Hz
200ms
200ms
At this time the high - speed counter elapsed value (DT9044 and DT9045) will be
increasing.
For trapezoidal control, set the initial speed to no more than 5000Hz.
Note
5 - 22
5.1
While X2 is in the on state, a pulse of 300Hz with a duty ratio of 10% is output from Y0.
At this time, directional output (Y2) is off and the count of the elapsed value for the
high - speed counter CH0 (DT9044 and DT9045) increases.
X6
F0 MV, H123, DT200
F0 MV, K700, DT201
F169 PLS, DT200, H1
While X6 is in the on state, a pulse of 700Hz with a duty ratio of 10% is output from Y1.
At this time, directional output (Y3) is off and the count of the elapsed value for the
high - speed counter CH1 (DT9048 and DT9049) decreases.
High - speed counter control instruction (F0)
This instruction is used for resetting the built - in high - speed counter, stopping the pulse
outputs, and setting and resetting the near home input.
Specify this instruction together with the special data register DT9052.
Once this instruction is executed, the settings will remain until this instruction is
executed again.
Operations that can be performed with this instruction
- Clear controls (stopping the pulse outputs) from high - speed counter
instructions F166 to F170.
- Near home processing for home return operations.
next page
5 - 23
Example 1: Enable the near home input during home return operations and
begin deceleration.
X3
F0 MV, H 4 , DT9052
.....
F0 MV, H 0 , DT9052
DF
..... 2
F0 MV, H 8 , DT9052
F0 MV, H 0 , DT9052
Example 2: Reads the elapsed value of the high - speed counter to DT100.
X7
DF
5 - 24
5.1
5.1.4.5
Wiring example
FP0
Input terminal
Home sensor
X0
Positioning start
X1
Positioning start
X2
X3
X4
X5
X6
Overrun
X7
a contact
COM
b contact a contact
Moving table
Stepping motor
( - side)
b contact
(+ side)
COM
Pulse input
Y0
COM
Directional output
Directional
input
Y2
+
-
See
note.
24V DC
power supply
Note
When the stepping motor input is a 5V photo - coupler type,
connect a 2K 1/4W resistor.
5 - 25
X1
R12
R10
DF
R10
R11
R10
DF
R11
DT100
K 500,
F0 MV,
K5000,
DT102
DT 102
F0 MV,
F1 DMV,
F0 MV,
K 200,
Acceleration/deceleration
time: 200ms
Movement amount: 10000
pulses
Pulse stop
R903A
DT 103
K10000,
K 0,
F168 SPD1,
DT 104
DT 106
DT 100,
R10
H0
T0
R12
DF/
TMX 0, K10
R12
( - side)
Motor
DT104
DT105
DT 101
DT 100
F0 MV,
DT101
DT106
H 102,
DT103
F0 MV,
(+ side)
5000Hz
10000 pulses
10000
pulses
500Hz
0Hz
200ms
5 - 26
200ms
5.1
X2
R22
R20
DF
R20
R21
R20
DF
R21
DT100
H 102,
K1000,
DT101
F0 MV,
K6000,
Acceleration/deceleration
time: 300ms
DT104
DT105
DT 102
F0 MV,
K 300,
DT 103
F1 DMV,
F0 MV,
K - 8000,
K 0,
F168 SPD1,
R903A
DT 104
DT 106
DT 100,
R20
H0
T1
R22
DF/
TMX 1, K10
R22
( - side)
Motor
DT103
DT 101
DT102
DT 100
F0 MV,
DT106
F0 MV,
(+ side)
6000Hz
8000 pulses
8000
pulses
1000Hz
0Hz
300ms
300ms
5 - 27
X1
R32
R30
DF
R30
R31
R30
DF
R31
DT100
H 112,
K 200,
DT101
DT103
Acceleration/deceleration
time: 250ms
DT104
DT105
DT 101
DT102
DT 100
F0 MV,
DT106
F0 MV,
F0 MV,
K4000,
DT 102
F0 MV,
K 250,
DT 103
F1 DMV,
F0 MV,
K22000,
K 0,
F168 SPD1,
R903A
DT 104
DT 106
DT 100,
R30
H0
T2
R32
DF/
TMX 2, K10
R32
( - side)
(+ side)
Motor
(10,000)
22,000
(30,000)
4000Hz
5 - 28
250ms
5.1
X3
R40
R42
DF
R40
R41
R40
DF
R41
DT200
DT 201
DT201
DT202
DT203
Acceleration/deceleration
time: 150ms
F0 MV,
H 123,
DT 200
F0 MV,
K 100,
F0 MV,
K2000,
DT 202
F0 MV,
K 150,
DT 203
F168 SPD1,
R903A
DT 200,
R40
H0
R42
T3
DF/
TMX 3, K10
R42
X4
F0 MV,
H 4,
H 0,
DT9052
F0 MV,
DF
DT9052
( - side)
(+ side)
Motor
X3: on
Near home
sensor
X4: on
Home sensor
X0: on
2000Hz
X0
Home
sensor
X4
Near
home
sensor
100Hz
0Hz
150ms
150ms
5 - 29
X3
R50
R52
DF
R50
R51
R50
DF
R51
DT200
DT 201
DT201
DT202
DT203
Acceleration/deceleration
time: 100ms
F0 MV,
H 122,
DT 200
F0 MV,
K 120,
F0 MV,
K2500,
DT 202
F0 MV,
K 100,
DT 203
F168 SPD1,
R903A
DT 200,
R50
H0
R52
T4
DF/
TMX 4, K10
R52
X4
F0 MV,
H 4,
H 0,
DT9052
( - side)
(+ side)
Motor
X3: on
Near home
sensor
X4: on
2500Hz
X4
Near
home
sensor
5 - 30
DT9052
F0 MV,
DF
X0
Home
sensor
120Hz
0Hz
100ms
100ms
Home sensor
X0: on
5.1
H 112,
DT 300
F0 MV,
K 300,
DT 301
F169 PLS,
DT 300,
DT300
DT301
H0
( - side)
(+ side)
X5
Motor
Y0(Pulse)
on
off
300Hz
0Hz
H 122,
DT 310
F0 MV,
K 300,
DT 311
F169 PLS,
DT 310,
DT310
DT311
H0
( - side)
(+ side)
X6
Motor
Y0(Pulse)
on
off
300Hz
0Hz
F0 MV,
H 8,
DT9052
H 0,
DT9052
5 - 31
Yes
No
[F168 SPD1, j, Kj]
Remedy
problem
Yes
Special internal
relay R903A or R903B
is already on.
Yes
Yes
First word
of data table is not set
to incremental (0), absolute
(1), or home
return (2).
Yes
Second word of
data table is set to 40 < or =
initial speed < or =
maximum
speed.
Elapsed value
tried to output pulse in
forward direction at
H7FFFFF.
Yes
Elapsed value
tried to output pulse in
reverse direction at
HFF8000.
Remedy
problem
No
Remedy
problem
Yes
No
Set to home
return mode
No
Yes
No
Modify
elapsed
value.
Remedy
problem
No
No
Modify
elapsed
value.
Yes
No
No
Remedy
problem
Remedy
problem
No
Remedy
problem
Yes
Yes
No
Home input is
already used by
interrupt or HSC.
Yes
Remedy
problem
Yes
Remedy
problem
No
Please contact your dealer.
Set to absolute
mode
No
Please contact your dealer.
Yes
Absolute mode
setting is target value
= elapsed
value.
No
Please contact your dealer.
5 - 32
5.1
5.1.5
5.1.5.1
With the F170 (PWM) instruction, the specified duty ratio and pulse width modulation
is obtained.
Applicable to analog controls such as temperature control and light modulation.
Setting the system register
When using the PWM output function, set the channels corresponding to system
registers 400 to Do not use high - speed counter.
5.1.5.2
While X6 is in the on state, a pulse with a period of 840ms and duty ratio of 50% is output
from Y0.
X7
F0 MV, H6, DT100
F0 MV, K300, DT101
F170 PWM, DT100, K1
While X7 is in the on state, a pulse with a period of 1.6 sec and duty ratio of 30% is output
from Y1.
5 - 33
5.2
5.2.1
Using the RS232C port, data and commands can be sent to and received from an
external device such as a bar code reader. This is done by executing the F144 (TRNS)
instruction.
Transmission and reception are not enabled in the default settings, so system register
412 must be changed to a general port (K2).
The transmission speed (baud rate) and transmission format are set using system
register 413 and 414.
5.2.1.1
Data Transmission
Any desired data register can be prepared as the transmission table, and the data
stored in that table transmitted.
Start and terminal codes are automatically added to the data being transmitted, and the
data is sent.
The data register to be used as the transmission table is specified using the F144
(TRNS) instruction.
Data transmission is executed using the F144 (TRNS) instruction.
There is no restriction on the number of bytes that can be transmitted. Any number of
bytes may be sent, as long as it does not exceed the range that can be used by the data
register.
Table for transmission
Transmission
Transmitted data
storage area
External device
(Computer, etc.)
5 - 34
5.2
5.2.1.2
Data Reception
Reception
Received data
storage area
External device
(bar code reader, etc.)
5 - 35
5.2.2
8 bits
Yes/odd
1 bit
CR
STX None
Set these items to match the external device connected to the RS232C port, and if
changing the transmission format, enter settings for the pertinent individual items.
With the FP Programmer II, the various items should be selected in bit units, as shown
below, and settings entered using H constants.
15
6 5 4 3 2 1 0
Start code
0:STX None
1:STX Yes
Terminal code
00:CR
01:CR+LF
10: None 11:ETX
Stop bit
0:1 bit
1:2 bits
Parity
00: None
Data length
0:7 bits
1:8 bits
5 - 36
5.2
Example:
H3
5 - 37
0
RS232C port
Tool port
H0: 9600bps
H1: 19200bps
If anything other than H0 or
H1 is set for the baud rate of
tool port, the baud rate will
be 9600bps.
Example:
H0: 19200bps
H1: 9600bps
H2: 4800bps
H3: 2400bps
H4: 1200bps
H5: 600bps
H6: 300bps
Setting 19,200bps for both the tool port and RS232C port
' Write H100.
Number of
reception bytes
Received data
storage area
5 - 38
5.2
5.2.3
5.2.3.1
External received
data
CR
E
B
on
R9038
Reception
completed flag
off
on
F144 (TRNS)
instruction
execution
off
on
R9039
Transmission
completed flag off
Transmitted data
CR
Stored
Reception
buffer
<1>
A
B
<2>
B
C
A
B
C
B
C
E
F
C
<3>
<0>
<1>
<2>
<3>
: Write pointer
Half - duplex transmission should be used for general - purpose serial communication.
Reception is disabled when the reception completed flag (R9038) is on.
Be aware that the reception completed flag (R9038) changes even while a scan is in
progress. (Example: If the reception completed flag is used multiple times as an input
condition, there is a possibility of different statuses existing within the same scan.)
When the F144 (TRNS) instruction is executed, the error flag (R9037), reception
completed flag (R9038) and transmission completed flag (R9039) go off.
Duplex transmission is disabled while the F144 (TRNS) instruction is being executed.
Check the transmission completed flag (R9039) to determine whether duplex
transmission is possible.
5 - 39
When the F144 (TRNS) instruction is executed, the number of bytes received is cleared,
and the address (write pointer) returns to the initial address in the reception buffer.
Reception stops if the error flag (R9037) goes on. To resume reception, execute the
F144 (TRNS) instruction. This turns off the error flag, and transmits both actual and
empty data.
5.2.3.2
STX
ETX
on
on
F144 (TRNS)
instruction
execution
ETX
The reception
code is deleted by
the F144 (TRNS)
instruction.
Cannot be
stored when
reception
completed
flag is on
R9038
Reception comoff
pleted flag
STX
off
Stored
Reception
buffer
B
C
B
C
B
C
E
C
<0>
<1>
<2>
<2>
<3>
: Write pointer
Number of
bytes received
is cleared when
start code is
received.
D
E
C
<2>
D
E
C
<0>
G
E
G
E
H
E
H
E
<1>
<0>
<1>
<1>
Number of bytes
received is cleared
when F144 (TRNS)
instruction is executed.
Number of
bytes received
is cleared when
start code is
received.
The data is stored in the reception buffer in sequential order, but at the point at which
the start code is received, the number of bytes received is cleared, and the address
(write pointer) is returned to the initial address in the reception buffer.
When the F144 (TRNS) instruction is executed, the number of bytes received is cleared,
and the address (write pointer) is returned to the initial address in the reception buffer.
If there are two start codes, data following the later start code is overwritten and stored
in the reception buffer.
Reception is disabled while the reception completed flag (R9038) is on.
The reception completed flag (R9038) is turned off by the F144 (TRNS) instruction.
Because of this, if the F144 (TRNS) instruction is executed at the same time that the
terminal code is received, the reception completed flag will not be detected.
5 - 40
5.2
STX
ETX
STX
Transmission
R9039
Transmission
completed flag
ETX
Transmission
on
off
on
Duplex transmission
disabled while F144
(TRNS) instruction is
being executed
Send buffer
<3>
<2>
<1>
<0>
<2>
<1>
<0>
<0>
<0>
: Transmission point
Start codes (STX) and terminal codes (ETX) are automatically added to the data being
transmitted, and the data is transmitted to an external device.
Executing the F144 (TRNS) instruction turns off the transmission completed flag
(R9039).
Duplex transmission is disabled while the F144 (TRNS) instruction is being executed.
Check the transmission completed flag (R9039) to determine whether duplex
transmission is possible.
5 - 41
5.3
5.3.1
5 - 42
5.3
5.3.2
5 - 43
5.3.3
Item
Programming tool
software (NPST - GR)
(Ladder symbol mode)
Programming tool
software
(NPST - GR)
(Boolean mode)
Rewrite procedure
When PG conversion is
executed online, the program will be rewritten.
Block a
Operation of
each
instruction
OT/KP
TM/CT
FP Programmer II
Block b
If an instruction written in
block a is deleted in block b,
the condition before the rewrite will be held.
If an instruction written in
block a is deleted in block b,
the condition before the rewrite will be held.
MC/MCE
CALL/SUB/
RET
A subroutine is a program
appearing between SUBn
and RET instructions. Be
sure to write it to an address
which follows the ED
instruction.
INT/IRET
5 - 44
An interrupt program is a
program appearing between
INTn and IRET instructions.
Be sure to write it to an address which follows the ED
instruction.
5.3
Item
Operation of
each
instruction
Programming tool
software (NPST-GR)
(Ladder symbol mode)
SSTP/STPE
Programming tool
software (NPST-GR)
(Boolean mode)
FP Programmer II
JP/LOOP/LBL
Be sure to write the instruction for setting the loop number before LBL-LOOP
instructions.
5 - 45
5.3.4
ACLR
ENT
WRT
ACLR
ENT
WRT
To change the set value for a timer or counter, follow the procedure below.
Example:
TMX 5,K 30
T5
1.
2.
Y10
TM
T-SV
ST
X-WX
SRC
READ
READ
3.
WRT
5 - 46
5.4
5.4
Input/output update
Operation
Peripheral service
5 - 47
5 - 48
Chapter 6
Special Functions of FP - M/FP1
6-2
6.1
6.1
6.1.1
Control Specifications
Item
FP - M and FP1
Counting range
Input mode
6-3
6-4
6.1
6.1.2
Input Mode
The high- speed counter supports 4 modes (2 - phase mode, up mode, down mode,
up/down mode) with or without reset input.
Setting of Input Mode
The input mode of the high- speed counter is set using system register 400 as follows:
Default value: H0 (high - speed counter function not used.)
Setting of system register 400
Set
value
l
H0
H1
2 - phase input
H2
2 - phase input
H3
Up input
H4
Up input
Input mode
p
X2
2 - phase mode
p
Reset input
Up mode
p
Reset input
H5
Down input
H6
Down input
H7
Up input
Down input
H8
Up input
Down input
Down mode
Reset input
Up/Down mode
p/
Reset input
on
off
X1
on
off
Number
of counts
n-1
Down input
X0
on
off
X1
on
off
Number
of counts
n-1
n-2
n-3
next page
6-5
Up mode
X0
on
off
Number 0
of counts
n-1
n-2
n-3
n-4
n-3
n-2
n-1
Down mode
X1
on
off
Number n
of counts
Up/down mode
X0
on
off
X0
on
off
Number 0
of counts
Up count
6.1.3
Down count
Up count
Down count
FP - M C16 and FP1 C14, C16, C24, C40 (transistor output types):
pulse output from Y7
Setting: system register 400: H3 or H4
Connection: For inputting the pulse from
Y7 to the high- speed counter, you need
to connect Y7 to X0.
To motor
driver
Y7
Programmable
controller
X0
FP - M and FP1 C56, C72 (transistor output types): pulse output from Y7
Setting: system register 400: H103 or H104
Connection: The pulses from Y7 can be
directly input to X0 without external
wiring.
To motor
driver
Y7
Programmable
controller
X0
6-6
6.1
Note
With programming tool software (NPST - GR), set as follows when
system register 400 is specified.
- HSC WORK MODE: [3] or [4]
- PULSE OUTPUT FEEDBACK: [YES]
FP - M and FP1 C56, C72 (transistor output types): pulse output from Y6 and Y7
Setting: system register 400: H107 or H108
To motor
Set
value
H107
H108
driver
Operation mode
Y6
Y7
Programmable
controller
X0 X1
Connection: The pulses from Y7 can be directly input to X0 and pulses from Y6 to X1
without external wiring.
If X0 is used as an input for pulses from Y7 and X1 as an input for pulses from Y6, they
cannot be used for anything else.
Note
With programming tool software (NPST - GR), set as follows when
system register 400 is specified.
- HSC WORK MODE: [7] or [8]
- PULSE OUTPUT FEEDBACK: [YES]
6.1.4
F0 (MV) Instruction
This instruction controls the high- speed counter operations as follows:
Software reset operation
Count input control operation
Reset input X2 availability control operation
Control of high- speed counter related instructions [F162 (HC0S), F163 (HC0R), F164
(SPD0), and F165 (CAM0) instruction].
Clear target value match interrupt.
Notes
Using the F0 (MV) instruction and special data register DT9052,
you can control the operation of the high - speed counter.
Once the operation mode is specified, the high - speed counter
operates in the mode until a new setting is made.
Example:
(DF)
>1
F0 MV, H 1, DT9052
F0 MV, H 0, DT9052
F1 (DMV) Instruction
This instruction changes or reads the elapsed value of the high- speed counter.
6-8
6.1
Specify this F1 (DMV) instruction together with the special data register DT9044.
The elapsed value is stored as 32 - bit data area of special data registers DT9045 and
DT9044.
Only the F1 (DMV) instruction can change and read the elapsed value.
(DF)
>1
(DF)
>1
>1
(DF)
F162 HC0S, K10000, Y5
>1
(DF)
F163 HC0R, K5000, Y0
Time chart
Target
value
Elapsed value
K10000
K5000
0
on
X3
off
Y0
on
off
Y5
Time
on
off
6.1
1000
3000
4000 Elapsed
value
Target
value 1
X3
Last target
value
on
off
R903A
Target
value 2
on
off
Time chart
Target
value
Elapsed value
Target value 3
K4000
Target value 2
K2000
Target value 1
K1000
0
X3
R903A
on
off
Y0
on
off
Y1
on
off
Y2
Time
on
off
on
off
Output pattern 3
Output
pattern 1
Initial output
pattern
Output
pattern 2
Elapsed
value
K14000
K12000
K8000
K6000
K4000
K2000
0
Time
on
X3
off
Y0
on
off
Y1
on
off
Notes
A maximum of eight cam control outputs are available starting
from Y0.
6 - 12
6.1
Elapsed value
K800
K300
0
INT0
Program
Time
Execution
Execution
6 - 13
6.2
This table shows the speed data set in the data table of instruction F164 (SPD0) and the
corresponding output pulse frequency that is actually output while pulse output is being
performed. Use this table as a guide when performing these settings.
Be aware of the points below.
There is a small amount of error in the actual output pulse frequency (+/ - 0.5%).
Due to load conditions and other factors, pulses at frequencies over 5kHz may not be
usable.
Pulse output may not be usable at small duty ratios. (The values in the table below do
not include delays caused by the hardware output components.)
Output pulse frequency (Hz)
Speed
Range 0
Range 1
Range 2
data
360Hz to 5kHz
255
254
253
252
251
250
249
248
247
246
245
244
243
242
241
240
239
238
237
236
235
234
233
232
231
230
229
228
227
226
225
224
223
222
6 - 14
180Hz to 5kHz
46700
31200
23400
18700
15600
13400
11700
10400
9350
8500
7790
7190
6680
6230
5840
5500
5190
4920
4670
4450
4250
4060
3890
3740
3590
3460
3340
3220
3120
3010
2920
2830
2750
2670
23500
15600
11700
9390
7820
6710
5870
5220
4690
4270
3910
3610
3350
3130
2930
2760
2610
2470
2350
2240
2130
2040
1960
1880
1810
1740
1680
1620
1560
1510
1470
1420
1380
1340
90Hz to 5kHz
11700
7810
5850
4680
3900
3350
2930
2600
2340
2130
1950
1800
1670
1560
1460
1380
1300
1230
1170
1120
1060
1020
976
937
901
867
836
808
781
755
732
710
689
669
Range 3
45Hz to 5kHz
5860
3910
2930
2340
1950
1670
1470
1300
1170
1070
977
902
837
782
733
690
651
617
586
558
533
510
488
469
451
434
419
404
391
378
366
355
345
335
Range 4
Range 5
1440Hz to 5kHz
720Hz to 5kHz
Duty
y
ratio
ti
(%)
187300
124800
93600
74900
62400
53500
46800
41600
37500
34000
31200
28800
26800
25000
23400
22000
20800
19700
18700
17800
17000
16300
15600
15000
14400
13900
13400
12900
12500
12100
11700
11300
11000
10700
93800
62500
46900
37500
31300
26800
23500
20800
18800
17100
15600
14400
13400
12500
11700
11000
10400
9870
9380
8930
8530
8160
7820
7500
7220
6950
6700
6470
6250
6050
5860
5690
5520
5360
25
33
25
40
33
43
38
44
40
45
42
46
43
47
44
47
44
47
45
48
45
48
46
48
46
48
46
48
47
48
47
48
47
49
6.2
221
220
219
218
217
216
215
214
213
212
211
210
209
208
207
206
205
204
203
202
201
200
199
198
197
196
195
194
193
192
191
190
189
188
187
186
185
184
183
182
181
180
179
178
177
176
175
174
173
180Hz to 5kHz
2600
2530
2460
2400
2340
2280
2230
2170
2120
2080
2030
1990
1950
1910
1870
1830
1800
1760
1730
1700
1670
1640
1610
1580
1560
1530
1510
1480
1460
1440
1420
1390
1370
1350
1340
1320
1300
1280
1260
1250
1230
1210
1200
1180
1170
1150
1140
1130
1110
1300
1270
1240
1200
1170
1150
1120
1090
1070
1040
1020
999
978
958
939
921
903
886
869
854
838
824
809
796
782
770
757
745
734
722
711
701
690
680
671
661
652
643
634
626
618
610
602
594
587
580
573
566
559
90Hz to 5kHz
651
633
616
600
585
571
558
545
532
520
509
498
488
478
468
459
450
442
434
426
418
411
404
397
390
384
378
372
366
360
355
350
344
339
335
330
325
321
316
312
308
304
300
296
293
289
286
282
279
Range 3
45Hz to 5kHz
326
317
309
301
293
286
279
273
266
261
255
249
244
239
234
230
225
221
217
213
209
206
202
199
195
192
189
186
183
180
178
175
172
170
167
165
163
161
158
156
154
152
150
148
147
145
143
141
140
Range 4
Range 5
1440Hz to 5kHz
720Hz to 5kHz
Duty
y
ratio
ti
(%)
10400
10100
9860
9600
9360
9130
8920
8710
8510
8320
8140
7970
7800
7640
7490
7340
7200
7070
6940
6810
6690
6570
6460
6350
6240
6140
6040
5940
5850
5760
5670
5590
5510
5430
5350
5280
5200
5130
5060
4990
4930
4860
4800
4740
4680
4620
4570
4510
4460
5210
5070
4940
4810
4690
4580
4470
4360
4260
4170
4080
3990
3910
3830
3750
3680
3610
3540
3470
3410
3350
3290
3230
3180
3130
3080
3030
2980
2930
2890
2840
2800
2760
2720
2680
2640
2610
2570
2540
2500
2470
2440
2410
2370
2350
2320
2290
2260
2230
47
49
47
49
48
49
48
49
48
49
48
49
48
49
48
49
48
49
48
49
48
49
48
49
48
49
48
49
48
49
48
49
49
49
49
49
49
49
49
49
49
49
49
49
49
49
49
49
49
6 - 15
172
171
170
169
168
167
166
165
164
163
162
161
160
159
158
157
156
155
154
153
152
151
150
149
148
147
146
145
144
143
142
141
140
139
138
137
136
135
134
133
132
131
130
129
128
127
126
125
124
6 - 16
180Hz to 5kHz
1100
1090
1070
1060
1050
1040
1030
1020
1000
994
984
974
963
954
944
935
925
916
907
899
890
882
873
865
857
850
842
834
827
820
813
806
799
792
785
779
772
766
760
754
748
742
736
730
724
719
713
708
703
552
546
540
534
528
522
516
510
505
499
494
489
484
479
474
469
465
460
456
451
447
443
439
435
431
427
423
419
415
412
408
405
401
398
395
391
388
385
382
379
376
373
370
367
364
361
358
356
353
90Hz to 5kHz
276
272
269
266
263
260
257
255
252
249
247
244
241
239
237
234
232
230
227
225
223
221
219
217
215
213
211
209
207
205
204
202
200
198
197
195
194
192
190
189
187
186
184
183
182
180
179
177
176
Range 3
45Hz to 5kHz
138
136
135
133
132
130
129
127
126
125
123
122
121
120
118
117
116
115
114
113
112
111
110
109
108
107
106
105
104
103
102
101
100
99.4
98.5
97.7
96.9
96.1
95.3
94.5
93.8
93.0
92.3
91.6
90.9
90.2
89.5
88.8
88.1
Range 4
Range 5
1440Hz to 5kHz
720Hz to 5kHz
Duty
y
ratio
ti
(%)
4410
4360
4300
4260
4210
4160
4120
4070
4030
3980
3940
3900
3860
3820
3780
3750
3710
3670
3640
3600
3570
3530
3500
3470
3440
3400
3370
3340
3310
3290
3260
3230
3200
3170
3150
3120
3100
3070
3040
3020
3000
2970
2950
2930
2900
2880
2860
2840
2820
2210
2180
2160
2130
2110
2080
2060
2040
2020
2000
1970
1950
1930
1910
1900
1880
1860
1840
1820
1800
1790
1770
1750
1740
1720
1710
1690
1680
1660
1650
1630
1620
1600
1590
1580
1560
1550
1540
1530
1510
1500
1490
1480
1470
1450
1440
1430
1420
1410
49
49
49
49
49
49
49
49
49
49
49
49
49
49
49
49
50
49
50
49
50
49
50
49
50
49
50
49
50
49
50
49
50
49
50
49
50
49
50
49
50
49
50
49
50
49
50
49
50
6.2
123
122
121
120
119
118
117
116
115
114
113
112
111
110
109
108
107
106
105
104
103
102
101
100
99
98
97
96
95
94
93
92
91
90
89
88
87
86
85
84
83
82
81
80
79
78
77
76
180Hz to 5kHz
697
692
687
682
677
672
668
663
658
654
649
645
640
636
631
627
623
619
615
611
607
603
599
595
592
588
584
580
577
573
570
566
563
560
556
553
550
547
543
540
537
534
531
528
525
522
519
516
350
348
345
343
340
338
335
333
331
328
326
324
322
319
317
315
313
311
309
307
305
303
301
299
297
295
293
292
290
288
286
285
283
281
279
278
276
275
273
271
270
268
267
265
264
262
261
259
90Hz to 5kHz
175
173
172
171
170
168
167
166
165
164
163
162
160
159
158
157
156
155
154
153
152
151
150
149
148
147
146
145
145
144
143
142
141
140
139
139
138
137
136
135
135
134
133
132
132
131
130
129
Range 3
45Hz to 5kHz
87.5
86.8
86.2
85.6
85.0
84.3
83.7
83.1
82.6
82.0
81.4
80.9
80.3
79.8
79.2
78.7
78.2
77.6
77.1
76.6
76.1
75.6
75.1
74.7
74.2
73.7
73.3
72.8
72.4
71.9
71.5
71.1
70.6
70.2
69.8
69.4
69.0
68.6
68.2
67.8
67.4
67.0
66.6
66.2
65.9
65.5
65.1
64.8
Range 4
Range 5
1440Hz to 5kHz
720Hz to 5kHz
Duty
y
ratio
ti
(%)
2800
2770
2750
2730
2710
2690
2680
2660
2640
2620
2600
2580
2570
2550
2530
2510
2500
2480
2460
2450
2430
2420
2400
2390
2370
2360
2340
2330
2310
2300
2280
2270
2260
2240
2230
2220
2200
2190
2180
2160
2150
2140
2130
2120
2100
2090
2080
2070
1400
1390
1380
1370
1360
1350
1340
1330
1320
1310
1300
1290
1290
1280
1270
1260
1250
1240
1230
1230
1220
1210
1200
1200
1190
1180
1170
1170
1160
1150
1140
1140
1130
1120
1120
1110
1110
1110
1090
1080
1080
1070
1070
1060
1050
1050
1040
1040
49
50
49
50
49
50
49
50
49
50
49
50
49
50
49
50
49
50
49
50
49
50
49
50
49
50
49
50
49
50
49
50
49
50
49
50
49
50
49
50
49
50
49
50
49
50
49
50
6 - 17
75
74
73
72
71
70
69
68
67
66
65
64
63
62
61
60
59
58
57
56
55
54
53
52
51
50
49
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
32
31
30
29
28
6 - 18
180Hz to 5kHz
514
511
508
505
502
500
497
494
492
489
487
484
482
479
477
474
472
470
467
465
463
460
458
456
454
451
449
447
445
443
441
439
437
435
433
431
429
427
425
423
421
419
417
415
414
412
410
408
258
257
255
254
252
251
250
248
247
246
245
243
242
241
240
238
237
236
235
234
232
231
230
229
228
227
226
225
224
223
221
220
219
218
217
216
215
214
213
212
211
211
210
209
208
207
206
205
90Hz to 5kHz
129
128
127
127
126
125
125
124
123
123
122
121
121
120
119
119
118
118
117
117
116
115
115
114
114
113
113
112
112
111
110
110
109
109
108
108
107
107
106
106
105
105
105
104
104
103
103
102
Range 3
45Hz to 5kHz
64.4
64.1
63.7
63.4
63.0
62.7
62.4
62.0
61.7
61.4
61.1
60.7
60.4
60.1
59.8
59.5
59.2
58.9
58.6
58.3
58.0
57.8
57.5
57.2
56.9
56.6
56.4
56.1
55.8
55.6
55.3
55.0
54.8
54.5
54.3
54.0
53.8
53.5
53.3
53.0
52.8
52.6
52.3
52.1
51.9
51.6
51.4
51.2
Range 4
Range 5
1440Hz to 5kHz
720Hz to 5kHz
Duty
y
ratio
ti
(%)
2060
2050
2040
2020
2010
2000
1990
1980
1970
1960
1950
1940
1930
1920
1910
1900
1890
1880
1870
1860
1850
1840
1840
1830
1820
1810
1800
1790
1780
1780
1770
1760
1750
1740
1730
1730
1720
1710
1700
1690
1690
1680
1670
1660
1660
1650
1640
1640
1030
1030
1020
1010
1010
1000
998
993
987
982
977
972
967
962
957
952
948
943
938
933
929
924
920
915
911
906
902
898
893
889
885
881
877
873
869
865
861
857
853
849
845
841
838
834
830
827
823
819
49
50
49
50
49
50
49
50
49
50
49
50
49
50
49
50
49
50
50
50
50
50
50
50
50
50
50
50
50
50
50
50
50
50
50
50
50
50
50
50
50
50
50
50
50
50
50
50
6.2
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
180Hz to 5kHz
406
405
403
401
399
398
396
394
393
391
389
388
386
385
383
381
380
378
377
375
374
372
371
369
368
367
365
204
203
202
201
201
200
199
198
197
196
196
195
194
193
192
192
191
190
189
189
188
187
186
186
185
184
183
90Hz to 5kHz
102
101
101
101
100
99.7
99.2
98.8
98.4
98.0
97.6
97.2
96.8
96.4
96.0
95.6
95.2
94.8
94.4
94.1
93.7
93.3
92.9
92.6
92.2
91.8
91.5
Range 3
45Hz to 5kHz
51.0
50.8
50.5
50.3
50.1
49.9
49.7
49.5
49.3
49.1
48.8
48.6
48.4
48.2
48.0
47.9
47.7
47.5
47.3
47.1
46.9
46.7
46.5
46.3
46.2
46.0
45.8
Range 4
Range 5
1440Hz to 5kHz
720Hz to 5kHz
Duty
y
ratio
ti
(%)
1630
1620
1610
1610
1600
1590
1590
1580
1570
1570
1560
1550
1550
1540
1530
1530
1520
1520
1510
1500
1500
1490
1490
1480
1470
1470
1460
816
812
809
805
802
798
795
792
788
785
782
778
775
772
769
766
763
760
757
753
750
747
745
742
739
736
733
50
50
50
50
50
50
50
50
50
50
50
50
50
50
50
50
50
50
50
50
50
50
50
50
50
50
50
6 - 19
93458
Frequency (Hz)
46948
Frequency (Hz)
23419
Frequency (Hz)
11723
Frequency (Hz)
374532
Frequency (Hz)
1876171
Frequency (Hz)
6 - 20
6.3
6.3
This table shows the set value and corresponding pulse width when performing pulse
output with the on pulse width fixed. Setting the on pulse width is possible with controllers
of CPU version 2.9 or later.
How to set the on - pulse width
Set the start data register [S] of the output pulse data table for F164 (SPD0) instruction
as shown below.
[S] = H V V V 0
Selection of on pulse wide
H0: Duty ratio 50 %
H1 to HF: fixed on pulse wide
Selection of output
Selection of frequency range
50 %
on
off
50 %
Set value: 0
on
off
Fixed
on
off
6 - 21
Range 0
360Hz to
5kHz
(L=10.7)
Range 1
180Hz to
5kHz
(L=21.3)
Range 2
90Hz to
5kHz
(L=42.7)
Range 3
45Hz to
5kHz
(L=85.3)
Range 4
1440Hz to
5kHz
(L=2.67)
Range 5
720Hz to
5kHz
(L=5.33)
H0
Duty ratio: 50 %
H1
H2
10.7s
21.3s
42.7s
85.3s
2.67s
5.33s
21.4s
42.6s
85.4s
170.6s
5.34s
10.66s
H3
32.1s
63.9s
128.1s
255.9s
8.01s
15.99s
H4
42.8s
85.2s
170.8s
341.2s
10.68s
21.32s
H5
53.5s
106.5s
213.5s
426.5s
13.35s
26.65s
H6
64.2s
127.8s
256.2s
511.8s
16.02s
31.99s
H7
74.9s
149.1s
298.9s
597.1s
18.69s
37.31s
H8
85.6s
170.4s
341.6s
682.4s
21.36s
42.64s
H9
96.3s
191.7s
384.3s
767.7s
24.03s
47.97s
HA
107.0s
213.0s
427.0s
853.0s
26.70s
53.30s
HB
117.7s
234.3s
469.7s
938.3s
29.37s
58.63s
HC
128.4s
255.6s
512.4s
1023.6s
32.04s
63.96s
HD
139.1s
276.9s
555.1s
1108.9s
34.71s
69.29s
HE
149.8s
298.2s
597.8s
1194.2s
37.38s
74.62s
HF
160.5s
319.5s
640.5s
1279.5s
40.05s
79.95s
6 - 22
Chapter 7
Hints for FP2/FP2SH/FP3/FP10SH
7-2
7.1
7.1
7.1.1
The slot numbers of the target intelligent unit are allocated automatically, based on the
installation position.
Number being specified (Hexadecimal constants)
16 slots (slots which can be counted as slot numbers)
14 slots (number of slots on backplane)
Power supply
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
Power supply
10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F
Power supply
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
Power supply
7-3
7.1.2
The slot numbers of the target intelligent unit are allocated automatically, based on the
installation position.
Number being specified (Hexadecimal constants)
Board
number =1
Power
supply
Expansion
CPU
Power
supply
00
Board
number =2
Power
supply
Expansion
Board
number =3
Power
supply
Expansion
01
02
03
04
05
06
07
08
09
0A
0B
0C
0D
0E
0F
10 11 12 13 14 15
10
11
12
13
14
15
16
17
16 17 18 19 20 21 22 23
18
19
1A
1B
1C
1D
1E
1F
24 25 26 27 28 29 30 31
02
03
04
05
06
07
Board
number =1
08
09
0A
0B
0C
0D
0E
0F
10 11 12 13 14 15
Power
supply
00
CPU
5 - slot type
backplane
Power
supply
Expansion
7-4
Appendix A
Specifications
Specifications
A-2
A.1
A.1.1
Performance Specifications
FP0
Relay output type
S - LINK
type
C10RS/
C10RM/
C10CRS/
C10CRM
C16T/
C16P/
C16CT/
C16CP
C32T/
C32P/
C32CT/
C32CP
T32C
SL1
Total: 32
Total: 32
Max. 128
Input: 16
Output: 16
Input: 16
Output: 16
Input: 64
Output: 64
at S - LINK
block
Max. 128
Max. 128
Max. 96 at
Item
Output: 4
Program memory
Program capacity
C14RS/
C14RM/
C14CRS/
C14CRM
Output: 6
Output: 8
Max. 62
Max. 112
With expansion Max. 58
unit 1
When configured with
same output
type as control
unit
Max. 112
With expansion Max. 106 Max. 110
unit 2
When relays
and transistors
are mixed
Built - in memory Built in EEPROM (without battery)
2,720 steps
expansion
block
Max. 128
Max. 128
5,000
steps
10,000
steps
5,000 steps
83
145
0.9s/step (by basic instruction)
Operation speed
With no expansion board: 0.3ms
I/O refresh and base time
With expansion board(s): 0.3ms and (1 x number of expansion boards) ms
1,008
1,008
Operation Relay
Internal relay (R) 1,008 points (R0 to R62F)
points (R0 points (R0
memory
to R62F)
to R62F)
points
(* Note 1)
Special internal 64 points (R9000 to R903F)
relay (R)
144 points (initial setting is 100 timer points, T0 to T99 / 44 counter points,
Timer/Counter
C100 to C143 (* Note 2))
(T/C)
Timer range: 1ms, 10ms, 100ms, 1s; selected by instruction
1,660 words (DT0 to DT1659)
6,144
16,384
6,144
Memory Data register
words
words
words
area
(DT)
(DT0 to
(DT0 to
(DT0 to
DT6143)
DT16383) DT6143)
(* Note 1)
112 words (DT9000 to DT9111)
112 words 112 words
Special data
(DT90000 (DT9000
register (DT)
to
to
DT90111) DT9111)
2 words
Index register
(IX, IY)
Unlimited of points
Differential points (DF, DF/)
32 points
Master control relay points (MCR)
64 labels
255 labels 64 labels
Number of labels (JP and LOOP)
Numbers of
instruction
i t
ti
Basic
High-level
A-3
Specifications
Item
S - LINK
type
C10RS/
C10RM/
C10CRS/
C10CRM
C16T/
C16P/
C16CT/
C16CP
SL1
C14RS/
C14RM/
C14CRS/
C14CRM
C32T/
C32P/
C32CT/
C32CP
T32C
128 stages
Number of subroutines
16 subroutines
Self-diagnosis function
Clock/calender function
Special
functions
X0 to X1: 50 s
X2 to X5: 100 s
Not
available
Not
available
Periodical interrupt
Constant scan
Password
High- speed counter
function
(* Note ****)
Not
available
50 s, <10kHz>
X3, X4
Counter mode:
100 s, <5kHz>
A-4
50 s, <10kHz>
X3, X4
100 s, <5kHz>
Not
available
Item
S - LINK
type
C10RS/
C10RM/
C10CRS/
C10CRM
Special
functions
SL1
C14RS/
C14RM/
C14CRS/
C14CRM
Pulse
output
function
(* Note
N t
6,10)
Output
point
number
Not available
Output
frequency
Output
point
number
Output
frequency
C32T/
C32P/
C32CT/
C32CP
Not
available
Not available
Not
available
Not available
Not
available
Not available
Frequency: 0.15Hz to
38Hz,
(* Note 9)
Duty: 0.1% to 99.9%
Memory
backup
(* Note 6)
(* Note 12)
T32C
Not
available
Duty:
0.1% to
99.9%
EEPROM
Operation memory
Frequency:
0.15Hz to
1KHz
Areas
which are
held if the
power supply fails are
fixed, and
are
retained by
the
EEPROM.
- Number
of points/
words of
the fixed
hold areas
in the
various
memories
Counters:
16 points
- Memory
areas
Internal re- which can
be specilays: 128
points
fied:
Date
Timers,
registers:
Counters,
32 words
Internal re(* Note 14) lays, Data
registers
Areas
which are
held if the
power supply fails are
fixed, and
are
retained by
the
EEROM.
- Number
of points/
words of
the fixed
hold areas
in the
various
memories
Counters:
16 points
Internal relays: 128
points
Date
registers:
32 words
(* Note 14)
next page
Notes
1) Hold or non - hold type can be set using the system registers.
2) The proportion of timer points to counter points can be
changed using a system register 5.
A-5
Specifications
Notes
3) Precision of calender timer:
At 0_C/32_F, less than 139 second error per month.
At 25_C/77_F, less than 72 seconds error per month.
At 55_C/131_F, less than 169 seconds error per month.
This accuracy is considered to be the worst fluctuation coefficient
value based on fluctuations in the normal voltage of 5V and the battery
backup voltage of 3V. Also, F157 and F158 (time/date addition and
subtraction instructions) cannot be used.
4) When using the RS232C port for communication, we recommend
using resend processing. The driver IC for the RS232C is in full
conformance with EIA/TIA - 232E and CCITT V.28 standards.
5) The combinations 1 phase 2 channels and 2 phases 1 channel
are also possible for the high - speed counter.
6) The internal relay, data register, and timer/counter hold areas of the
T32CT control unit (10 k step type) can be changed by the system
registers. The number of points in the table is the value when the
system registers are initial values.
7) The max. counting speed (10kHz) is the counting speed with a rated
input voltage of 24V DC and an ambient temperature of 25C. The
counting speed (frequency) will decrease depending on the voltage
and temperature.
8) If both reset inputs X0 and X1 are reset, X2 will be the reset input of
X1. In the same way, for X3 and X4, X5 acts as the reset input of X4.
9) With a CPU of Ver. 1.2 or a subsequent version, the frequency will be
0.15Hz to 1kHz.
10) The maximum is 9.5kHz when the positioning control instruction
(F168) is executed.
11) Precautions when using the battery backup function Secondary
(chargeable) battery is used as backup battery in the FP0 T32C
control unit. The battery is not charged before the unit is shipped,
so please make sure that the built - in backup battery have been
charged before using the unit.
12) The program, system registers and the hold type areas (internal
relay, data register and counter) are backed up by the built in
EEPROM.
13) The possible number of write times by the EEP - ROM write
instruction is 100,000 or less.
14) The possible number of write times by the EEP - ROM write
instruction is 10,000 or less.
A-6
A.1.2
FP - e
Model
AFPE224300
(Standard
type) RS232C
AFPE224302
(Standard
type) RS485
Item
AFPE224305
(Calendar
timer type)
RS232C
AFPE214325
(Thermocouple input type)
RS232C
AFPE224322
(Thermocouple input type)
RS485
Programming method/Control
method
Number of
controllable I/O
points
i t
Control unit
14 points
[Input: 8, Output: 6 (Tr. NPN: 5/Ry 1)]
12 points
[Input: 6, Output: 6]
Front switch
input
1 point
1 point
6 points
Program memory
Program capacity
2,720 steps
Basic
83
High - level
Number of
instruction
168 Note 1)
Operation speed
2 ms
Operation Relays
p
y
memory
memor
points
Special internal
relay (R)
Timer/Counter
(T/C)
144 points (Initial setting: 100 timer points, T0 toT99/44 counter points,
C100 to C143 Note 3 )
Timer range (1 ms, 10ms, 100ms, 1 s): selected by instruction
Typical 2 to 3 ms
Max.15 ms Note 2)
Special data
register (DT)
Index registers
(IX, IY)
2 points
Differential points
32 points
64 labels
128 stages
Number of subroutines
16 subroutines
Self-diagnostic function
Clock/calendar function
Battery life
Note 4)
Not available
No battery
No battery
A-7
Specifications
Model
AFPE224300
(Standard
type) RS232C
AFPE224302
(Standard
type) RS485
Item
AFPE224305
(Calendar
timer type)
RS232C
AFPE214325
(Thermocouple
input type)
RS232C
AFPE224322
(Thermocouple
input type)
RS485
RS232C
Periodical interrupt
RS232C
RS485
Available
Password
RS232C
0.5ms to 30s
Constant scan
RS485
Available
Special
functions
: Max. 5kHz
X3: count input (ch. 2)
X4: count input (ch. 3)
X5: reset input Note 7)
- Min. input pulse width: X0, X1: 50s (10 kHz) X0, X1: 100s (5 kHz)
X3 and X4: 100 s (5kHz)
Counter mode: 2 - phase/individual/direction decision (2- phase)
- Input points: 2 ch (Max.)
- Max. speed: 2 kHz (total of 2 ch.)
- Input contact:
X0: count input (ch. 0)
X1: count input (ch. 0)
X2: reset input
: Max. 1 kHz
X3: count input (ch. 2)
X4: count input (ch. 2)
X5: reset input
- Min. input pulse width: X0, X1: 50s (10 kHz) X0, X1: 100s (5 kHz)
X3 and X4: 100 s (5kHz)
Pulse
p
output
funcf
tion *2
Output
points
PWM
o p
output
funcf
tion *2
Output
points
Output
Frequency: 0.15 Hz to 1 kHz
frequency Duty: 0.1% to 99.9%
*1 The combinations 1 - phase x 2 ch. and 2 - phase x 1 ch. are also possible for the high- speed counter.
*2 For details and limitations on the high- speed counter, see the following pages.
A-8
Model
AFPE224300
(Standard
type) RS232C
AFPE224302
(Standard
type) RS485
Item
Memory
backup
Note 9)
AFPE214325
(Thermocouple
input type)
RS232C
AFPE224322
(Thermocouple
input type)
RS485
Timer
Counte
er
AFPE224305
(Calendar
timer type)
RS232C
Non - hold
type
Hold type
yp
SV: Hold
Data
Non - hold
eg s e
register type
Note 10)
Hold type
Notes
1) High - level instructions are available for Ver1.2 or higher.
2) The time takes longer every 250 ms.
3) The proportion of timer points to counter points can be
changed using a system register.
4) Precision of calendar timer:
- At 0 C/32 F, less than 200 seconds error per month
- At 25 C/77 F, less than 70 seconds error per month
- At 55 C/131 F, less than 240 seconds error per month
5) When using the COM. port to communication with other
devices, retransmission is recommended as it may be affected
by excessive noise depending on the environments installed.
The driver IC for the RS232C port conforms to EIA/TIA - 232E
and CCITT V. 28 standards.
6) The max counting speed (10 kHz) is the counting speed with a
rated input voltage of 24 V DC and an ambient temperature of
25 C. The counting speed (frequency) will decrease
depending on the voltage and temperature.
7) If the unit is equipped with both reset inputs X0 and X1, X2
serves as the reset input for X1. If X3 and X4 are used, X5
serves as the reset input for X4.
next page
A-9
Specifications
A - 10
A.1.3
FP
Item
Descriptions
FPG - C32T/
C32TTM
FPG - C24R2/
C24R2TM
FPG - C28P2
Control unit
32 points (DC
input: 16, NPN
output: 16)
32 points (DC
input: 16, NPN
output: 16)
24 points (DC
input: 16, relay
output: 8)
28 points (DC
input: 16, PNP
output: 12)
Not possible
FPG - C32T2/
C32T2TM
Program memory
Program capacity
Basic
85
High - level
Number of instructions
220
0.4 s/step (for basic instruction)
Operation speed
512 points
(see note 7)
1,184 points
(see note 7)
External output
relay (Y)
512 points
(see note 7)
1,184 points
(see note 7)
Timer/Counter
(T/C)
1,024 points (see note 1 and 2) (for initial setting, timer: 1,008 points
(T0 to T1007), counter: 16 points (C1008 to C1023)
Timer: Counts each unit up to 32767 times (units: 1 ms, 10 ms, 100
ms, or 1 s).
Counter: Counts 1 to 32767.
Memory
y
area
External input
relay (X)
Operation Relay
y
memory
points
i t
Differential points
Unlimited
256
256
1,000 stages
A - 11
Specifications
Item
Descriptions
Number of subroutines
100 subroutines
Clock/calendar function
Available (year, month, day, hour, minute, second and day of week);
however, this function can only be used when a battery has been
installed (see note 3).
Thermistor unit
Battery life
220 days or more* (actual usage value: approx. 840 days (25 deg. C).
Suggested replacement interval: 1 year.
*Value applies when no power is supplied at all.
Comment storage
Link function
Other functions
Notes
A - 12
A.1.4
FP1
Item
C14
C16
C24
C40
C56
C72
Programming/control method
Basic
construction
Total: 14
points
(Input:
8 points
Output:
6 points)
Total: 16
points
(Input:
8 points
Output:
8 points)
Total: 24
points
(Input:
16 points
Output:
8 points)
Total: 40
points
(Input: 24
points
Output:
16 points)
Total: 56
points
(Input: 32
points
Output:
24 points)
Total: 72
points
(Input: 40
points
Output:
32 points)
Expanded
construction
Max.
54
points
Max.
56
points
Max.
104
points
Max.
120
points
Max.
136
points
Max.
152
points
Max.
118
points
Max.
120
points
Max.
168
points
Max.
184
points
Max.
200
points
Max.
216
points
Built - in memory
Built-in EEPROM
(without battery)
Optional memory
None
EEPROM/EPROM
900 steps
2,720 steps
5,000 steps
Basic
41
80
81
High-level
85
111
111
Program memory
Program capacity
Numbers of instruction
Operation
memory
points
256 points
(R0 to R15F)
Special internal
relay (R)
Timer/Counter
(T/C)
128 points
144 points
(Default setting: T0 to (Default setting: T0 to T99/C100 to C143)
T99/C100 to C127)
Relay
Memory
area
1,660 words
Special data
register (DT)
Index register
(IX, IY)
6,144 words
2 words
Auxiliary timer
Not available
16 points
32 points
32 points
64 points
64 stages
128 stages
Number of subroutines
8 subroutines
16 subroutines
None
9 programs
Unlimited number of
points
next page
A - 13
Specifications
Item
C14
C16
C24
C40
C56
C72
1 potentiometer
2 potentiometers
4 points
(X0 to X3)
Interrupt input
Not available
Periodical interrupt
Not available
Not available
Clock/calendar
(FP1 C24C, C40C, C56C
and C72C type)
Not available
Available
(year, month, day, hour, minute, second and
day of week)
I/O link
32 inputs, 32 outputs
Pulse output
(FP1 transistor output
type)
1 point (Y7)
Constant scan
Special
functions
4 potentiometers
1 to 128ms
Notes
1) The two pulse outputs, Y6 and Y7, are not available at the
same time.
2) For FP1 C14 and C16 series, the hold type data area is backed
up by the internal capacitor. Back- up time for them is 10 days
at 25 deg. C/77 deg. F.
A - 14
A.1.5
FP - M C16T
Description
Item
FP - M C16T
Programming method
Relay symbol
Control method
Cyclic operation
Basic board
With expansion
board
Not available
Built-in EEPROM (without battery)
Program memory
900 steps
Program capacity
Basic
43
High-level
Numbers of instruction
71
1.6s/step (with basic instruction)
Operation speed
Operation
memory
points
Relay
Data register
(DT)
Special data
register (DT)
70 words
Index register
(IX, IY)
Memory
area
2 words
Auxiliary timer
Not available
16 points
32 points
64 stages
Number of subroutines
8 subroutines
next page
A - 15
Specifications
Description
Item
FP - M C16T
High - speed
counter
(1 channel)
Pulse catch
input
Interrupt input
Pulse output
1 point (Y7)
360Hz to 5kHz/180Hz to 5kHz/90Hz to 5kHz/45Hz to 5kHz/720Hz
to 5kHz/1440Hz to 5kHz, selectable range
Constant scan
Special functions
Memory backup
A - 16
A.1.6
FP - M C20/C32
Description
Item
FP - M C20
FP - M C32
Relay symbol
Programming method
Cyclic operation
Control method
Basic board
With expansion
board
Program memory
Program capacity
81
High-level
Numbers of instruction
111
1.6s/step (with basic instruction)
Operation speed
Operation
memory
points
Relay
Data register
(DT)
Special data
register (DT)
Index register
(IX, IY)
Memory
area
2 words
Auxiliary timer
32 points
64 points
128 stages
Number of subroutines
16 subroutines
9 programs
next page
A - 17
Specifications
Description
Item
FP - M C20
Special
functions
FP - M C32
2 potentiometers
Interrupt input
Periodical interrupt
Clock/calendar
(C type only: C20RC/
C20TC/C32TC)
Available (year, month, day, hour, minute, second and day of week)
I/O link
32 inputs, 32 outputs
Pulse output
(FP - M transistor output
type)
Constant scan
1 to 128ms
Other functions
Memory backup
Approx. 27,000 h (C type FP - Ms)
(at ambient temperature 25 deg. C/77 deg. F) Approx. 53,000 h (except C type FP - Ms)
Notes
1) The two pulse outputs, Y6 and Y7, are not available at the
same time.
2) The ch1 of high - speed counter is available for FP - Ms with
CPU Ver. 2.D or later.
3) Program block edition during RUN mode is available for
FP - Ms with CPU Ver 3.0 or later.
A - 18
A.1.7
FP2
Item
Descriptions
FP2: FP2 - C1, FP2 - C1D, FP2 - C1A, FP - 2C1SL
Program/control method
Program
g
capacity
it
Internal memory
Using expansion
memory unit
Number of
instruci t
tions
Basic instructions
95 types
High-level
instructions
428 types
Operation
speed
(typical
value)
Basic instructions
High-level
instructions
Operation
y
memory
points f
i t for
relays
External input
relays (X)
External output
relays (Y)
4,048 points
Timer/counter (T/C)
(* Note 1)
2,048 points
1,024 points
None
6,000 words
256 words
Timer/counter set
value area (SV)
1,024 words
Timer/counter
elapsed value area
(EV)
1,024 words
14 words
Operation
memory
points for
memory
areas
Differential points
Auxiliary timer
A - 19
Specifications
Item
Descriptions
FP2: FP2 - C1, FP2 - C1D, FP2 - C1A, FP - 2C1SL
Shift register
256 points
1,000 steps
Number of subroutine
100 subroutines
1 program (periodical interrupt: allows setting of the time interval within the
range from 0.5ms to 1.5s)
Clock/calendar function
(* Notes 5 and 6)
Available (year, month, day, hour, minute, second and day of week)
Link functions
Self-diagnostic functions
Other functions
Program block edition during RUN mode, forced input/output, interrupt processing, test run, constant scan ,machine language program and ROM operation
function (* Note 7)
CPU only
FP2 - EM1
When
installed
expansion
e pa sio
FP2 - EM2,
memory unit
FP2 - EM3
FP2 - EM6
FP2 - EM7
Notes
1) Hold or non-hold type can be set using the system registers.
2) The practical usable external input and output points are
restricted according to the number of the input and output
units.
3) Can also be used as internal relays.
4) Can also be used as data registers.
5) Precision of calendar timer:
At 0C/32F, less than 90-second error per month.
At 25C/77F, less than 40-second error per month.
At 55C/131F, less than 98-second error per month.
6) The expansion memory unit (FP2 - EM1, FP2 - EM2 or FP2 - EM3)
is required.
7) The expansion memory unit (FP2 - EM3, FP2 - EM6 or FP2 - EM7)
is required.
8) The expansion memory unit (FP2 - EM2, FP2 - EM3 or FP2 - EM6)
is required.
A - 20
A.1.8
FP2SH
Descriptions
FP2SH: FP2 - C2, FP2 - C2P, FP2 - C3P
Item
Program/control method
Using remote
I/O system
Program
p
y
capacity
Expanded
construction
Controllable
I/O p
points
Basic
construction
Internal memory
Using
expansion
memory unit
Basic
instructions
95 types
High-level
instructions
434 types
Operation
p
speed
(typical
(t i l
value)
Basic
instructions
High-level
instructions
Operation
y
memory
points f
i t for
relays
External input
relays (X)
External output
relays (Y)
Internal relays
(R)
Timer/counter
(T/C)
Data registers
(DT)
File registers
(FL)
Link data
registers (LD)
Timer/counter
set value area
(SV)
3,072 words
Timer/counter
elapsed value
area (EV)
3,072 words
Index registers
(I0 to ID)
14 words 16 banks
Number of
instructions
Operation
y
memory
points f
i t for
memory
areas
A - 21
Specifications
Item
Descriptions
FP2SH: FP2 - C2, FP2 - C2P, FP2 - C3P
Differential points
Auxiliary timer
Shift register
256 points (For FP2 - C3P: 1st program: 256 points/2nd program: 256 points)
Number of labels
(JP and LOOP)
256 points (For FP2 - C3P: 1st program: 256 points/2nd program: 256 points)
Number of subroutine
100 subroutines
1 program (periodical interrupt: allows setting of the time interval within the
range from 0.5ms to 1.5s) (For FP2 - C3P: 1st program only)
Clock/calendar function
Available (year, month, day, hour, minute, second and day of week) (* Note 5)
Link functions
Self-diagnostic functions
Watchdog timer, memory malfunction detection, I/O malfunction detection, backup battery malfunction detection, program syntax check, etc.
Other functions
CPU only
When installed expansion memory unit
Notes
1) Hold or non-hold type can be set using the system registers.
2) The practical usable external input and output points are
restricted according to the number of the input and output
units.
3) Can also be used as internal relays.
4) Can also be used as data registers.
5) Precision of calendar timer:
At 0C/32F, less than 57-second error per month.
At 25C/77F, less than 88-second error per month.
At 55C/131F, less than 88-second error per month.
6) For FP2 - C2, the expansion memory unit (FP2-EM7) is
required.
A - 22
A.1.9
FP10SH
Item
Order number
Descriptions
FP10SH
AFP6221V3
Program/control method
AFP6211V3
Using expansion
backplanes
Using remote I/O
system
Program
g
memory
Built-in memory
RAM
Optional memory
Program capacity
Approx. 30k steps (Approx. 60k or 120k steps available by installing optional
expansion memory.)
Basic
Number of
instructions
i t ti
High-level
95 types
431 types
Operation
speed
(typical
value)
Basic instructions
High - level
instructions
Relays
External input
relays (X)
8,192 points
External output
relays (Y)
8,192 points
14,192 points
10,240 points
2,048 points
2,048 points
10,240 words
32,765 words
8,448 words
Timer/counter set
value area (SV)
3,072 words
Timer/counter
elapsed value area
(EV)
3,072 words
14 words (I0 to ID) (* Note 1) (with bank switching, 224 words portions can be
used)
Memory
areas
A - 23
Specifications
Item
Descriptions
Order number
FP10SH
AFP6221V3
Differential points
Auxiliary timer
256 points (when using the 90k step expansion memory, up to a total of 512
points can be used for the 1st and 2nd programs)
Number of labels
(JP and LOOP)
256 points (when using the 90k step expansion memory, up to a total of 512
points can be used for the 1st and 2nd programs)
Number of subroutine
Clock/calendar function
Available (year, month, day, hour, minute, second and day of week)
Link functions
Self-diagnostic function
Other functions
Program edition during RUN, forced on/off, interrupt input, test run and
constant scan
Memory
backup
(lithi
time (lithium battery
storage
time)
AFP6211V3
CPU only
Notes
1) Hold or non - hold type can be set.
2) Can also be used as an internal relay.
3) Can also be used as a data register.
4) In addition to the IC memory card, the IC memory card board
(AFP6209A) is required.
5) In addition to the ROM, the ROM operation board (AFP6208) is
required.
6) The value when the 90k steps type expansion memory board
(AFP6205) is used.
A - 24
A.1.10
FP3
Item
Order number
Descriptions
FP3
AFP3220C - F
Program/control method
Using one
Controlbackplane
lable I/O
points
i t
Using
expansion
backplanes
Using remote
I/O system
Built-in
memory
RAM
EPROM/EEPROM
Program capacity
(* Note 1)
Basic
Number of
instructions High-level
i t ti
Basic
Operation
instructions
p
speed
(typical
(t i l
High-level
value)
instructions
83 types
237 types
237 types
From 0.5s per instruction
External input
relays (X)
241 types
2,048 points
2,048 points
External output
relays (Y)
Internal relays
(R)
(* Note 2)
Timer (T)/
counter (C)
(* Note 2)
Relays
AFP3211C - F
Optional
memory
Program
y
memory
AFP3210C - F
Data registers
(DT)
(* Note 2)
2,048 words
File registers
(FL)
(* Note 1, 2)
Link data
registers (LD)
(* Note 2, 4)
Timer/counter
set value area
(SV)
256 words
Timer/counter
elapsed value
area (EV)
256 words
Index registers
(IX, IY)
2 words
1,568 points
Total 256 points
(Numbers of points can be changed.)
down type on-delay timer: 0.01 to 327.67s, 0.1 to 3276.7s or
1 to 32767s
down type preset counter: 1 to 32,767 counts
0 to 8,192 words
A - 25
Specifications
Item
Order number
Descriptions
FP3
AFP3220C - F
Differential points
Auxiliary timer
Master control relay points
(MCR)
Number of labels
(JP and LOOP)
Number of step ladder
(* Note 2)
Number of subroutine
Number of interrupt program
Comment input function
(* Note 5)
Sampling trace function
(* Note 6)
Clock/calendar function
Link functions
Self-diagnostic function
AFP3210C - F
AFP3211C - F
256 points
1,000 stages
100 subroutines
25 programs
Not available
Not available
Available
Not available
Not available
Available
Available (year, month, day, hour, minute, second and day of week)
PC link, computer link, data transfer, remote programming and modem
Watching dog timer, memory malfunction detection, I/O malfunction detection, backup battery malfunction detection, program syntax check, etc.
Other functions
Program edition during RUN, forced on/off, interrupt input, test run, constant scan
and machine language program
Memory backup time (lithium Min. 10,000 hours
Min. 17,000 hours
Min. 10,000 hours
battery storage time)
(typical value: approx.
(typical value : approx.
(typical value : approx.
22,000 hours)
34,000 hours)
22,000 hours)
Notes
1) The capacity will differ depending on the system register
settings.
2) Hold or non - hold type can be set.
3) Can also be used as an internal relay.
4) Can also be used as a data register.
5) Max. 2,730 points. Up to 12 characters per 1 comment.
6) Can perform sampling up to a maximum of 1,000 samples
(4,000 words) for data of 16 contacts and 3 words.
A - 26
Appendix B
Programming Information
Programming Information
B.1
B.1.1
System registers are used to set values (parameters) which determine operation
ranges and functions used. Set values based on the use and specifications of your
program. There is no need to set system registers for functions which will not be used.
Precautions for system register setting
Sytem register settings are effective from the time they are set.
However, input settings, tool port, COM port, and modem connection settings become
effective when the mode is changed from PROG. to RUN. With regard to the modem
connection setting, when the power is turned off and on or when the mode is changed
from PROG. to RUN, the controller sends a command to the modem which enables it
for reception.
When the initialized operation is performed, all set system register values (parameters)
will be initialized.
B-2
B.1
2.
3.
4.
5.
Using FP programmer II
Procedure:
1.
2.
3.
ENT
4.
(- )
OP
READ
B
Note
Be aware that the FP programmer II cannot make settings at the
FP/FP2/FP2SH/FP10SH system register.
B-3
Programming Information
B.1.2
512 words
(fixed)
A
(set using system register 0)
B
(set using system register 1)
Be sure to set the A (using system register 0) and B (using system register 1) as even
numbers.
The area remaining in A after 512 words are subtracted is the sequence program area
that can actually be used.
The file register area C is the area that remains after A and B have been subtracted from
the user memory capacity.
FP3 (16K)
Users memory capacity :16K words
Setting range of A
:2K to 16K words (default value: 8K)
Setting range of B
:0 to 14K words (default value: 0)
16.
Allocate so that A + B
Setting example: The values of C when B = 0.
A
(1024A - 512)
2
4
6
8
10
12
14
16
B-4
1,535 steps
3,583 steps
5,631 steps
7,679 steps (default value)
9,727 steps
11,775 steps
13,823 steps
15,871 steps
22,525 words
20,477 words
18,429 words
16,381 words (default value)
14,333 words
12,285 words
10,237 words
8,189 words
B.1
FP3(10K)
Users memory capacity
Setting range of A
Setting range of B
Allocate so that A + B
10.
: 10K words
: 2K to 10K words (default value: 8K)
: 0 to 8K words (default value: 0)
(1024A - 512)
2
4
6
1,535 steps
3,583 steps
5,631 steps
8,189 words
6,141 words
4,093 words
2,045 words
10
9,727 steps
0 word
2
4
6
8
10
12
2,048 words
4,096 words
6,144 words
7,679 words
10,240 words
12,288 words
14
16
18
20
22
14,336 words
16,384 words
18,432 words
20,480 words
22,528 words
For example, for the FP3 (16K - step type), when the area for the sequence program (A)
is set to 10K words, the area for the machine language program (B) can be set up to
6K words. In this situation, the file register can be used up to 8,189 words.
B-5
Programming Information
512 words
(fixed)
A
(set using system register 0)
B
(set using system register 1)
Area for
configuration
C
(set using system register 2)
Be sure to set the A (using system register 0), B (using system register 1), and C (using
system register 2) as even numbers.
The area remaining in A after 512 words are subtracted is the sequence program area
that can actually be used.
File register area D is the area that remains after A, B, and C have been subtracted from
the user memory capacity.
The configuration area is reserved for future expansion.
FP2 (16K)
Users memory capacity
Setting range of A
Setting range of B
Setting range of C
Allocate so that A + B + C
:16K words
:2K to 16K words (default value: 12K)
:0 to 14K words (default value: 0)
:0 to 14K words (default value: 0)
16.
(1024A - 512)
2
4
6
8
10
12
14
16
B-6
1,535 steps
3,583 steps
5,631 steps
7,679 steps
9,727 steps
11,775 steps (default value)
13,823 steps
15,871 steps
14,333 words
12,285 words
10,237 words
8,189 words
6,141 words
4,093 words (default value)
2,045 words
0 word
B.1
FP2 (32K)
Users memory capacity
Setting range of A
Setting range of B
Setting range of C
Allocate so that A + B + C
:32K words
:2K to 32K words (default value: 12K)
:0 to 30K words (default value: 0)
:0 to 30K words (default value: 0)
32.
(1024A - 512)
1,535 steps
3,583 steps
5,631 steps
7,679 steps
9,727 steps
11,775 steps (default value)
13,823 steps
15,871 steps
17,919 steps
19,967 steps
22,015 steps
24,063 steps
26,111 steps
28,159 steps
30,207 steps
32,255 steps
2
4
6
8
10
12
14
16
18
20
22
24
26
28
30
32
30,717 words
28,669 words
26,621 words
24,573 words
22,525 words
20,477 words (default value)
18,429 words
16,381 words
14,333 words
12,285 words
10,237 words
8,189 words
6,141 words
4,093 words
2,045 words
0 word
2
4
6
8
10
12
14
16
4,096 words
8,192 words
12,288 words
16,384 words
20,480 words
24,576 words
28,672 words
32,768 words
18
20
22
24
26
28
30
36,864 words
40,960 words
45,056 words
49,152 words
53,248 words
57,344 words
61,440 words
For example, for the FP2 (16K - step type), when the area for the sequence program (A)
is set to 10K words and the area for configuration (C) is set to 0K words, the area for
the machine language program can be set up to 6K words.
B-7
Programming Information
B.1.3
C10, C14, C16, C32 and T32 in the table respectively indicate 10-point, 14-point,
16-point and 32-point type FP0 control units.
Item
Address Name
Allocation
of user
memory
Default
value
Description
The set values are fixed and cannot be
changed.
The stored values vary depending on the type.
6 to 8
Not used
(Available type: C10, C14,
C16, C32)
K100
K0 to K144
K10
K0 to K63
K0
K0 to K16384
9 to 13
Not used
14
Hold/
Nonhold
od
Not used
Not used
(Available type: C10, C14,
C16, C32)
Hold or non - hold setting
for step ladder process
(Available type: T32)
15
Action on
error
21, 22
B-8
K0 to K144
K0: Hold
K1: Non - hold
Not used
20
K100
Not used
K0
B.1
Item
Address
Name
Default
value
Description
Action on
error
23
K0
K0: Stop
K1: Continuation
24, 25
Not used
26
K0
K0: Stop
27
K1
28, 29
Time
setting
tti
Not used
31
K1: Continuation
Not used
30
K0: Stop
Not used
K1: Continuation
With the FP0, values set with the program ming tool become invalid.
K2600
K4 to K32760: 10ms to 81900ms
(6500ms) Used of default setting (K2600/ 6500ms) is
recommended.
set value x 2.5ms = Wait time setting for
multi - frame communication (ms)
With the FP0, values set with the programming tool become invalid.
Not used
K0
B-9
Programming Information
Item
Address
Name
Input
setting
400
High-speed
counter mode
settings (X0 to
X2)
Default
value
Setting by
H0
programming
tool software
Description
CH0
CH1
Notes
If the operation mode is set to 2 - phase, individual, or direction
differentiation, the setting for CH1 is invalid.
If reset input settings overlap, the setting of CH1 takes
precedence.
If system register 400 to 403 have been set simultaneously for
the same input relay, the following precedence order is
effective: [High - speed counter] - > [Pulse catch] - > [Interrupt
input].
B - 10
B.1
Item
Address Name
Default Description
value
Input
setting
400
H0
High-speed
Setting by FP
counter mode programmer II
settings (X0
to X2)
CH0/
CH1
H 0
Notes
If the operation mode is set to 2 - phase, individual, or direction
differentiation, the setting for CH1 is invalid.
If reset input settings overlap, the setting of CH1 takes
precedence.
If system register 400 to 403 have been set simultaneously for
the same input relay, the following precedence order is
effective: [High - speed counter] - > [Pulse catch] - > [Interrupt
input].
B - 11
Programming Information
Item
Address Name
Input
setting
401
High-speed
counter mode
settings (X3 to
X5)
Default Description
value
Setting by
programming
tool software
H0
CH2
CH3
Notes
If the operation mode is set to 2 - phase, individual, or direction
differentiation, the setting for CH3 is invalid.
If reset input settings overlap, the setting of CH3 takes
precedence.
If system register 400 to 403 have been set simultaneously for
the same input relay, the following precedence order is
effective: [High - speed counter] - > [Pulse catch] - > [Interrupt
input].
B - 12
B.1
Item
Address Name
Default
value
Description
Input
setting
401
H0
CH2/
CH3
High-speed
Setting by FP
counter mode programmer
settings (X3
II
to X5)
H 0
Notes
If the operation mode is set to 2 - phase, individual, or direction
differentiation, the setting for CH3 is invalid.
If reset input settings overlap, the setting of CH3 takes
precedence.
If system register 400 to 403 have been set simultaneously for
the same input relay, the following precedence order is
effective: [High - speed counter] - > [Pulse catch] - > [Interrupt
input].
B - 13
Programming Information
Item
Address
Name
Default
value
Input
setting
402
H0
Description
X5 X4 X3 X2 X1 X0
0: Standard input
1: Pulse catch input
0 0 0 0 0 0
402:
X5 X4 X3 X2 X1 X0
H1
H8
Input H18
In the case of FP0, settings X6 and X7 are
invalid.
403
H0
Specify
interrupt
15
0
001111
X5 X4 X3 X2 X1 X0
403:
000011
X5 X4 X3 X2 X1 X0
H0
H3
H0
HF
Input H30F
404 to
407
Not used
With the FP0, values set with the programming tool become invalid.
next page
B - 14
B.1
Note
If system register 400 to 403 are set simultaneously for the same
input relay, the following precedence order is effective:
[High - speed counter] - > [Pulse catch] - > [Interrupt input].
When the high - speed counter is being used in the incremental
input mode, even if input X0 is specified as an interrupt input and
as pulse catch input, those settings are invalid, and input X0
functions as counter input for the high - speed counter.
No. 400: H1 a This setting will be valid.
No. 402: H1
No. 403: H1
B - 15
Programming Information
Item
Address
Name
Default
value
Description
Tool port
setting
se
g
410
K1
411
Communication format
setting for tool port
H0
15
Modem communication
0: Disabled
1: Enabled
Data length
(character bits)
0: 8 bits
1: 7 bits
When connecting a modem, set the unit number to 1 with system resister 410.
414
H0
414
Baud rate
setting for tool
port and COM
port
H1
0: 9600bps
1: 19200bps
Tool port/
COM port
setting
Setting by
FP
programmer
II
H 0
Tool port
H0: 9600bps
H1: 19200bps
If anything other
than H0 or H1 is set
for the baud rate of
tool port, the baud
rate will be 9600bps.
COM port
H0: 19200bps
H1: 9600bps
H2: 4800bps
H3: 2400bps
H4: 1200bps
H5: 600bps
H6: 300bps
B - 16
B.1
Item
Address
Name
Default
value
Description
COM port
setting
412
Communication method
setting for COM port
K0
413
Using FP programmer II
Start code
0: Without STX
1: With STX
01: CR+LF
11: ETX
0: 1 bit
1: 2 bits
1: 8 bits
414
H1
0: 19200bps
1: 9600bps
2: 4800bps
3: 2400bps
4: 1200bps
5: 600bps
6: 300bps
415
K1
416
H0
417
K0
418
Capacity
g
setting for
received
i d
buffer
C10C/ C14C/
C16C type
K1660
K0 to K1660
C32C type
K6144
K0 to K6144
T32 type
K16384
K0 to K16384
B - 17
Programming Information
B.1.4
Item
No.
Name
Default
value
Descriptions
Hold/
Non hold
100
0 to 144
140
0 to 144
61
0 to 63
1652
0 to 1660
14
Non - hold
Hold/Non - hold
Yes
FPWIN GR:
Disabled
Fixed
FPWIN GR: Disabled/Enabled
26
Stop
Stop/Continuation of operation
Disabled
Action 20
on
error
(See note.)
note )
31
6500.0 ms
10 to 81900 ms
34
0.0 ms
0: Normal scan
0 to 160 ms: Scans once each specified
time interval.
Note
B - 18
B.1
Item
No.
Name
Default
value
Descriptions
High speed
counter
400
CH0:
Do not set input X0 as
high - speed
counter
CH0
CH1:
Do not set input X1 as
high - speed
counter
CH1
CH2:
Do not set input X3 as
high - speed
counter
CH2
CH3:
Do not set input X4 as
high - speed
counter
CH3
401
B - 19
Programming Information
Item
No.
Name
Default
value
Descriptions
Interrupt
input
402
Not set
X0 X1 X2 X3 X4 X5
Specify the input contacts used as pulse
catch input.
403
Not set
X0 X1 X2 X3 X4 X5
Specify the input contacts used as
interrupt input.
X0 X1 X2 X3 X4 X5
Specify the effective interrupt edge.
(When set: on off is valid)
Notes
B - 20
B.1
Item
No.
Name
Default
value
Descriptions
Temperature
inout
409
0 to 50
For default value 0, the number of average processing times is 20.
Tool
port
set
setting
410
1 to 99
411
Disabled
COM.
port
setting
9600 bps
9600 bps
19200 bps
412
413
Data length: 8
bits,
Parity check:
with, odd
Stop bit: 1 bit
414
9600 bps
300 bps
600 bps
1200 bps
2400 bps
4800 bps
9600 bps
19200 bps
415
1 to 99
(In Ver.1.2 and higher, settings can be
changed in R mode even with the front operation switch.)
416
Disabled
Enabled/Disabled
417
0 to 1659
418
1660
0 to 1660
B - 21
Programming Information
B.1.5
Item
No.
Name
Default
value
Descriptions
Hold/
Non hold 1
1008
0 to 1024
1008
0 to 1024
90
0 to 98
32710
0 to 32765
14
Non - hold
Hold/Non - hold
10
64
0 to 64
12
128
0 to 128
Action 20
on
error
Yes
FPWIN GR:
Disabled
Fixed
FPWIN GR: Disabled/Enabled
23
Stop
Stop/Continuation of operation
26
Stop
Stop/Continuation of operation
Disabled
Hold/
Non hold 2
31
6500.0 ms
10 to 81900 ms
34
0.0 ms
0: Normal scan
0 to 350 ms: Scans once each specified
time interval.
PLC
link
setting
40
0 to 64 words
41
0 to 128 words
42
0 to 63
43
0 to 64 words
44
0 to 127
45
0 to 127 words
47
16
1 to 16
B - 22
B.1
Item
No.
Name
Default
value
Descriptions
High speed
counter
400
CH0:
Do not set input X0 as
high - speed
counter
CH0
CH1:
Do not set input X1 as
high - speed
counter
CH1
CH2:
Do not set input X3 as
high - speed
counter
CH2
CH3:
Do not set input X4 as
high - speed
counter
CH3
401
B - 23
Programming Information
Item
No.
Name
Default
value
Descriptions
Interrupt
input
402
Not set
X0 X1 X2 X3 X4 X5 X6 X7
Specify the input contacts used as pulse
catch input.
403
Not set
X0 X1 X2 X3 X4 X5 X6 X7
Specify the input contacts used as
interrupt input.
X0 X1 X2 X3 X4 X5 X6 X7
Specify the effective interrupt edge.
(When set: on off is valid)
Notes
B - 24
B.1
Item
No.
Name
Default
value
Descriptions
Tool
port
set
setting
410
1 to 99
412
Disabled
Enabled/Disabled
413
Data length: 8
bits,
Parity check:
with, odd
Stop bit: 1 bit
415
9600 bps
2400 bps
4800 bps
9600 bps
19200 bps
38400 bps
57600 bps
115200 bps
410
0 to 99
412
COM.
1 port
setting
Disabled
Enabled/Disabled
413
Data length: 8
bits,
Parity check:
with, odd
Stop bit: 1 bit
415
9600 bps
2400 bps
4800 bps
9600 bps
19200 bps
38400 bps
57600 bps
115200 bps
416
0 to 32764
417
2048
0 to 2048
Note
B - 25
Programming Information
Item
No.
Name
Default
value
Descriptions
COM.
2 port
setting
411
1 to 99
412
Disabled
Enabled/Disabled
414
Data length: 8
bits,
Parity check:
with, odd
Stop bit: 1 bit
415
9600 bps
2400 bps
4800 bps
9600 bps
19200 bps
38400 bps
57600 bps
115200 bps
418
2048
0 to 32764
419
Buffer capacity setting for data received of general (serial data) communication mode
2048
0 to 2048
Note
B - 26
B.1
B.1.6
Item
Address
Name
Allocation
of user
memory
Default
value
Description
The set values are fixed and cannot be
changed.
The stored values vary depending on the
type.
K1: FP1 C14/C16, FP - M C16T
K3: FP1 C24/C40, FP - M 2.7K
K5: FP1 C56/C72, FP - M 5K
1 to 3
Not used
Action on
error
K0
Hold/
Nonhold
od
K100
K100
K0 to K144
Set the system regis(FP1 C14/C16, FP - M ters 5 and 6 to the
C16T: K0 to 128)
same value.
K10
K0
9 to 13
15 to 19
Action on
error
Not used
14
K0 to K144
21 to 25
Not used
26
K0: Hold
Not used
20
K1
27 to 29
K0
K1
K0: Stop
K1: Continuation
Not used
B - 27
Programming Information
Item
Address
Name
Time
setting
tti
30
Not used
31
Default
value
Description
K2600
K4 to K32760: 10ms to 81900ms
(6500ms) Used of default setting (K2600/ 6500ms) is
recommended.
set value 2.5 = Wait time setting for multi frame communication
(ms)
Not used
34
K0
B - 28
B.1
Item
Address
Name
Default
value
Description
Input
setting
400
H0
H_0_
High - speed counter mode
Set
value
Internal connection
setting for pulse
output
(FP1 C56/C72, FP - M
only)
H0
H1
H2
H3
H4
H5
H6
H7
H8
Up/Down input
Reset input
Note
When system registers 400, 402, 403, and 404 are set at the same
time, their priorities are:
- 1st
400 (high - speed counter mode settings)
- 2nd
- 3rd
- last
B - 29
Programming Information
Item
Address
Name
Input
setting
401
Not used
402
Default
value
Description
H0
FP1 C14/C16: X0 to X3
FP1 C24/C40/C56/C72: 0 to X7
FP - M C20/C32T: X0 to X7
System register 402
Bit position 15 . . 12 11 . . 8 7
Corresponding
input
. . 4 3 . . 0
X7 X6 X5 X4 X3 X2 X1 X0
0: Standard input
1: Pulse catch input
In the FP programmer II, enter the above setting in hexadecimal.
Example: If the pulse catch function is used for inputs
X3 and X4, input H18.
System register 402
Bit position 15 . . 12 11 . . 8 7
Corresponding
input
. . 4 3 . . 0
X7 X6 X5 X4 X3 X2 X1 X0
0 0 0 0
0 0 0 0
0 0 0 1
1 0 0 0
H1
Data input
H8
X3 X2 X1 X0
0
0: Standard input
1: Pulse catch input
1 0 0 0
X3 X2 X1 X0
H8
B - 30
B.1
Item
Address
Name
Default
value
Description
Input
setting
403
Interrupt input
settings
H0
Bit position 15 . . 12 11 . . 8 7
Corresponding
input
. . 4 3 . . 0
X7 X6 X5 X4 X3 X2 X1 X0
Data input
X7 X6 X5 X4 X3 X2 X1 X0
0 0 0 0
0 0 0 0
1 1 1 0
0 0 0 0
HE
H0
X5 X4
0
0: Standard input
1: Interrupt input
0 0 1 0 0 0 0 0
X5 X4
H2
H0
B - 31
Programming Information
Item
Address
Name
Default
value
Input
setting
404
H0001
Description
In the FP - M C16T: Enter the set value to change the input
constant time. The input constant time corresponding to
the set value is set to X0 to X3.
- Set value of input time constant
1ms
2ms
4ms
8ms
16ms
32ms
64ms
128ms
H0
H1
H2
H3
H4
H5
H6
H7
B - 32
B.1
Item
Address
Name
Default
value
Description
Input
constant
404
H1111
H1111
- Set system registers 404, 405, 406, and 407, referring to
the following:
404 = H _ _ _ _
X0 to X7
X8 to XF
X10 to X17
X18 to X1F
Control board
control unit
405 = H _ _ 1 _
406
X20 to X27
t
Fixed
X30 to X37
X38 to X3F
H1111
FP1 Primary
expansion
406 = H_ _ 1 _
X40 to X47
Fixed
X50 to X57
X58 to X5F
407 = H 0 0 1 _
407
H0011
Fixed
FP1 Secondary
expansion
X60 to X67
0 0 0 1
0 0 0 1
. . 4 3 . . 0
0 0 0 1 0 0 1 0
H1
H1
H1
H2
X18 to X1F X10 to X17 X8 to XF X0 to X7
408, 409
Not used
B - 33
Programming Information
Item
Address
Name
Default
value
Description
Tool
port
setting
410
Unit number
setting for tool port
K1
411
Communication
format settings for
tool port
H0
Default setting
items
The modem
communication
settings are not
available for FP - M
C16 and FP1 C14/
C16.
B - 34
Communication
method setting for
COM port
- Modem: Disabled
412
Modem communication
0: Disabled
1: Enabled
COM
port
setting
K0
B.1
Item
Address
Name
Default
value
COM
port
setting
413
Communication
format settings for
COM port
H3
Default setting
items
- Data length: 8 bits
- Parity check: With
odd
Without STX
Description
Bit position 15
12 11
8 7
4 3
0 0 0 0
0 0 0 0
. . 4 3 . . 0
0 0 0 1
0 0 1 1
H1
H3
B - 35
Programming Information
Item
Address
Name
Default
value
Description
COM
port
setting
414
K1
415
Unit number
setting for COM
port
K1
416
H0
Settings:
Set value
K0
K1
K2
K3
K4
K5
K6
Baud rate
19,200bps
9,600bps
4,800bps
2,400bps
1,200bps
600bps
300bps
General port
setting
417
418
B - 36
Starting address
setting for received
buffer of serial data
communication
mode
(Data register
number)
K0
K1660
Setting range:
C version FP - M 2.7k type and FP1 C24C/C40C types:
K0 to K1660
C version FP - M 5k type and FP1 C56C/C72C types:
K0 to K6144
For details about its usage, refer to F144 (TRNS) instruction.
Setting range:
C version FP - M 2.7k type and FP1 C24C/C40C types:
K0 to K1660 words
C version FP - M 5k type and FP1 C56C/C72C types:
K0 to K6144 words
For details about its usage, refer to F144 (TRNS) instruction.
B.1
B.1.7
Item
Address
Name
Default
value
Description
Allocation
of user
memory
12 K
words
0 word
0 word
Enabled
Memory area
contents
setting at
INITIALIZE
position
Available PLC:
FP2SH,
FP10SH
Cleared
Cleared
File register
(FL)
Cleared
Error alarm
relay (E)
Cleared
Index
register (I)
Cleared:
Cleared
Conventional
Conventional
Enabled
B - 37
Programming Information
Item
Address
Description
FP2SH/
FP10SH:
3000
FP2SH/
FP10SH:
0 to 3072
FP2:
0 to 1024
FP2SH/
FP10SH:
3000
FP2SH/
FP10SH:
0 to 3072
FP2: 1000
Default
value
FP2: 1000
Hold/ Non- 5
hold
Name
FP2:
0 to 1024
FP2SH/
FP10SH:
500
FP2SH/FP10SH: 0 to 887
FP2: 200
FP2: 0 to 253
FP2SH/FP10SH: 0 to 10240
10
0 to 64
11
64
64 to 128
12
0 to 128
13
128
128 to 256
14
Non-hold
Hold/non-hold
15
0 to 32765
Note
B - 38
FP2: 0 to 6000
FP2SH/FP10SH: 0 to 32765
FP2 (16 K): 0 to 14333
FP2 (32 K): 0 to 30717
B.1
Item
Address
Hold/ Non- 16
hold
Name
Default
value
Description
128
128 to 640
256
256 to 8448
0 to 224
18
19
Action on
error
0 to 32765
20
Disable
Disable/enable
21
Stop
Stop/continuation
Stop
Stop/continuation
Stop
Stop/continuation
23
Stop
Stop/continuation
24
Stop
Stop/continuation
Set the time - out time for watching dog
timer with system register 30.
Stop
Stop/continuation
Stop
Stop/continuation
27
Stop
Stop/continuation
28
Stop
Stop/continuation
B - 39
Programming Information
Item
Address
Name
Default
value
Description
Time
setting for
FP2SH/
FP10SH
29
240s
0 to 52428s
30
100ms
0.4 to 640ms
31
Multi-frame communication
time settings in the computer
link and communication time
setting for data sending buffer
6500ms
10 to 81917.5ms
32
10000ms
10 to 81917.5ms
33
163837.5
ms
2500 to 163837.5ms
34
0ms:
Normal
scan
0 to 640ms:
31
Multi-frame communication
time settings in the computer
link
6500ms
10.0ms to 8190.0ms
32
2000ms
10.0ms to 8190.0ms
33
10000s
800.0s to 52428.0s
34
Time
setting for
FP2
0: Normal
scan
0ms to 640ms:
Scans once each specified time interval.
Set 0: Normal scan
B - 40
B.1
Item
Address
Remote I/O 25
control
Name
Default
value
Description
Stop
Stop/continuation
Enabled
(wait for
connection)
36
PC link 0
setting
Scan synchronous
40
PC link 0
Size of link
settings for
relays used
MEWNET-W/ -P for commuy
link system
nication
0 to 64 words
41
Available PLC:
Size of link
data registers used for
communication
0 to 128 words
Send area
starting
address of
link relay
0 to 63
43
Size of link
relays used
for send
area
0 to 64 words
44
Send area
starting
address of
link data
register
0 to 127
45
Size of link
0
data registers
used for
send area
MEWNET-W:
FP10SH, FP2,
FP2SH
42
46
MEWNET-P:
FP10SH
0 to 127 words
Normal allocation:
(PC link 0 for the link unit with a smaller slot number and PC link 1 for one
with a larger slot number)
Reverse allocation:
(PC link 1 for the link unit with a smaller slot number and PC link 0 for one
with a larger slot number)
B - 41
Programming Information
Item
Address
Name
Default
value
Description
MEWNET H setting
49
4
(1024
bytes per
scan)
PC link 1
settings for
MEWNET-W/-P
y
link system
Size of link
relays used
for communication
0 to 64 words
51
Available PLC:
Size of link
data registers used for
communication
0 to 128 words
Send area
starting
address of
link relay
64
64 to 127
53
Size of link
relays used
for send
area
0 to 64 words
54
Send area
starting
address of
link data
register
128
128 to 255
55
PC link 1
setting
Size of link
data registers used for
send area
0 to 127 words
Communic
ation
format
(character
bit): 8 bits,
MEWNET-W:
FP10SH, FP2,
FP2SH
52
Tool port
setting
410
MEWNET-P:
FP10SH
411
Communication format
setting for tool port
Available PLC: FP2/FP2SH
Modem
communic
ation:
Disabled
B - 42
B.1
Item
Address
Name
Default
value
Description
Tool port
setting
414
19200bps
38400bps
2400bps
57600bps
4800bps
115200bps
9600bps
COM port
setting
412
Communication method
setting for COM port
FP2: Not
used
FP2SH/
FP10SH:
Computer
link
413
Communication format
setting (Common setting for
both computer link and serial
data communication)
When used for computer link,
the start and end code
settings of format for
MEWTOCOL-COM will not be
effective.
Character
bit: 8 bits,
Start code:
NO STX
19200 bps
19200bps 19200bps
1200bps
38400bps
2400bps
57600bps
4800bps
115200bps
9600bps
415
Modem
disabled
FP2SH/FP10SH: 0 to
10240
1024
416
General
communication
g
setting
417
418
FP2: 0 to 5999
0 to 1024
B - 43
Programming Information
X1
DF
MCE 0
Example 1:
When system register 4 sets 0 (conventional)
Time chart 1
X0
X1
Y10
Previous execution
of DF instruction
Time chart 2
X0
X1
Y10
Previous execution
of DF instruction
B - 44
B.1
Example 2:
When system register 4 sets 1 (new)
Time chart 1
X0
X1
Y10
Previous execution
of DF instruction
Time chart 2
X0
X1
Y10
Previous execution
of DF instruction
B - 45
Programming Information
B.1.8
Item
Address
Name
Default
value
Description
Allocation
of user
memory
8 K words
(K8)
0 word
(K0)
2
Action on
error
3 (K3)
Enabled
(K0)
FP3: 200
(K200)
FP3: 200
(K200)
FP3: 0 to 256
(K0 to K256)
FP3: 60
(K60)
0 (K0)
Hold/ Non- 5
hold
Note
The number in the parentheses of default value and description
columns shows the setting value when the FP programmer II is
operated.
B - 46
B.1
Item
Address
Name
Default
value
Description
Hold/
Non-hold
0 (K0)
10
0 (K0)
0 to 64 (K0 to K64)
11
64 (K64)
12
0 (K0)
13
128
(K128)
14
Non-hold
(K1)
16, 17
Not used
20
Disable
(K0)
21
Stop (K0)
22
Stop (K0)
23
Stop (K0)
24
Not used
26
Stop (K0)
27
Stop (K0)
28
Stop (K0)
Action on
error
Note
The number in the parentheses of default value and description
columns shows the setting value when the FP programmer II is
operated.
B - 47
Programming Information
Item
Address
Name
Time
setting
tti
29
Not used
30
Not used
31
Multi-frame communication
time settings in the computer
link
Default
value
Description
6500ms
(K2600)
10.0ms to 81900.0ms
(K4 to K32760)
Use of default setting (6500ms) is recommended.
In the FP programmer II, setting time can
be obtained using the formula Set time
= Set value (K4 to K32760) x 2.5 (ms)
32
33
2000ms
(K800)
10000s
(K5000)
10.0ms to 81900.0ms
(K4 to K32760)
Use of default setting (2000ms) is recommended.
In the FP programmer II, setting time can
be obtained using the formula Set time
= Set value (K4 to K32760) x 2.5 (ms)
In the programming tool software, setting
range: 2000 to 131070s
In the FP programmer II,
- setting range: 2000 to 65534s
(K1000 to K32767)
- setting range: 65536 to 131070s
(H8000 to HFFFF)
Use of default setting (10000s) is recommended.
Set this system register using an even
number.
In the FP programmer II, set the value
divided by 2).
34
0: (K0)
Note
The number in the parentheses of default value and description
columns shows the setting value when the FP programmer II is
operated.
B - 48
B.1
Item
Address
Remote I/O 35
control
Name
Default
value
Description
Enabled
(wait for
connection)
(K1)
36
Scan synchronous
(K0)
Note
The number in the parentheses of default value and description
columns shows the setting value when the FP programmer II is
operated.
B - 49
Programming Information
Item
Address
Name
Default
value
Description
PC link 0
setting
40
PC link 0
settings for
MEWNET - W/
MEWNET - P
link system
Size of link
relays used
for communication
0 (K0)
Size of link
data registers used for
communication
0 (K0)
42
Send area
starting
address of
link relay
0 (K0)
0 to 63 (K0 to K63)
43
Size of link
relays used
for send
area
0 (K0)
44
Send area
starting
address of
link data
register
0 (K0)
45
Size of link
0 (K0)
data registers
used for
send area
41
46
Normal
allocation
(K0)
MEWNET
- H setting
49
0 (K0)
Available
PLC: FP3
Note
The number in the parentheses of default value and description
columns shows the setting value when the FP programmer II is
operated.
B - 50
B.1
Item
Address
Name
PC link 1
setting
50
PC link 1
settings for
MEWNET - W/
MEWNET - P
link system
Default
value
Description
Size of link
relays used
for communication
0 (K0)
Size of link
data registers used for
communication
0 (K0)
52
Send area
starting
address of
link relay
64 (K64)
53
Size of link
relays used
for send
area
0 (K0)
54
Send area
starting
address of
link data
register
128
(K128)
55
Size of link
data registers used for
send area
0 (K0)
51
410
1 (K1)
411
Tool port
setting
Communication format
setting for tool port
Communication
format
(character
bit):
8 bits
Modem
communication:
Disabled
Notes
The number in the parentheses of default value and
description columns shows the setting value when the FP
programmer II is operated.
For system registers 410 and 411, they cannnot be changed
using FP programmer II.
B - 51
B.2
The special internal relays turn on and off under special conditions. The on and off
states are not output externally. Writing is not possible with a programming tool or an
instruction.
B.2.1
Address
Name
Description
R9000
Self - diagnostic
error flag
R9001 to
R9003
R9004
R9005,
R9006
R9007
Turns on and keeps the on state when an operation error occurs. The address
where the error occurred is stored in DT9017 (indicates the first operation
error which occurred).
R9008
Carry flag
R9009
The address where the operation error occurred is stored in DT9018. The
contents change each time a new error occurs.
- when an overflow or underflow occurs.
- when 1 is set by one of the shift instructions.
R900A
> flag
Turns on for an instant when the compared results become larger in the F60
(CMP) to F63 (DWIN) comparison instructions.
R900B
= flag
R900C
< flag
Turns on for an instant when the compared results become smaller in the F60
(CMP) to F63 (DWIN) comparison instructions.
R900D
Auxiliary timer
contact
Turns on when the set time elapses (set value reaches 0) in the timing operation of the F137 (STMR)/F183 (DSTM) auxiliary timer instruction.
R900E
R900F
Turns on when scan time exceeds the time specified in system register 34
during constant scan execution.
R9010
Always on relay
Always on.
R9011
Always off.
R9012
It turns off when the trigger for auxiliary timer instruction turns off.
B - 52
B.2
Address
Name
Description
R9013
R9014
Turns off from the second scan and maintains the off state.
Turns off only at the first scan in the operation.
Turns on from the second scan and maintains the on state.
R9015
R9016,
R9017
R9018
R9019
R901A
0.01 s
0.02 s
0.1s
R901B
R901C
R901D
0.2 s
1s
2s
R901E
1 min.
Not used
R901F
R9020
R9021 to
R9025
R9026
(* Note)
Message flag
R9027
(* Note)
R9028
Note
Used by the system.
B - 53
Address
Name
Description
R9029
(* Note)
Forcing flag
Turns on during forced on/off operation for I/O relay and timer/counter contacts.
R902A
(* Note)
External interrupt
enable flag
Turns on while the external interrupt trigger is enabled by the ICTL instruction.
R902B
(* Note)
R902C to
R902F
Not used
R9030,
R9031
Not used
R9032
R9033
Printout instruction
flag
R9034
This is a special internal relay that goes on for only the first scan following the
completion of rewriting in the RUN mode.
R9035
Turns on when the S - LINK error (ERR 1, 3 or 4) occurs using S - LINK system.
R9036
R9037
R9038
R9039
Turns on while data is not send during the serial data communicating.
R903A
High-speed counter
control flag for ch0
R903B
High-speed counter
control flag for ch1
R903C
High-speed counter
control flag for ch2
R903D
High-speed counter
control flag for ch3
Turns off while data is being sent during the serial data communicating.
Not used
R903E,
R903F
Note
Used by the system.
B - 54
B.2
B.2.2
Address
Name
Description
R9000
R9001
Not used
R9002
Not used
R9003
Not used
R9004
R9005
R9006
Turns on and keeps the on state when a backup battery error occurs. Once a battery error has been detected, this is held even
after recovery has been made. It goes off if the power supply is
turned off, or if the system is initialized.
R9007
R9008
Turns on for an instant when an operation error occurs. The address where the operation error occurred is stored in DT90018.
The contents change each time a new error occurs.
R9009
Carry flag
R900A
> flag
R900B
= flag
R900C
< flag
R900D
Turns on when the set time elapses (set value reaches 0) in the
timing operation of the F137 (STMR)/F183 (DSTM) auxiliary timer
instruction.
This flag turns off when the trigger for auxiliary timer instruction
turns off.
R900E
Tool port communication error Turns on when a communication error at the Tool port has occurred.
R900F
Turns on when the scan time exceeds the time specified in system
register 34 during constant scan execution.
This goes on if 0 has been set using system register 34.
B - 55
Address
Name
Description
R9010
Always on relay
Always on.
R9011
Always off.
R9012
R9013
Goes on for only the first scan after operation (RUN) has been
started, and goes off for the second and subsequent scans.
R9014
Goes off for only the first scan after operation (RUN) has been
started, and goes on for the second and subsequent scans.
R9015
Turns on for an instant only in the first scan of the process the moment the step ladder process is opened.
R9016
Not used
R9017
Not used
R9018
R9019
R901A
R901B
R901C
R901D
R901E
2s
1 min
R901F
B - 56
Not used
B.2
Address
Name
Description
R9020
R9021
Not used
R9022
Not used
R9023
Not used
R9024
Not used
R9025
Not used
R9026
Message flag
R9027
Not used
R9028
Not used
R9029
Forcing flag
R902A
R902B
R902C
Not used
R902D
Not used
R902E
Not used
R902F
Not used
B - 57
Address
Name
R9030
Not used
R9031
Not used
R9032
R9033
R9034
R9035
Not used
R9036
Not used
R9037
R9038
R9039
R903A
CH0
R903B
CH1
R903C
CH2
R903D
CH3
R903E
Not used
R903F
Not used
B - 58
Description
Goes on for only the first scan following completion of a rewrite during RUN operation.
B.2
Address
Name
Description
R9040
Not used
R9041
R9042
R9043 to
R9046
Not used
R9047
R9048
R9049
R904A to
R904D
Not used
R904E
Circular interpolation
control in progress
flag
This flag is set when circular interpolation instruction F176 is run. This state
is maintained until the target value is achieved.
While this flag is set, other positioning instructions (F171 to F176) cannot be
run.
R904F
Circular interpolation
data overwrite confirmation flag
R9050
MEWNET - W0
PLC link transmission
error flag
R9051 to
R905F
Not used
B - 59
Address
Name
R9060
MEWNET - W0
PLC link
transmission
assurance relay
Description
Unit no. 1
Unit no. 2
R9062
Unit no. 3
R9063
Unit no. 4
R9064
Unit no. 5
R9065
Unit no. 6
R9066
Unit no. 7
R9067
Unit no. 8
R9068
Unit no. 9
R9069
Unit no. 10
R906A
Unit no. 11
R906B
Unit no. 12
R906C
Unit no. 13
R906D
Unit no. 14
R906E
Unit no. 15
R906F
Unit no. 16
R9061
B - 60
B.2
Address
Name
R9070
MEWNET - W0
PLC link operation
mode relay
Description
Unit no. 1
Unit no. 2
R9072
Unit no. 3
R9073
Unit no. 4
R9074
Unit no. 5
R9075
Unit no. 6
R9076
Unit no. 7
R9077
Unit no. 8
R9078
Unit no. 9
R9079
Unit no. 10
R907A
Unit no. 11
R907B
Unit no. 12
R907C
Unit no. 13
R907D
Unit no. 14
R907E
Unit no. 15
R907F
Unit no. 16
R9071
B - 61
B.2.3
Address Name
Description
R9000
R9001
Not used
R9002
MEWNET - TR master error Turns on when a communication error occurs in the MEWNET - TR master
unit or MEWNET - TR network. The slot, where the erroneous MEWNET flag
TR master unit is installed, can be checked using:
(Available PLC: FP3,
FP10SH)
Turns on when the error occurs in the I/O unit. The slot number of the unit
where the error was occurred is stored in DT90002, DT90003.
R9004
R9005
(Available PLC:
FP - M C20,C32/FP1 C24,
C40,C56,C72/FP2/FP2SH/
FP3/FP10SH)
R9007
Turns on and keeps the on state when a backup battery error occurs. To
reset R9006,
(Available PLC:
FP - M C20,C32/FP1 C24,
C40,C56,C72/FP2/FP2SH/
FP3/FP10SH)
R9006
Turns on and keeps the on state when an operation error occurs. The
address where the error occurred is stored in:
B - 62
(Available PLC:
FP1/FP - M/FP2/FP2SH/
FP10SH)
R9008
B.2
Address Name
Description
R9009
Carry flag
> flag
Turns on for an instant when the compared results become larger in the
F60 (CMP)/P60 (PCMP), F61 (DCMP)/P61 (PDCMP), F62 (WIN)/P62
(PWIN) or F63 (DWIN)/P63 (PDWIN) comparison instructions.
R900B
= flag
R900C
< flag
Turns on for an instant when the compared results become smaller in the
F60 (CMP)/ P60 (PCMP), F61 (DCMP)/P61 (PDCMP), F62 (WIN)/P62
(PWIN) or F63 (DWIN)/P63 (PDWIN) comparison instructions.
R900D
Turns on when the set time elapses (set value reaches 0) in the timing
operation of the F137 (STMR)/F183 (DSTM) auxiliary timer instruction.
(Available PLC:
FP - M C20,C32/FP1 C56,
C72/FP2/FP2SH/FP3/
FP10SH)
R900E
Turns on when scan time exceeds the time specified in system register 34
during constant scan execution.
R9010
Always on relay
Always on.
R9011
Always off.
R9012
R9013
Turns on only at the first scan in the operation. Turns off from the second
scan and maintains the off state.
R9014
Turns off only at the first scan in the operation. Turns on from the second
scan and maintains the on state.
R9015
Step ladder initial on pulse Turns on for an instant only in the first scan of the process the moment the
step ladder process is opened.
relay
R9016
Not used
R9017
Not used
R9018
R9019
R901A
R901B
R901C
0.1 s
0.2 s
1s
B - 63
Address Name
Description
R901D
R901E
2s
1 min
Not used
R901F
R9020
R9021
(Available PLC:
FP2/FP2SH/FP3/FP10SH)
R9022
Break flag
(Available PLC:
FP2/FP2SH/FP3/FP10SH)
R9023
Turns on while the initialize/test switch of the CPU is set to TEST and
mode selector is set to RUN. (test run operation start)
Turns off during the normal RUN mode.
Turns on while the BRK instruction is executing or the step run is executing.
Turns on while the BRK instruction is enabled in the test RUN mode.
(Available PLC:
FP2/FP2SH/FP3/FP10SH)
R9024
Turns on while the output update is enabled in the test RUN mode.
(Available PLC:
FP2/FP2SH/FP3/FP10SH)
R9025
R9026
Message flag
Turns on while the single instruction execution is selected in the test RUN
mode.
Turns on while the F149 (MSG)/P149 (PMSG) instruction is executed.
(Available PLC:
FP - M C20,C32/FP1 C24,
C40,C56,C72/FP2/FP2SH/
FP3/FP10SH)
R9027
R9028
(Available PLC:
FP2/FP2SH/FP3/FP10SH)
R9029
Forcing flag
Turns on during forced on/off operation for I/O relay and timer/counter
contacts.
R902A
Turns on while the external interrupt trigger is enabled by the ICTL instruction.
(Available PLC:
FP - M/FP1 C24, C40, C56,
C72/FP2SH/FP3/FP10SH)
Interrupt flag
(Available PLC:
FP - M/FP1 C24, C40, C56,
C72/FP2/FP2SH/FP3/
FP10SH)
R902C
B - 64
B.2
Address Name
Description
R902D
R902E
R902F
(Available PLC:
FP2/FP2SH/FP3/FP10SH)
R9030
R9031
F145 (SEND)/P145
(PSEND) and F146
(RECV)/P146 (PRECV)
instruction executing flag
F145 (SEND)/P145
(PSEND) and F146
(RECV)/P146 (PRECV)
instruction end flag
(Available PLC:
FP2/FP2SH/FP3/FP10SH)
R9034
(Available PLC: FP - M
C20,C32/FP1 C24,C40,
C56, C72/FP2/FP2SH/
FP3/FP10SH)
R9033
R9032
(Available PLC:
FP2/FP2SH/FP3/FP10SH)
R9035
F152 (RMRD)/P152
(PRMRD) and F153
(RMWT)/P153 (PRMWT)
instruction execution flag
(Available PLC:
FP2/FP2SH/FP3/FP10SH)
B - 65
Address Name
Description
R9036
F152 (RMRD)/P152
(PRMRD) and F153
(RMWT)/P153 (PRMWT)
instruction end flag
(Available PLC:
FP2/FP2SH/FP3/FP10SH)
Turns on when the error occurs using the I/0 link function.
(Available PLC: FP - M
C20,C32/FP1)
R9038
Turns on when the serial data communication error occurs using COM
port.
(Available PLC: FP - M
C20C,C32C/FP1 C24C,
C40C,C56C,C72C/FP2/
FP2SH/FP10SH)
R9037
Turns off when data is being sent by the F144 (TRNS) instruction.
Tuns on when the end code is received during the serial data communicating.
(Available PLC: FP - M
C20C,C32C/FP1 C24C,
C40C,C56C,C72C/FP2/
FP2SH/FP10SH)
COM port send flag
Tuns on while data is not send during the serial data communicating.
(Available PLC: FP - M
C20C,C32C/FP1 C24C,
C40C,C56C,C72C/FP2/
FP2SH/FP10SH)
Tuns off while data is being sent during the serial data communicating.
R903A
Turns on while the high - speed counter instructions F166 (HC1S) to F170
(PMW) is executed.
R903B
R9039
Turns on while the high - speed counter instruction F166 (HC1S) to F170
(PWM) is executed.
R903C
Turns on while the high - speed counter instruction F166 (HC1S) to F170
(PWM) is executed.
R903D
Turns on while the high - speed counter instruction F166 (HC1S) to F170
(PWM) is executed.
Not used
R903E
Not used
R903F
R9040
B - 66
B.2
Address Name
Description
R9050
R9051
R9052
R9053
MEWNET - W/ - P link
transmission error flag
[W/P LINK 4]: for
FP2/FP10SH
[W LINK 4]: for FP2SH
MEWNET - W/ - P link
transmission error flag
[W/P LINK 5]: for
FP2/FP10SH
[W LINK 5]: for FP2SH
MEWNET - H link
transmission error flag
[H LINK 1]: for
FP3/FP10SH
MEWNET - H link
transmission error flag
[H LINK 2]: for
FP3/FP10SH
MEWNET - H link
transmission error flag
[H LINK 3]: for
FP3/FP10SH
R9054
R9055
R9056
R9057
R9058
(Available PLC:
FP2/FP2SH/FP3/FP10SH)
R9059
R905A
R905B
R905C to
R905F
B - 67
Address Name
MEWNET - W/ - P
PC link transmission assurance
relay [for PC link 0
l [f
li k
(W/P)]
Description
Unit
No.1
Unit
No.2
R9062
Unit
No.3
R9063
Unit
No.4
R9064
Unit
No.5
R9065
Unit
No.6
R9066
Unit
No.7
R9067
Unit
No.8
R9068
Unit
No.9
R9069
Unit
No.10
R906A
Unit
No.11
R906B
Unit
No.12
R906C
Unit
No.13
R906D
Unit
No.14
R906E
Unit
No.15
R906F
Unit
No.16
R9060
R9061
Note
When the system registers 46=K0, PC link 0 for the link unit with
a smaller slot no. and PC link 1 for one with a larger slot no.
When the system registers 46=K1, PC link 1 for the link unit with
a smaller slot no. and PC link 0 for one with a larger slot no.
B - 68
B.2
Address Name
MEWNET - W/ - P
p
PC link operation
mode relay [for
d
l [f
PC link 0(W/P)]
Description
Unit
No.1
Unit
No.2
R9072
Unit
No.3
R9073
Unit
No.4
R9074
Unit
No.5
R9075
Unit
No.6
R9076
Unit
No.7
R9077
Unit
No.8
R9078
Unit
No.9
R9079
Unit
No.10
R907A
Unit
No.11
R907B
Unit
No.12
R907C
Unit
No.13
R907D
Unit
No.14
R907E
Unit
No.15
R907F
Unit
No.16
R9070
R9071
Note
When the system registers 46=K0, PC link 0 for the link unit with
a smaller slot no. and PC link 1 for one with a larger slot no.
When the system registers 46=K1, PC link 1 for the link unit with
a smaller slot no. and PC link 0 for one with a larger slot no.
B - 69
Address Name
Description
R9080
MEWNET - W/ - P
Unit
PC link transmis- No.1
sion assurance
relay [for PC link 1
Unit
(W/P)]
No.2
R9082
Unit
No.3
R9083
Unit
No.4
R9084
Unit
No.5
R9085
Unit
No.6
R9086
Unit
No.7
R9087
Unit
No.8
R9088
Unit
No.9
R9089
Unit
No.10
R908A
Unit
No.11
R908B
Unit
No.12
R908C
Unit
No.13
R908D
Unit
No.14
R908E
Unit
No.15
R908F
Unit
No.16
R9081
Note
B - 70
When the system registers 46=K0, PC link 0 for the link unit with
a smaller slot no. and PC link 1 for one with a larger slot no.
When the system registers 46=K1, PC link 1 for the link unit with
a smaller slot no. and PC link 0 for one with a larger slot no.
B.2
Address Name
R9090
Description
Unit
No.1
Unit
No.2
R9092
Unit
No.3
R9093
Unit
No.4
R9094
Unit
No.5
R9095
Unit
No.6
R9096
Unit
No.7
R9097
Unit
No.8
R9098
Unit
No.9
R9099
Unit
No.10
R909A
Unit
No.11
R909B
Unit
No.12
R909C
Unit
No.13
R909D
Unit
No.14
R909E
Unit
No.15
R909F
Unit
No.16
R9091
R9100
R9101
(* Note)
R9102
(* Note)
MEWNET - W/ - P
PC link operation
mode relay [for
PC link 1 (W/P)]
IC memory card
installation flag
(Available PLC: FP2SH/
FP10SH)
Monitors the voltage drop condition for the IC memory card as:
Monitors the voltage drop condition for the IC memory card as:
Note
When the system registers 46=K0, PC link 0 for the link unit with
a smaller slot no. and PC link 1 for one with a larger slot no.
When the system registers 46=K1, PC link 1 for the link unit with
a smaller slot no. and PC link 0 for one with a larger slot no.
B - 71
Address Name
Description
R9103
(Available PLC:
FP2SH/FP10SH)
- on: The protect switch is not in the write - protected (WP) position.
Monitors the condition of the IC memory card access enable switch as:
(Available PLC:
FP2SH/FP10SH)
R9104
- off (access disabled): The access enable switch is in the off position.
Not used
R9105
through
R910F
Note
The IC memory card backup battery condition can be judged
using special internal relays R9101 and R9102 as follows:
R9101
R9102
OFF
OFF
ON
OFF
ON
ON
B - 72
B.3
B.3
The special data registers are one word (16-bit) memory areas which store specific
information. With the exception of registers for which Writing is possible is indicated in
the Description column, these registers cannot be written to.
B.3.1
Address
Description
p
Read ing
i
Writ ing
i
FP0 T32
FP0
C10,C14,
C16, C32
FP - e
DT90000
DT9000
Self - diagnostic
error code
N/A
DT90001
DT9001
FP - e screen
display switching
(Available PLC:
FP - e)
N/A
DT90010
DT9010
N/A
DT90014
DT9014
Auxiliary register
for operation
N/A
DT90015
DT9015
Auxiliary register
for operation
DT90016
DT9016
DT90017
DT9017
Operation error
address (hold)
DT90018
DT9018
Operation error
address (nonhold)
DT90019
DT9019
N/A
N/A
Difference between the values of the two points (absolute value) x 2.5ms = Elapsed time between the two
points.
DT90020
DT9020
DT90021
Not used
DT9021
B - 73
Address
Name
Description
p
Read ing
i
Writ ing
i
The current scan time is stored here. Scan time is calculated using the formula:
Scan time (ms) = stored data (decimal) x 0.1
N/A
Not used
N/A
N/A
N/A
N/A
/
N/A
/
N/A
FP0 T32
FP0
C10,C14,
C16, C32
FP - e
DT90022
DT9022
Scan time
(current value)
(* Note)
DT90023
DT9023
Scan time
(minimum value)
(* Note 1)
DT9024
Scan time
(maximum value)
(* Note 1)
DT90025
(* Note 2)
DT9025
(* Note 2)
Mask condition
monitoring
register for
interrupts
(INT 0 to 5)
11
0 (Bit No.)
543
0 (INT No.)
0: interrupt disabled (masked)
1: interrupt enabled (unmasked)
DT90026
DT9026
DT90027
(* Note 2)
DT9027
(* Note 2)
DT90028
DT9028
Not used
DT90029
DT9029
Not used
DT90030
(* Note 2)
DT9030
(* Note 2)
Message 0
DT90031
(* Note 2)
DT9031
(* Note 2)
Message 1
DT90032
(* Note 2)
DT9032
(* Note 2)
Message 2
DT90033
(* Note 2)
DT9033
(* Note 2)
Message 3
DT90034
(* Note 2)
DT9034
(* Note 2)
Message 4
DT90035
(* Note 2)
DT9035
(* Note 2)
Message 5
Notes
1) Scan time display is only possible in RUN mode, and shows
the operation cycle time. The maximum and minimum values
are cleared when each the mode is switched between RUN
mode and PROG. mode.
2) Used by the system.
B - 74
B.3
Address
Name
Description
p
Read ing
i
Writ ing
i
FP0 T32
FP0
C10,C14,
C16, C32
FP - e
DT90036
DT9036
Not used
N/A
N/A
DT90037
DT9037
DT90038
DT9038
DT90039
DT9039
Not used
N/A
DT90040
DT9040
Temperature input
ch.0 (Available
PLC: FP - e)
DT90041
DT9041
Temperature input
ch.1 (Available
PLC: FP - e)
DT90042
DT9042
DT90043
DT9043
Used by the
system (Available
PLC: FP - e)
DT90044
DT9044
DT90045
DT9045
DT90046
DT9046
DT90047
DT9048
DT90049
DT9049
DT90050
DT9050
DT90051
DT9051
N/A
Not used
N/A
N/A
N/A
High-speed
counter elapsed
value for ch0
The elapsed value (24 - bit data) for the high - speed
counter is stored here.
High-speed
counter elapsed
value for ch0
The elapsed value (24 - bit data) for the high - speed
counter is stored here.
High-speed
counter target
value for ch0
The target value (24 - bit data) of the high - speed counter A
specified by the high - speed counter instruction is stored
here.
DT9047
DT90048
N/A
High-speed
counter target
value area for ch1
The elapsed value (24 - bit data) for the high - speed
counter is stored here.
N/A
B - 75
Address
Name
FP0 T32
DT9052
Read ing
i
Writ ing
i
High-speed
counter control
flag
FP0
C10,C14,
C16, C32
FP - e
DT90052
Description
p
12 11
8 7
4 3
DT9052
DT90052
for ch3 for ch2 for ch1
for ch0
B - 76
B.3
Address
Name
DT9053
(Note2)
Writ ing
i
N/A
FP0
C10,C14,
C16, C32
FP - e
DT90053
(Note1)
Read ing
i
Clock/calendar
monitor
(hour/minute)
FP0 T32
Description
p
Hour data
H00 to H23 (BCD)
DT90054
(Note1)
DT9054
(Note2)
Clock/calendar
monitor and
setting
(minute/second)
DT90055
(Note1)
DT9055
(Note2)
Clock/calendar
monitor and
setting
(day/hour)
DT90056
(Note1)
DT9056
(Note2)
Clock/calendar
monitor and
setting
(year/month)
Minute data
H00 to H59 (BCD)
DT9057
(Note2)
Clock/calendar
monitor and
setting
(day-of-the-week)
Minute data
Mi t d t
H00 to H59 (BCD)
S
Second data
dd t
H00 to H59 (BCD)
DT90055
Day data
H01 to H31 (BCD)
Hour data
H00 to H23 (BCD)
DT90056
DT90057
(Note1)
DT90054
Year data
H00 to H99 (BCD)
Month data
H01 to H12 (BCD)
DT90057
Day-of-the-week
data
H00 to H06 (BCD)
Notes
1) After discharging the battery (including when the power is
turned on for the first time), the values of DT90053 to DT90058
change at random. Once the time and date have been set, these
values will function normally.
2) For FP - e with clock/calendar type only
B - 77
Address
Name
DT9058
(Note2)
Writ ing
i
FP0
C10,C14,
C16, C32
FP - e
DT90058
(Note1)
Read ing
i
Clock/calendar
time setting and
30 seconds
correction
FP0 T32
Description
p
Example:
Set the time to 12:00:00 on the 5th day when the X0
turns on.
X0
1
( DF )
1
[ F0 MV, H
0, DT90054 ]
. . Inputs 0
minutes and
0 seconds
. . Inputs 12th
hour 5th day
Example:
Correct to 0 seconds with X0 turns on
X0
( DF )
[ F0 MV, H
1
1, DT90058 ]
Correct to 0
second.
Notes
1) After discharging the battery (including when the power is
turned on for the first time), the values of DT90053 to DT90058
change at random. Once the time and date have been set, these
values will function normally.
2) For FP - e with clock/calendar type only. For FP - e, 30 seconds
corection function is not available.
B - 78
B.3
Address
Name
FP0 T32
DT9059
Description
p
Read ing
i
Writ ing
i
N/A
Process
number:
0 to 15
Indicates the startup condition of the step ladder process. When the proccess starts up, the bit corresponding to the p
process number turns on 1.
g
Process
number:
16 to 31
N/A
FP0
C10,C14,
C16, C32
FP - e
DT90059
bit 15
12 11
8 7
4 3
DT9059
DT90059
Error flag of
COM port
- Tool port
Error flag of
tool port
- COM port
DT90060
DT9060
DT90061
DT9061
Step
ladder
p
process
DT90062
DT9062
Process
number:
32 to 47
DT90063
DT9063
Process
number:
48 to 63
DT90064
DT9064
Process
number:
64 to 79
DT90065
DT9065
DT9066
DT9067
DT9104
DT90105
DT9105
DT90106
DT9106
DT90107
DT9107
15
11
0 (Bit No.)
Process
number:
112 to 127
DT90104
11
Process
number:
96 to 111
DT90067
15
Process
number:
80 to 95
DT90066
DT9060
DT90060
3
0 (Process No.)
0:
not - executing
1: executing
High-speed
cou te elapsed
counter e apsed
value area for ch2
The elapsed value (24 - bit data) for the high - speed
counter is stored here.
High-speed
counter target
value area for ch2
The target value (24 - bit data) of the high - speed counter specified by the high - speed counter instruction is
stored here.
B - 79
Address
Name
FP0 T32
DT9108
DT90109
DT9109
DT90110
DT9110
DT90111
DT9111
Read ing
i
Writ ing
i
High-speed
cou te elapsed
counter e apsed
value area for ch3
The elapsed value (24 - bit data) for the high - speed
counter is stored here.
High-speed
counter target
value area for ch3
The target value (24 - bit data) of the high - speed counter specified by the high - speed counter instruction is
stored here.
N/A
FP0
C10,C14,
C16, C32
FP - e
DT90108
Description
p
B - 80
B.3
B.3.2
The special data registers are one word (16-bit) memory areas which store specific
information.
(A: Available, N/A: Not available)
Address
Name
Description
Reading
Writing
DT90000
N/A
DT90001
Not used
N/A
N/A
DT90002
N/A
N/A
N/A
When an error occurs at an FP expansion I/O unit, the bit corresponding to the
unit no. will turn on. Monitor using binary
display.
15
11
7
3 2 1 0 (bit no.)
3 2 1 0 (unit no.)
on: error, off: normal
DT90003
Not used
DT90004
Not used
DT90005
Not used
DT90006
11
N/A
3 2 1 0 (bit no.)
3 2 1 0 (unit no.)
Not used
DT90008
Not used
DT90009
DT90010
Position of I/O verify error unit When the state of installation of an FP0
expansion I/O unit has changed since
for FP0 right side expansion
the power was turned on, the bit corresponding to the unit no. will turn on.
Monitor using binary display.
N/A
15
11
N/A
N/A
3 2 1 0 (bit no.)
2 1 0 (unit no.)
B - 81
Address
Name
Description
DT90011
Writing
N/A
N/A
15
Reading
N/A
3 2 1 0 (bit no.)
3 2 1 0 (unit no.)
Not used
DT90013
Not used
DT90014
DT90015
DT90017
After commencing operation, the address where the first operation error occurred is stored. Monitor the address using decimal display.
N/A
DT90018
DT90019
DT90020
Not used
N/A
N/A
DT90021
Not used
DT90022
N/A
DT90016
B - 82
B.3
Address
Name
Description
Reading
Writing
DT90023
N/A
DT90024
DT90025
N/A
N/A
N/A
N/A
N/A
N/A
15
11
0 (Bit no.)
23
19
16 (INT no.)
Not used
DT90027
Periodical interrupt
interval (INT 24)
DT90028
Not used
DT90029
Not used
DT90030
Message 0
DT90031
Message 1
DT90032
Message 2
DT90033
Message 3
DT90034
Message 4
DT90035
Message 5
Note
Scan time display is only possible in RUN mode and shows the
operation cycle time. (In PROG mode, the scan time for the
operation is not displayed.) The maximum and minimum values
are cleared each time the mode is switched from RUN to PROG.
B - 83
Address
Name
Reading
Writing
DT90036
Not used
N/A
N/A
DT90037
Operation auxiliary
register for search
instruction F96 (SRC)
N/A
DT90038
Operation auxiliary
register for search
instruction F96 (SRC)
DT90039
Not used
N/A
N/A
DT90040
Potentiometer (volume)
input V0
N/A
DT90041
Potentiometer (volume)
input V1
DT90042
N/A
N/A
DT90043
DT90044
DT90045
DT90046
Description
High-speed
counter
elapsed valval
ue
For CH0
The elapsed value (32 - bit data) for the high speed counter is stored here. The value can
be read and written by executing the F1
(DMV) instruction.
High-speed
counter target value
For CH0
The target value (32 - bit data) of the high speed counter specified by the high - speed
counter instruction is stored here.
Target values have been preset for the various instructions to be used when the high speed counter related instruction F166, F167,
F171, F175 or F176 is executed. The value
can be read by executing the F1 (DMV) instruction.
N/A
High-speed
counter
elapsed valval
ue area
For CH1
The elapsed value (32 - bit data) for the high speed counter is stored here. The value can
be read and written by executing the F1
(DMV)instruction.
High-speed
counter target value
area
For CH1
The target value (32 - bit data) of the high speed counter specified by the high - speed
counter instruction is stored here.
vari
Target values have been preset for the various instructions to be used when the high speed counter related instruction F166 or
F167 is executed. The value can be read by
executing the F1 (DMV) instruction.
N/A
DT90047
DT90048
DT90049
DT90050
DT90051
B - 84
B.3
Address
Name
Description
Reading
Writing
DT90052
High - speed
counter and
pulse output
control flag
N/A
N/A
12
4 3 2 1 0
Channel setting
[HSC] 0 to 3: CH0 to CH3
[PLS] 0, 2: CH0, CH2
[PLS] Home near input
0: Invalid/1: Valid
Clock/calendar
monitor
(hour/minute)
0: Enable/1: Disable
DT90053
0: Enable/1: Disable
0: No/1: Yes
Hour data
H00 to H23
DT90054
Clock/calendar
setting
(minute/second)
DT90055
Clock/calendar
setting
(day/hour)
DT90056
DT90057
Clock/calendar
setting
(year/month)
Clock/calendar
setting
(day-of-theweek)
Minute data
H00 to H59
The year, month, day, hour, minute, second, and dayof-the-week data for the calendar timer is stored. The
built-in calendar timer will operate correctly through the
year 2099 and supports leap years. The calendar timer
can be set by writing a value using a programming tool
software or a program that uses the F0 (MV) instruction
(see example for DT90058).
Higher byte
Lower byte
DT90054
Minute data
H00 to H59
Second data
H00 to H59
DT90055
Day data
H01 to H31
Hour data
H00 to H23
DT90056
Year data
H00 to H99
Month data
H01 to H12
DT90057
Day-of-the-week
data
H00 to H06
B - 85
Address
Name
Description
Reading
Writing
DT90058
Clock/calendar
time setting and
30 seconds
correction
register
Inputs 0 min.
0, DT90054 ] and 0 sec.
Inputs 12th
[ F0 MV, H 512, DT90055 ]
hour 5th day
[ F0 MV, H8000, DT90058 ] Sets the time
F0 MV, H
1, DT90058
Correct to 0
seconds
At the time of correction, if between 0 and 29 seconds, the time will be moved down, and if between 30
and 59 seconds, it will be moved up. In the example
above, if the time was 5 minutes 29 seconds, it will
become 5 minutes 0 seconds; and, if the time was 5
minutes 35 seconds, it will become 6 minutes 0 seconds.
B - 86
B.3
Address
Name
Description
Reading
Writing
DT90059
Serial
communication
error code
N/A
N/A
DT90060
Step ladder
process (0 to 15)
DT90061
Step ladder
process (16 to 31)
DT90062
DT90063
DT90064
DT90065
DT90066
DT90067
DT90068
DT90069
DT90070
DT90071
DT90072
DT90073
15
11
0 (Bit no.)
1: Executing
0 (Process no.)
0: Not - executing
DT90079
DT90078
11
DT90077
15
DT90060
DT90076
Example:
E
l
DT90075
DT90074
Indicates the startup condition of the step ladder process. When the process starts up, the bit corresponding to the process number turns on.
on
B - 87
Address
Name
DT90080
DT90081
DT90082
DT90083
DT90084
DT90085
DT90086
DT90087
DT90088
DT90089
DT90090
DT90091
DT90092
DT90093
DT90094
DT90095
DT90096
DT90097
DT90098
DT90099
B - 88
Description
Reading
A
Indicates the startup condition of the step ladder process. When the process starts up, the bit corresponding to the process number turns on.
on
Monitor using binary display.
Example:
E
l
15
11
DT90060
15
11
1: Executing
0 (Bit no.)
0 (Process no.)
0: Not - executing
Writing
A
B.3
Address
Name
DT90100
DT90101
DT90102
DT90103
DT90104
DT90105
DT90106
DT90107
DT90108
DT90109
DT90110
DT90111
DT90112
DT90113
Description
Reading
Writing
Indicates the startup condition of the step ladder process. When the process starts up, the bit corresponding to the process number turns on.
Monitor using binary display.
Example:
E
l
15
11
0 (Bit no.)
DT90100
655
651
1: Executing
647
0: Not - executing
DT90114
DT90115
DT90116
DT90117
DT90118
DT90119
DT90120
DT90121
DT90122
B - 89
Address
Name
DT90123 to
DT90125
Not used
DT90126
Forced Input/
Output unit no.
DT90127 to
DT90139
Not used
DT90140
MEWNET - W0
PLC link status
Description
Reading
Writing
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
DT90141
DT90142
The minimum interval between two receiving operations: value in the register x 2.5ms
DT90143
The maximum interval between two receiving operations: value in the register x 2.5ms
DT90144
DT90145
DT90146
The minimum interval between two sending operations: value in the register x 2.5ms
DT90147
The maximum interval between two sending operations: value in the register x 2.5ms
DT90148 to
DT90155
Not used
DT90156
MEWNET - W0
PLC link status
DT90157
DT90158
Not used
DT90159
DT90160
MEWNET - W0
PLC link unit no.
DT90161
MEWNET - W0
PLC link error
flag
B - 90
B.3
Address
Name
DT90162 to
DT90169
Not used
DT90170
MEWNET - W0
PLC link status
Description
Reading
N/A
DT90171
DT90175
DT90176
DT90177
DT90178
DT90179
N/A
DT90174
N/A
DT90173
DT90172
N/A
N/A
Writing
DT90180 to
DT90189
Not used
DT90190
DT90191
DT90192
DT90194 to
DT90199
0: Off/1: On
HSC instruction
Pulse output
0: Continue/1: Clear
0: Continue/1: Stop
Hardware reset
0: Enable/1: Disable
Count
0: Enable/1: Disable
Software reset
DT90193
N/A
0: No/1: Yes
N/A
N/A
B - 91
Address
Name
DT90200
High - speed
counter
elapsed value
High - speed
counter target
value
DT90201
DT90202
Description
Reading
Writing
For CH2
The elapsed value (32-bit data) for the highspeed counter is stored here. The value can
be read and written by executing the F1
(DMV) instruction.
For CH2
The target value (32-bit data) of the highspeed counter specified by the high-speed
counter instruction is stored here.
N/A
Target values have been preset for the various instructions to be used when the highinstructions,
high
speed counter related instruction F166, F167,
F171, F175 or F176 is executed. The value
can be read by executing the F1 (DMV) instruction.
DT90203
DT90204
DT90205
DT90206
High - speed
counter
elapsed value
For CH3
The elapsed value (32-bit data) for the highspeed counter is stored here. The value can
be read and written by executing the F1
(DMV)instruction.
High - speed
counter target
value
For CH3
The target value (32-bit data) of the highspeed counter specified by the high-speed
counter instruction is stored here.
N/A
N/A
N/A
Target values have been preset for the various instructions, to be used when the highspeed counter related instruction F166 or
F167 is executed. The value can be read by
executing the F1 (DMV) instruction.
DT90207
DT90208 to
DT90218
B - 92
Not used
B.3
Address
Name
DT90219
DT90220
PLC link
unit (station)
no.
no 1 or 9
DT90221
Description
Reading
Writing
N/A
DT90222
DT90223
DT90224
DT90225
PLC link
unit (station)
no.
no 2 or 10
DT90226
DT90227
DT90228
DT90229
PLC link
unit (station)
no.
no 3 or 11
DT90230
DT90231
DT90232
DT90233
PLC link
unit (station)
no.
no 4 or 12
DT90234
Example:
When DT90219 is 0
DT90220 to
DT90223
Unit (station)
no.1
Higher byte
Lower byte
Setting
S i contents of system
f
register 41, 43, 45, and 47
DT90235
DT90236
DT90237
PLC link
unit (station)
no.
no 5 or 13
DT90238
DT90239
B - 93
Address
Name
DT90240
PLC link
unit (station)
no.
no 6 or 14
DT90241
Description
Reading
A
N/A
N/A
Writing
N/A
N/A
DT90242
DT90243
Example:
When DT90219 is 0
DT90244
DT90245
PLC link
unit (station)
no.
no 7 or 15
DT90246
DT90247
DT90240 to
DT90243
Unit (station)
no.6
Higher byte
DT90248
DT90249
PLC link
unit (station)
no.
no 8 or 16
DT90250
DT90251
Lower byte
DT90252
to DT90255
Not used
DT90256
B - 94
B.3
B.3.3
Address
FP-M
C24/
C56/
C16
C16
Self-diagnostic error
code register
Availability
FP1
C14/
DT9000
Name
C40
C72
C20/
C32
DT9015
N/A
N/A
DT9016
DT9017
Operation error
address (hold)
DT9018
Operation error
address (non-hold)
The address where a operation error occurred is stored. Each time an error occurs,
the new address overwrites the previous address. At the beginning of scan, the address
is 0. Monitor the address using decimal display.
The data in DT9019 is increased by one every 2.5ms. Difference between the values of
the two points (absolute value) x 2.5ms =
Elapsed time between the two points.
DT9019
DT9020
DT9021
Not used
A: Available, N/A: Not available
B - 95
Address
Description
p
FP-M
C24/
C56/
C16
C16
Scan time
(current value)
(* Note 1)
Availability
FP1
C14/
DT9022
Name
C40
C72
N/A
N/A
N/A
N/A
C20/
C32
Scan time
(minimum value)
(* Note 1)
DT9024
Scan time
(maximum value)
(* Note 1)
DT9025
(* Note 2)
Mask condition
monitoring register for
interrupts
(INT 0 to 7)
11
0 (Bit No.)
7
0 (INT No.)
0: interrupt disabled (masked)
1: interrupt enabled (unmasked)
DT9026
Not used
DT9027
(* Note 2)
Periodical interrupt
interval
(INT24)
Notes
1) The scan time display is during the RUN mode only and
displays the operation cycle time. During the PROG. mode, the
operation scan time is not displayed. The maximum and
minimum values are cleared when each the mode is switched
between the RUN and PRG. modes.
2) Used by the system.
B - 96
B.3
Address
Name
Description
p
FP1
Availability
FP-M
C14/
C56/
C40
C72
C16
C20/
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
C32
Not used
DT9028
Not used
DT9029
DT9030
(* Note)
Message 0
DT9031
(* Note)
Message 1
DT9032
(* Note)
DT9033
(* Note)
Message 3
DT9034
(* Note)
Message 2
Message 4
DT9035
(* Note)
C24/
C16
Message 5
Not used
DT9036
DT9037
DT9038
N/A
N/A
(C40
only)
N/A
N/A N/A
Not used
DT9039
DT9043
DT9044
DT9040
DT9041
DT9042
DT9045
DT9046
DT9047
N/A N/A
Note
B - 97
Address
Name
Description
p
Availability
FP1
FP-M
C14/
C16
N/A
A
(*)
A
(*)
N/A
A
(*)
C72
C20/
C32
Not used
DT9048
to
DT9051
DT9052
C24/
C40
C56/
C16
A value can be written with F0 (MV) instruction to reset the high-speed counter, disable
counting, stop high-speed counter instructions (F162 to F165), and clear the highspeed counter.
Control code =
000000000000____
High - speed counter
instruction
(0: Continue / 1: Clear)
Hardware reset
(0: Enable / 1: Disable)
Count
(0: Enable / 1: Disable)
Software reset
(0: Yes / 1: No)
The system register 400 setting is stored in
the upper 16 bits.
15
11
DT9052
<Mode setting>
Set by system register 400
(H00 to H08)
<Control code>
Entered by the F0 (MV) instruction
(H0 to HF)
DT9053
Clock/calendar monitor
(hour and minute)
Hour data
H00 to H23 (BCD)
Minute data
H00 to H59 (BCD)
Note
C type FP - M C20, C32 and FP1 C24C, C40C, C56C, and C72C
only.
B - 98
B.3
Address
DT9055
DT9056
Clock/calendar monitor
and setting
(day and hour)
Clock/calendar monitor
and setting
(year and month)
Description
p
Second data
H00 to H59 (BCD)
Hour data
H00 to 23 (BCD)
C56/
C16
C40
C72
A
(*)
A
(*)
N/A
A
(*)
A
(*)
A
(*)
N/A
A
(*)
N/A
A
(*)
A
(*)
N/A
A
(*)
DT9057
N/A
A
(*)
A
(*)
N/A
A
(*)
C20/
C32
Month data
H01 to H12 (BCD)
Clock/calendar monitor
and setting
(day - of - the - week)
C24/
FP-M
C16
Clock/calendar monitor
and setting
(minute and second)
Availability
FP1
C14/
DT9054
Name
Note
C type FP - M C20, C32 and FP1 C24C, C40C, C56C, and C72C
only.
B - 99
Address
Description
p
FP-M
C24/
C56/
C16
C16
Clock/calendar time
setting and 30 seconds
correction
Availability
FP1
C14/
DT9058
Name
C40
C72
N/A
A
(*)
A
(*)
C20/
C32
DF
F0 MV, H
0, DT9054 . . . . . 1)
. . . . 2)
F0 MV, H 512, DT9055
F0 MV, H8000, DT9058
N/A
A
(*)
. . . . 3)
Note
C type FP - M C20, C32 and FP1 C24C, C40C, C56C, and C72C
only.
B - 100
B.3
Address
Name
Description
p
Availability
FP1
FP-M
C14/
DT9058
Clock/calendar time
setting and 30
seconds correction
C24/
C56/
C16
C40
C72
C16
C20/
N/A
A
A
A
N/A
(* 1) (* 1)
(* 1)
C32
DF
1
F0 MV, H
1, DT9058
Correct to 0
second.
A
A
A
N/A
N/A
(* 1)
(* 1)
(* 1)
A: Available, N/A: Not available
Notes
1) C type FP - M C20, C32 and FP1 C24C, C40C, C56C, and C72C
only.
2) Used by the system.
B - 101
Address
Name
Description
p
Availability
FP1
FP-M
C14/
DT9060
DT9061
Process
number:
16 to 31
DT9062
Process
number:
32 to 47
DT9063
Process
number:
48 to 63
DT9064
Process
number:
64 to 79
DT9065
Process
number:
80 to 95
DT9066
Process
number:
96 to 111
DT9067
Process
number:
112 to 127
15
11
0 (Process No.)
DT9060
N/A
0 (Bit No.)
(
)
N/A
N/A
N/A
11
15
C72
C56/
C40
C24/
C16
C16
C20/
C32
0: not - executing
1: executing
B - 102
B.3
Address
Name
Description
p
Availability
FP1 FP-M
C16
C20/
C32
DT9080
DT9082
Digital
Channel 0
converted
value from
analog
Channel 1
control
board No.0
Channel 2
DT9083
Channel 3
DT9084
DT9086
Digital
Channel 0
converted
value from
Channel 1
analog
control
board No.1
Channel 2
DT9087
Channel 3
DT9088
DT9090
Digital
Channel 0
converted
value from
Channel 1
analog
control
board No.2
Channel 2
DT9091
Channel 3
DT9092
DT9094
Digital
Channel 0
converted
value from
Channel 1
analog
control
board No.3
Channel 2
DT9095
Channel 3
DT9081
DT9085
DT9089
DT9093
N/A
N/A
N/A
N/A
N/A
N/A
When
Wh A/D converter b
t board i i t ll d
d is installed
N/A
B - 103
Address
Name
Description
p
Availability
FP1 FP-M
C16
C20/
C32
DT9096
DT9097
Digital
Channel 0
value for
specifying
analog data
output from
analog
control
board No.0
Channel 1
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
DT9098
DT9099
Digital
Channel 0
value for
specifying
analog data
output from
analog
Channel 1
control
board No.1
Example:
Bit position
Binary data
15 1211 8 7 4 3 0
1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1
K999
Data in bit position 10 to 15 is ingnored.
DT9100
DT9101
Digital
Channel 0
value for
specifying
analog data
output from
analog
Channel 1
control
board No.2
Example:
DT9102
DT9103
Digital
Channel 0
value for
specifying
analog data
output from
analog
Channel 1
control
board No.3
Bit position
Binary data
15 1211 8 7 4 3 0
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
K255
Data in bit position 8 to 15 is ingnored.
Be sure to use the F0 (MV) instruction to transfer data
into these special data registers.
B - 104
B.3
Address
Name
Description
p
Availability
FP1 FP-M
C16
C20/
C32
DT9104
DT9105
DT9106
DT9107
DT9108
DT9109
DT9110
DT9111
DT9112
DT9113
DT9114
DT9115
DT9116
DT9117
DT9118
DT9119
DT9120
Target value 0 Channel 0 These registers are performed for storing data of the
of high - speed
FP - M high - speed counter board.
counter board
The target values 0 and 1, elapsed value, and capture
value are processed in binary in the range of
Target value 1
K - 8388608 to 8388607.
of high - speed
counter board
Be sure to use F1 (DMV) instruction to transfer
data in these special data registers to other regis- N/A N/A
regis
Elapsed value
ters or data in other registers to these special data
of high - speed
registers.
counter board
When changing data in these special data registers, be sure to specify data in the range of
Capture value
K - 8388608 to K8388607.
of high - speed
If data outside range is input, data handled disrecounter board
garding bit positions 24 to 31 (bit positions 8 to 15
Target value 0 Channel 1
in the higher 16 - bit area of 32 - bit data).
of high - speed
counter board
Example:
If K2147483647 is specified, high - speed counter acts
Target value 1
regarding it as K - 8388608.
of high - speed
Data configuration when K2147483647 is input:
counter board
N/A N/A
Elapsed value
Higher 16 - bit area
Lower 16 - bit area
of high - speed
counter board
Capture value
of high - speed
counter board
High - speed counter
board control register
Binary data 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
K - 8388608
Data in bit position 24 to 31 is ingnored.
This register is used to control the high - speed counter
board by the F0 (MV) instruction.
Bit position 15 12 11
0 0
Data
8 7
1 0
4 3
N/A N/A
B - 105
Address
Name
Description
p
Availability
FP1 FP-M
C16
C20/
C32
DT9120
Output mode:
The output goes on or off when the elapsed value becomes equal to the target. These bits specify the mode
for output transition when the elapsed value beccomes
equal to the target value. If the output mode is changed,
set the target value again.
Bit
position
0
1
8
9
Corresponding
target value
0
1
Corresponding
output
Target 0
Target 1
Target 0
Target 1
Channel
OUT00
OUT01
OUT10
OUT11
on
off
N/A
on
off
N/A
on
off
on
off
on
off
B - 106
B.3
Address
Name
Description
p
Availability
FP1 FP-M
C16
DT9120
C20/
C32
N/A
N/A
N/A
N/A
Target setting:
0 0 0
Data
8 7
4 3
B - 107
Address
Name
Description
p
Availability
FP1 FP-M
C16
C20/
C32
DT9121
This input disables external output even if the high speed counter is set to the output enable mode by
DT9120. While this input is turned on, the output of the
high - speed counter board is not changed even if the
elapsed value becomes equal to the target.
Error codes:
A BCD error is detected only when data for the high speed couter board is set to BCD operation using F0
(MV) and bit position 7 of DT9120.
11
0
0
0
1
Bit position
10 9 8
0 0 1
0 1 0
1 0 0
0 0 0
N/A
N/A
Description
BCD error
CH0 overflow/underflow
CH1 overflow/underflow
Watchdog timer error
B - 108
B.3
B.3.4
Address
FP3
DT90000
DT9001
DT90002
Read -
Writ -
ing
ing
The self-diagnostic error code is stored here when a selfdiagnostic error occurs. Monitor the error code using decimal display.
N/A
Not used
DT90001
DT9002
Description
N/A
N/A
N/A
FP2/
FP2SH/
FP10SH
DT9000
Name
Self-diagnostic
error code
Communication
error of MEWNET - TR master
unit
(slot No. 0 to 15)
(Available PLC:
FP3, FP10SH)
DT90003
Communication
error of MEWNET - TR master
unit
(slot No. 16 to 31)
(Available PLC:
FP3, FP10SH)
Position of abnormal I/O slot
(slot No. 16 to 31)
12 11
12 11
8 7
8 7
12 11
28 27
8 7
24 23
4 3
4 3
0
0
4 3
20 19
0
16
DT9002/DT90002
Bit position 15
Slot number 31
DT9003/DT90003
(Available PLC:
FP2/FP2SH)
B - 109
Address
FP3
DT90006
Description
Read -
DT9007
DT90007
Bit position 15
Slot number 15
12 11
12 11
8 7
8 7
12 11
28 27
8 7
24 23
4 3
4 3
0
0
4 3
20 19
0
16
DT9006/DT90006
Bit position 15
Slot number 31
DT9007/DT90007
DT9010
DT90010
DT9011
DT90011
Bit position 15
Slot number 15
12 11
12 11
8 7
8 7
12 11
28 27
8 7
24 23
4 3
4 3
0
0
4 3
20 19
0
16
DT9010/DT90010
Bit position 15
Slot number 31
DT9011/DT90011
DT9014
DT90014
Auxiliary register
for operation
DT9015
DT90015
Auxiliary register
for operation
DT9016
DT90016
DT9017
DT90017
Operation error
address
(hold)
DT9018
DT90018
Operation error
address
(non-hold)
DT9019
DT90019
2.5ms ring
counter
B - 110
Writ -
ing
FP2/
FP2SH/
FP10SH
DT9006
Name
ing
N/A
B.3
Address
FP3
Name
Description
Read -
FP2/
FP2SH/
FP10SH
Maximum value
of program
DT9020
Writ -
ing
ing
N/A
N/A
N/A
(Available PLC:
FP3)
DT90020
(Available PLC:
FP10SH)
Example:
(Available PLC:
FP2)
Maximum value
of file register
DT9021
(* Note)
Example:
(Available PLC:
FP3)
DT90021
(* Note)
Maximum value
of file register
(Available PLC:
FP2, FP10SH)
DT9022
DT90022
Scan time
(current value)
Example:
DT90023
Scan time
(minimum value)
Example:
DT90024
Scan time
(maximum value)
Example:
Note
Used by the system.
B - 111
Address
FP3
DT90025
(* Note)
Description
Read -
Mask condition
monitoring register for interrupt
unit initiated
interrupts
(INT 0 to 15)
(*FP2: Not used)
The mask conditions of interrupt unit initiated interrupts using ICTL instruction can be monitored here. Monitor using
binary display.
Bit position 15
INT program 15
12 11
12 11
8 7
8 7
4 3
4 3
0
0
DT9025/DT90025
DT90026
Mask condition
monitoring register for intelligent
unit initiated
interrupts
(INT 16 to 23)
(*FP2: Not used)
12 11
8 7
23
4 3
20 19
0
16
DT9026/DT90026
DT90027
(* Note)
DT9028
(* Note)
DT90028
(* Note)
DT9029
(* Note)
DT90029
(* Note)
Break address
DT9030
(* Note)
DT90030
(* Note)
Message 0
DT9031
(* Note)
DT90031
(* Note)
Message 1
DT9032
(* Note)
DT90032
(* Note)
Message 2
DT9033
(* Note)
DT90033
(* Note)
Message 3
DT9034
(* Note)
DT90034
(* Note)
Message 4
DT9035
(* Note)
DT90035
(* Note)
Message 5
Note
Used by the system.
B - 112
Writ -
ing
FP2/
FP2SH/
FP10SH
DT9025
(* Note)
Name
ing
N/A
B.3
Address
FP3
DT90036
Description
F152 (RMRD)/
P152 (PRMRD)
and
F153 (RMWT)/
P153 (PRMWT)
instructions end
code
Read -
Writ -
ing
FP2/
FP2SH/
FP10SH
DT9036
Name
ing
N/A
N/A
Abnormal unit dis- If an abnormal unit is installed to the backplane, the slot
play
number of that unit will be stored. Monitor using decimal
display.
DT9037
DT90037
Work 1 for
F96 (SRC)/
P96 (PSRC)
instructions
DT9038
DT90038
Work 2 for
F96 (SRC)/
P96 (PSRC)
instructions
DT9039
DT90039
F145 (SEND)/
P145 (PSEND)
and
F146 (RECV)/
P146 (PRECV)
instructions end
code
B - 113
Address
FP3
DT90053
(* Note)
Description
Read -
Clock/calendar
monitor
(hour/minute)
DT9054
DT90054
(* Note)
Clock/calendar
monitor and setting
(minute/second)
DT9055
DT90055
(* Note)
Clock/calendar
monitor and setting
(day/hour)
DT9056
DT9057
DT90056
(* Note)
DT90057
(* Note)
Clock/calendar
monitor and setting
(year/month)
Clock/calendar
monitor and setting
(day-of-the week)
N/A
Minute data
H00 to H59 (BCD)
The year, month, day, hour, minute, second, and day-of-theweek data for the calendar timer is stored. The built-in calendar timer will operate correctly through the year 2099 and
supports leap years. The calendar timer can be set (the
time set) by writing a value using a programming tool software or a program that uses the F0 (MV) transfer instrucinstruc
tion.
Higher 8 bits
DT9054/
DT90054
DT9055/
DT90055
DT9056/
DT90056
DT9057/
DT90057
Lower 8 bits
Minute data
H00 to H59 (BCD)
Second data
H00 to H59 (BCD)
Day data
H01 to H31 (BCD)
Hour data
H00 to H23 (BCD)
Year data
H00 to H99 (BCD)
Month data
H01 to H12 (BCD)
Day-of-the-week
data
H00 to H06 (BCD)
Note
In the FP2, an expansion memory unit is necessary.
B - 114
ing
Lower 8 bits
Hour data
H00 to H23 (BCD)
Writ -
ing
FP2/
FP2SH/
FP10SH
DT9053
Name
B.3
Address
FP3
DT90058
(* Note)
Description
Read -
Clock/calendar
time setting and
30 seconds
correction
Writ -
ing
FP2/
FP2SH/
FP10SH
DT9058
Name
ing
Example:
Set the time to 12:00:00 on the 5th day when the X0 turns
on.
X0
( DF )
[ F0 MV, H
1
. . Inputs 0
minutes and 0
seconds
. . Inputs 12th
hour 5th day
. . Sets the time
0, DT9054 ]
Example:
[ F0 MV, H
1
1, DT9058 ]
Correct to 0
second.
Note
In the FP2, an expansion memory unit is necessary.
B - 115
Address
FP3
DT90059
(* Note)
Description
Read -
DT90060
Step ladder
process (0 to 15)
DT9061
DT90061
Step ladder
process (16 to 31)
DT9062
DT90062
Step ladder
process (32 to 47)
DT9063
DT90063
Step ladder
process (48 to 63)
DT9064
DT90064
Step ladder
process (64 to 79)
DT9065
DT90065
Step ladder
process (80 to 95)
DT9066
DT90066
DT9067
DT90067
DT9068
DT90068
DT90069
DT9070
DT90070
DT9071
DT90071
DT9072
DT90072
DT9073
DT90073
DT9074
DT90074
DT9075
DT90075
DT9076
DT90076
DT9077
DT90077
Example:
15 12 11 8 7 4 3 0
Bit position
iti
Process number 15 12 11 8 7 4 3 0
DT9060/DT90060
B - 116
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
Note
N/A
Lower 8 bits
DT9069
ing
DT9060
Writ -
ing
FP2/
FP2SH/
FP10SH
DT9059
(* Note)
Name
B.3
Address
FP3
DT90078
Description
Read -
Step ladder proIndicates the startup condition of the step ladder process.
cess (288 to 303)
Writ -
ing
FP2/
FP2SH/
FP10SH
DT9078
Name
ing
DT9079
DT90079
DT9080
DT90080
DT9081
DT90081
DT9082
DT90082
DT9083
DT90083
DT9084
DT90084
DT9085
DT90085
DT9086
DT90086
DT9087
DT90087
DT9088
DT90088
DT9089
DT90089
DT9090
DT90090
DT9091
DT90091
DT9092
DT90092
DT9093
DT90093
DT9094
DT90094
DT9095
DT90095
DT9096
DT90096
DT9097
DT90097
DT9098
DT90098
DT9099
DT90099
Example:
15 12 11 8 7 4 3 0
Bit position
Process number 335 332 331 328 327 324 323 320
DT9080/DT90080
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
B - 117
Address
FP3
DT90100
Description
Read -
DT9101
DT90101
DT9102
DT90102
DT9103
DT90103
DT9104
DT90104
DT9105
DT90105
DT9106
DT90106
DT9107
DT90107
DT9108
DT90108
DT9109
DT90109
DT9110
DT90110
DT9111
DT90111
DT9112
DT90112
DT9113
DT90113
DT9114
DT90114
DT9115
DT90115
DT9116
DT90116
DT9117
DT90117
DT9118
DT90118
DT9119
DT90119
DT9120
DT90120
DT9121
DT90121
DT9122
DT90122
B - 118
Example:
15 12 11 8 7 4 3 0
Bit position
Process number 655 652 651 648 647 644 643 640
DT9100/DT90100
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
Writ -
ing
FP2/
FP2SH/
FP10SH
DT9100
Name
ing
B.3
Address
Name
Description
Read -
DT9123
DT90123
Not used
DT9124
DT90124
DT90125
DT9126
(* Note)
DT90126
(* Note)
Forced on/off
operating station
display
This displays the unit number that has executed forced on/
off operation.
DT9127
(* Note)
DT90127
(* Note)
MEWNET-F
system remote
I/O service time
N/A
N/A
N/A
Not used
DT9125
N/A
N/A
FP2/
FP2SH/
FP10SH
ing
N/A
FP3
Writ -
ing
Not used
Lower 8 bits
For master 2
DT9128
(* Note)
Higher 8 bits
For master 1
DT90128
(* Note)
Higher 8 bits
For master 4
DT9129
DT90129
DT90130
Not used
DT9131
DT90131
For master 3
Not used
DT9130
Lower 8 bits
MEWNET-F
(remote I/O)
slave stations
abnormality
checking
(for selecting the
display contents
and master of
DT9132 to
DT9135/
DT90132 to
DT90135)
Note
Used by the system.
B - 119
Address
Name
FP3
DT90132
DT90133
Read -
The bit corresponding to the station number of the MEWNET-F where an error is occurring is set to on. Monitor using
binary display.
(1: Error slave station, 0: Normal slave station)
Bit position
Slave station no.
15
16
12 11
13 12
8 7
9 8
15
32
12 11
29 28
8 7
25 24
4 3
5 4
0
1
4 3
21 20
0
17
DT9132/DT90132
Bit position
Slave station no.
DT9133/DT90133
MEWNET-F (remote I/O) I/O
verify error slave
station number
(when DT9131/
DT90131 is
H100, H101,
H102 or H103)
15
16
12 11
13 12
8 7
9 8
15
32
12 11
29 28
8 7
25 24
4 3
5 4
0
1
4 3
21 20
0
17
DT9132/DT90132
Bit position
Slave station no.
DT9133/DT90133
DT9134
DT9135
DT90134
DT90135
15
16
12 11
13 12
8 7
9 8
15
32
12 11
29 28
8 7
25 24
4 3
5 4
0
1
4 3
21 20
0
17
DT9134/DT90134
Bit position
Slave station no.
DT9135/DT90135
MEWNET-F (remote I/O) momentary voltage drop
slave station number
(when DT9131/
DT90131 is
H100, H101,
H102 or H103)
12 11
13 12
8 7
9 8
15
32
12 11
29 28
8 7
25 24
4 3
5 4
0
1
4 3
21 20
0
17
DT9134/DT90134
Bit position
Slave station no.
DT9135/DT90135
B - 120
15
16
Writ -
ing
FP2/
FP2SH/
FP10SH
DT9132
DT9133
Description
ing
N/A
B.3
Address
FP3
DT90136
DT90137
Description
Read -
Error code of
MEWNET-F
(remote I/O) system
Writ -
ing
FP2/
FP2SH/
FP10SH
DT9136
DT9137
Name
ing
N/A
N/A
N/A
Lower 8 bits
For master 2
For master 1
Higher 8 bits
Lower 8 bits
For master 4
For master 3
DT9136/DT90136
DT9137/DT90137
DT9138
DT90138
Not used
DT9139
DT90139
Not used
B - 121
Address
FP3
DT90140
(*Note 1)
(*Note 1)
DT9141
DT90141
(*Note 1)
(*Note 1)
DT9142
DT90142
(*Note 1)
(*Note 1)
DT9143
DT90143
(*Note 1)
(*Note 1)
DT9144
DT90144
(*Note 1)
(*Note 1)
DT9145
DT90145
(*Note 1)
(*Note 1)
DT9146
DT90146
(*Note 1)
(*Note 1)
DT9147
DT90147
(*Note 1)
(*Note 1)
Description
MEWNET-W/-P
PC link status
[PC li k 0 (W/P)]
link
(*Note 2, 3)
Read -
Writ -
ing
FP2/
FP2SH/
FP10SH
DT9140
Name
ing
N/A
N/A
Notes
1) Used by the system.
2) When the system register 46 = K0, First: PC link 0, second: PC
link 1
When the system register 46 = K1, First: PC link 1, second: PC
link 0
3) For MEWNET - W system, available PLC type: FP2/FP2SH/FP3/
FP10SH
For MEWNET - P system, available PLC type: FP3/FP10SH
B - 122
B.3
Address
FP3
DT90148
(*Note 1)
(*Note 1)
DT9149
DT90149
(*Note 1)
(*Note 1)
DT9150
(*Note 1)
DT9151
DT90151
(*Note 1)
(*Note 1)
DT9152
DT90152
(*Note 1)
(*Note 1)
DT9153
DT90153
(*Note 1)
(*Note 1)
DT9154
DT90154
(*Note 1)
(*Note 1)
DT9155
DT90155
(*Note 1)
(*Note 1)
DT9156
DT90156
(*Note 1)
(*Note 1)
DT9157
DT90157
(*Note 1)
(*Note 1)
DT9158
DT90158
(*Note 1)
(*Note 1)
DT9159
DT90159
(*Note 1)
(*Note 1)
MEWNET-W/-P
PC link status
[PC link 1 (W/P)]
(*Note 2, 3)
Read -
Writ -
ing
DT90150
(*Note 1)
Description
FP2/
FP2SH/
FP10SH
DT9148
Name
ing
N/A
N/A
MEWNET-W/-P
C
PC link status
[PC link 0 (W/P)]
(*Note 2, 3)
MEWNET-W/-P
C
PC link status
[PC link 1 (W/P)]
(*Note 2, 3)
Notes
1) Used by the system.
2) When the system register 46 = K0, First: PC link 0, second: PC
link 1
When the system register 46 = K1, First: PC link 1, second: PC
link 0
3) For MEWNET - W system, available PLC type: FP2/FP2SH/FP3/
FP10SH
For MEWNET - P system, available PLC type: FP3/FP10SH
B - 123
Address
Name
Description
FP2/
FP2SH/
FP10SH
DT9160
DT90160
DT9161
DT90161
Error flag
[W/P link 1]
(*Note)
DT90162
DT90163
Error flag
[W/P link 2]
(*Note)
DT90164
DT9165
DT90165
Error flag
[W/P link 3]
(*Note)
DT9166
DT90166
DT9167
DT90167
Error flag
[W/P link 4]
Available PLC:
FP2SH, FP10SH
DT9168
DT90168
DT9169
DT90169
Error flag
[W/P link 5]
Available PLC:
FP2SH, FP10SH
N/A
DT9164
DT9163
ing
DT9162
Writ -
ing
FP3
Read -
Note
For MEWNET - W system, available PLC type: FP2/FP2SH/FP3/
FP10SH
For MEWNET - P system, available PLC type: FP3/FP10SH
B - 124
B.3
Address
Name
Description
Read -
FP3
FP2/
FP2SH/
FP10SH
DT9170
DT90170
DT9171
DT90171
DT9172
DT90172
DT90173
DT90174
DT90175
DT9176
DT90176
Send NACK
DT9177
DT90177
Send NACK
DT9178
DT90178
Send WACK
DT9179
DT90179
Send WACK
DT9180
DT90180
Send answer
DT9181
DT90181
Send answer
DT9182
DT90182
Unidentified command
DT9183
DT90183
DT9184
DT90184
DT9185
DT90185
Format error
DT9186
DT90186
DT9187
DT90187
Self-diagnostic result
DT9188
DT90188
DT9189
DT90189
DT9190
DT90190
DT9191
DT90191
DT9192
DT90192
DT9193
DT90193
DT9194
DT90194
DT9195
DT90195
N/A
DT9175
DT9174
ing
DT9173
Writ -
ing
MEWNET-W/-P
link status
[W/P li k 1]
link
(*Note)
(For FP2/FP2SH,
using W2 mode)
DT9196
DT90196
MEWNET - H link
status/link unit
number
(H link 2)
(For FP2/FP2SH,
using W2 mode)
Link status
of H link 1
Unit number
of H link 1
Link status
of H link 2
Unit number
of H link 2
Note
For MEWNET - W system, available PLC type: FP2/FP2SH/FP3/
FP10SH
For MEWNET - P system, available PLC type: FP3/FP10SH
B - 125
Address
FP3
DT90197
Description
Read -
MEWNET - H link
status/link unit
number
(H link 3)
(For FP2/FP2SH,
using W2 mode)
Higher 8 bits
N/A
N/A
N/A
Lower 8 bits
Link status
of H link 3
ing
N/A
Writ -
ing
FP2/
FP2SH/
FP10SH
DT9197
Name
Unit number
of H link 3
DT9197/DT90197
Not used
DT9198
DT90198
DT9199
DT90199
DT9200
DT90200
DT9201
DT90201
DT9202
DT90202
DT9203
DT90203
DT9204
DT90204
DT9205
DT90205
DT9206
DT90206
Send NACK
DT9207
DT90207
Send NACK
DT9208
DT90208
Send WACK
DT9209
DT90209
Send WACK
DT9210
DT90210
Send answer
DT9211
DT90211
Send answer
DT9212
DT90212
Unidentified command
DT9213
DT90213
DT9214
DT90214
DT9215
DT90215
Format error
DT9216
DT90216
DT9217
DT90217
Self-diagnostic result
DT9218
DT90218
DT9219
DT90219
DT9220
DT90220
DT9221
DT90221
DT9222
DT90222
Not used
MEWNET-W/-P
link status
[W/P link 2]
(* Note)
Note
For MEWNET - W system, available PLC type: FP2/FP2SH/FP3/
FP10SH
For MEWNET - P system, available PLC type: FP3/FP10SH
B - 126
B.3
Address
Name
Description
Read -
FP3
FP2/
FP2SH/
FP10SH
DT9223
DT90223
DT9224
DT90224
DT9225
DT90225
Not used
DT9226
DT90226
DT90227
DT90228
DT90229
DT9230
DT90230
DT9231
DT90231
DT9232
DT90232
DT90233
DT90234
DT90235
DT90236
Send NACK
DT9237
DT90237
Send NACK
DT9238
DT90238
Send WACK
DT9239
DT90239
Send WACK
DT9240
DT90240
Send answer
DT9241
DT90241
Send answer
DT9242
DT90242
Unidentified command
DT9243
DT90243
DT9244
DT90244
DT9245
DT90245
Format error
DT9246
DT90246
DT9247
DT90247
Self-diagnostic result
DT9248
DT90248
DT9249
DT90249
DT9250
DT90250
N/A
DT9236
DT9235
N/A
DT9234
N/A
DT9233
N/A
Not used
DT9229
Not used
DT9228
ing
Not used
DT9227
Writ -
ing
MEWNET-W/-P
link status
[W/P link 2]
(* Note)
Not used
MEWNET-W/-P
link status
[W/P link 3]
(* Note)
Note
For MEWNET - W system, available PLC type: FP2/FP2SH/FP3/
FP10SH
For MEWNET - P system, available PLC type: FP3/FP10SH
B - 127
Address
FP3
DT90251
Description
Read -
DT9252
DT90252
DT9253
DT90253
DT9254
MEWNET-W/-P
link status
[W/P link 3]
(* Note)
DT90254
Writ -
ing
FP2/
FP2SH/
FP10SH
DT9251
Name
ing
N/A
N/A
DT90255
Monitoring tool
port
station number
(Available PLC:
FP2SH/FP10SH)
Station number BCD (H1 to H32) set for tool port is stored
here.
DT90256
Monitoring COM
port
station number
(Available PLC:
FP2SH/FP10SH)
Station number BCD (H1 to H32) set for COM port is stored
here.
DT90257
Operation error
program number
(hold)
(Available PLC:
FP2SH/FP10SH)
DT90258
Operation error
program number
(non - hold)
(Available PLC:
FP2SH/FP10SH)
DT90259
The program block number where the BRK instruction occurred is stored here.
Program block number
- H1: In the first program block
- H2: In the 2nd program block
DT90260
Type of IC
memory card
(Available PLC:
FP2SH/FP10SH)
DT90261
Capacity of IC
memory card 1
(Available PLC:
FP2SH/FP10SH)
DT90262
Capacity of IC
memory card 2
(Available PLC:
FP2SH/FP10SH)
DT90263
Note
For MEWNET - W system, available PLC type: FP2/FP2SH/FP3/
FP10SH
For MEWNET - P system, available PLC type: FP3/FP10SH
B - 128
B.3
Address
FP3
Name
Description
Read -
FP2/
FP2SH/
FP10SH
Writ -
ing
ing
DT90264
N/A
DT90265
Free compile
memory
capacity
(Available PLC:
FP2SH/FP10SH)
Free capacity of compile memory is stored here. If the program memory is 120K steps, the capacity of 1st program
block is stored.
N/A
DT90266
Free compile
memory capacity
for program
block 2
(Available PLC:
FP2SH/FP10SH)
If the program memory is 120K steps, free capacity of program block 2 compile memory is stored here.
N/A
Not used
N/A
N/A
Not used
N/A
N/A
N/A
DT90267
DT90268
Index register
bank
(current value)
(Available PLC:
FP2SH/FP10SH)
DT90269
Index register
bank
(shelter number)
(Available PLC:
FP2SH/FP10SH)
DT90399
DT90400
Number of the
error alarm relay
which went on
(Available PLC:
FP2SH/FP10SH)
X1
( DF )
DT90401
R DT90400
X1
( DF )
E12
R
Second error
alarm relay
which went on
(Available PLC:
FP2SH/FP10SH)
DT90403
B - 129
Address
FP3
Name
Read -
FP2/
FP2SH/
FP10SH
Fourth error
alarm relay
which went on
(Available PLC:
FP2SH/FP10SH)
DT90405
DT90406
DT90407
Seventh error
alarm relay
which went on
(Available PLC:
FP2SH/FP10SH)
DT90408
Eighth error
alarm relay
which went on
(Available PLC:
FP2SH/FP10SH)
DT90409
DT90410
DT90411
Eleventh error
alarm relay
which went on
(Available PLC:
FP2SH/FP10SH)
DT90412
Twelfth error
alarm relay
which went on
(Available PLC:
FP2SH/FP10SH)
DT90413
Thirteenth error
alarm relay
which went on
(Available PLC:
FP2SH/FP10SH)
DT90414
Fourteenth error
alarm relay
which went on
(Available PLC:
FP2SH/FP10SH)
E12
R
Writ -
ing
DT90404
B - 130
Description
ing
N/A
B.3
Address
FP3
Name
Description
Read -
FP2/
FP2SH/
FP10SH
DT90415
Fifteenth error
alarm relay
which went on
(Available PLC:
FP2SH/FP10SH)
DT90416
Sixteenth error
alarm relay
which went on
(Available PLC:
FP2SH/FP10SH)
Writ -
ing
ing
N/A
Relay number
(E12) to rest
X1
( DF )
E12
R
DT90417
DT90418
Eighteenth error
alarm relay
which went on
(Available PLC:
FP2SH/FP10SH)
DT90419
Nineteenth error
alarm relay
which went on
(Available PLC:
FP2SH/FP10SH)
DT90420
Time at which
the first
error alarm relay
(DT90401) went
on (for minute
and second
data)
(Available PLC:
FP2SH/FP10SH)
The time (minute and second) data at which the first error
alarm relay in DT90401 went on is stored.
DT90421
Time at which
the first
error alarm relay
(DT90401) went
on (for day and
hour data)
(Available PLC:
FP2SH/FP10SH)
The time (day and hour) data at which the first error alarm
relay in DT90401 went on is stored.
DT90422
Time at which
the first error
alarm relay
(DT90401) went
on (for year and
month data)
(Available PLC:
FP2SH/FP10SH)
The time (year and month) data at which the first error alarm
relay in DT90401 went on is stored.
B - 131
B.4
Decimal
Hexa decimal
Binary data
BCD data
(Binary Coded
Decimal)
Gray code
0
1
2
3
4
5
6
7
0000
0001
0002
0003
0004
0005
0006
0007
8
9
10
11
12
13
14
15
0008
0009
000A
000B
000C
000D
000E
000F
16
17
18
19
20
21
22
23
0010
0011
0012
0013
0014
0015
0016
0017
24
25
26
27
28
29
30
31
0018
0019
001A
001B
001C
001D
001E
001F
63
003F
255
00FF
B - 132
B.5
B.5
ASCII Codes
ASCII Codes
b7
b6
b4
ASCII HEX
code
b3
b2
b1
b0
NUL DEL
SPA
CE
SOH DC1
STX DC2
ETX DC3
EOT DC4
ENQ NAK
ACK SYN
&
BEL ETB
BS
CAN
HT
EM
LF
SUB
VT
ESC
FF
FS
<
CR
GS
SO
RS
>
SI
US
DEL
Leas signi
ast
nificant digit
d
b5
b4
b6
b5
b7
B - 133
B - 134
Appendix 1
Table of Error codes
-Operation will not begin even after swirching to the RUN mode.
-Remote operation cannot be used to change to RUN mode.
Clearing a syntax check error
By changing to the PROG.mode,the error will clear and the ERROR will turn off.
Steps to take for syntax error
Change to the PROG. mode ,and then execute the total check function while online mode with the
programming tool connected. This will call up the content of error and the address where the error
occurred.
Correct the program while referring to the content of error.
E1-2
-Self-diagnostic Error
This error occurs when the control unit (CPU unit) self-diagnostic function detects the occurrence of an
abnormality in the system. The self-diagnostic function monitors the memory abnormal detection,I/O
abnomal detection,and other devices.
When a self-diagnostic error occurs
The ERROR turns on or flashes.
The operation of the control unit (CPU unit) might stop depending on the contect of error and the system
register setting.
The error codes will be stored in the special data register DT9000(DT90000).
In the case of operation error, the error address will stored in the DT9017(DT90017) and
DT9018(DT90018).
Clearing the self-diagnostic error
At the STATUS DISPLAY,execute the error clear.Error codes 43 and higher can be cleared.
-You can use the initialize/test switch to clear an error.However,this will also clear the contents of
operation memory.
-Errors can also be cleared by turning off and on the power while in the PROG.mode.
However,the contents of operation memory ,not stored with the hold type data,will also be cleared.
-The error can also be cleared depending on the self-diagnostic error set instruction F148(ERR).
Steps to take for self-diagnostic error
The steps to be taken will differ depending on the error contents. For more details,use the error code
obtained above and consult the table of aself-diagnostic error codes.
E1-3
Duplicated
output error
Stops
E3
Not paired
error
Stops
E4
Parameter
mismatch
error
Stops
Program
area error
Stops
(Note)
E5
(Note)
FP3
E2
FP10SH
Stops
FP2SH
Syntax error
FP2
E1
FP
Opera
-tion
status
FP-e
Name
FP0
Error
code
FP1/FP-M
A A A
A A A
A A A
A A A
A A A
A:Available
Note) This error is also detected if you attempt to execute a rewrite containing a syntax error during RUN.
In this case,nothing will be written to the CPU and operation will continue.
E1-4
FP10SH
E6
Compile
memory full
error
Stops
E7
High-level
instruction
type error
Stops
E8
High-level
instruction
operand
combination
error
Stops
A A A
E9
No
progra
error
Stops
E10
Continues
A A
FP2
Rewrite
during
RUN
syntax
error
FP3
FP2SH
FP1/FP-M
FP
Opera
-tion
status
FP-e
Name
FP0
Error
code
A:Available
E1-5
FP10SH
FP3
E20
CPU error
Stops
E21
E22
E23
E24
E25
RAM error1
RAM error2
RAM error3
RAM error4
RAM error5
Stops
A A A
FP-e
Name
FP
FP2SH
Opera
-tion
status
FP2
Error
code
FP1/FP-M
FP-e,FP0,FP,and FP1
C14,C16:Probably a hardware
abnormality.
Please contact your dealer.
E26
Users ROM
error
Stops
E27
Unit
installation
error
Stops
E28
System
register
error
Stops
E29
E30
E31
Configuratio
n parameter
error
Interrupt
error 0
Interrupt
error 1
FP2,FP2SH,FP10SH,and FP3:
There may be a problem with the
installed ROM.
-ROM is not installed.
-ROM contens are damaged.
-Program size stored on the ROM is
larger than the capacity of the ROM
Check the contents of the ROM
Units installed exceed the
limitations.(i.e.,4 or more link units)
Turn off the power and re-configure
units referring to the hardware manual..
Probably an abnormality in the system
register.
Check the system register setting or
initialize the system registers.
Stops
Stops
Stops
A
A
A A A
A:Available
E1-6
E33
Multi-CPU
data
unmatch
error
CPU2
Stops
FP3
Stops
FP10SH
Interrupt
error 2
FP2SH
E32
FP2
FP1/FP-M
FP
Opera
-tion
status
FP-e
Name
FP0
Error
code
A A A
E34
I/O status
error
Stops
E35
MEWNET-F
slave illegal
unit error
Stops
E36
MEWNET-F
(remore I/O)
limitation
error
Stops
E37
MEWNET-F
I/O mapping
error
Stops
E38
MEWNET-F
slave I/O
terminal
mapping
error
Stops
A A
A:Available
E1-7
Stops
E40
I/O error
Selectable
FP2
FP3
FP1/FP-M
FP10SH
IC card read
error
FP2SH
E39
FP
Opera
-tion
status
FP-e
Name
FP0
Error
code
A:Available
E1-8
I/O unit
verify error
Selectable
E43
System
watching
dog timer
error
Select
able
FP1/FP-M
FP3
E42
FP10SH
Selectable
FP2SH
Intelligent
unit error
FP2
E41
FP
Opera
-tion
status
FP-e
Name
FP0
Error
code
A:Available
E1-9
E46
Remote I/O
communiation error
Selectable
FP3
Selectable
FP10SH
Selectable
FP2SH
Operation
error
FP2
E45
FP1/FP-M
Selectable
A A A
A A
FP
E44
Slave staiton
connecting
time error for
MEW-NET-F
system
Name
FP0
Opera
-tion
status
Error
code
A:Available
E1-10
E50
Backup
battery
errror
Continues
E51
MEWNET-F
terminal
station error
Continues
E52
MEWNET-F
I/O update
synchronou
s error
Continues
E53
Multi-CPU
I/O
registration
error
(CPU2 only)
Continues
E54
Continues
IC memory
card backup battery
error
FP3
Selectable
FP10SH
MEWNET-F
attribute
error
FP2SH
E47
FP2
FP1/FP-M
FP
Opera
-tion
status
FP-e
Name
FP0
Error
code
A
Note)
A:Available
Note) Available PLC:FP1 C24,C40,C56,C76,and FP-M
E1-11
FP10SH
E56
Incompatible IC
memory
card error
Continues
E57
No unit for
the
configuratio
n
Continues
MEWNET-W2
The MEWNET-W2 link unit is not
installed in the slot specified using the
configuration data.
Either install a unit in the specified slot
or change the parameter.
E100
to
E199
E200
to
E299
Selfdiagnostic
error set by
F148
(ERR)/P148(
PERR)
instruction
Stop
Continues
A A A
FP3
FP2SH
FP2
FP1/FP-M
Continues
FP
E55
IC memory
card backup battery
error
FP-e
Name
FP0
Opera
-tion
status
Error
code
A A A
A:Available
E1-12
Error
code
!21
!22
!23
!24
!25
!26
!27
!28
!29
!30
!32
!33
!36
!38
!40
!41
!42
!43
!50
!51
!52
Name
NACK error
WACK error
Unit No. overlap
Transmission format
error
Link unit hardware
error
Unit No. setting error
No support error
No response error
Buffer closed error
Time-out error
Transmission
impossible error
Communication stop
No destination error
Other communication
error
BCC error
Format error
No support error
Multiple frames
procedure error
Link setting error
Transmission
time-out error
Transmit disable
error
!53
Busy error
!60
Parameter error
!61
Data error
!62
Registration over
error
!63
PC mode error
Description
E1-13
Error
code
Name
!64
External memory
error
!65
Protect error
!66
Address error
!67
No program error
and No data error
!68
!70
!71
E1-14
Description
Appendix 2
Table of Instructions
Table of Instructions
Name
Boolean Symbol
Description
Steps
(* 1)
ST
X,Y,R,T,C,L,P,E
Start Not
ST/
X,Y,R,T,C,L,P,E
Out
OT
Not
AND
AN
AND Not
AN/
OR
OR
OR Not
OR/
Leading
edge start
ST
Trailing edge ST
start
P2 - 2
1 (2)
1 (2)
X,Y,R,T,C,L,P,E
1 (2)
X,Y,R,T,C,L,P,E
1 (2)
1 (2)
1 (2)
Begins a logic operation only for one scan when the leading
edge of the trigger is detected.
Y,R,L,E
X,Y,R,T,C,L,P,E
X,Y,R,T,C,L,P,E
X,Y,R,T,C,L,P,E
X,Y,R,T,C,L,P,E
Begins a logic operation only for one scan when the trailing edge 2
of the trigger is detected.
Name
Availability
FP2SH
H
FP10S
SH
Start Not
Out
Not
AND
AND Not
OR
OR Not
Leading
edge start
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
Trailing edge
start
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
FP- e
FP
Start
FP0
FP2
FP - M
FP3
FP1
C32
Notes
A: Available, N/A: Not available
1) In the FP2/FP2SH/FP10SH, when using X1280, Y1280, R1120
(special internal relay included), L1280, T256, C256 or
anything beyond for the ST, ST/, OT, AN, AN/, OR and OR/
instructions, the number of steps is shown in parentheses.
Also, in the FP2/FP2SH/FP10SH, when a relay number has an
index modifier, the number of steps is shown in parentheses.
P2 - 3
Table of Instructions
Name
Boolean Symbol
Description
Leading
edge AND
AN
Trailing edge AN
AND
Leading
edge OR
X,Y,R,T,C,L,P,E
OR
X,Y,R,T,C,L,P,E
Trailing edge OR
OR
Leading
edge out
X,Y,R,T,C,L,P,E
OT
X,Y,R,T,C,L,P,E
Trailing edge OT
out
Steps
Outputs the operated result to the specified output only for one
scan when leading edge of the trigger is detected. (for pulse
relay)
Outputs the operated result to the specified output only for one
scan when trailing edge of the trigger is detected. (for pulse
relay)
Inverts the output condition (on/off) each time the leading edge of 3
the trigger is detected.
Alternative
out
ALT
AND stack
ANS
OR stack
ORS
Push stack
PSHS
Read stack
RDS
Pop stack
POPS
Leading
edge differential
DF
P2 - 4
Y,R,L,E
A
(DF )
Turns on the contact for only one scan when the leading edge of 1
the trigger is detected.
(DF/ )
Turns on the contact for only one scan when the trailing edge of 1
the trigger is detected.
Availability
Name
FP
FP- e
FP3
FP2
FP2SH
H
FP10S
SH
FP - M
FP0
FP1
Leading
edge AND
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
Trailing edge
AND
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
Leading
edge OR
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
Trailing edge
OR
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
Leading
edge out
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
Trailing edge
out
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
Alternative
out
N/A
N/A N/A
N/A
N/A N/A
N/A
N/A
AND stack
OR stack
Push stack
Read stack
Pop stack
Leading
edge differential
Trailing edge
differential
C32
Note
A: Available, N/A: Not available
P2 - 5
Table of Instructions
Name
Boolean Symbol
Description
Leading
edge differential (initial
execution
type)
DFI
Turns on the contact for only one scan when the leading edge of 1
the trigger is detected. The leading edge detection is possible on
the first scan.
Set
SET
Reset
RST
Keep
KP
(DFI )
Y,R,L,E
<S>
Y,R,L,E
<R>
Set
KP
Steps
(* 1)
Outputs at set trigger and holds until reset trigger turns on.
1 (2)
No operation.
Reset
No operation NOP
P2 - 6
Availability
Name
FP
FP- e
FP3
FP2
FP2SH
H
FP10S
SH
FP - M
FP0
FP1
N/A
N/A
N/A
N/A
N/A
N/A
N/A
Set
Reset
Keep
No operation
Leading
edge differential (initial
execution
type)
C32
Notes
A: Available, N/A: Not available
1) In the FP2/FP2SH/FP10SH, when using Y1280, R1120 (special
internal relay included), L1280 or anything beyond for the KP
instruction, the number of steps is shown in parentheses.
Also, in the FP2/FP2SH/FP10SH, when a relay number has an
index modifier, the number of steps is shown in parentheses.
P2 - 7
Table of Instructions
Name
Boolean Symbol
Description
Steps
(* 1)
3 (4)
3 (4)
TMX
3 (4)
TMY
On-delay
timer
4 (5)
TML
TMR
TMa
Auxiliary
timer
(16 - bit)
F137
(STMR)
Y,R,L,E
F137 STMR, S, D
Auxiliary
timer
(32 - bit)
F183
(DSTM)
Y,R,L,E
F183 DSTM, S, D
Counter
CT
3 (4)
Count
CT
n
Reset
UP/DOWN
counter
F118
(UDC)
UP/DOWN
F118 UDC
Count
S
Reset
D
Note
1) In the FP2/FP2SH/FP10SH, when timer 256 or higher, or
counter 255 or lower, is used, the number of steps is the
number in parentheses. Also, in the FP2/FP2SH/FP10SH, when
a timer number or counter number has an index modifier, the
number of steps is the number in parentheses.
P2 - 8
Availability
Name
FP2SH
H
FP10S
SH
N/A
N/A
N/A
N/A
N/A
N/A
On-delay
timer TMR
On-delay
timer TMX
On-delay
timer TMY
Auxiliary
timer
(16 - bit)
Auxiliary
timer
(32 - bit)
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
Counter
UP/DOWN
counter
FP- e
A
(* 1)
FP
On-delay
timer TML
FP0
FP2
FP - M
FP3
FP1
C32
Notes
A: Available, N/A: Not available
1) This instruction is available for FP0 C10, C14, C16, C32 CPU
Ver. 2.0 or later/FP0 T32C.
P2 - 9
Table of Instructions
Name
Boolean Symbol
Shift register SR
SR WR n
Shift
Steps
1 (2)
Data
Description
2 (3)
(* 1)
Reset
Left/right
shift register
F119
(LRSR)
L/R
F119 LRSR
Data
Shift
D1
D2
Reset
Control instructions
Master control relay
MC
(MC
n)
MCE
Jump
JP
(MCE n)
(JP
Label
LBL
Auxiliary
jump
F19
(SJP)
Label
LBL
P2 - 10
n)
(LBL
n)
(LBL
1
The program jumps to the label instruction specified by S
and continues from there.
F19 SJP S
n)
(* 2)
3
1
Availability
Name
FP
FP- e
FP3
FP2
FP2SH
H
FP10S
SH
FP - M
FP0
FP1
Shift register
Left/right
shift register
C32
Control instructions
Master control relay
Jump
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
Label
Auxiliary
jump
Label
Notes
A: Available, N/A: Not availble
1) In the FP2/FP2SH/FP10SH, when internal relay WR240 or
higher is used, the number of steps is the number in
parentheses. Also, in the FP2/FP2SH/FP10SH, when the
specified internal relay number (word address) has an index
modifier, the number of steps is the number in parentheses.
2) In the FP2/FP2SH/FP10SH, when the number n in a jump
instruction has an index modifier, the number of steps is the
number in parentheses.
P2 - 11
Table of Instructions
Name
Boolean Symbol
Loop
LOOP
Label
LBL
Break
BRK
End
Description
ED
(LBL
n)
Steps
4 (5)
LOOP n, S
(* 1)
1
Start the specified process n and clear the process currently started. (Scan execution type)
(NSTL n)
Start the specified process n and clear the process currently started. (Pulse execution type)
(NSTP n)
(BRK
(ED
Conditional
end
CNDE
Eject
EJECT
(CNDE )
(EJECT)
SSTP
(SSTP n)
Next step
NSTL
NSTP
Clear step
CSTP
(CSTP n)
SCLR
Step end
STPE
P2 - 12
SCLR n1, n2
(STPE
Availability
Name
FP
FP- e
FP3
FP2
FP2SH
H
FP10S
SH
FP - M
FP0
FP1
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
End
Conditional
end
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
Loop
C32
Label
Break
EJECT
Next step
N/A
N/A
N/A
N/A
N/A
N/A
N/A
NSTL
Next step
NSTP
Clear step
Step end
Notes
A: Available, N/A: Not available
1) In the FP2/FP2SH/FP10SH, when the number n in a loop
instruction has an index modifier, the number of steps is the
number in parentheses.
P2 - 13
Table of Instructions
Name
Boolean Symbol
Description
Steps
Subroutine instructions
Subroutine
call
CALL
Output off
type subroutine call
FCAL
Subroutine
entry
SUB
(CALL n)
(FCAL n)
n)
(RET
RET
(SUB
Subroutine
return
Interrupt instructions
Interrupt
INT
(INT
Interrupt
return
IRET
Interrupt
control
ICTL
P2 - 14
n)
(IRET
(DF)
ICTL S1, S2
Availability
Name
FP2SH
H
FP10S
SH
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
Subroutine
entry
Subroutine
return
FP- e
FP
FP0
FP2
FP - M
FP3
FP1
C32
Subroutine instructions
Subroutine
call
Output off
type subroutine call
Interrupt instructions
Interrupt
N/A
Interrupt
return
N/A
Interrupt
control
N/A
N/A
(* 2)
Notes
A: Available, N/A: Not available
1) In the FP2/FP2SH/FP10SH, when the number n of a
subroutine program has an index modifier, the number of
steps is the number in parentheses.
2) The ICTL instruction cannot be used with the FP - M C16T.
(Interrupt masking and clearing are not possible.)
The interrupt operation is possible using the interrupt setting
of the system register 403.
P2 - 15
Table of Instructions
Name
Boolean Symbol
Description
Steps
SYS1
Password
setting
Interrupt
setting
SYS1, M
PLC link
time setting
Set the system setting time when a PLC link is used, based
on the contents specified by the character constant.
MEWTOCOL
- COM
response
control
System
registers
No. 40 to
No. 47
changing
P2 - 16
Change the setting value of the system register for the PLC 7
link function.
SYS2
SYS2, S, D1, D2
Name
Availability
FP
FP- e
FP3
FP2
FP2SH
H
FP10S
SH
FP - M
FP0
FP1
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
Password
setting
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
Interrupt
setting
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
PLC link
time setting
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
MEWTOCOL
- COM
response
control
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
System
registers
No. 40 to
No. 47
changing
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
C32
P2 - 17
Table of Instructions
Name
Boolean Symbol
Description
Steps
ST=
=
S1, S2
ST<>
< >
S1, S2
ST>
>
S1, S2
> =
S1, S2
<
S1, S2
< =
S1, S2
ST>=
ST<
ST<=
P2 - 18
Availability
Name
FP2SH
H
FP10S
SH
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
FP- e
FP
FP0
FP2
FP - M
FP3
FP1
C32
Note
A: Available, N/A: Not available
P2 - 19
Table of Instructions
Name
Boolean Symbol
Description
Steps
16-bit data
compare
(AND)
AN=
S1, S2
AN<>
< > S1, S2
AN>
>
S1, S2
AN>=
> =
S1, S2
AN<
<
S1, S2
AN<=
< =
P2 - 20
S1, S2
Availability
Name
FP- e
FP3
FP2
FP2SH
H
FP10S
SH
16-bit data
compare
(AND)
FP
FP - M
FP0
FP1
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
C32
AN=
16-bit data
compare
(AND)
AN<>
16-bit data
compare
(AND)
AN>
16-bit data
compare
(AND)
AN>=
16-bit data
compare
(AND)
AN<
16-bit data
compare
(AND)
AN<=
Note
A: Available, N/A: Not available
P2 - 21
Table of Instructions
Name
Boolean Symbol
Description
Steps
16-bit data
compare
(OR)
OR=
S1, S2
OR<>
< > S1, S2
OR>
>
S1, S2
OR>=
> =
S1, S2
OR<
<
S1, S2
OR<=
< =
P2 - 22
S1, S2
Availability
Name
FP- e
FP3
FP2
FP2SH
H
FP10S
SH
16-bit data
compare
(OR)
FP
FP - M
FP0
FP1
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
C32
OR=
16-bit data
compare
(OR)
OR<>
16-bit data
compare
(OR)
OR>
16-bit data
compare
(OR)
OR>=
16-bit data
compare
(OR)
OR<
16-bit data
compare
(OR)
OR<=
Note
A: Available, N/A: Not available
P2 - 23
Table of Instructions
Name
Boolean Symbol
Description
Steps
32-bit data
compare
(Start)
STD=
D=
S1, S2
STD<>
D< >
S1, S2
STD>
D>
S1, S2
STD>=
D> =
S1, S2
STD<
D<
S1, S2
STD<=
D< =
P2 - 24
S1, S2
Availability
Name
FP- e
FP3
FP2
FP2SH
H
FP10S
SH
32-bit data
compare
(Start)
FP
FP - M
FP0
FP1
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
C32
STD=
32-bit data
compare
(Start)
STD<>
32-bit data
compare
(Start)
STD>
32-bit data
compare
(Start)
STD>=
32-bit data
compare
(Start)
STD<
32-bit data
compare
(Start)
STD<=
Note
A: Available, N/A: Not available
P2 - 25
Table of Instructions
Name
Boolean Symbol
Description
Steps
32-bit data
compare
(AND)
AND=
D=
S1, S2
AND<>
D< > S1, S2
AND>
D>
S1, S2
AND>=
D> =
S1, S2
AND<
D<
S1, S2
AND<=
D< =
P2 - 26
S1, S2
Availability
Name
FP- e
FP3
FP2
FP2SH
H
FP10S
SH
32-bit data
compare
(AND)
FP
FP - M
FP0
FP1
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
C32
AND=
32-bit data
compare
(AND)
AND<>
32-bit data
compare
(AND)
AND>
32-bit data
compare
(AND)
AND>=
32-bit data
compare
(AND)
AND<
32-bit data
compare
(AND)
AND<=
Note
A: Available, N/A: Not available
P2 - 27
Table of Instructions
Name
Boolean Symbol
Description
Steps
32-bit data
compare
(OR)
ORD=
D=
S1, S2
ORD<>
D< > S1, S2
ORD>
D>
S1, S2
ORD>=
D> =
S1, S2
ORD<
D<
S1, S2
ORD<=
D< =
P2 - 28
S1, S2
Availability
Name
FP- e
FP3
FP2
FP2SH
H
FP10S
SH
32-bit data
compare
(OR)
FP
FP - M
FP0
FP1
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
C32
ORD=
32-bit data
compare
(OR)
ORD<>
32-bit data
compare
(OR)
ORD>
32-bit data
compare
(OR)
ORD>=
32-bit data
compare
(OR)
ORD<
32-bit data
compare
(OR)
ORD<=
Note
A: Available, N/A: Not available
P2 - 29
Table of Instructions
Steps
(S) (D)
S, D
(S+1, S) (D+1, D)
S, D
(S) (D)
S, D
(S+1, S) (D+1, D)
Reading of
GETS
head word
PGETS
No. of the
specified slot
S, D
Bit data
move
S, n, D
Hexadecimal DGT
digit (4-bit)
PDGT
data move
S, n, D
Two 16-bit
data move
MV2
S1, S2, D
(S1) (D),
(S2) (D+1)
Two 32-bit
data move
DMV2
S1, S2, D
11
P8
F10
Block move
BKMV
S1, S2, D
F0
P0
F1
P1
F2
P2
F3
P3
F4
P4
F5
P5
F6
P6
F7
P7
F8
P10
P2 - 30
16-bit data
move
MV
32-bit data
move
DMV
16-bit data
invert and
move
MV/
32-bit data
invert and
move
DMV/
PMV
PDMV
PMV/
PDMV/
BTM
PBTM
PMV2
PDMV2
PBKMV
FP2SH
H
FP10S
SH
FP - M(*1)
FP2
FP1 (* 1)
FP3
FP- e (* 1)
FP (* 1)
*
FP0 (* 1)
*
Number Availability
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
A
(*2)
A
(*2)
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
C14
C24
C56
C16
C40
C72
C16
C20
C32
Notes
A: Available, N/A: Not available
1) For the FP0/FP/FP - e/FP1/FP - M, the P type high - level
instructions are not available.
2) The instruction is available for FP2/FP2SH CPU Ver. 1.4 or later.
P2 - 31
Table of Instructions
Num- Name
ber
F11
COPY
S1, S2, D
11
S1, S2, D
11
D1, D2
D1, D2
16-bit data
block
exchange
D1, D2,
D3
PBXCH
SJP
S, D
S, D
S1, S2, D
Block copy
P11
F12
P12
F12
F13
P13
PCOPY
ICRD
Data read
from IC card/ PICRD
ROM
ICRD
Data write to
IC card/ROM
P13
F14
P14
F15
P15
F16
P16
F17
P17
F18
P18
Steps
ICWT
PICWT
PICWT
Program
read from IC
memory
card
PGRD
16-bit data
exchange
XCH
32-bit data
exchange
DXCH
PPGRD
PXCH
PDXCH
BXCH
Control instruction
F19
Auxiliary
jump
P2 - 32
16-bit data
addition
32-bit data
addition
D+
16-bit data
addition
P+
PD+
P+
Number Availability
FP (* 1)
*
FP- e (* 1)
FP3
FP2
FP2SH
H
FP10S
SH
FP - M(*1)
FP0 (* 1)
*
FP1 (* 1)
N/A
N/A
N/A
N/A
N/A
N/A
N/A
F12
A(* 2)
F13
N/A
N/A
N/A
N/A
N/A
N/A
N/A
P13
A
(* 2)
F14
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
M/A
N/A
N/A
N/A
N/A
F11
C14
C24
C56
C16
C40
C16
C72
C20
C32
P11
F12
P12
P13
P14
F15
P15
F16
P16
F17
P17
F18
P18
Control instruction
F19
N/A
N/A
P20
F21
P21
F22
P22
Notes
A: Available, N/A: Not available
1) For the FP0/FP/FP - e/FP1/FP - M, the P type high - level
instructions except for P13 (PICWT) instruction are not
available.
2) This instruction is available for FP0 T32C and FP0
C10/C14/C16/C32 CPU Ver. 2.0 or later.
P2 - 33
Table of Instructions
Num- Name
ber
F23
D+
P23
F25
P25
F26
P26
F27
P27
F28
P28
F30
P30
F31
P31
F32
P32
F33
P33
F34
P34
F35
P35
F36
P36
P2 - 34
Steps
S1, S2, D
11
S, D
S, D
S1, S2, D
S1, S2, D
11
*
16-bit data
multiplication P*
S1, S2, D
32-bit data
D*
multiplication PD*
S1, S2, D
11
16-bit data
division
S1, S2, D
32-bit data
division
D%
S1, S2, D
11
16-bit data
*W
multiplication P*W
(result in 16
bits)
S1, S2, D
16-bit data
increment
+1
(D) + 1 (D)
32-bit data
increment
D+1
(D+1, D) + 1 (D+1, D)
32-bit data
addition
16-bit data
subtraction
32-bit data
subtraction
16-bit data
subtraction
32-bit data
subtraction
PD+
PDPD PDPD -
P%
PD%
P+1
PD+1
Number Availability
FP (* 1)
*
FP - e(* 1)
FP3
FP2
FP2SH
H
FP10S
SH
FP - M(*1)
FP0 (* 1)
*
FP1 (* 1)
F31
N/A
N/A
P31
F32
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
F23
C14
C24
C56
C16
C40
C16
C72
C20
C32
P23
F25
P25
F26
P26
F27
P27
F28
P28
F30
P30
P32
F33
P33
F34
P34
F35
P35
F36
P36
Notes
A: Available, N/A: Not available
1) For the FP0/FP/FP - e/FP1/FP - M, the P type high - level
instructions are not available.
P2 - 35
Table of Instructions
Num- Name
ber
F37
P37
F38
P38
F39
P39
16-bit data
decrement
32-bit data
decrement
-1
Steps
(D) - 1 (D)
(D+1, D) - 1 (D+1, D)
S1, S2, D
11
S, D
S, D
S1, S2, D
S1, S2, D
11
S, D
S, D
S1, S2, D
P-1
D-1
PD - 1
32-bit data
D*D
multiplication PD*D
(result in 32
bits)
P2 - 36
4-digit
BCD data
addition
B+
8-digit
BCD data
addition
DB+
4-digit
BCD data
addition
B+
8-digit
BCD data
addition
DB+
4-digit
BCD data
subtraction
B-
8-digit
BCD data
subtraction
DB -
4-digit
BCD data
subtraction
B-
PB+
PDB+
PB+
PDB+
PB -
PDB -
PB -
Number Availability
FP- e (* 1)
FP3
FP2
FP2SH
H
FP10S
SH
F37
FP (* 1)
*
FP - M(*1)
FP0 (* 1)
*
FP1 (* 1)
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
C14
C24
C56
C16
C40
C16
C72
C20
C32
P37
F38
P38
F39
P39
N/A
N/A
N/A
N/A
N/A
N/A
N/A
P40
F41
P41
F42
P42
F43
P43
F45
P45
F46
P46
F47
P47
Notes
A: Available, N/A: Not available
1) For the FP0/FP/FP - e/FP1/FP - M, the P type high - level
instructions are not available.
P2 - 37
Table of Instructions
Num- Name
ber
F48
DB -
P48
F50
P50
F51
P51
F52
P52
F53
P53
F55
P55
F56
P56
F57
P57
F58
P58
P2 - 38
Steps
S1, S2, D
11
4-digit
B*
BCD data
PB*
multiplication
S1, S2, D
8-digit
DB*
BCD data
PDB*
multiplication
S1, S2, D
11
4-digit BCD
B%
data division PB%
S1, S2, D
8-digit BCD
DB%
data division PDB%
S1, S2, D
4-digit
BCD data
increment
B+1
(D) + 1 (D)
8-digit
BCD data
increment
DB+1
(D+1, D) + 1 (D+1, D)
4-digit
BCD data
decrement
B-1
(D) - 1 (D)
8-digit
BCD data
decrement
DB - 1
(D+1, D) - 1 (D+1, D)
8-digit
BCD data
subtraction
PDB -
PB+1
PDB+1
PB - 1
PDB - 1
Number Availability
FP- e(* 1)
*
FP3
FP2
FP2SH
H
FP10S
SH
F48
FP (* 1)
*
FP - M(*1)
FP0 (* 1)
*
FP1 (* 1)
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
C14
C24
C56
C16
C40
C16
C72
C20
C32
P48
F50
P50
F51
P51
F52
P52
F53
P53
F55
P55
F56
P56
F57
P57
F58
P58
Notes
A: Available, N/A: Not available
1) For the FP0/FP/FP - e/FP1/FP - M, the P type high - level
instructions are not available.
P2 - 39
Table of Instructions
Num- Name
ber
Steps
16-bit data
compare
CMP
32-bit data
compare
DCMP
S1, S2
PCMP
F61
P61
S1, S2
PDCMP
F62
P62
F63
P63
F64
P64
16-bit data
band
compare
WIN
32-bit data
band
compare
DWIN
Block data
compare
BCMP
PWIN
S1, S2,
S3
PDWIN
S1, S2,
S3
13
PBCMP
S1, S2,
S3
S1, S2, D
S1, S2, D
S1, S2, D
S1, S2, D
16-bit data
AND
WAN
16-bit data
OR
WOR
16-bit data
exclusive
OR
XOR
16-bit data
exclusive
NOR
XNR
16-bit data
unite
WUNI
PWAN
PWOR
PXOR
PXNR
PWUNI
S1, S2,
S3, D
P2 - 40
FP2SH
H
FP10S
SH
FP - M(*1)
FP2
FP1 (* 1)
FP3
FP- e (* 1)
FP (* 1)
*
FP0 (* 1)
*
Number Availability
N/A
N/A
C14
C24
C56
C16
C40
C16
C72
C20
C32
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
P65
F66
P66
F67
P67
F68
P68
F69
P69
Notes
A: Available, N/A: Not available
1) For the FP0/FP/FP - e/FP1/FP - M, the P type high - level
instructions are not available.
P2 - 41
Table of Instructions
Num- Name
ber
Steps
F72
P72
F73
P73
F74
P74
F75
P75
F76
P76
F77
P77
P2 - 42
S1, S2,
S3, D
Hexadecimal HEXA
data
PHEXA
ASCII code
S1, S2, D
ASCII code
Hexadecimal data
AHEX
S1, S2, D
4-digit BCD
data
ASCII code
BCDA
ASCII code
4-digit
BCD data
ABCD
16-bit binary
data
ASCII code
BINA
ASCII code
16-bit
binary data
ABIN
32-bit binary
data
ASCII code
DBIA
Block
check code
calculation
BCC
PBCC
Example: HABCD H 42 41 44 43
B A D C
PAHEX
Example: H 44 43 42 41 HCDAB
D C B A
S1, S2, D
PBCDA
Example: H1234 H 32 31 34 33
2 1 4 3
S1, S2, D
PABCD
Example: H 34 33 32 31 H3412
4 3 2 1
S1, S2, D
PBINA
Example: K - 100 H 30 30 31 2D 20 20
0 0 1 S1, S2, D
PABIN
PDBIA
Example: H 30 30 31 2D 20 20 K - 100
0 0 1 S1, S2, D
11
FP2SH
H
FP10S
SH
FP - M(*1)
FP2
FP1 (* 1)
FP3
FP- e (* 1)
FP (* 1)
*
FP0 (* 1)
*
Number Availability
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
C14
C24
C56
C16
C40
C16
C72
C20
C32
F72
P72
F73
P73
F74
P74
F75
P75
F76
P76
F77
P77
Notes
A: Available, N/A: Not available
1) For the FP0/FP/FP - e/FP1/FP - M, the P type high - level
instructions are not available.
P2 - 43
Table of Instructions
Num- Name
ber
F78
ASCII code
32-bit
binary data
DABI
16-bit binary
data
4-digit BCD
data
BCD
4-digit BCD
data
16-bit binary
data
BIN
32-bit binary
data
8-digit BCD
data
DBCD
P78
F80
P80
F81
P81
F82
P82
F83
P83
F84
P84
F85
P85
F86
P86
F87
P87
P2 - 44
Steps
S1, S2, D
11
S, D
PDABI
PBCD
PBIN
8-digit BCD
DBIN
data 32-bit PDBIN
binary data
S, D
16-bit data
INV
invert (com- PINV
plement of 1)
16-bit data
complement
of 2
NEG
32-bit data
complement
of 2
DNEG
16-bit data
absolute
ABS
PDBCD
PNEG
PDNEG
PABS
Number Availability
FP- e (* 1)
FP3
FP2
FP2SH
H
FP10S
SH
F78
FP (* 1)
*
FP - M(*1)
FP0 (* 1)
*
FP1 (* 1)
N/A
N/A
C14
C24
C56
C16
C40
C16
C72
C20
C32
P78
F80
P80
F81
P81
F82
P82
F83
P83
F84
P84
F85
P85
F86
P86
F87
P87
Notes
A: Available, N/A: Not available
1) For the FP0/FP/FP - e/FP1/FP - M, the P type high - level
instructions are not available.
P2 - 45
Table of Instructions
Num- Name
ber
F88
32-bit data
absolute
DABS
16-bit data
sign
extension
EXT
P89
F90
Decode
DECO
P88
F89
P90
F91
7-segment
decode
SEGT
F92
Encode
ENCO
P93
F94
P94
F95
P95
F96
P96
F97
P97
S, n, D
S, D
S, n, D
S, n, D
S, n, D
Each of the digits of the data of S are stored in (distributed to) the least significant digits of the areas beginning at
D.
S, D
15
S1, S2,
S3
S1, S2,
S3
11
D1, D2,
D3
PEXT
P91
F93
PDABS
PDECO
P92
Steps
PSEGT
PENCO
16-bit data
combine
UNIT
16-bit data
distribute
DIST
Character
ASCII code
ASC
16-bit table
data search
SRC
32-bit table
data search
DSRC
PUNIT
PDIST
PASC
PSRC
PDSRC
P2 - 46
Data table
shift-out and
compress
CMPR
PCMPR
Number Availability
FP- e (* 1)
FP3
FP2
FP2SH
H
FP10S
SH
F88
FP (* 1)
*
FP - M(*1)
FP0 (* 1)
*
FP1 (* 1)
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
C14
C24
C56
C16
C40
C16
C72
C20
C32
P88
F89
P89
F90
P90
F91
P91
F92
P92
F93
P93
F94
P94
F95
P95
F96
P96
F97
P97
N/A
P98
Notes
A: Available, N/A: Not available
1) For the FP0/FP/FP - e/FP1/FP - M, the P type high - level
instructions are not available.
P2 - 47
Table of Instructions
Num- Name
ber
F99
CMPW
P99
F100
P100
F101
P101
F102
P102
F103
P103
F105
P105
F106
P106
F108
P108
F109
P109
F110
P110
F111
P111
F112
P112
P2 - 48
Steps
S, D1, D2
D, n
Left shift of
multiple bits
(n bits) in a
16-bit data
D, n
D, n
Left shift of
n bits in a
32-bit data
D, n
Left shift of
one hexadecimal digit
(4-bit)
D1, D2, n
Left shift of
multiple bits
(n bits)
D1, D2, n
D1, D2
Left shift of
one word
(16-bit)
D1, D2
D1, D2
Data table
shift-in and
compress
PCMPW
SHL
PSHL
DSHL
PDSHL
BSL
PBSL
BITL
PBITL
WSHL
PWSHL
Number Availability
FP- e (* 1)
C16
C40
C72
FP3
FP2
FP2SH
H
FP10S
SH
F99
FP (* 1)
*
FP - M(*1)
FP0 (* 1)
*
FP1 (* 1)
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
C14
C24
C56
C16
C20
C32
P99
F100
P100
F101
P101
F102
P102
F103
P103
F105
P105
F106
P106
F108
P108
F109
P109
F110
P110
F111
P111
F112
P112
Notes
A: Available, N/A: Not available
1) For the FP0/FP/FP - e/FP1/FP - M, the P type high - level
instructions are not available.
P2 - 49
Table of Instructions
Num- Name
ber
F113
WBSL
P113
Left shift of
one hexadecimal digit
(4-bit)
Steps
D1, D2
n, D
S, D
S, D
PWBSL
FIFO instructions
F115
P115
F116
P116
F117
P117
FIFO buffer
define
FIFT
Data read
from FIFO
buffer
FIFR
Data write
into FIFO
buffer
FIFW
PFIFT
PFIFR
PFIFW
UP/DOWN
counter
UDC
S, D
F119
Left/right
shift register
LRSR
D1, D2
Shifts one bit to the left or right with the area between D1
and D2 as the register.
D, n
D, n
D, n
D, n
F123
P123
P2 - 50
16-bit data
right rotate
ROR
16-bit data
left rotate
ROL
16-bit data
right rotate
with carry
flag (R9009)
data
RCR
16-bit data
left rotate
with carry
flag (R9009)
data
RCL
PROR
PROL
PRCR
PRCL
Number Availability
FP- e (* 1)
FP3
FP2
FP2SH
H
FP10S
SH
F113
FP (* 1)
*
FP - M(*1)
FP0 (* 1)
*
FP1 (* 1)
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
C14
C24
C56
C16
C40
C16
C72
C20
C32
P113
FIFO instructions
F115
P115
F116
P116
F117
P117
F119
P120
F121
P121
F122
P122
F123
P123
Notes
A: Available, N/A: Not available
1) For the FP0/FP/FP - e/FP1/FP - M, the P type high - level
instructions are not available.
P2 - 51
Table of Instructions
Num- Name
ber
F125
32-bit data
right rotate
DROR
32-bit data
left rotate
DROL
32-bit data
right rotate
with carry
flag (R9009)
data
DRCR
32-bit data
left rotate
with carry
flag (R9009)
data
DRCL
P125
F126
P126
F127
P127
F128
P128
Steps
D, n
D, n
D, n
D, n
D, n
D, n
D, n
D, n
Test the value of bit position n of the data of D and output the result to R900B.
S, D
S, D
PDROR
PDROL
PDRCR
PDRCL
P2 - 52
16-bit data
bit set
BTS
16-bit data
bit reset
BTR
16-bit data
bit invert
BTI
16-bit data
bit test
BTT
Number of
on (1) bits in
16-bit data
BCU
Number of
on (1) bits in
32-bit data
DBCU
PBTS
PBTR
PBTI
PBTT
PBCU
PDBCU
Number Availability
FP- e (* 1)
C16
C40
C72
FP3
FP2
FP2SH
H
FP10S
SH
F125
FP (* 1)
*
FP - M(*1)
FP0 (* 1)
*
FP1 (* 1)
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
C14
C24
C56
C16
C20
C32
P125
F126
P126
F127
P127
F128
P128
P130
F131
P131
F132
P132
F133
P133
F135
P135
F136
P136
Notes
A: Available, N/A: Not available
1) For the FP0/FP/FP - e/FP1/FP - M, the P type high - level
instructions are not available.
P2 - 53
Table of Instructions
Num- Name
ber
Steps
STMR
S, D
HMSS
S, D
Seconds
data to
hours, minutes and
seconds
data
SHMS
S, D
PSHMS
Carry flag
(R9009) set
STC
Carry flag
(R9009)
reset
CLC
Auxiliary
timer
(16 - bit)
Special instructions
F138
P138
F139
P139
F140
P140
F141
P141
P2 - 54
PHMSS
PSTC
PCLC
C14
C24
C56
C16
C40
C72
FP2SH
H
FP10S
SH
FP - M(*1)
FP2
FP1 (* 1)
FP3
FP- e (* 1)
FP (* 1)
*
FP0 (* 1)
*
Number Availability
N/A
N/A
N/A
C16
C20
C32
Special instructions
A
(* 2)
N/A
N/A
A
(* 2)
N/A
N/A
P139
F140
N/A
N/A
N/A
N/A
F138
P138
F139
P140
F141
P141
Notes
A: Available, N/A: Not available
1) For the FP0/FP/FP - e/FP1/FP - M, the P type high - level
instructions are not available.
2) On the FP0 it is only possible to use F138 and F139 with the
T32 type.
P2 - 55
Table of Instructions
Num- Name
ber
F142
Watching
dog timer
update
WDT
Partial I/O
update
IORF
F144
Serial data
communication control
F145
Data send
P142
F143
P143
D1, D2
TRNS
S, n
SEND
S1, S2,
D, N
S1, S2,
N, D
PRECV
P145
F146
Steps
PWDT
PIORF
PSEND
Data receive
P146
RECV
F147
Printout
PR
S, D
F148
Selfdiagnostic
error set
ERR
n
(n: K100
to K299)
P148
P2 - 56
PERR
Number Availability
FP (* 1)
*
FP- e (* 1)
C16
C40
C72
FP3
FP2
FP2SH
H
FP10S
SH
FP - M(*1)
FP0 (* 1)
*
FP1 (* 1)
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
F144
N/A
N/A
A
(* 2)
A
(* 2)
N/A
A
(* 2)
N/A
F145
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
F147
N/A
N/A
F148
N/A
N/A
F142
C14
C24
C56
C16
C20
C32
P142
F143
P143
P145
F146
P146
P148
Notes
A: Available, N/A: Not available
1) For the FP0/FP/FP - e/FP1/FP - M, the P type high - level
instructions are not available.
2) Available for: - FP1 C24C, C40C, C56C, and C72C
- FP - M C20RC, C20TC, C32TC
P2 - 57
Table of Instructions
Num- Name
ber
F149
Message
display
MSG
Data read
from intelligent unit
READ
Data write
into intelligent unit
WRT
Data read
from
MEWNET-F
slave station
RMRD
Data write
into
MEWNET-F
slave station
RMWT
Steps
13
S1, S2, n,
D
S1, S2, n,
D
S1, S2, n,
D
S1, S2, n,
D
PRMWT
MCAL
P154
Machine
language
program call
F155
Sampling
SMPL
S1, S2, D
The time after (S2+1, S2) elapses from the time of (S1+2,
S1+1, S1) is stored in (D+2, D+1, D).
S1, S2, D
The time that results from subtracting (S2+1, S2) from the
time (S1+2, S1+1, S1) is stored in (D+2, D+1, D).
S, n, D
This is used to send data to or receive data from an external device through the specified CPU COM port or MCU
COM port.
S, D1, D2
P149
F150
P150
F151
P151
F152
P152
F153
P153
F154
P155
F156
PMSG
PREAD
PWRT
PRMRD
PMCAL
PSMPL
P156
Sampling
trigger
F157
P157
F158
P158
F159
P159
F161
P161
P2 - 58
STRG
PSTRG
PCADD
Time
substruction
CSUB
Serial data
communication
MTRN
Serial data
reception
(for MCU
COM port)
MRCV
PCSUB
PMTRN
PMRCV
Number Availability
FP- e (* 1)
FP3
FP2
FP2SH
H
FP10S
SH
F149
FP (* 1)
*
FP - M(*1)
FP0 (* 1)
*
FP1 (* 1)
N/A
N/A
N/A
A
(* 2)
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
C14
C24
C56
C16
C40
C16
C72
C20
C32
P149
F150
P150
F151
N/A
(* 2)
P151
N/A
N/A
N/A
N/A
N/A
N/A
NA
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
A
(* 3)
N/A
N/A
P158
A
(* 3)
F159
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
A
(*4)
A
(*4)
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
A
(*4)
A
(*4)
N/A
F152
P152
F153
P153
F154
P154
F155
P155
F156
P156
F157
P157
F158
P159
F161
P161
Notes
A: Available, N/A: Not available
1) For the FP0/FP/FP - e/FP1/FP - M, the P type high - level
instructions are not available.
2) The instruction is available for FP CPU Ver. 2.0 or later.
3) On the FP0 it is only possible to use F157 and F158 with the
T32 type.
4) The instruction is available for FP2/FP2SH CPU Ver. 1.4 or later.
P2 - 59
Table of Instructions
Num- Name
ber
Steps
Double word
(32-bit) data
square root
DSQR
S, D
(S) (D)
PDSQR
High - speed
counter and
Pulse output
controls
MV
S,
DT9052
F1
Change and
read of the
elapsed value
of high - speed
counter and
Pulse output
DMV
F162
High - speed
counter output set
HC0S
S, Yn
F163
High - speed
counter output reset
HC0R
S, Yn
F164
Speed control
(Pulse output
and pattern
output controls) (See
below.)
SPD0
F165
Cam control
CAM0
Controls cam operation (on/off patterns of each cam output) according to the elapsed value of the high - speed
counter.
FP1 C24/C40
FP1 C56/C72
FP - M C20T/C20R/C32T
Y7
Y7
Y6 and Y7 (selectable)
Pulse frequency
Internal connection
between pulse output
and counter input
Not possible
Not possible
Possible
Switching of the pulse frequency range is supported by CPU Ver. 2.7 or later.
In versions prior to CPU Ver. 2.7, the range is fixed at 360Hz to 5kHz.
In Ver. 2.7 or later but prior to CPU Ver. 2.9, switching is possible among 4 ranges
(360Hz to 5kHz/180Hz to 5kHz/90Hz to 5kHz/45Hz to 5kHz).
In CPU Ver. 2.9 and later versions, switching is possible among 6 ranges.
P2 - 60
Number Availability
C56
C16
C40
N/A
N/A
N/A
N/A
C72
N/A
FP10S
SH
C24
FP2SH
H
C14
FP2
FP - M
FP3
FP- e
FP
FP0
FP1
C16
C20
C32
N/A
N/A
P160
N/A
N/A
N/A
N/A
N/A
F1
A
(* 1)
N/A
N/A
N/A
N/A
N/A
F162
N/A
N/A
N/A
N/A
N/A
N/A
N/A
F163
N/A
N/A
N/A
N/A
N/A
N/A
N/A
F164
N/A
N/A
N/A
N/A
N/A
N/A
N/A
F165
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
Notes
A: Available, N/A: Not available
1) The elapsed value area varies depending on the channel being
used.
P2 - 61
Table of Instructions
Num- Name
ber
Steps
n, S, Yn
11
F167
n, S, Yn
11
F168
Positioning
control
(with channel specification)
S, n
F169
S, n
Outputs a pulse from the specified output (Y0 or Y1) according to the contents of the data table beginning at S.
F170
S, n
P2 - 62
SPD1
Number Availability
FP2SH
H
FP10S
SH
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
F167
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
F168
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
F169
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
F170
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
FP- e
FP
F166
FP0
FP2
FP - M
FP3
FP1
C14
C24
C56
C16
C40
C16
C72
C20
C32
Note
A: Available, N/A: Not available
The elapsed value area varies depending on the channel being
used.
P2 - 63
Table of Instructions
Num- Name
ber
Boolean
Operand Description
Steps
High - speed
counter and
Pulse output
controls
MV
S,
DT90052
F1
Change and
read of the
elapsed value
of high - speed
counter and
Pulse output
DMV
S,
DT90044
DT90044,
D
F166
Target value
much on
(with channel specification)
HC1S
n, S, D
11
F167
Target value
much off
(with channel specification)
HC1R
n, S, D
11
F171
Pulse output
(with channel specification)
SPDH
S, n
F172
S, n
Pulse strings are output from the specified output, in accordance with the contents of the data table that starts with S.
F173
PWM output
(with channel specification)
PWMH
S, n
PWM output is output from the specified output, in accordance with the contents of the data table that starts with S.
F174
Pulse output
(with channel specification)
(Selectable
data table
control operation)
SP0H
S, n
F175
S, n
F176
Pulse output
(Circular interpolation)
S, n
(Trapezoidal
control and
home return)
P2 - 64
SPCH
Number Availability
FP2SH
H
FP10S
SH
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
F1
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
F166
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
F167
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
F171
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
F172
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
F173
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
F174
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
F175
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
F176
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
FP- e
N/A
FP
F0
FP0
FP2
FP - M
FP3
FP1
C14
C24
C56
C16
C40
C16
C72
C20
C32
P2 - 65
Table of Instructions
Num- Name
ber
Steps
FP - e screen
display
registration
SCR
S1, S2,
S3, S4
F181
FP - e screen
display
switching
DSP
S, D
S1, S2,
S3, D
S1, S2,
S3, D
S1, S2, D
12
S1, S2, D
12
S1, S2, D
12
S1, S2, D
12
S1, S2,
S3, D
16
S, D
S, D
Auxiliary
timer (32-bit)
DSTM
Three 16-bit
data move
MV3
Three 32-bit
data move
DMV3
PMV3
PDMV3
10
32-bit data
AND
DAND
32-bit data
OR
DOR
32-bit data
XOR
DXOR
32-bit data
XNR
DXNR
Double word
(32-bit) data
unites
DUNI
PDAND
PDOR
PDXOR
PDXNR
PDUNI
P2 - 66
Time data
second conversion
TMSEC
Second
time data
conversion
SECTM
PTMSEC
PSECTM
FP2SH
H
FP10S
SH
FP - M
FP2
FP1
FP3
FP- e (* 1)
FP (* 1)
*
FP0 (* 1)
*
Number Availability
F180
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
F181
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
C14
C24
C56
C16
C40
C16
C72
C20
C32
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
P190
F191
P191
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
P215
F216
P216
F217
P217
F218
P218
F219
P219
N/A
N/ A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
A
(*2)
A
(*2)
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
A
(*2)
A
(*2)
N/A
P230
F231
P231
Notes
A: Available, N/A: Not available
1) For the FP0, FP and FP - e, the P type high - level instructions
are not available.
2) The instruction is available for FP2/FP2SH CPU Ver. 1.4 or later.
P2 - 67
Table of Instructions
Num- Name
ber
F235
P235
F236
P236
F237
P237
F238
P238
F240
P240
F241
P241
Steps
S, D
S, D
16 - bit gray
code
binary data
conversion
GBIN
S, D
32 - bit gray
code
binary data
conversion
DGBIN
S, D
COLM
S, n, D
Bit column
to bit line
conversion
LINE
S, n, D
PGBIN
PDGBIN
PCOLM
PLINE
P2 - 68
Comparing
character
strings
SCMP
S1, S2
10
Character
string coupling
SADD
S1, S2, D
12
Number of
LEN
characters in
a character
string
S, D
Search for
character
string
SSRC
S1, S2, D
10
Retrieving
data from
character
strings
(right side)
RIGHT
S1, S2, D
These instructions retrieve a specified number of characters from the right side of the character string.
Number Availability
FP- e
C14
C16
C40
C72
FP3
FP2
FP2SH
H
FP10S
SH
F235
FP (* 1)
*
FP - M
FP0
FP1
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
C24
C56
C16
C20
C32
P235
F236
P236
F237
P237
F238
P238
F240
P240
F241
P241
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
P257
F258
P258
F259
P259
F260
P260
F261
P261
Notes
A: Available, N/A: Not available
1) For the FP, the P type high - level instructions are not
available.
P2 - 69
Table of Instructions
Num- Name
ber
F262
Retrieving
data from
character
strings (left
side)
LEFT
S1, S2, D
These instructions retrieve a specified number of characters from the left side of the character string.
Retrieving a
character
string from a
character
string
MIDR
S1, S2,
S3, D
10
Writing a
character
string to a
character
string
MIDW
S1, S2,
D, n
12
Replacing
character
strings
SREP
S, D, p, n
12
P262
F263
P263
F264
P264
F265
P265
Steps
F272
P272
F273
P273
F275
P275
F276
P276
P2 - 70
Maximum
value (word
data (16-bit))
MAX
Maximum
value
(double
word data
(32-bit))
DMAX
Minimum
value (word
data (16-bit))
MIN
Minimum
value
(double
word data
(32-bit))
DMIN
Total and
mean values
(word data
(16-bit))
MEAN
Total and
mean values
(double
word data
(32-bit))
DMEAN
S1, S2, D
Searches the maximum value in the word data table between the S1 and S2, and stores it in the D. The address relative to S1 is stored in D+1.
S1, S2, D
S1, S2, D
S1, S2, D
Searches for the minimum value in the double word data table 8
between the area selected with S1 and S2, and stores it in
the D. The address relative to S1 is stored in D+2.
S1, S2, D
The total value and the mean value of the word data with
sign from the area selected with S1 to the S2 are obtained and stored in the D.
S1, S2, D
The total value and the mean value of the double word
data with sign from the area selected with S1 to S2 are
obtained and stored in the D.
PMAX
PDMAX
PMIN
PDMIN
PMEAN
PDMEAN
Number Availability
C14
C16
C40
C72
FP2
FP2SH
H
FP10S
SH
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
C24
C56
C16
C20
C32
FP3
FP- e
F262
FP (* 1)
*
FP - M
FP0
FP1
P262
F263
P263
F264
P264
F265
P265
N/A
F271
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
(*2)
P275
F276
N/A
(*2)
P273
F275
N/A
(*2)
P272
F273
N/A
(*2)
P271
F272
A
(*2)
P270
N/A
A
(*2)
P276
Notes
A: Available, N/A: Not available
1) For the FP, the P type high - level instructions are not
available.
2) Available from Ver.1.2 or higher.
P2 - 71
Table of Instructions
Num- Name
ber
F277
Sort (word
data (16-bit))
SORT
Sort (double
word data
(32-bit))
DSORT
Scaling of
16 - bit data
SCAL
Scaling of
32 - bit data
DSCAL
P277
F278
P278
F282
P282
F283
P283
PSORT
PDSORT
PSCAL
PDSCAL
Steps
S1, S2,
S3
S1, S2,
S3
The double word data with sign from the area specified by
S1 to S2 are sorted in ascending order (the smallest
word is first) or descending order (the largest word is first).
S1, S2,
D
The output value Y is found for the input value X by performing scaling for the given data table.
S1, S2,
D
The output value Y is found for the input value X by performing scaling for the given data table.
10
F287
P287
F288
P288
Upper and
lower limit
control
(16-bit data)
LIMT
Upper and
lower limit
control
(32-bit data)
DLIMT
Deadband
control
(16-bit data)
BAND
Deadband
control
(32-bit data)
DBAND
PLIMT
S1, S2,
S3, D
10
PDLIMT
S1, S2,
S3, D
16
PBAND
S1, S2,
S3, D
10
PDBAND
S1, S2,
S3, D
When (S1+1, S1) > (S3+1, S3), (S3+1, S3) - (S1+1, S1) 16
(D+1, D)
When (S2+1, S2) < (S3+1, S3), (S3+1, S3) - (S2+1, S2)
(D+1, D)
When (S1+1, S1) < or = (S3+1, S3) < or = (S2+1, S2),
0 (D+1, D)
F289
P289
Zone control
(16-bit data)
ZONE
PZONE
S1, S2,
S3, D
When S3 < 0, S3 + S1 D
10
When S3 = 0, 0 D
When S3 > 0, S3 + S2 D
F290
P290
Zone control
(32-bit data)
DZONE
PDZONE
S1, S2,
S3, D
P2 - 72
16
Number Availability
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
C32
A
(*2)
P282
F283
C72
N/A
C20
(*2)
P278
F282
C40
C16
(*2)
P277
F278
C16
FP10S
SH
C56
FP2SH
H
FP- e
N/A
C24
FP2
FP (* 1)
*
F277
C14
FP - M
FP3
FP0
FP1
N/A
N/A
P283
N/A
F286
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
(*2)
P289
F290
N/A
(*2)
P288
F289
N/A
(*2)
P287
F288
N/A
(*2)
P286
F287
A
(*2)
P285
N/A
A
(*2)
P290
Notes
A: Available, N/A: Not available
1) For the FP, the P type high - level instructions are not available.
Table of Instructions
Num- Name
ber
Steps
P2 - 74
BCD type
sine
operation
BSIN
BCD type
cosine
operation
BCOS
BCD type
tangent
operation
BTAN
BCD type
arcsine
operation
BASIN
BCD type
arccosine
operation
BACOS
BCD type
arctangent
operation
BATAN
S, D
S, D
S, D
S, D
S, D
S, D
PBSIN
PBCOS
PBTAN
PBASIN
PBACOS
PBATAN
Number Availability
FP2SH
H
FP10S
SH
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
FP- e
N/A
FP
N/A
FP0
FP2
FP - M
FP3
FP1
C14
C24
C56
C16
C40
C16
C72
C20
C32
Note
P2 - 75
Table of Instructions
Num- Name
ber
Steps
P2 - 76
S, D
(S+1, S) (D+1, D)
S1, S2, D
14
S1, S2, D
14
FloatingF*
point type
PF*
data
multiplication
S1, S2, D
14
FloatingF%
point type
PF%
data division
S1, S2, D
14
Floatingpoint type
data sine
operation
SIN
S, D
10
Floatingpoint type
data cosine
operation
COS
S, D
10
Floatingpoint type
data tangent
operation
TAN
S, D
10
Floatingpoint type
data arcsine
operation
ASIN
S, D
10
Floatingpoint type
data
arccosine
operation
ACOS
S, D
10
Floatingpoint type
data move
FMV
Floatingpoint type
data
addition
F+
Floatingpoint type
data
subtraction
F-
PFMV
PF+
PF -
PSIN
PCOS
PTAN
PASIN
PACOS
FP2SH
H
FP10S
SH
FP - M
FP2
FP1
FP3
FP- e (* 1)
FP (* 1)
*
FP0 (* 1)
*
Number Availability
A
(* 2)
N/A
N/A
N/A
N/A
N/A
N/A
A
(* 2)
N/A
N/A
N/A
N/A
N/A
N/A
A
(* 2)
N/A
N/A
N/A
N/A
N/A
N/A
A
(* 2)
N/A
N/A
N/A
N/A
N/A
N/A
A
(* 2)
N/A
N/A
N/A
N/A
N/A
N/A
A
(* 2)
N/A
N/A
N/A
N/A
N/A
N/A
A
(* 2)
N/A
N/A
N/A
N/A
N/A
N/A
A
(* 2)
N/A
N/A
N/A
N/A
N/A
N/A
A
(* 2)
N/A
N/A
N/A
N/A
N/A
N/A
A
(* 2)
N/A
N/A
N/A
N/A
N/A
N/A
C14
C24
C56
C16
C40
C16
C72
C20
C32
Notes
A: Available, N/A: Not available
1) For the FP0, FP and FP - e, the P type high - level instructions
are not available.
2) The instruction is available for FP0 T32C and FP0 C10/C14/
C16/C32 CPU Ver. 2.0 or later.
P2 - 77
Table of Instructions
Num- Name
ber
F319
Floatingpoint type
data
arctangent
operation
ATAN
Floatingpoint type
data natural
logarithm
LN
Floatingpoint type
data
exponent
EXP
Floatingpoint type
data
logarithm
LOG
Floatingpoint type
data power
PWR
Floatingpoint type
data square
root
FSQR
FLT
DFLT
P319
F320
P320
F321
P321
F322
P322
F323
P323
F324
P324
F325
P325
F326
P326
P2 - 78
Steps
S, D
10
S, D
LN (S+1, S) (D+1, D)
10
S, D
10
S, D
10
S1, S2, D
14
PATAN
PLN
PEXP
PLOG
PPWR
S, D
PFSQR
10
S, D
S, D
PFLT
PDFLT
(S+1, S) (D+1, D)
FP0 (* 1)
*
P321
F322
P322
F323
P323
F324
P324
F325
P325
F326
P326
C72
FP10S
SH
F321
C40
FP2SH
H
P320
C16
FP2
F320
FP1
FP3
P319
FP- e (* 1)
F319
FP (* 1)
*
Number Availability
FP - M
A
(* 2)
N/A
N/A
N/A
N/A
N/A
N/A
A
(* 2)
N/A
N/A
N/A
N/A
N/A
N/A
A
(* 2)
N/A
N/A
N/A
N/A
N/A
N/A
A
(* 2)
N/A
N/A
N/A
N/A
N/A
N/A
A
(* 2)
N/A
N/A
N/A
N/A
N/A
N/A
A
(* 2)
N/A
N/A
N/A
N/A
N/A
N/A
A
(* 2)
N/A
N/A
N/A
N/A
N/A
N/A
A
(* 2)
N/A
N/A
N/A
N/A
N/A
N/A
C14
C24
C56
C16
C20
C32
Notes
A: Available, N/A: Not available
1) For the FP0, FP and FP - e, the P type high - level instructions
are not available.
2) The instruction is available for FP0 T32C and FP0 C10/C14/
C16/C32 CPU Ver. 2.0 or later.
P2 - 79
Table of Instructions
Num- Name
ber
F327
P327
F328
P328
F329
P329
F330
P330
P2 - 80
Steps
FloatingINT
point type
PINT
data to 16-bit
integer conversion (the
largest integer not exceeding the
floatingpoint type
data)
S, D
FloatingDINT
point type
PDINT
data to 32-bit
integer conversion (the
largest integer not exceeding the
floatingpoint type
data)
S, D
FloatingFIX
point type
PFIX
data to 16-bit
integer conversion
(rounding
the first
decimal
point down
to integer)
S, D
FloatingDFIX
point type
PDFIX
data to 32-bit
integer conversion
(rounding
the first
decimal
point down
to integer)
S, D
FP0 (* 1)
*
FP (* 1)
*
FP- e (* 1)
FP1
C16
C40
C72
FP3
FP2
FP2SH
H
FP10S
SH
Number Availability
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
F327
P327
P328
P329
C24
C56
C16
C20
C32
(* 2)
F329
C14
(* 2)
F328
FP - M
(* 2)
F330
P330
(* 2)
Notes
A: Available, N/A: Not available
1) For the FP0, FP and FP - e, the P type high - level instructions
are not available.
2) The instruction is available for FP0 T32C and FP0
C10/C14/C16/ C32 CPU Ver. 2.0 or later.
P2 - 81
Table of Instructions
Num- Name
ber
F331
P331
F332
P332
F333
P333
F334
P334
F335
P335
F336
P336
F337
P337
P2 - 82
Steps
FloatingROFF
point type
PROFF
data to 16-bit
integer conversion
(rounding
the first
decimal
point off to
integer)
S, D
FloatingDROFF
point type
PDROFF
data to 32-bit
integer conversion
(rounding
the first
decimal
point off to
integer)
S, D
Floatingpoint type
data rounding the first
decimal
point down
FINT
S, D
Floatingpoint type
data rounding the first
decimal
point off
FRINT
S, D
Floatingpoint type
data sign
changes
F+/ -
S, D
Floatingpoint type
data absolute
FABS
S, D
Floatingpoint type
data degree
radian
RAD
S, D
PFINT
PFRINT
PF+/ -
PFABS
PRAD
FP0 (* 1)
*
FP (* 1)
*
FP- e (* 1)
FP1
C16
C40
C72
FP3
FP2
FP2SH
H
FP10S
SH
Number Availability
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
F331
P331
FP - M
C14
C24
C56
C16
C20
C32
(* 2)
F332
P332
(* 2)
F333
P333
(* 2)
F334
P334
(* 2)
F335
P335
(* 2)
F336
P336
(* 2)
F337
P337
(* 2)
Notes
A: Available, N/A: Not available
1) For the FP0, FP and FP - e, the P type high - level instructions
are not available.
2) The instruction is available for FP0 T32C and FP0
C10/C14/C16/ C32 CPU Ver. 2.0 or later.
P2 - 83
Table of Instructions
Num- Name
ber
F338
DEG
P338
Floatingpoint type
data radian
degree
S, D
PDEG
Steps
F347
P347
F348
P348
Floatingpoint type
data
compare
FCMP
Floatingpoint type
data band
compare
FWIN
Floatingpoint type
data upper
and lower
limit control
FLIMT
Floatingpoint type
data deadband control
FBAND
S1, S2
PFCMP
10
PFWIN
S1, S2,
S3
S1, S2,
S3, D
14
PFLIMT
17
PFBAND
S1, S2,
S3, D
17
F349
P349
F350
P350
P2 - 84
Floatingpoint type
data zone
control
FZONE
Floatingpoint type
data maximum value
FMAX
PFZONE
S1, S2,
S3, D
17
PFMAX
S1, S2, D
N/A
P338
(* 2)
C24
C56
C16
C40
C72
N/A
N/A
C16
C20
C32
N/A
N/A
FP10S
SH
C14
FP2SH
H
FP- e (* 1)
F338
FP - M
FP2
FP (* 1)
*
FP1
FP3
FP0 (* 1)
*
Number Availability
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
P345
F346
P346
F347
P347
F348
P348
F349
P349
F350
P350
Notes
A: Available, N/A: Not available
1) For the FP0, FP and FP - e, the P type high - level instructions
are not available.
2) The instruction is available for FP0 T32C and FP0
C10/C14/C16/ C32 CPU Ver. 2.0 or later.
P2 - 85
Table of Instructions
Num- Name
ber
F351
Floatingpoint type
data minimum value
FMIN
Floatingpoint type
data total
and mean
values
FMEAN
Floatingpoint type
data sort
FSORT
Scaling of
real number
data
P351
F352
P352
F353
P353
F354
P354
Steps
S1, S2, D
S1, S2, D
The total value and the mean value of the real number data
from the area selected with S1 to S2 are obtained. The
total value is stored in the (D+1, D) and the mean value is
stored in the (D+3, D+2).
S1, S2,
S3
PFSORT
FSCAL
S1, S2, D
Scaling (linearization) on a real number data table is performed, and the output (Y) to an input value (X) is calculated.
12
S, D
S, D
PFMIN
PFMEAN
PFSCAL
Compare instructions
F373
P373
F374
P374
P2 - 86
16-bit data
revision
detection
DTR
32-bit data
revision
detection
DDTR
PDTR
PDDTR
Number Availability
FP- e
C14
C16
C40
C72
FP3
FP2
FP2SH
H
FP10S
SH
F351
FP
FP - M
FP0
FP1
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
C24
C56
C16
C20
C32
P351
F352
P352
F353
P353
F354
(* 3)
P354
(* 3)
N/A
N/A
N/A
N/A
N/A
N/A
(* 1)
Compare instructions
F373
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
P373
F374
P374
Notes
A: Available, N/A: Not available
1) For the FP0, FP and FP - e, the P type high - level instructions
are not available.
2) For the FP0, the instruction is available for the T32C and C10,
C14, C16, C32 CPU Ver. 2.0 or later.
3) The instruction is available for FP2/FP2SH CPU Ver. 1.4 or later.
P2 - 87
Table of Instructions
Num- Name
ber
Steps
F412
P412
Setting the
index register bank
number
SETB
Changing
the index
register
bank number
CHGB
Restoring
the index
register
bank number
POPB
PSETB
PCHGB
PPOPB
P2 - 88
Setting the
file register
bank
number
SBFL
PSBFL
Changing
CBFL
the file regis- PCBFL
ter bank
number
Restoring
PBFL
the file regis- PPBFL
ter bank
number
Number Availability
FP2SH
H
FP10S
SH
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
FP- e
N/A
FP
N/A
FP0
FP2
FP - M
FP3
FP1
C14
C24
C56
C16
C40
C16
C72
C20
C32
F412
P412
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
P414
F415
P415
F416
P416
Note
A: Available, N/A: Not available
P2 - 89
Table of Instructions
P2 - 90
Index
Index
A
Absolute, 5 - 19
B
Basic function instruction, 2 - 4
Basic instructions, 2 - 3, 2 - 7, B - 142
Baud rate, 5 - 38
BCD data, 4 - 25, B - 230
Boolean, 3 - 3
C
Carry flag, B - 52
Changing program modes, 5 - 46
Character constants (M), 1 - 78
Clock pulse relay, B - 53
Constants, 1 - 2, 1 - 70
Control instruction, 2 - 4
Control mode, 5 - 19
Counters (C), 1 - 18, 1 - 33
G
General - purpose serial communications
function, 5 - 34
General - use serial communications,
5 - 34, 5 - 39
H
Hexadecimal constants (H), 1 - 71
High - level instruction number, 3 - 3
D
Data compare instructions, 2 - 5
Data reception, 5 - 35
Data register (DT), 1 - 42
Data transmission, 5 - 34
Decimal constants (K), 1 - 70
Decremental input mode, 5 - 9
Destination, 3 - 3
Directional distinction mode, 5 - 10
Double pulse input driver, 5 - 21
I
Incremental, 5 - 19
Down mode, 6 - 6
Duplicated output, 4 - 8
I-1
Index
Incremental input mode, 5 - 9
Operand, 3 - 3
Index modification, 1 - 60
Operation errors, 4 - 15
Overflow, 1 - 82
Index registers, 4 - 19
Index registers (I0 to ID), 1 - 59, 1 - 60
Index registers (IX, IY), 1 - 56
Input mode, 6 - 5
Input modes, 5 - 9
Instruction used with PWM output function, 5 - 33
Instructions used with high - speed counter
function, 5 - 12
P
P type high - level instruction, 3 - 4, 3 - 6
Points to check in program, 4 - 18
Precautions when using a control instruction, 4 - 13
Pulse output control, 6 - 14, 6 - 21
Pulse output function, 5 - 3, 5 - 18
J
JOG operation, 5 - 19
R
Real number, 1 - 72
Reception buffer, 5 - 38
L
Leading edge detection method, 4 - 10
Link data registers (LD), 1 - 48, 1 - 50
Link relays (L), 1 - 26, 1 - 28
M
Memory areas, 1 - 2, 1 - 42
Relay numbers, 1 - 18
Relays, 1 - 2
Rewrite function during RUN, 5 - 42
Rewriting a value in the set value area,
4-5
RS232C transmission format, 5 - 36
S
Self - diagnostic error flag, B - 52
Separate input mode, 5 - 10
number, 3 - 3
I-2
Index
16 - bit data, 1 - 79
Slot numbers, 7 - 3
Source, 3 - 3
Special data registers, B - 73, B - 81,
B - 95, B - 109
Special data registers (DT), 1 - 44
Special internal relays, 1 - 25, B - 52,
B - 55, B - 62
Start codes (STX), 5 - 37
Steps, 2 - 6
Syntax check error, B - 134
System register settings, B - 4
System registers, B - 2, B - 8, B - 18,
B - 22, B - 27, B - 37, B - 46
T
Terminal codes (EXT), 5 - 37
32 - bit data, 1 - 79
Timer, 1 - 32
Timers (T), 1 - 18
2 - phase input mode, 5 - 10
2 - phase mode, 6 - 5
U
Underflow, 1 - 82
Up mode, 6 - 6
Up/down mode, 6 - 6
I-3
Index
I-4
Record of changes
Record of changes
Manual No.
Date
Description of Changes
ARCT1F313E/
ACG - M313E
MAR. 2000
First edition
ARCT1F313E - 1/
ACG - M313E - 1
MAY. 2000
2nd edition
ARCT1F313E - 2/
ACG - M313E - 2
SEPT. 2000
3rd edition
ARCT1F313E - 3/
ACG - M313E - 3
JUNE. 2003
4th edition
Additions
- FPSIGMA
- FP - e
ARCT1F313E - 4/
ACG - M313E - 4
JUL. 2003
5th edition
ARCT1F313E - 5/
ACG - M313E - 5
JUL. 2004
6th edition
Addition & New programming
ICTL, F4, F159, F161, F230, F231, F354
ARCT1F313E - 6/
ACG - M313E - 6
AUG. 2004
ARCT1F313E - 7/
ACG - M313E - 7
OCT. 2004
R-1
Printed in Japan.