Yaskawa CP-9200SH Programming Manual

Page 1
'ÿi
MACHINE
CONTROLLER
PROGRAMMING
»i£
Wm
m
s:
-
<
mmm
CP-9200SH
MANUAL
1
'1
min
£
B
nit
i
msmsmm
r
YASKAWA
MANUAL
SIE-C879-40.3B
NO.
Page 2
Introduction
Programming
This
essential
this
In
Listed
also.
manual,
below
preparing
for
are
Manual
"CP-717"
other
documents
the
refers
provides
software
Control
to
relevanttothe
descriptions
the
for
Machine
Pack
the
on
Controller
CP-717,
which
CP-9200SH.
programming
CP-9200SH.
of
is
one
Please
refer
language
peripheral
the
to
these
which
is
devices.
materials
Relevant
Document
Documents
No.
SIE-C873-16.4
SIE-C877-17.4 SIE-C877-17.5
TOE-C877-17.7
CHE-C879-40
KAE-C879-40 SIE-879-40.1
SIE-879-40.2
System
FDS Control
Control
Control
Pack Pack
Pack
CP-9200SH
CP-9200SH
Machine
Machine
Controller
Controller
Installation
CP-717 CP-717
CP-717
Brochure
Catalog
CP-9200SH
CP-9200SH
NameofDocument
Manual
Operation Operation
Instructions
Manual Manual
User's
Servo
(Vol.l) (Vol.2)
Manual
Controller
User’s
Manual
1
Page 3
TABLE

CONTENTS

OF
1
INTRODUCTION
Programming
1.1
2
HIERARCHICAL
Types
2.1
Execution
2.2
2.2.1
2.2.2
2.3
Hierarchical
2.3.1
2.3.2
Functions
2.4
2.4.1
2.4.2
3
REGISTER
Register
3.1
3.2
Data
Types
3.3
3.3.1
3.3.2
3.3.3
3.3.4
3.3.5
3.3.6
Symbol
3.4
3.4.1
3.4.2
Upward
3.5
3.5.1
3.5.2
4
BASIC
4.1
4.2
INSTRUCTIONS
Instruction
Program
4.2.1
4.2.2
4.2.3
4.2.4
4.2.5
4.2.6
4.2.7
4.2.8
4.2.9
Direct
4.3
4.3.1
4.3.2
PROGRAMMING
TO.
Languages
STRUCTURE
and
Priority
Control
Execution
Scheduling
LevelsofParent
of
Control
of
Structure
Drawings
Execution Execution
of of
Process
2-6
Function User
Definition
Function
MANAGEMENT
Designation
Types
of
DWG
Function
CPU
Subscripts
(1) (2) (3)
(4)
(5)
Function
Programs
Symbol
Symbol
Upward
Automatic
Child
FOR
WHILE IF
(1)
(2)
Function
Function
Function
Comment
Expansion
I/O
3-3
Registers
Registers
Registers
Internal
and
i
When When
When
When
Example
Subscript
a
Subscript
a
a
Subscript
Subscript
a
I/O
and
Management
Management
Management
Linking
of
Linking
Register
]
[
with
Control
Instructions
Drawing
Structure
Structure
Structure
Structure
IF
Structure
IF
Referencing
Input
Output
Instruction
Program,
Instructions
Continuous
Continuous
of
and
Symbols
Statement
Execution
Execution
1-2
OF
Parent
the
Drawings
of
Parent
Execution
Drawings
of
Drawings
of
2-6
Preparation
METHOD
Method
3-5
3-5
3-6
Registers
j
3-7
is is is
is
Program
Function
Register
Referencing
3-10
in in
and
Symbols
of
Number
4-3
Referencing
Statement
Statement
Statement Statement
Instruction
Instruction
Instruction
(COMMENT)
Execution
4-17
THE
DRAWING
Drawings
Drawings
of
Scan
2-4
Procedure
3-2
3-6
Attached
Attached
Attached
Attached
Using
Registers
the
DWG's
the
Functions
Automatic
3-11
Allocation
"ÿ
.
4-4
Instruction
4-5
4-6
4-8
1
-
2
-
(FIN)
(FOUT)
Instruction
Type
Direct
Type
Direct
2-3
Process
2-4
2-5
to
Bit
Integer
to
Double-Length
to
Real
to
Subscript
a
3-8
Ranges
3-10
Number
4-8
4-9
(FSTART)
4-11
4-14
Input
Output
SYSTEM
2-2
2-3
Drawings
2-7
Type
Number
3-10
3-11
(SEE)
4-12
(XCALL)
Instruction
Instruction
.
Data
Type
Data
Type
3-7
3-9
Allocation
,
4-4
4-10
AND
PROGRAMS
2-3
3-7
3-7
Integer
Data
4-16
(INS)
(OUTS)
Type
3-11
3-7
'
4-17
Data
4-19
=
1-1
2-1
3-1
3-7
4-1
2
Page 4
TABLE
OF
CONTENTS
4.4
4.5
4.6
4.7
4.8
4.9
Sequence
4.4.1
4.4.2
4.4.3
4.4.4
4.4.5
4.4.6
4.4.7
4.4.8
4.4.9
4.4.10
Logical
4.5.1
4.5.2
4.5.3
NO
NC
Coil Set
Rising
Falling
On-delay
Off-delay
On-delay
Off-delay
Operation
AND
OR XOR
Numerical
4.6.1
4.6.2
4.6.3
4.6.4
4.6.5
4.6.6
4.6.7
4.6.8
4.6.9
4.6.10
4.6.11
4.6.12
4.6.13
4.6.14
4.6.15
4.6.16
Integer
Real
Storage
Addition
Subtraction
Extended
Extended
Multiplication
Division
MOD
REM
INC
DEC
Time Time Time
Numerical
4.7.1
4.7.2
4.7.3
4.7.4
4.7.5
4.7.6
4.7.7
4.7.8
4.7.9
Number
4.8.1
4.8.2
Data
4.9.1
4.9.2
4.9.3
4.9.4
4.9.5
4.9.6
4.9.7
4.9.8
4.9.9
4.9.10
4.9.11
4.9.12
INV
COM
ABS
BIN
BCD
PARITY
ASCII BINASC
ASCBIN
Comparison
Range
Operation
ROTL
MOVB
MOVW
XCHG SETW
BEXTD
BPRESS BSRCH
SORT
SHFTL
COPYW
BSWAP
Circuit
Instructions
Contact
Contact
Instruction
/
Reset
Coil
Pulse
Pulse
Timer
Timer
Timer
Timer
Instructions
Instruction
Instruction
Instruction
Operation
Type
Number
Instruction
Instruction
Addition
Subtraction
Instruction
Instruction
Instruction
Instruction
Instruction
Add
Instruction
Subtraction
Spend
Conversion
Instruction
Instruction
Instruction
Instruction
Instruction
Instruction
Instruction
Instruction
Instruction
Comparison
Check
Instructions
Instruction
Instruction
Instruction
Instruction
Instruction
Instruction
Instruction
Instruction
Instruction
Instruction
Instruction
Instruction
Instruction
Instruction
Instruction
Coil
Instruction
Instruction
Instruction:
Instruction:
Instruction:
Instruction:
4-34
4-35
4-35
Instructions
Entry
Instruction
Entry
Type
(
(
Instruction
Instruction
Instruction
4-45
4-45
4-46
4-47
Instruction
Instruction
Instructions
4-52
4-53
4-53
4-54
4-54
4-55
Instructions
Instructions
Instruction
and
4-63
4-66 4-67
4-71
and
4-20
(
—I!—
(
\A
o
(
(
~f~
(
f—
Unit
Unit
Unit Unit
4-34
4-36
Instruction
)
=>
4-38
)
+
(
Instruction
(
v-
(
(TMADD)
)
(TMSUB)
(SPEND)
4-52
4-55
4-56
4-57
4-58
4-58
(RCHK)
4-62
ROTR
4-65
Instruction
4-68
4-69
4-70
SHFTR
4-73
4-74
)
4-20
)
4-21
4-21
i)
[S}H,
(
)
4-23
)
4-24
of
measurement=0.01
of
measurement=0.01
of
measurements
of
measurements
h
++
(
)
4-48
)
(
)
--
4-43
4-41
4-39
)
4-40
(
X
4-44
(
4-50
4-60
Instruction
-JRH)
4-36
)
||-
)
4-42
4-49
4-62
4-72
4-22
seconds
seconds
seconds seconds
4-37
(-P
(i (f
H
Y)
T-
}
s}
)
)
)
4-25
4-27
4-29
4-31
3
Page 5
4.10
4.11
4.12
Basic
4.10.1
4.10.2
4.10.3
4.10.4
4.10.5
4.10.6
4.10.7
4.10.8
4.10.9
4.10.10
Instructions
DDC
4.11.1
4.11.2
4.11.3
4.11.4
4.11.5
4.11.6
4.11.7
4.11.8
4.11.9
4.11.10
4.11.11
4.11.12
4.11.13
Table
4.12.1
4.12.2
4.12.3
4.12.4
4.12.5
4.12.6
4.12.7
4.12.8
4.12.9
Function
SQRT
SIN
COS
TAN
ASIN
ACOS
ATAN.
EXP LN
Instruction
LOG
DZA
DZB
LIMIT
PI
Instruction
Instruction
PD
Instruction
PID
LAG
LLAG FGN
IFGN
LAU
SLAU
PWM
Operation
Data
Block
Block
Row
Column
Block Inter
Cue
Cue
Pointer
Cue
Instructions
Instruction
Instruction
Instruction
Instruction
Instruction
Instruction
Instruction
Instruction
Instruction
4-81
Instruction Instruction
Instruction
Instruction
Instruction
Instruction
Instruction
Instruction
Instruction
Instruction
Read
Instruction
Instruction
Write
Search
Instruction:
Search
Clear
Instruction
Block
Table
Table
Read
Table
Write
Clear
4-75
4-75
4-76
4-77
4-78
'4-78
4-78 4-79
4-80
4-80
4-80
.
4-81
4-82
4-84
4-86
4-88
.4-90
4-93
4-94
4-96
4-98
4-100
4-103
4-107
Instructions
Instruction:
Transfer
Instruction
Instruction
Instruction
4-108
(TBLBR)
(TBLBW)
Vertical
Horizontal
(TBLCL)
Instruction
(QTBLR,
(QTBLW,
(QTBLCL)
4-108
4-109
Direction
Direction
4-112
(TBLMV)
QTBLRI)
QTBLWI)
(TBLSRL)
(TBLSRC)
4-114
4-116
4-110
4-111
4-113
4-115
SFC
5
PROGRAMMING
Configuration
5.1
Execution
5.2
System
SFC
5.3
5.4
5.5
5.6
5.7
5.8
5.9
Flowchart
SFC
Action
SFC
Output
SFC
Step
Name
Taking
Precautions
5.9.1
5.9.2
5.9.3
5.9.4
5.9.5
of
of
SFC
Operation
Box
Definition
Designation
System
Out
upon
Restrictions Restriction
Converging
Restriction
Restrictions
(1)
Restrictions
(2)
Restrictions
(3)
Restrictions
(4)
Restrictions
Restrictions
Program
SFC
an
5-2
Registers
5-4
5-5
Time
Method
Step
Nos.
Preparation
concerning
concerning
Connections
the
of
concerning
concerning
5-3
Chart
5-7
5-7
of
an
Branching
Branching
in
Number
Subroutines
concerning
concerning concerning
concerning
Step
5-2
5-6
SFC
Program
and
and
a
Multi-Token
of
Branches
Nesting
Jumping Branching
the
Timer
Names
5-8
Converging
Structure
a
in
Multi-Token
5-13
(Depth
of
5-15
5-16
Transition
5-18
.
Connections
Macro)
Condition
5-11
Structure
5-14
5-9
5-12
Instruction
5-1
5-17
4
Page 6
TABLE
CONTENTS
OF
6
TABLE
Types
6.1
Execution
6.2
6.3
Constant
6.3.1
6.3.2
6.4
Constant
6.4.1
6.4.2
I/O
6.5
6.5.1
6.5.2
Interlock
6.6
6.6.1
6.6.2
Part
6.7
6.7.1
6.7.2
6.7.3
Constant
6.8
6.8.1
6.8.2
FORMAT
of
Table
of
Table
Outline
Preparing
(1)
Defining
(2)
Inputs
Table
Outline
Preparing
(1)
Defining
(2)
Inputs
Conversion
Outline
Preparing
(1)
Scale
(2)
Bit
Table
Outline
Preparing
Composition
Outline
Preparing
Preparing
Table
Outline
Preparing
(1)
Defining
(2)
Inputs
PROGRAMMING
Format
Register)
the
Constant
the
Constant
the
into
the
Register)
the
Constant
the
Constant
the
the
into
the
I/O
the
I/O
Conversion
6-12
the
Interlock
the
Interlock
Table
the
Part
the
Part
the
Function
Register)
the
Constant
the
Constant
the
into
the
Programs
Programs
Constant
Constant
Constant
Constant
6-8
Conversion
Conversion
Function
6-14
Composition Composition
Constant
Constant
Format
Table
(M
of
(#
of
Table
of
Conversion
Signal
of
of
(C
of
6-2
6-4
(M
Table
(M
Table
Table
Table
6-6
(#
Table
(#
Table
Table
Table
Table
Table
Table
Table Table
Program
6-17
(C
Table
(C
Table
Table
Table
6-3
Register) Register)
(M
Register)
(M
Register)
Register)
Register)
(#
Register)
(#
Register)
6-8
6-9
6-9
6-10
6-12
6-13
Table
Table
for
Parts
Register)
Register)
(C
Register)
(C
Register)
6-14
6-15
6-4 6-5
6-6
6-7
6-16
6-17
6-18
6-5
6-7
6-18
:
6-5
6-7
6-18
6-1
:(
STANDARD
Data
7.1
7.1.1
7.1.2
Trace
7.2
7.3
Failure
7.3.1
7.3.2
7.3.3
7.3.4
Inverter
7.4
7.4.1
7.4.2
SYSTEM
Trace
Readout
Configuration
(1)
(2)
(3)
Function
Data Readout
(1)
(2)
(3)
(4)
Data
Readout
(1) (2)
(3)
FUNCTIONS
Read
Function
Data
of
Configuration
Data
Record Number
Trace
Length
of
(TRACE)
Read
Readout
Data
Configuration
Data
Record
Configuration
Structure
NumberofRecords
Readout
Data
Configuration
Data Record
Number
Trace
Configuration
of
Read
ReadoutofInverter
Readout
(1)
(2)
(3)
Data
Data
Configuration
Record
Number
Length
of
(DTRC-RD)
7-3
the
Read
of
7-4
Records
7-5
Function
(Failure Configuration
of
(Failure
Configuration
Records
Function
Configuration
Records
(FTRC-RD)
Occurrence
Register
Restoration
(ITRC-RD)
Trace
7-10
7-2
Data
7-4
7-4
7-7
7-4
7-6
Data)
(Failure
7-7
Designation
7-7
Data)
(Failure
7-8
7-8
7-8
Data
7-10
7-10
7-10
7-10
7-7
Occurrence
words)
(2
No.
7-8
Restoration
7-9
Data)
Data)
7-1
7-7
7-7
7-8
5
Page 7
:
7.5
7.6
7.7
7.8
7.9
Inverter
7.5.1
7.5.2
Inverter
CP-213
Send
7.8.1
Constant
Configuration
Method
(1) (2)
Constant
Initial
Message
Parameters
(1)
(2) (3)
(4)
(5)
(6) (7)
(8)
(9)
(10)
(11)
(12)
(13)
(14)
Inputs
7.8.2
(1) (2)
(3)
(4)
(5)
(6)
(7)
Outputs
7.8.3
(1) (2)
(3)
7.8.4
Limitations
Communications
(1)
(2)
Program
7.8.5
Receive
7.9.1
Message
Parameters
(1) (2)
(3)
(4)
(5)
(6) (7)
.
(8)
(9)
(10) (11)
(12)
(13) (14)
Write
of
Writing
WRITE
Program
ENTER
Example
Read
Data
Function
Process
Status
Called
Function
Data
Data
Called Coil
Input
Input
Holding
For
Result
(PARM01)
Station
Code
Address
Size
CPU
Offset
Relay Register
Register
System
Relationship
When
Transmission
7-25
EXECUTE
ABORT
(Send
DEV-TYP
PRO-TYP
CIR-NO
CH-NO
PARAM
BUSY
(Circuit
(Channel
(Set
7-26
(In
COMPLETE
ERROR
When
(Occurrence
Arising
Making
Connection
Making
When
Example
Function
7-30
Process
Status
Calling
Function
Data
Data
Calling
Coil
Input
.
Input
Holding
Write-in
For
When
Result
(PARAM01)
Station
Code
Address
Size
CPU
Offset
Relay
Register
Register
Range
System
Non-procedural
Function
of
the
Write-in
an
to
EEPROM
Command
7-14
Function
Setting
Function
(MSG-SND)
7-20
(PARAM00)
7-21
#(PARAM02)
(PARAM04)
(PARAM05)
(PARAM06)
#(PARAM07)
(PARAM08)
Offset
(PARAM09)
Offset
Offset
(PARAM12)
Use
between
Protocol
(Send
Message
Message
(Transmission
(Transmission
No.)
No.)
Head
Data
Process)
7-26
(Completion
of
from
Other
Protocols
Dedicated
a
with
Link
OMRON
an
7-28
(MSG-RCV)
(PARAM00)
7-31
(PARAM02)
#
(PARAM04)
(PARAM05)
(PARAM06)
(PARAM07)
#
(PARAM08)
Offset
Use
(PARAM09)
Offset
Offset
(PARAM12),
LO
(PARAM14)
(ICNS-WR)
Data
7-13
(ICNS-RD)
(ISET-213)
7-19
7-20
7-22
7-22
7-23
7-23
7-24
7-24
(PARAM10)
(PARAMll)
7-24
Data
the
is
Execution
Forced
Interruption
Device
Protocol)
7-25
7-25
Address)
Process)
of
Error)
Companies'
the
with
Protocol
MELSEC
the
Upward
7-29
7-30
7-31
7-31
7-31
7-31
7-31
(PARAM
(PARAMll)
is
set
10)
7-32
for
7-11
7-12
7-13
7-16
7-18
7-24
7-24
7-24
Address,
set
Type)
Size
to
Non-procedural
Command)
7-25
7-25
7-25
7-26
7-26
CP-217IF
computer
Linking
7-31
7-27
Mode
7-31
7-32
7-32
Write-in
Range
Transmission
Offset
and
7-25
Command)
7-27
(SYSWAY)
(PARAM13)
HI
Protocol
1
7-24
7-24
7-25
Connection
7-32
7-27
7-32
6
Page 8
TABLE
OF
CONTENTS
7.10
7.11
Appendix
Types
A
B
ListofInstructions
C
Differences
Inputs
7.9.2
(1) (2) (3) (4) (5) (6)
(7)
7.9.3
Outputs
(1)
(2)
(3)
Limitations
7.9.4
Communications
(1)
(2)
7.9.5
‘Program
Counter
First-in
Function
First-out
Instruction
of
7-32
EXECUTE
ABORT
(Receive
DEV-TYP
PRO-TYP
CIR-NO
CH-NO
PARAM
BUSY
(Circuit
(Channel
(Set
7-33
an
COMPLETE ERROR
When
(Occurrence
Arising
Making
Connection
Making
When
Example
(COUNTER)
Function
Words
A-3
Programming
on
(Receive
(Transmission
(Transmission
Data
Process)
(Completion
Message
Message
No.)
No.)
Head
7-33
of
from
Other
Protocols
Dedicated
a
with
Link
an
OMRON
7-35
(FINFOUT)
A-2
between
Forced
Device
Protocol)
7-33
7-33
Address)
Process)
of
Error)
Companies'
the
with
Protocol
the
MELSEC
Upward
7-36
CP-9200H
Execution
Interruption
Type)
7-33
7-33
7-33
CP-217IF
Computer
Linking
7-37
and
Command)
Command)
7-32
.
>.
7-33
7-34
(SYSWAY)
Mode
CP-9200SH
7-34
7-32
Connection
16
A-
7-32
7-34
A-l
7
Page 9
1.
INTRODUCTION
PROGRAMMING
TO
INTRODUCTION
1
PROGRAMMING
programming
The
CP-9200SH
with
are
languages
described
TO
that
in
can
this
used
be
chapter.
1-1
Page 10
1.1
Programming
Languages
CP-9200SH
prepared
refer
using
the
to
Programming
Ladder
Table
SFC
chart)
program
format
(sequential
program
support
the
Control
Language
program
programming
the
programming
Pack
CP-9200SH
Table
1.1
function
languages
language
User's
Programming
Programs
text
and
operation
Sequential
processes,
Programs
in
use
form)
and
(fill
Tables,
*
table,
Sequential
the
Sequences,
written
shown
that
is
Manual
Languages
prepared
are
type
instructions
instructions,
processes,
various
and
for
specific
with
such
of
the
as
part
composition
programs
steps
such
readily.
in
Table
optimal
(SIE-C879-40.1).
that
for
can
Characteristics
using
(control
etc.)
numerical
other
applications
of
use
the
constant
table,
prepared
are
and
transition
automatic
as
1.1.
application.
the
be
Used
relay
instructions,
operation
programs
tables.
setting
data
are
conditions.
operation
User
programs
circuit
can
prepared
are
table,
available.
flowchart
in
For
instructions
numerical
processes,
be
written.
in
interlock
form
flows,
can
be
can
details,
data
FIF
by
be
1-2
Page 11
HIERARCHICAL
2.
STRUCTURE
OF
THE
DRAWING
SYSTEM
PROGRAMS
AND
HIERARCHICAL
o
DRAWING
Drawings,
and
definition
their
which
hierarchical
methods
SYSTEM
basic
the
are
described
are
STRUCTURE
AND
PROGRAMS
programming
in
and
this
chapter.
structure
THE
OF
units,
function
2-1
Page 12
User
programs
(DWG
There
drawings.
each
No.).
are
drawing.
These
parent
Besides
managed
are
drawings
drawings,
drawings,
in
serve
child
units
as
drawings,
there
of
the
are
drawings,
basis
grandchild
also
functions,
of
which
user
drawings,
are
programs.
which
identified
and
operation
be
can
referenced
by
the
error
drawing
processing
freely
No.
from
2.1
Parent
The
Drawings
parent
Execution"
Drawings
Child
Child
drawings
Instruction.
Grandchild
Grandchild
Instruction.
Operation
This
executed
is
Functions
Functions
by
Types
Parent
the
as
C879-40.1).
FSTART
the
drawings
purpose
shown
and
in
drawing
of
Table
are
Drawings
drawings
Error
automatically
executed
are
Instruction.
Priority
of
the
Table
.
executed
is
established.
is
2.1
executed
executed
are
Processing
upon
Levels
are
classified
For
The
details,
process.
2.1.
automatically
being
upon
upon
Drawing
by
the
being
referenced
of
Parent
by
the
priority
refer
referenced
being
system
first
character
levels
the
to
the
system
by
referenced
program
from
the
Drawings
of
execution
and
Control
from
from
upon
parent,
the
conditions
Pack
parent
child
a
child,
when
or
(A,
program
the
occurrence
drawing
of
CP-9200SH
the
drawing
drawing
operation
of
grandchild
L)
I,
H,
drawings
User's
Manual
"Condition
by
by
according
are
SEE
the
SEE
the
error.
drawing
defined
(SIE-
of
to
(Note)
Type
of
Parent
Drawing
DWG.
DWG.
DWG.
DWG.
:
The Parent
Operation
Child
Grand
Starting
A
process
Interruption
I
process
High-speed
H
scan
Low-speed
L
scan
details
drawing
drawings
child
Table
Role
of
Drawing
process
process
the
of
processing
error
drawings
Types
2.1
Priority
Level
number
and
1
2
3
4
drawings
of
drawing
n:
*
AA
Priority
LevelsofParent
Condition
Turning
when
Start
rising
Start
high-speed
Start
low-speed
:
:
the
:
first
:
the
of
of
of
of
as
is
(ÿ)
1
(ÿ
00)
1
(ÿ
2
(A,
maximum
character
drawing
child
on
interruption
interruption
fixed
fixed
the
power
cycle
scan
cycle
scan
follows.
01
to
62,
L:
of
power
is
turned
(Executed
time.)
(Executed
time.)
'
99)
H,
number
the
of
number
Drawings
Execution
(Executed
on.)
(Executed
signal.)
input
maximum
A
grandchild
and
98)
L:
of
drawings
drawing
on
on
(A,
once
upon
each
each
I,
Number
Drawings
total
drawings.
that
can
L)
H,
(Note)
100
100
of
n-2
64
64
be
of
child
used.
2-2
Page 13
2.
HIERARCHICAL
STRUCTURE
OF
THE
DRAWING
SYSTEM
AND
PROGRAMS
2.2
2.2.1
Execution
Execution
drawing
Each
each
On
speed
Batch
I
Batch
DWG.H
High-speed
[
DWG.A
high-
scan
output
input
rawing
f
Control
Control
is
Power
Starting
Drawing
time
Scan
of
of
Parent
executed
ON
Process
On
speed
|
1
[
|
DWG.L
Prrv'
Fig.
Parent
Drawings
based
each
scan
output
Batch
input
Batch
Low-speed
TYrawi
SR
Execution
2.1
Drawings
priority
its
on
low-
time
Scan
1
Control
level
as
Operation
DWG.X00
Operation
Processing
continue
original
Parent
of
shown
Error
Error
Drawing
X:
I
with
process
Drawings
Fig.
in
A,I,H,
2.1.
Interruption
DWG.I
L
Interruption
Drawing
continue
original
Signal
with
process
2.2.2
Scheduling
The
levelsasshown
DWG.H
DWG.L
Ground
*
process
scan
High-speed
scan
I-
-
of
the
Execution
drawings
Fig.
in
_1
of
not
are
and
2.2
-
High-speed
Low-speed
scan
mm
executing
For
:
*
Scan
executed
are
executed
Process
simultaneously
on
scan
High-speed
scan
mmm
internal
Drawings
the
schedule.
-
processes
but
High-speed
scan
scheduled
are
—3
iiaa
(self-diagnosis,
based
etc.)
on
Mi:in
of
the
priority
I
execution
system.
1
Fig.
Scheduling
2.2
of
the
Execution
of
Scan
Process
Drawings
2-3
Page 14
2.3
Hierarchical
Structure
Drawings
of
2.3.1
The
However,
drawing
referenced referenced.
drawings.
Execution
The
drawing
[Parent
DWGJt
I
drawings
a
cannot
of
prepares
user
hierarchy
Drawing]
[
are
parent
from
This
Drawings
arranged
drawing
reference
parent
the
structure
processing
each
shown
as
DWGJffll
the
in
cannot
grandchild
a
drawing,
is
in
[Child
manner
reference
always
program
Fig.
2.3.
Drawing]
j-
parent
drawing
and
from
followed,
with
drawing
child
a
that
and
a
parent
of
drawing
a
different
child
is
called
child
-
drawing
drawing
[Grandchild
Referencing
function
drawing
-|DWGJffll.01
DwaxoLce
DWGJCOLUP
drawing-grandchild
ofadifferent
The
type.
the
the
hierarchical
child
-
Drawing]
of
by
a
grandchild
child
grandchild
drawing
a
|~
I-
j-
drawing.
type
a
child
and
drawing
drawing
structure
grandchild
-
is
is
of
[Function]
IFUNC-OOI
I
The
parent
priority
and
type.
In
other
system.
the
DWG
a
reference
Functions
referenced
operation
a
If
will
be
started.
drawing
parent
of
words,
Thus,
listed
by
a
error
]
executed
is
drawings,"
the
the
customer
instruction
may
2.2
in
function.
occurs,
DWG-Xnn
2.3
Fig.
parent
(SEE
be
operation
}
Hierarchical
automatically
criteria
drawing
can
referenced
is
execute
instruction)
from
error
Referencing
drawing
child
Referencing
parent
of
of
drawing
(Note)
StructureofDWG's
by
for
automatically
any
processing
system,
the
execution
child
or
the
in
all
parent
drawings.
drawings
are
called
grandchild
function
a
a
function
Substitute
from
since
determined
(called
drawing
child
or
Furthermore,
corresponding
by
a
by
a
I,
A,
H,
Table
2.1
separately
up
and
by
drawings.
a
function
FUNC-064
1
L
of
2.1
each
X.
in
"Types
for
can
screen
each
or
executed)
programming
to
[
by
be
2-4
Page 15
2.
HIERARCHICAL
STRUCTURE
OF
THE
DRAWING
SYSTEM
AND
PROGRAMS
2.3.2
Execution
The
execution
whereby
Taking
Fig.
2.4.
Start
up
execution
I
Parent
DWG.A
A01
SEE
Process
process
lower-ranking
example
an
system
when
conditions
Drawing
of
Drawings
of
drawings
of
DWG.
program
satisfied
are
Child
drawings
the
A,
DWGJMI
SEE
SEE
referenced
are
the
hierarchical
Drawing
A01.01
A01.02
arranged
hierarchy
a
in
by
upper-ranking
structure
Grandchild
DWGAQ1.01
FUNC-001
DEND
DWGA01.02
FUNC-001
is
of
DWGs
Drawing
k-
carried
drawings.
(drawings)
in
out
is
Function
FUNC-001
PEND
manner
a
shown
in
SEEAQ2
DEND
DWG
<ÿ
expression
:
DWG.
DWG.
PEND
DWGAQ2
Occurrence
operation
error
PEND
AA
.
OO
TTT
00
T
Fig.
2.4
System
automatically
activates
of
a
<
Grandchild
drawing
Child
Type
of
Operation
Drawing
PEND
DEND
drawing
no.
parent
Execution
drawing
error
DWG.A00
no.(01to99)
(01to99)
(A,
drawing
Process
(A,
L)
I,
H,
L)
I,
H,
2-5
Page 16
2.4

Functions

2.4.1
Functions
simultaneously
.
also
can
become
It
The
function
A
data
that
depicts
be
can
user
Standard
The
to
classified
functions,
user
modify
(program).
functions.
User
Functions
These
are
function
Preparation
Function
Functions
expression
can
reference
easy
program
composed
is
input
are
the
processes
System
freely
can
the
contents
Refer
functions
definition
Procedures"
Definition
defined
are
form
freely
be
from
other
to
can
into
which
Functions
use
to
Chapter
that
and
for
functions
referenced
drawings
arrangeaprogram
be
of
into
that
standard
are
a
of
the
of
functions.
prepared
the
function
output
and
are
to
system
defined
function
function.
that
"Standard
7
defined
are
main
different
The
and
be
by
that
body
concerning
the
user
by
at
shown
any
from
types
following
parts.
into
maintained
definition,
from
a
function,
executed
according
functions,
the
user.
been
has
other
In
(programmed)
(program)
the
the
Fig.
in
words,
System
preparation
time
of
2.5.
drawing.
and
different
benefits
easily.
which
determines
and
to
which
are
predefined
the
Functions"
freely
of
the
methods.
user
function
Functions
hierarchies.
the
inputs
the
made
by
the
cannot
for
the
obtained
main
available
system,
more
user.
can.be
user
by
function.
preparation
can
even
the
number
body
and
but
freely
information
The
See
2.4.2
be
Further,
by
using
and
(program),
outputs.
by
the
is
not
create
user
prepares
"User
using
referenced
functions
functions.
types
which
Functions
system,
and
permitted
definitions
system
on
Function
graphic
the
of
the
Numerical
(integer,
integer,
Numerical
(integer,
integer,
(Note):
The
or
ifiput
Bit
input
Bit
input
double-length
number)
real
input
double-length
number)
real
names
less
of
alphanumeric
-
-
the
Fig.
INPUT-
INPUT-2
INPUT-3
===<
INPUT-4
ss=7
function,
characters.
Graphic
2.5
Name
-
1
Address
the
FUNC-011
of
Function
OUTPUT-1
OUTPUT-2
OUTPUT-3
OUTPUT-4
INPUT-5
input
inputs,
and
Expression
the
of
-
-
===*
ts!*>
outputs
Function
a
Bit
output
output
Bit
Numerical
(integer,
integer,
real
Numerical
(integer,
integer,
are
real
respectively
output
double
-length
number)
output
double-length
number)
expressed
in
8
2-6
Page 17
HIERARCHICAL
2.
STRUCTURE
OF
THE
DRAWING
SYSTEM
PROGRAMS
AND
\
Function
User
Fig.
user.
2.6
shows
Determination
I/O
the
Preparation
the
function
Programming
the
Programming
referencing
Preparation
procedure
the
specifications
of
definition
v
\
f
of
program
body
the
function
Procedure
of
of
function
preparing
for
Determine
is
Input
Prepare
types
made
registers
of
DWG's.Becareful
numbers
output
Input
A
upon
in
Input
Instruction.
B
Use
the
data.
Use
C
the
output
user
the
the
in
used
referencing
following
the
the
FIN
FOUT
data.
functions,
number
using
the
same
manner
used
of
the
function
the
in
procedures:
name
of
Instruction
Instruction
which
of
I/Os
can
and
CP-717.
the
as
differ
will
from
correspondence
program
function.
the
the
function
prepare
to
to
prepare
defined
be
the
data
DWGs.
those
the
and
with
program
the
freely
types.
However,
with
used
register
the
of
the
data
FSTART
the
for
program
by
the
the the
input/
input
for
*
on
I/O
definition
system
a
:
If
specifications,
already
defined
For
more
(SIE-C877-17.4,
provided
or
details
function
in
the
by
prepared.
Fig.
operating
on
-17.5).
be
is
to
Chapter
function
the
system
2.6
used,
7
definition,
User
CP-717,
the
prepare
the
"STANDARD
and
in
the
case
Function
Preparation
refer
to
program
SYSTEM
the
main
system
of
the
body
functions,
Control
referring
upon
FUNCTIONS".
the
of
function
these
Procedure
Pack
CP-717
description
the
to
Since
program
do
havetobe
not
Operation
the
I/O
are
Manual
2-7
Page 18
3.
REGISTER
MANAGEMENT
METHOD
1
o
REGISTER
O
METHOD
Various
to
designation
types
application
registers
of
and
methods
MANAGEMENT
introduced
are
register
the
describedinthis
are
attributes
according
and
chapter.
3-1
Page 19
r
\
3.1
Register
showninTable
As
symbolic
These When No.
Refer
Direct No.
Symbolic
designation
designation.
two
symbolic
be
must
the
to
Type
Designation
register
designation
Designation
3.1,
register
of
types
designation
defined
Control
of
in
Pack
Bit
Integer
Double-length
Real
Address
:
Bit
Integer
Double-length
Real Address
:
Method
registers
designation
is
to
symbol
the
CP-9200SH
Table
register
type
type
number
type
case
the
In
the
after
register
type
type
number
type
the
In
or
with
case
j,
are
characters
8
may
be
used,
be
table
Register
3.1
designation
register
integer
type
register
subscript
of
register
designation
register
integer
type
register
subscript
of
attached
designated
methods
relationship
the
described
User's
register
register
Manual
Designation
Designation
designation
type
designation
No.
designation
type
designation
after
less.
or
by
direct
may
be
used
between
later.
(SIE-C879-40.1)
register
designation
designation,
register
designation
designation,
the
designation
designation
alphanumeric
register
together
Methods
Method
subscript
the
An
a
designationorby
No.
the
in
symbol
the
details.
for
MB00100AD
MW001000
:
ML00100Q
:
MF00100D
:
MA00100D
or
i
RESET
: :
STIME-H.D
:
POS-REF.D
IN-DEF.D
PID-DATA.D
alphanumeric
characters
8
then
and
expression
the
user
and
j
is
1
-A.
i
expression
or
subscript,
the
of
programs.
register
the
attached
U
less.
symbol
of
i
Direct
Register
Symbolic
Symbol
Register
No.:
Designation
[Symbol
:
Designation
No.
V
T
-
TVpe
DWG
Function
Name]
No.
-*
[Bit
Data
register
of
[.]
*-*ÿ
No.]
[Subscript]
L
»•
When
-
Register
given
type
|M|
(V:
S
S|M|I|0|C|#|D|X|Y|Z|A)
(V:
[Subscript]
L
Can
Necessary
(to
differentiate
subscript).
T
given
No.
by
V
|
O
I
designate
when
designate
Can
(bit
B
=
by
(T:
B|W
|
#
C
i
the
subscript
a
between
subscript
the
(hexadecimal:
type)
(decimal/hexadecimal)
V
F
L
I
be
to
symbol
|
A)
i
used
name
or
j.
|
D)
!
subscript
is
the
and
j.
or
i
F)
0
to
the
3-2
Name
am
Alphabetic
*
(A
attached
i
Alphanumeric
number
the
to
symbolic
or
cannot
register:
symbolic
or
character
be
used
charactersorless
8
characters
the
at
head
of
symbol
a
name.)
Page 20
3.2
Types
Data
There
real
are
number
Address
Refer
to
device
type
the
for
data
five
type,
data
Control
details.
types;
and
may
Pack
the
the
address
be
used
CP-9200SH
bit
type,
only
type.
for
Table
the
These
pointer
User’s
3.2
integer
are
designation.
Manual
Data
3.
REGISTER
double-length
the
type,
according
used
(SIE-C879-40.1)
Types
MANAGEMENT
integer
the
to
purpose.
the
for
METHOD
type,
the
corresponding
Type
B
W
L
F
Type
Data
Bit
Integer
Double¬
length
integer
Real
number
Numerical
OFF
ON,
-32768
(8000H)
-2147483648
+32767
to
(7FFFH)
(80000000H)
±(1.175E
38),0
+
-38
Range
2147483647
to+
(7FFFFFFFH)
3.402E
to
for
for
usedinthe
are
that
instruction
a
in
begin
relay
numerical
Used Used
(
)
operations.
Ordinarily
groups
entry
used
that
instruction
Used
(
)
for
usedinthe
are
numerical
operations.
Ordinarily
groups
entry
used
that
instruction
Used
May
with
instruction
that
that
instruction
a
in
begin
numerical
for
only
real
a
cannot
it
instruction
integer
type
Remarks
circuits.
operations.
logic
of
case
used
begin
seriesofinstruction
with
(||—
used
begin
seriesofinstruction
with
(||—
seriesofinstruction
a
in
integer
an
with
).
can
It
Q—
number
real
a
).
operations.
logic
of
case
in
series
a
integer
an
with
).
can
It
({—
real
number
a
).
operations.
used
).
(|}—
be
groups
entry
in
series
a
entry
type
Please
used
that
keep
in
begin
instruction
a
be
number
Values
also
groups
type
Values
instruction
of
also
groups
type
begins
that
mind
in
series
of
with
(}—
in
type
be
entry
in
type
be
entry
an
).
Address
A
Register
[M
W001
[MW00101] [MW00102] [MW00103]
32767
0
to
Designation
FEDCBA9876543210
00]
and
Data
r
Types
Used
[MB001006]
r
[MB00103A]
only
for
pointer
[ML00100]
“I
[MF00100]
[ML00102]
[MF00102]
designation.
3-3
Page 21
Pointer
Designation
j-
Fig.
In
By
handing
internal
for
is
referred
can
be
Memory
Address
nn
II
LMAOOIOO:
MAOOIOO
3.1,
MAOOIOO
processes
"pointer
to
as
freely
used
for
signifies
to
of
bits,
Register
_
_
_
3.1
Pig.
the
a
function,
the
function.
designation".
integers,
Domain
SSSSg
,
_
$3
Pointer
memory
the
Such
double-length
register
this
In
address
useofan
way,
[MWOOIOO]
[MI
00101]
[OT00102]
[Mf
00103]
Designation
of
nn
domain
address
register
the
integers,
[ML00100]
i
J
[BF00100]
MWOOIOO.
below
MWOOIOO
argument
as
an
domain
or
real
may
of
below
numbers.
be
used
a
function
MWOOIOO
3-4
Page 22
3.3
Type
of
Registers
3.
REGISTER
MANAGEMENT
METHOD
3.3.1
Type
M
I
S
DWG
The
Refer
Name
System
register
Data
regoster
Input
register
Registers
types
7
to
the
Designation
SB,
SFnnnnn
(SAnnnnn)
MB,
ML,
MFnnnnn
(MAnnnnn)
IB,
IFhhhh
(IAhhhh)
register
of
Control
Method
SW,
MW,
IW,
SL,
IL,
shown
CP-9200SH
Pack
Registers
The
Upon
cleared
Registers
Used
The
expression.
Register
and The
expression.
The
configuration
numbers
with
details,
module.
in
Table
can
3.3
User's
3.3
Table
made
register
system
to
used
I/F
for
register
that
0.
DWG
available
No.
nnnnn
start-up,
common
in
between
number
used
is
communication
register
register
number number
definition
COOO
and
refer
modules
the
to
motion
be
used
Manual
each
in
(SIE-C879-40.1)
Registers
Description
the
decimal
a
system.
by
is
SW00000-SW00049
etc.
is
DWG's.
decimal
a
with
among
DWG's,
nnnnn
for
interface
module.
hexadecimal
is
hhhh
is
later
such
instruction
a
assigned
screen.
used
are
SVA
as
manual
on
The
for
modules.
DWG.
for
expression.
are
module
I/O
the
module
register
interface
For
each
of
details.
Characteristic
all
Used
common
DWG's
in
by
O
C
#
D
Output
register
Constant
register
#
register
register
D
OW,
OB,
OFhhhh
(OAhhhh)
CB,
CW,
CFnnnnn
(CAnnnnn)
#W,
#B,
#Fnnnnn
(#Annnnn)
DW,
DB,
DFnnnnn
(DAnnnnn)
OL,
CL,
#L,
DL,
Register
and
The
expression.
The
configuration
numbers
with
details,
thatisused
communication
register
register
COOO
motion
refer
module.
Register
program.
expression.
Registers
program.
Can
The
user
The
that
The
only
referenced
actual
with
the
register
that
expression.
Internal
Can
The
user
The
expression.
registers
only
referenced
actual
with
register
the
module.
number
number
hhhh
definition
and
later
modules
instruction
to
the
only
can
register
only
can
the
application
CP-
717.
number
_
unique
the
application
CP-
717.
number
for
interface
is
a
assigned
is
screen.
used
are
such
be
SVA
as
referenced
number
referenced
be
corresponding
range
nnnnn
nnnnn
is
is
each
to
corresponding
range
is
isadecimal
I/O
with
hexadecimal
the
register
interface
for
module
on
The
modules.
of
by
is
in
each
a
a
decimal
a
DWG.
by
manual
nnnn
specified
decimal
a
_
DWG.
DWG.
specified
by
module
For
the
the
Unique
DWG
each
to
3-5
Page 23
3.3.2
Function
Registers
Type
X
Y
Z
A
#
D
S
M
1
0
C
The
Refer
Name
Function
input
register
Function
output
register
Register
inside
function
Register
outside
function
#
Register
D
register
System
register
Data
register
Input
register
Output
register
Constant
register
types
1
1
the
to
Designation
XB,XW,XL,XFnnn
YB,YW,YL,YF
ZB,ZW,ZL,ZFnnnnn
AB.AWÿALÿAFnnnnn
#B,#W,#L,#Fnnnnn
(#Annnnn)
DB,DW,DL,DFnnnnn
(DAnnnnn)
SB,SW,SL,SFnnnnn
(SAnnnnn)
MB,MW,MUMFnnnnn
(MAnnnnn)
registers
of
Control
Method
nnnnn
ffi,IW,IL,IFhhhh
(IAhhhh)
OB,OW,OL,OFhhhh
(OAhhhh)
CB,CW,CL,CFrmnmi
(CAnnnnn)
shown
Pack
nn
in
Table
CP-9200SH
3.4
Table
Input
Bit
Integer Double-length
The
Outputs
Bit
Integer
Double-length
The Internal
Can
The
External
address.
For
The
Register
Can
The
CP-717.
The
Characteristic Can
The
CP-717.
The
Same
(Since
functions,
referenced
into
input
input
register
from
output
output
register
registers
used
be
register
registers
linking
register
that
reference
actual
register
reference
actual
register
the
as
these
be
a
with
application
application
from
can
3.4
User's
Function
function
number
a
number
for
number
number
can
only
number
internal
only
number
DWG
registers
careful
Manual
Registers
Description
:XBOOOOOO
:XW00001
integer
input:
nnnnn
function
:YBOOOOOO
:YW00001toYW00016
integer
output:
nnnnn
unique
to
nnnnn
that
(S,
M,
nimnn
only
the
nnnnn
the
nnnnn
registers.
are
of
processes
use
I,
0,
be
referenced
corresponding
range
register
corresponding
range
used
their
internal
DWG'sofdifferent
be
used
in
(SIE-C879-40.1)
toXBOOOOOF
to
XW00016
XL00001
is
a
decimal
YBOOOOOF
to
YL00001
isadecimal
each
function.
the
of
is
a
decimal
address
the
DAnnnnn).
#,
is
decimal
a
by
specified
a
decimal
for
each
specified
function.
|
function.
is
is
is
!
is
a
decimal
in
common
use
when
priority
each
function.
toXL00015
expression.
YL00015
to
expression.
function.
expression.'
input
value
expression.
a
program.
by
the
user
expression.
function.
by
the
user
expression.
by
both
the
same
levels.)
for
as
with
with
DWG's
function
details.
the
the
the
and
is
base
Characteristic
Unique
each
Used
common
DWG's
to
function
in
by
3-6
(Note)
3.3.3
SA,
MA,
CPU
The
user
LA,
OA,
Internal
registers
program
Register
A
register
register
F
register
B
register
I
register
J
DA,
#A
and
CA
Registers
showninTable
processes.
Used
operations.
Used
Used
Used
Used
may
as
as
for
as
as
also
3.5
Table
register
a
register
a
relay
an
an
used
be
are
3.5
_
circuit
index
index
inside
provided
CPU
logic,
for
real
for
operations
register
register
a
function.
inside
Internal
Usage
integer,
number
(I).
(J).
the
CPU.
Registers
and
operations.
These
are
used
double-length
for
carrying
integer
out
Page 24
REGISTER
3.
MANAGEMENT
METHOD
3.3.4
Subscripts
types
Two
number,
These
(1)
i
subscripts
When
This
MBOOOOOOi
1=2,
MB000001B.
(2)
When
This
1=3,
if
MW00031.
When
(3)
This
1=1,
if
and
J=l.
i
j
and
registers,
of
j
and
have
are
Subscript
a
equivalent
be
will
b2
MBOOOOOOi
j
Subscript
a
equivalent
be
will
MWOOOlOi
-00030
-MWOOOOlj
Subscript
a
equivalent
be
will
MLOOOOOi
Be
careful.
MLOOOOOJ
ML00000
MLOOOOOJ
ML00001
i
and
the
same
explained
is
Attached
to
the
be
will
Attached
is
to
be
will
is
Attached
to
be
will
when
when
j,
are
function.
below
adding
same
=>I
adding
the
same
=>J
adding
the
same
J=0
J=1
exclusively
used
an
with
Bit
Type
to
value
the
as
MB000002.
equivalent
Integer
to
the
value
MW00013.
as
equivalent
Double-Length
to
value
the
ML00001.
as
:
:
for
example
Data
i
of
or
If
Type
Data
i
of
or
If
i
of
or
Upper
MW00001
MW00002
modifying
for
each
j
to
J=27,
MB
j
to
J=30,
MW00031
|—
Integer
j
to
MLOOOOOj
relay
the
MBOOOOOOj
000002
register
the
MWOOOOlj
Type
register
the
word
relay
a
register
number.
number.
Data
number.
be
will
Lower
word
MW00000
MW00001
number
data
will
will
as
follows
type.
For
be
For
be
For
register
or
example
the
same
example,
same
the
example,
when
if
as
as
J=0
(4)
(5)
When
if
This
1=1,
and
a
will
MFOOOOOi
J=l.
Example
The
program
MW00199
to
Subscript
be
is
equivalent
will
careful
Be
MFOOOOOJ
MF00000
MFOOOOOJ
MF00001
Program
of
when
when
shown
is
in
in
set
00000
h
FOR
MW00200+MW00100j
h
FEND
Fig.
Attached
adding
to
be
the
same
J=0
J=1
Using
a
Fig.
3.2
MW00200
=00000
J
3.2
Example
Real
to
the
as
:
:
Subscript
is
one
the
by
00099
to
of
Number
of
i
value
MF00001.
Upper
MW00001
m
MW00002
which
in
subscript
of
use
by
00001
Program
Data
Type
j
the
to
or
MFOOOOOj
word
the
total
a
Using
register
will
Lower
MW00000
MW00001
for
100
j.
MW00200
VV
M
Subscript
number.
be
as
word
registers
00200
For
follows
from
example,
J=0
when
MW00100
3-7
Page 25
3.3.5
Function
I/O
and
Function
Registers
inputs
The
shown
as
details.
for
Table
Function
input
Bit
Integer, length
real
integer,
number
Address
output
Bit
S
Integer,
length
number
real
outputs
integer,
outputs
and
in
Table
3.6
I/O
double¬
inputs
input
double¬
3.6.
Correspondence
>
and
and
function
a
in
Refer
to
_
bit
The
input.
bit
of
register
The
XF00001
and number
(XW00001, (XL00001,
(XF00Q01,
address
The
register.
AW00001...)
=
The
bit
bit
output.
of
register
The
YF00001
and
real
number
(YWOOOOl,
(YL00001,
(YF00001,
referencing
the
Control
between
number
(XBOOOOOO,
number
in
input.
XW00002,
XL00003, XF00003,
input
(Input
number
value
(YBOOOOOO,
number
in
output,
YW00002,
YL00003,
YF00003,
Pack
Function
Function
increases
XB000001,
increases
orderofthe
the
XW00003,
XL00005, XF00005,
corresponds
value
MA00100
=
increases
increases
the
orderofthe
respectively.
YW00003,
YL00005,
YF00005,
process
CP-9200SH
continuously
continuously
YB000001,
correspond
User's
and
I/O's
Register
XB000002,
continuously
integer-double-length
,
XW00016)
...
,
XL00015)
...
XP00Q15)
,
...
to
MW00100
:
YB000002,
continuously
integer,
YW00016)
,
...
YL00015)
,
...
YF00015)
,
...
to
Manual
Function
_
XB000000
from
from
_
register
=
from
XBOOOOOO
from
double-length
the
function
(SIE-C879-40.1)
Registers
in
XBOOOOOF)
...
XW00001,
integer-real
the
of
No.
0
AWOOOOO,
...
YWOOOOl,
MW00101
in
YBOOOOOF)
,
integer,
registers
the
order
XL00001,
external
the
order
YL00001,
and
the
In
AWOOOOO
fr
"
|-
MW01000
"
MW00400
-
I
ML00402
MW00404
MW00406
function
-
HI
program
AW00001
+
MW01001
+
=>
lh~
======>
======>
======>
Fig.
shown
in
AW00002"
=>
operation:
MW01002"
=>
FUNC-011
XBOOOOOO
XB000001
XW00001
XB000002
XL00002
XW00004 XW00005
AWOOOOO
MA01000
3.3
Function
Fig.
3.3,
if
is
written
is
executed.
YBOOOOOO
YB000001,
YB000002
YL00001
YL00003
YW00005
YL00006
Program
in
the
program
======>
==:===)
i\
>
======>
inside
O
o-
O
ML00410
ML00412
MW00414
ML00416
the
function,
the
3-8
Page 26
3.
REGISTER
MANAGEMENT
METHOD
3.3.6
Programs
©
Constant
(#B,
Individual
(PB,
and
DWGH03
Program
Max.
Registers
each
DWG
data
#W,
data
DW,
FUNC-000
Program
Max.
Register
(Drawing)
500
unique
Max
»L,
Max.
DFmugm)
PL,
(Function)
500
steps
steps
to
words
16384
»Fmumn)
16384
words
Referencing
Function
(AB,
AW,
Ranges
<D
external
AL,
register
AFnnnnn)
Registers
System
(SB,
Data
(MB.
Input
GB,
common
registers
SW.
registers
MW,
registers
IW,
IL,
SL
ML,
all
to
SFnmnm)
MFraumn)
IFhhhh)
DWGs
©
(D
(2)
(3)
©
Registers
each
function
Function
(XB,
XW,
Function
(YB,
YW,
Function
ZW,
f"/U
Constant
(#B,
*W,
Individual
(DB,
DW,
The
:
drawing
Registers
:
Registers
:
The
:
each
to
registers.
unique
registers
input
XL,
registers
output
YL,
internal
71.
data
Max.
*L,
data
Max.
PL,
registers
or
that
that
registers
drawing
to
words
17
XFtanum)
words
17
YFnmmn)
register
ZFnncnn)
16384
words
#Fmnmn)
words
16384
DFcnimn)
that
function.
unique
are
are
unique
that
can
may
can
be
to
be
be
used
in
each
to
each
function
used
common
in
referenced
only
by
by
can
be
the
common
drawing
can
fromafunction
Output
(OB.
Constant
(CB,
the
DWG's
only
be
referenced
DWG’s
by
registers
OL.
OW.
registers
CW,
CL,
may
be
referenced
that
within
and
the
registers
the
use
of
OFhhhh)
CFtmnnn)
referenced
within
that
function.
that
function
the
from
drawing.
unique
are
external
any
3-9
Page 27
3.4
Symbol
Management
3.4.1
Symbol
All
registration
performed
Management
symbols
modification
any
done
for
-17.5)
single
a
for
When
Since
time
the
an
only
designation
usedinthe
symbols
of
symbol
the
on
symbols
of
while
drawing.
method
unregistered
the
the
of
Register
NO7
0
IBOOOOO
OBOOOOO
1
2
MW00000
3
MB000010
4
MW00010
5
MW00020
MW00021
6
:
N
a
If
:
*
index
configurations.
For
the
in
the
in
DWG
on
definition
as
program
a
Refer
defining
of
symbol
register
No.
program
process
example,
range
DWG
's
managed
are
symbol
the
screen
well
to
is
the
as
being
Control
designation
DWG
symbol
will
is
be
registered
number
Table
Symbol
STARTPBL
STARTCOM
SPDMAS
WORK-DB
PIDDATA
LAUIN
LAUOUT
prepared
is
data,
etc.,
data
to
9,
is
define
if
0
by
the
table
and
the
of
prepared.
Pack
symbol
used
tables.
during
automatically
become
will
3.7
DWG
Size
1
1 1
16
10
1
1
using
such
define
the
referenced
the
size
symbol
DWG
designation
CP-
17.
7
modification
or
maximum
A
CP-717
program
necessary
Symbol
*
The
hexadecimal
The
hexadecimal
data
sizes
as
PIDDATA.i
10.
as
table
register
of
Further,
Operation
registration,
of
register
of
symbols
200
Manual
preparation...
in
the
the
after
Table
Remarks
register
register
number
expression.
number
expression.
configurations
used
the
in
and
shown
symbol
DWG
program
is
is
as
respective
i.takes
on
Fig.
in
numbers
deletion,
numbers
be
can
Both
3.7.
can
be
and
can
be
registered
(SIE-C877-17.4,
the
is
a
a
arrays,
table,
prepared.
data
values
3.4.2
Symbol
symbols
The
The
registration,
register
of
a
Management
usedinthe
deletion,
number
Register
No.
0
XB000000
'
1
XW00001 AW00001
2
3
AB00000F
4
YBOOOOOO
YW00001
5
ZB000000
6
7
ZW00001
ZW00002
8
N
a
If
:
*
index
configurations.
For
the
in
in
the
functions
and
carried
are
No.
program
process
example,
range
Functions
all
are
modification
out
in
Table
Symbol
EXECQM
INPUT
P-GAIN
ERROR
PIDEXE
PIDOUT
WORKCOIL
'
WORK1
WORK2
is
prepared
data,
etc.,
data
to
9,
is
define
if
0
managed
symbol
of
a
the
same
3.8
Function
Size
1
using
define
referenced
the
size
with
manner
Symbol
*
1
1
1
1
1
4
1
1
such
the
sizes
as
PIDDATA.i
as
symbol
the
and
the
as
in
data
configurations
usedinthe
10.
table,
designation
the
DWG's.
Table
Remarks
and
i
shown
and
as
arrays,
respective
takes
on
Table
in
3.8.
modification
data
values
3-10
Page 28
3.
REGISTER
MANAGEMENT
METHOD
3.5
3.5.1
Upward
Upward
The
in
Ordinarily,
DWG
However,
drawing
the
CP-717.
concerning
Linking
upward
drawings
or
function
may
same
Refer
Linking
linking
different
of
symbol
a
using
by
be
type.
The
to
setting
the
Table
Symbol
Symbols Symbols
Symbols
Symbols
of
Symbols
Symbols
of
symbols
of
hierarchical
that
program
upward
the
referenced
upward
the
Control
method.
3.9
Linkable
parent
of
a
of
a
child
grandchild
of
a
inside
is
defined
and
by
a
linking
Pack
Symbol
drawing
function
a
and
refers
to
rank
for
cannot
linking
drawingaslong
child
of
CP-717
Symbols
Table
drawing
drawing
Automatic
defining
the
be
can
certain
a
be
referenced
function
symbol
a
Operation
and
drawing
Number
symbols
of
to
DWG
by
symbols,
as
at
set
reference
or
other
the
the
used
for
is
Manual
Symbol
Table
Parent
X
O.
O
X X
Linkable
:
O
Allocation
that
so
the
function
DWG's
symbol
a
drawings
Symbol
(SIE-C877-17.4,
for
Child
drawing
x
x
o.
X
X
Not
:
symbol
register
same
becomes
functions.
or
defined
process
are
Definition
Linking
Grandchild
drawing
x x
x
linkable
names
unique
screen
-17.5)
defined
number.
to
parent
a
in
drawings
of
for
details
that
of
the
3.5.2
Automatic Automatic
automatic
the
assigned.
been
Setting
screen
-17.5)
automatic
of
for
DWG
System
Input
Output
Data
register
#
register
C
register
D
Register
register
allocation
the
CP-717.
detailed
Symbol
register
regiter
register
register
Number
number
register
of
allocation
Refer
procedures
3.10
Table
Table
Automatic
S
I
0
M
#
C
D
Allocation
allocation
numbers
register
of
to
Control
the
setting
for
Automatic
Number
Allocation
o
o.
o
o
Cl
o.
O
refers
numbers
Pack
them.
Register
System
Input
Output
Data
#
C
D
Function
Function
Function
Function
Automatic
:
O
X
Automatic
:
setting
the
to
symbols
to
can
CP-717
Number
Function
register
register
register
register
register
register
register
input
internal
for
performed
be
Operation
Symbol
register
register
output
external
number
number
the
head
of
register
which
on
Manual
Assignment
Table
S
I
0
M
#
C
D
X
Y
register
register
Z
A
allocation
allocation
register
numbers
symbol
the
(SIE-C877-17.4,
Automatic
Allocation
O
o
o
O
O
o
o
x
X
o
X
possible
impossible
number
have
definition
Number
and
not
3-11
Page 29
4.

INSTRUCTIONS

BASIC
4
of
All
9200SH
BASIC
instructions
the
describedindetail
are
INSTRUCTIONS
CP-
that
can
in
be
this
used
chapter.
with
4-1
Page 30
[Arrangement
of
This
Chapter]
chapter,
this
In
[Format]
[Description]
[Operation
the
Description
Description
the
of
Shows
The
perform
A
F
B
I
J
description
Register]
the
registers
user
A
F
O
O
register,
A:
A
Register
register
register
register
register register
each
of
the
of
operands
the
of
functions
storage
status
showninTable
program
I
B
x
o
F:
F
as
Used
operations.
Used
as
Used
for
Used
as
Used
as
instruction
and
of
of
the
4.1
processes.
J
o
register,
Table
a
register
register
a
relay
index
an
index
an
4.1
circuit
arranged
is
the
form
the
instruction.
CPU
internal
provided
are
:
stored
O
:
indeterminate
*
(Stored
B:
register,
B
CPU
for
logic,
for
or
internal
real
operations
register
register
the
of
registers.
inside
x
not
:
not
stored
I:I
Usage
integer,
number
(I).
(J).
the
following
in
operands
the
stored
depending
register,
Registers
and
operations.
manner.
of
the
instruction.
CPU.
These
the
on
register
J
J
:
double-length
are
case.)
integer
used
to
[Example(s)]
Describes
example
an
examples
or
of
simple
a
program
that
uses
the
instruction.
4-2
Page 31
4.1
instruction
with
INSTRUCTIONS
BASIC
4.
[
]
Instruction
]
[
with
|
[Format]
[Description]
[Operation
[Example(s)]
[Instruction]
instruction
A
the
The
ON.
enclosed
[]
to
Register]
the
of
When
A
o
When
*
:
*
Example
with
immediately
instruction
can
in
each
the
F
O
the
only
single
a
instruction.
register
B
B
o
register
B
[]
B.
*
*
accordance
In
1
MB000001
MBObOOll
[
enables
J
preceding
within
be
used
].If[]
[
is
I
o
is
I
*
the
with
conditional
register.
B
only
[]
is
instruction.
for
1
istobe
OFF:
O:
J
o
ON:
O
_J
*
*
instruction
executed
used
stored indeterminate
:
*
(Stored
:
:
(Stored
or
stored
indeterminate
or
within
MB000011
execution
when
plurality
A
a
plurality
for
x
not
:
stored
not
x
:
not
stored
not
{
].
O
according
the
value
of
stored
depending
stored
depending
to
the
the
B
of
instructions
of
instructions,
on
on
value
register
cannot
attach
case.)
the
case.)
the
of
is
be
[SEE
L01]
MBOPPOOl
UBOO
1011
IFON
SEE
LOI
I
END
Example
|
[]—
2
MB0j)j)00F
MW00001]
[
+
MBOOyOOF
IFON
J
m?
IEND
ooooi
+00100
equivalent
$
00100]
$
HB000011
O
[=>K¥00002]
equivalent
=>M»00002
4-3
Page 32
|
Child
Drawing
Referencing
Instruction
[
4.2
4.2.1
Program
Child
Drawing
[Format]
[Description]
[Operation
[Example(s)]
Control
Referencing
SEE
,
The
drawing
Referencing
example,
Register]
of
the
A
*
SEE
SEE
Instructions
Instruction
<Cliild
SEE
A01
drawing
instructionisused
when
or
cannot
"SEE
HOI"
B.
F.
*
*
A01
DWG
A
(SEE)
grand-child
or
No..
referencing
performed
be
cannot
when
a
be
written
grandchild
between
drawing
referencing
drawings
inside
a
drawing
DWG.L.
__
I
*
*
indeterminate
:
*
(Stored
Start
child
stored
:
O
J
x
not
or
execution
of
drawing
not
:
stored
stored
A01
No>
child
drawing
which
depending
of
from
from
child
a
differ
in
on
DWG.A01
parent
a
drawing.
type.
case.)
the
For
End
child
execution
of
drawing
of
A01
DEND
4-4
Page 33
4.
INSTRUCTIONS
BASIC
4.2.2
FOR
Structure
[Format]
[Description]
Statement
V
FOR
Instruction
c
FEND
The
instruction
corresponding
(B
{N
=
by
C
on
following
The
V:
C:
B,
A
A
=
A
-
each
Any
with
Any
with
to
B
sequence
FEND
1)/C}.
+
repeated
registers
registers
subscript,
registers
subscript,
by
C
sequence
instruction
The
(processing
surrounded
variable
execution.
may
of of
the
and
the
any
V
used
be
integer
any
integer
constant
I
Instruction
sequence
program)
repeated
is
starts
instruction
The
for
subscript
V=A
by
from
V,A,B,
type, type,
any
or
|
the
by
the
initial
sequence
and
register
any
register
any
register
subscript
Structure
FOR
instruction
FOR
designated
A
value
is
C.
of
J).
(I,
of
register
(B>AX),
Statement
and
numberoftimes
incremented
and
is
ended
when
integer
the
integer
the
(I,
J).
OO)
the
V>B.
type
type
[Operation
of
the
Fig.
Depth
FOR,
The
statements
structure
IF
depth
of
restricted
Register]
A
F
I
*
*
4.1
of
Structure
WHILE,
within
statement
nested
a
to
24
B.
*
v=v+c
>
the
To
the
by
(Nesting)
statements
called
is
nested
be
WHILE,
FOR,
next
FOR
"nesting".
up
Execution
IF
and themselves.
structure
nests.
V:B
£
Control
Statements
structure
This
each
can
using
__
or
x
not
not
:
stored
stored
:
I
O
J
*
indeterminate
:
*
(Stored
instruction
Structure
may
contain
A
8
to
times.
IF
and
stored
statements
depending
Statement
other
structure
WHILE,
FOR,
The
maximum
the
on
thus
is
case.)
or
[Example(s)]
The
[
for
total
(-00000
FOR
FEND
=00000
J
(-
MW00200
registers,
100
to
MWOOlOOj
+
00099
from
by
00001
MW00100
MW00199,
to
VV
00200
M
MW00200
stored
is
MW00200.
in
4-5
Page 34
|
WHILE
Structure
Statement
|
4.2.3
WHILE
Structure
[Format]
[Description]
Statement
WHILE
n-
Instruction
-
ON/OFF
Instruction
-WEND
The
instruction
long
as
OFF)
as
instruction
instruction
instruction
As
shown
in
determinedbythe
OFF)
(or
If,
result
with
example,
for
of
the
Instruction
sequence
B
instruction
the
instruction
register
sequence
the
conditions
are
sequence
to
next
Fig.
4.2,
the
first
1
sequence
sequence
2,
satisfied.
is
2
WEND.
the
condition
condition
(ie.
the
condition
execution
next
to
=OFF
(judgment
1
2
(processing
between
defined
When
executed
not
the
of
results
for
of
instruction
WEND
of
program)
WHILE
by
instruction
the
conditions
and
execution
for
register
B
of
instruction
execution
without
repetition
and
WEND
sequence
the
program
of
immediately
sequence
is
found
sequence
executing
A
Instruction
sequence
register
B
condition)
is
executed
1
are
longer
no
proceeds
instruction
preceding
1).
tobenot
the
program
1,
the
instruction
1
=ON
repeatedly
and
the
sequence
satisfied
(or
ON
satisfied,
the
with
2
is
the
ON
as
proceeds
sequence
a
Instruction
sequence
(a)
WHILE-ON-WEND
Structure
'
Fig.
4.2
.
FOR,
nested
nests.
of
WHILE,
structure
Depth
i-
|
The
statements
structure
IF
of
a
to
24
NOTE
program
CPU
the
structure
structure
will
is
stop.
Write
!
WEND
repetition
1
WHILE
;
=ON
2
To
next
the
Statement
Control
Structure
and
within
statement
themselves.
statement
continued
statement,
V
instruction
of
Execution
Statements
IF
structure
each
can
using
FOR,
that
so
endlessly
be
the
condition
will
the
by
(Nesting)
statements
This
is
nested
WHILE,
definitely
and
watchdog
=OFF
Instruction
sequence
(b)
WHILE-OFF-WEND
Structure
the
called
up
and
part
program
the
WHILE
-
"nesting".
to
IF
be
unsatisfied
timer
Statement
Structure
|
may
contain
times.
8
statements
(instruction
cannot
will
2
To
The
the
next
Statement
other
A
FOR,
maximum
is
sequence
at
some
proceed
be
activated
instruction
structure
WHILE,
thus
restricted
point.
1)
out
and
or
depth
of
If
of
the
the
the
the
4-6
[Operation
A
F
*
* *
__
the
of
Register]
or
X
not
J.
O
:
indeterminate
*
(Stored
I
B
* *
:
stored
not
:
stored
stored
depending
on
the
case.)
Page 35
4.
BASIC
INSTRUCTIONS
[Example(s)]
total
The
KOODOO
WILE
KI
ON
HI
KI
IEND
NOTE
Place
is
for
100
registers,
00100
<
00200
an
be
to
WILE
IBOOyOO
wo
+
+
N.O.
used
HfOOlOOi
00001
contact
after
IBP
00
r
5NC0FF
:
IEND
from
instruction
a
coil
pooi
MW00100
instruction.
to
MW00199,
=>I
=>11100200
=>Hf
00200
=>I
|
)
(
an
if
K
HBOOOOOO
o
|
WHILE
ON
is
(or
Structure
stored
OFF)
Statement"]
MW00200.
in
instruction
4-7
Page 36
;
IF
4.2.4
Structure
Structure
IF
The
exclusive
essential
no
(1)
Statement
Statement
IF
structure
condition
differences
Structure
IF
[Format]
[Description]
statement
exists.
between
Statement
IFON/IFOFF
|-
L
IEND
When The
the
current
current
When
The
the
current
current
The
;
take
can
Although
these
1
-
Instruction
the
IFON
instruction
valueofthe
valueofthe
IFOFF
the
instruction
value
valueofthe
process
flows
one
the
two
two.
sequence
Instruction
sequence
B
Instruction
sequence
the
of
B
are
of
two
formats
(processing
is
between
register
B
register
between
register
B
register
shown
formats
described
are
Used
IFON
is
OFF.
is
is
Used
IFON
is
is
ON.
Fig.
in
depending
program)
and
and
ON
and
and
OFF
4.3.
whether
on
separately
IEND
will
IEND
will
will
not
will
not
or
below,
be
be
there
be
executed
executedifthe
be
executed
executed
not
an
are
if
if
the
if
[Operation
[Example(s)]
of
Register]
the
If
B
Instruction
Sequence
I
To
the
next
IFON-IEND
(a)
Structure
4.3
Fig.
F.
A
;*
*
MB000108
register
=ON
instruction
Execution
=OFF
Statement
B_
I
*
*
is
ON,
MB0QQ1Q8
B
register
=OFF
Instruction
Sequence
I
To
Control
by
the
(b)
IF
Structure
the
IFOFF-IEND
Structure
instruction
next
Statement
__
x
:
not
stored
not
or
MW00021
stored
depending
are
set
the
O
J
*
(Stored
*
contents
:
stored
indeterminate
:
of
=ON
Statement
(1)
on
the
0.
to
case.)
4-8
[
IFON
J-00000
IEND
=>MI00021
Page 37
4.
BASIC
INSTRUCTIONS
(2)
IF
Structure
[Format]
[Description]
Statement
IFON/IFOFF
r-
Instruction
-
ELSE
Instruction
L-
IEND
When
the
If
be
will
current
executed
be
When
the
If
will
1
current
executed
The
process
B
2
-
the
IFON
current
executed
value
the
IFOFF
current
be
executed
valueofthe
and
register
sequence
sequence
Instruction
value
and the
of
and
instruction
InstructionisUsed:
value
and
instruction
are
flows
=OFF
1
-
2
-
the
of
instruction
register
B
the
of
instruction
register
B
sequence
shown
is
Used:
register
B
sequence
register
B
is
in
is
sequence
is
OFF,
is
sequence
ON,
1
Fig.
4.4.
ON,
only
1
OFF,
only
will
will
IF
Structure
|
only
instruction
2
will
not
instruction
be
not
only
not
2
will
instruction
be
register
B
executed.
not
Statement
be
executed.
sequence
executed.
instruction
be
executed.
sequence
=ON
sequence
If
2
sequence
If
will
2
j
1
the
will
the
be
[Operation
[Example(s)]
of
Instruction
sequence
To
the
next
(a)
IFON-ELSE-IEND
Structure
Fig.
Depth
The
FOR,
structure
FOR,
times.
IF
and
the
Register]
A
*
The
contents
number
=ON
1
instruction
Statement
Execution
4.4
of
Structure
WHILE,
statements
WHILE,
The
maximum
statements
F
B
*
*
and
to
Instruction
sequence
and
structure
or
IF
is
2
Control
Statements
IF
structure
within
depth
thus
themselves.
of
a
restricted
by
statement
nested
Instruction
sequence
To
the
(b)
the
IF
Structure
(Nesting)
statements
structure
to
24
next
IFOFF-ELSE-IEND
Structure
Thisiscalled
can
nests.
__
x
not
or
MW00010
if
0
negative
a
not
:
stored
I
*
MW00011
of
MW00010
if
1
_J
*
:
stored
O
indeterminate
:
*
(Stored
are
set
contains
to
=OFF
1
J
instruction
Statement
Statement
contain
may
"nesting."
eachbenested
using
FOR,
stored
depending
contains
number.
Instruction
sequence
(2)
other
up
WHILE,
the
on
positive
a
2
A
to
8
case.)
I-MW00010
.
IFON
HOOOO
ELSE
00001
h
IEND
00000
=>W00011
00011
4-9
Page 38
Structure
IF
Function
Statement
Referencing
Instruction
NOTE
Place is
(FSTART)
an
be
used
to
N.O.
|
contact
after
instructionÿ
a
coil
instruction.
I
)if
an
IFON
(or
IFOFF)
instruction
4.2.5
Function
[Format]
[Description]
[Operation
[Additional
Referencing
,
;
the
of
Note]
'
FSTART
The
function definition
functions
by
the
IFON(IFUFF)
i
Instruction
FSTART
from
system.
the
Register]
A
* *
When
"FSTART
functions
"FSTART"
Control
Pack
input
IBQOOOO
HBOOOOOO
:
END
:
(FSTART)
instructionisused
drawing,
of
do
the
not
a
parent
referenced
havetobe
__
I
B.
* * *
(
Enter
displayed
is
instruction
CP-717
method.
itself
Operation
IB00001
user
defined
O
J
*
(Stored
)
input
is
"
and
the
input
will
reference
to
drawing,
child
function
:
:
not
Manual
must
by
the
stored
indeterminate
not
or
the
at
of
the
displayed
be
(SIE-C877-17.4,
HBOOOOOO
o
user
an
user
or
prepared
be
since
user
x
:
stored
not
depending
stored
CP-717,
function
the
on
function
function.
they
graphic
name
the
in
advance.
already
are
on
prompted.
is
screen.
-17.5)
or
The
case.)
the
display
Refer
for
a
system
function
System
defined
of
to
details
the
The
the
on
4-10
Page 39
4.
INSTRUCTIONS
BASIC
4.2.6
Input
Bit
Integer
Double-length integer
Real
input
Address
:
*
Function
[Format] [Description]
Data
input
type
type
number
input
Indicates
Form
input
input
type
the
Input
input
Instruction
FIN
FIN
The The
forms
Designation*
Input
B-VAL
I-VAL
I-REG
L-VAL
L-REG
F-VAL
F-REG
designation
(FIN)
instruction
data
of
4.2
Table
Designates
Usually,
the
The
Designates
Usually,
The
Designates
number
function.
The
become
Designates
Usually,
The
designated
Designates
register.
The
referencing
(double-length
become
Designates
Usually,
The
with
Designates
number
function.
data)
function.
Hands
register)
the
at
used
is
input
Function
function.
bit
data
contents
|
instruction
contents
the
contents
numberofthe
the
contents
the
of
the
of
over
CP-717.
to
into
a
Input
output
the
|
|
the
become
the
input
|
the
(integer
become
input
the
of
integer
the
j
The
(integer
input
the
input
the
I
(double-length
with
input
the
function.
the
integer
input
the
input
the|—instructionisused
(real
instruction
I)—
input
the
the
real
||—
The
register
the
the
to
function.
input
store
function
register
Data
of
be
to
instruction
input
the
be
to
an
of
instruction
instruction
to
instruction
the
double-length
to
number
number
instruction
addressofthe
the
to
|
the
to
to
with
data)
to
type
data)
to
data)
is
of
input
the
the
be
register
of
function.
be
of
a
is
integer
instruction
be
the
The
function.
be
of
a
data)
become
be
the
type
the
Only
1
Forms
a or
to
used
the
is
not
double-length
used
|—
of
real
contents
is
designated
input
Function
data
into
are
Description
type.
bit
[/)
the
function.
the
integer
contents
the
the
register
not
designated
type.
to
reference
register
the
to
designated
is
necessary.
register
reference
to
data)
become
contents
integer
instruction
register
the
number
reference
to
register
of
the
input
of
is
necessary.
is
allowedinthe
function.
Input
a
function
shown
instruction
the
number
of
an
integer
with
integer
the
of
input
the
double-length
of
a
register
type
is
not
with
type.
the
with
function.
the
to
real
number
a
designated
The
number
register
in
function.
designated
when
designated
the
type.
function.
the
register
necessary.
the
function.
the
when
contents
become
(an
case
Instruction
register.
input
Table
4.2.
used
is
type
to
is
designated
number
type
reference
to
register.
referencing
with
the
the
function.
integer
designated
The
designated
register.
referencing
(real
input
the
arbitrary
of
user
a
(FIN)
the
with
The
the
number
number
type
when
contents
number
The
the
number
the
to
integer
function.
[Operation
[Additional
the
of
Note]
Register]
A
o
graphic
The
at
input
not
will
Manual
NOTE
is
It
are
B
o
I
O O
F
o
display
CP-717
the
displayed
be
(SIE-C877-17.4,
recommended
type.
bit
a
of
not
J
of
function
after
the
on
that
stored
O:
indeterminate
:
*
(Stored
inputs
designating
screen.
-17.5)
for
I-REG,
or
is
the
Refer
details
L-REG,
not
X
:
not
stored
displayed
data.
the
Control
to
the
on
F-REG
or
stored
depending
when
The
input
"FIN
"FIN"
Pack
method.
be
used
the
on
[
Enter
instruction
if
the
Operation
CP-717
case.)
I/O
)
"
itself
data
is
4-11
Page 40
f
Function
4.2.7
Output
Function
Instruction
Output
[Format]
[Description]
Output
Data
Bit
output
Integer
type
Double-length
type
output
Real
number
output
output
integer
type
(FOUT)
Instruction
FOUT
The
register
are
Form
,
FOUT
as
shown
Output
(FOUT)
instruction
output
in
Table
Table
4.3
Designation*
B-VAL
I-VAL
-REG
I
L-VAL
L-REG
F-VAL
'
F-REG
data
4.3.
Function
is
usedtotake
of
the
function.
Designates
Usually,
function.
with
Designates
Usually,
The
with
Designates
register.
The
referencing
The
The
with
Designates Usually,
The
the
instruction.
Designates
integer
The
designated
instruction
data)
Designates
Usually,
The
with
Designates
type
is
The
niunber
number.
The
Output
the The
the
number
the
output
the
number
number
=>
instruction
output
designated
the
the
the
output
register
the
type
number
is
storedinthe
are
the
output
data
the
number
register.
designated
instruction
=>
data)
out
the
contents
forms
of
Data
Forms
Description
output
the
output
the
=>
data
the
of
the
data
=>
data
with
register.
of
when
not
the
=>
the
The
when
are
to
|
instructionisused
O—
data
designated
to
output
instruction
(integer
designated
to
output
the
integer
function.
not
is
(integer
number.
be
to
output
instructionisused
(double-length
the
number
output
to
double-length
the
referencing
necessary.
register
to
output
instruction
(real
number
designated
to
output
numberofthe
referencing
not
is
stored
in
,
ofafunction
output
data
be
bit
type.
of
a
(bit
data)
are
the
with
Integer
of
be
a
reference
used
is
data)
are
storedinthe
the
with
be
the
contents
registerisdesignated
type
necessary.
data)
of
the
be
The
be
of
is
be
necessary.
the
stored
are
a
double-length
to
integer
designated
contents
integer
the
output
the
with
real
a
used
to
data)
are
the
with
the
contents
real
the
function.
The
register
referenceafunction.
number
referenceafunction.
number
fromafunction
reference
to
storedinthe
instruction.
|
O
type.
the
function.
instruction.
=>
integer
of
an
register
the
in
integer
data)
of
function.
data
designated
storedinthe
instruction.
=>
output
with
stored
are
with
double-length
a
register
type
(double-length
number.
type.
real
a
type
data
designated
the
number
register
of
output
the
register
register
type
when
type.
in
the
=>
The
=>
register
(real
is
4-12
(Indicates
*
[Operation
of
the
the
B-VAL I-VAL
I
L-VAL
L-REG
F-VAL
F-REG
output
Register]
-REG
designation
A
F
B
iO
o
o
O
o
x
o
o o
O.
x
Q.
o
o
x
o. o.
X
O
o
o.
u
u
o
I
o
o
O
o
at
the
the
CP-717.
o
o
J
stored
:
O
:
indeterminate
*
(Stored
or
x
not
not
:
stored
stored
depending
on
the
case.)
o
o
o
O
o
1
Page 41
4.
BASIC
INSTRUCTIONS
[Additional
[Example(s)]
Note]
graphic
The
is
input
itself
will
Operation
Table
4.4
program
NOTE
recommended
is
It
of
not
display
the
at
be
not
Manual
MBOOOOOO
IffOOlO
MBOOOOQl
UL0001
shows
example
Input
INPUT-
INPUT-2
INPUT-3
INPUT-4
bit
a
type.
function
of
CP-717
after
displayed
(SIE-C877-17.4,
I!
=====>
1
======>-
function
the
above.
Table
Data
Data
B-VAL
1
REG
I
-
B-VAL
REG
L-
that
I-REG,
outputs
designating
the
on
INPUT-
INPUT-2
INPUT-3
INPUT-4
data
I/O
Function
4.4
Form
L-REG,
Function
|
displayed
is
the
screen.
-17.5)
Refer
for
FUNC-030
1
OUTPUT-
OUTPUT-2
OUTPUT-3
OUTPUT-4
INPUT-5
MA00100
defined
I/O
Data
Output
OUTPUT-1
OUTPUT-2
OUTPUT-3
OUTPUT-4
F-REG
or
data.
to
details.
1
by
function
Forms
Data
be
Output
when
"FOUT
The
"FOUT"
Control
the
QB00000
===>
HB000021
==>
Data
B-VAL
II
-REG
B-VAL
L-REG
used
Instruction
[
instruction
Pack
O
MV00200
O
UL00201
definition
Form
the
I/O
if
(FOIJT)
Enter
CP-717
in
data
~)
the
are
]
"
Table
4.5
function
the
body
of
Input
register
B
IW0010
Register
B
ML00011 MW00100
MW00101
ML00102
MB001040
shows
the
the
registers
I/O
function.
Table
Data
(=MBOOOOOO)
(=MB000001)
correspondence
when
the
I/O
4.5
Correspondence
Referencing
Body
of
Function
Input
Register
XBOOOOOO
XW00001
XB000001
XL00002
AWOOOOO
AW00001
AW00002
AB000040
relationships
data
I/O
within
the
are
the
Function
Function
Output
Register
YB000000 YW00001
YB000001
YW00002
between
referenced
Relationships
Main
Register
B
MW00200
Register
B
ML00201
the
I/O
within
Output
(=OBOOOOO)
(=MB000021)
data
the
Data
and
main
4-13
Page 42
|
Comment
Instruction
(COMMENT)
|
4.2.8
Comment
Comments
Instruction
can
Alphanumeric
[Format]
[Description]
[Operation
of
be
written
characters
"character
character
The
merely
target
the
character
A
instruction).
Register]
the
A
o
o
NOTE
Do
not
branching
of
<Example
(COMMENT)
any
at
may
be
used
string"
string
a
comment,
of
the
it
number
string
B
o
1>
in
I
a
a
o o
F
prepare
position
for
enclosed
not
is
of
12
J
program
series
SB000004
SB000004
the
in
comments.
with
executed
steps
of
characters
O
*
(Stored
that
sequence
of
«—
'
ABC
DWG
program
:
is
treated
"
"
as
instruction.
an
in
:
:
there
user
the
be
will
stored
X
indeterminate
not
or
is
comment
a
instruction
DB000001
DB000002
State
Comment
instruction
or
as
program.
equivalent
stored
not
:
depending
stored
groups.
there
isabranch
user
comment.
a
Be
aware
function
to
on
program.
Since
thatitbecomes
1
step
case.)
the
instructioninthe
O
DB000005
O
this
(1
basic
middle
Wrong
is
1
SB000004
M
ABC
*—
Comment
SB000004
;
DBOOO
001
DB000002
there
State
instruction
!
is
branch
no
o
DB000005
Correct
4-14
Page 43
Comment
BASIC
4.
Instruction
INSTRUCTIONS
(COMMENT)
<Example
<Example
2>
3>
SB000004
H
diagram
the
In
at
.
®
SB
000004
H
ABC
[
Do
not
prepare
instruction
(D
above,
*
«—
Comment
between
DB000001
DBOol)Cl02
not
insert
do
4
DB000001
H
DB000002
II
instruction
program
a
contact
that
instructions.
DB000005
comment
a
DB000005
there
O
O
o
O
is
Correct
instruction
Wrong
comment
a
DBOOOOOO
ABC
'
'
DB000001
II
'
'
'
ABC
DBOOOOOO
II
or
DBOOOOOO
ABC
'
DBOOOOOI
I
i
DBOOOOOI
DB0
00005
o
DB000005
o
DB000002
O
DB000005
O
Wrong
Correct
Correct
4-15
Page 44
Expantion
|
Program
Execution
Instruction
(XCALL)
]
4.2.9
Expansion
[Format]
[Description]
[Operation
Program
XCALL
The
Expansion
,
table
expansion
converted
:
plurality
a
expansion
Register]
the
of
A
o
Execution
<type
XCALL
programs
format
programs
ladder
program
MCTBL
IOTBL
ILKTBL
ASMTBL
F
*
Instruction
expansion
of
instruction
programs
program
of
XCALL
cannot
Table
Symbol
.1
B
O
*
(XCALL)
program>
is
used
refer
are
the
to
showninTable
as
converted
executed
is
instructions
be
Types
4.6
Constant
I/O
Interlock
Parts
J
*
to
execute
table
into
with
may
called
more
Expansion
of
conversion
composition
stored
:
O
indeterminate
:
*
(Stored
an
format
ladder
be
than
Program
table
table
X
not
or
expasnsion
programs.
With
4.6.
programs
XCALL
the
in
used
once.
Programs
Type
(M
register)
table
table
stored
not
:
depending
stored
program.
There
the
CP-9200SH,
instruction.
drawing,
one
are
execution.
for
the
on
types
4
these
Although
same
the
case.)
of
A
[Example(s)]
XCALL
XCALL
ILKTBL
DWG.XJCX
ILKTBL
Expansion
XPROG
XPEND
The
program
[
viewed
Conversion
ILKTBL
conveted
cannot
the
at
Program
ladder
be
CP-717.
4-16
:
Page 45
Continuous
[
execution
type
direct
4.
input
BASIC
INSTRUCTIONS
instruction
(INS)
[
direct
point
the
I/O
of
I/O
Direct
The
independent
the
until
Continuous
[Format]
[Description]
Instructions
instructions
I/O
system
of
the
executionofthe
operation
Execution
INS
has
Type
[
Parameter/head
Register
T
[Register
INS
The
continuously
can
OPT.
is
operation,
ADR
0
1
2
3
4
;
N+3
apply
Type
W
W W
W
W
;
W
instruction
direct
an
If
Symbol
RSSEL MDSEL
STS
N
IDl
IDN
used
are
(batch
I/O
direct
I/O
completed.
been
Direct
address
address
performs
input
occurred
error
interruption
Table
Module Module
Status
Number
Input
;
Input
to
execute
input/batch
instruction.
Input
Instruction
address
(except
(except
conforming
direct
input
the
are
UO-01/2000IO.
in
by
the
INS
4.7
data
Instruction
Name
designation designation
words
of
1
;
data
N
output).
of
for for
to
even
system
1
2
If
inputs
An
The
subsequent
(INS)
the
data
#/C)
#/C)
with
previously
single
a
to
single
a
is
prohibited.
Parameter/Data
Designation
(The
details
Status
for
Designation
Outputs
there
the
is
and
input
table
subscript
module.
If
no
word,
of
module
are
each
word
of
number
input
error,
an
outputs
output
or
instruction
i
]
parameter
set
error
register
B
Specificatii
for
described
output
of
continuous
data.
is
stored.
0
an
in
]
only
The
all
at
occurs,
turns
Table
performing
(1)
and
bit
with
user
carried
is
is
not
table
modules
ON.
input
(2)
below.)
response
input
program
out
executed
contents,
register
B
During
Input
Output
words
at
that
IN
IN
OUT
IN
OUT
i
OUT
Method
*
(1)
(2)
of
RSSEL
RSSEL
MDSEL
the
For
For
the
F
a
Input
a:
b:
Rack
Slot
c:
d:
Data
and
LIO-Ol:
200010:
CB
module
number
number
offset
MDSEL
Settings
Designates
is
mounted.
Hexadecimal
However,
LIO-Ol:
200010:
Designate
LIO-Ol
Designates
module
module.
87
b
type
(1
(1
(0
d
the
xx
=
yy
=
designate
Mounting
itself
Mounting
module
rack
the
module.
the
type
in
1:
4)
9)
7)
rack/slot
expression:
number
rack slot
number
the
rack/slot
rack/slot
connectedtothe
input
data
number/slot
rack the
200010
43
c
Discrete
0:
Register
where
the
xxyyH
(01H
(oo„
mounting
number number
offset
rackofthe
0
d
input
module
input
module
xx
yy
module
04„)
ODH)
=
target
2s
rack/slot
LIO-Ol
on
on
2000IOIF
the
200010
internal
target
for
number/input
target
Hexadecimal:
as:
abcdH
4-17
Page 46
Continuous
|
execution
type
direct
input
instruction
(INS)
j
Designation
explained
EACM1
'
2
EACH
RSSEL
of
ex
in
®
CP-9200SH
0
I
PS
CPB
0
12
PS
to
bus
:
bus
PS
PS
configuration
3-
12
B
f
0
12
3-
0
4
B
2
52
0
S*'
n
S
B
2
1
shown
below
9
9
is
MDSEL
and
ex
.
©
j/
9
L
0
L
0
11
2
0
0
13
E
f
F
F
in
200010
system
a
System
BACI41
,i
EACII2
[Operation
[Example(s)]
of
i
5
the
i
,
'
Data
ex©
ex©
ex® ex©
ex® ex©
Register]
F
A
o
O
input
H0204
b
ho
hi
LIO-01
(RACK1/SLOT9)
RSSEL=0109H
LIO-01
(RACK2/SLOT2)
RSSEL=0202H
B2501
(Discrete
input)
(RACK2/SLOT11)
RSSEL=020BH
B2701
(Register
input)
(RACK2/SLOT11)
RSSEL=020BH
B2500
(Discrete
output)
(RACK2/SLOT11)
RSSEL=020BH
B2700
(RACK2/SLOT11)
(Register
RSSEL=020BH
B
x
from
LIO
J
I
o
o
mountedatrack2,slot
output)
O
*
(Stored
First
word
MDSEL=0
Second
word
MDSEL=1
(RACK1/SLOT6)
First
word
MDSEL=0160H
(RACK2/SLOT5)
Fourth
word
MDSEL=1254H
(RACK1/SLOT5)
word
First
MDSEL=0150H
(RACK2/SLOT4)
Seventh
MDSEL=1247H
:
stored
indeterminate
:
X
:
stored
or
not
input
is
output
is
connected
input
is
connected
is
input
connected
input
is
connected
word
not
4.
input
is
stored
depending
=>MW00100
=>MW00101
=>MW00103
on
to
to
to
to
the
2000IOIF
2000IOIF
20001
OIF
2000IOIF
case.)
4-18
Input
*
INS
MA00100
data
stored
MW00104.
in
Page 47
4.
INSTRUCTIONS
BASIC
4.3.2
Continuous
[Format]
OUTS
[Description]
Execution
Parameter/head
[
Register
T
Type
Register
The
OUTS
continuously
apply
can
OFF.
is
If
operation,
Type
ADR
W
0
1
W
2
W
W
3
W
4
i
:
W
N+3
Continuous
|
Direct
addressofthe
address address
instruction
performs
output
direct
error
an
interruption
Table
4.8
Symbol
RSSEL
MDSEL
STS
N
OD1
Module Module
Status
Numberofwords
Output
l
ODN
Output
Output
(except
(except
conforming
direct
is
the
occurred
by
OUTS
Name
designation designation
data
:
data
execution
type
Instruction
data
table
#/C)
for
#/C)
for
output
with
previously
to
a
to
UO-01/2000IO.
in
the
even
a
system
single
is
Instruction
Designation
1
(The
details
2
Status
Designation
1
N
Setting
output
direct
(OUTS)
)
1
subscript
set
parameter
single
module.
error
no
If
word,
register
B
prohibited.
Parameter/Data
Specifications
module
of
described
each
for
output
are
of
output
word
numberofcontinuous
data
instruction
The
all
at
Table
performing
for
(1)
with
only
occurs,
turns
(2)
and
bit
output
table
module
ON.
output
below.)
response
(OUTS)
contents,
register
B
During
Input
Output
words
|
that
IN IN
OUT
IN
IN
:
IN
[Operation
[Example(s)]
of
Method
*
Register]
the
A
O
Two
ho
FIB
O
words
H030A
b
2
b
Output
xxxxx
b
Output
byyyyy
OUTS
setting
of
x
I
output
data
data
MA00200
RSSEL
I
O
LIO-Ol
to
1
2
J
o
MDSEL
and
:
O
indeterminate
:
*
(Stored,
stored
or
is
not
mountedatrack3,slot
the
same
X
not
:
stored
stored
depending
=>MW00200 =>MW00201
=>MW00203
MW00204
=>
MW00205
=>
as
10.
for
INS.
on
the
case.)
4-19
Page 48
N.O.
[
Contact
Instruction
(
|
j
)
|
4.4
4.4.1
Sequence
The
circuit
N.O.
Contact
[Format]
Circuit
elements
No.
2
3
4
5
6
7
8
Si
10
11
Instruction
'
Any
Any
with
.
Instructions
showninTable
Table
contact
contact
coil
pulse
pulse
timer
timer
timer
timer
(
H
type
type
\
Circuit
instruction
instruction
'
)
,
h
register
register
h
(10ms
(10ms
(Is
(Is
Sequence
N.O.
N.C. Coil
coil
Set
Reset
Rising
Falling
On-delay
Off-delay
On-delay Off-delay
bit
bit
subscript
4.9
Sequence
4.9
Element
unit)
unit)
unit)
unit)
are
usedincombination
Circuit
Symbol
~
f~
I
-Vh
-tsH
dRH
-J=~
~br
h
-r
-r
b
d
T-
Elements
Connection
(1)
Branching
(2)
Parallel
(3)
Parallel
to
prepare
Remarks
indication
connection connection
sequence
elements
point
circuits.
~T
""P
[Description]
[Operation
[Example(s)]
The
referenced
(OFF).
the
of
When
MB
MB000101
N.O.
Register]
A
F
o
o
MB000100
MB00010©
00
0001
contact
register
B
X
II
ON
OFF
ON
OFF
instruction
(ON)
is
1
J
I
o
o
becomes
ON,
the
sets
and
stored
:
O
indeterminate
:
*
(Stored
MB000101
1
status
OFF
to
X
or
not
MB000101
o
the
of
value
if
the
stored
not
:
stored
becomes
-
register
B
of
the
depending
ON.
if
the
ON
to
referenced
case.)
the
on
value
register
of
tl
is
4-20
Page 49
N.C.
j
.
Contact
I
Coil
4.
BASIC
INSTRUCTIONS
Instruction
Instruction
(
)
)
N.C.
Contact
[Format]
[Description]
[Operation
[Example
(s)]
instruction
Any
Any
with
The
referenced
(OFF).
Register]
the
of
A
O
When
MB
MB000101
(
bit
type
bit
subscript
14
N.C.
contact
F.
O
MB000100
MB000100
000100
-M~
register
type
register
BII
x
ON
OFF
ON
OFF
)
register
instruction
is
1
o o
becomes
_
(ON)
J
ON,
the
sets
and
to
stored
:
O
:
indeterminate
*
(Stored
MB000101
MB000101
_
status
ON
not
or
O
the
of
the
if
x
not
:
stored
becomes
register
B
value
stored
depending
OFF.
of
OFF
to
referenced
the
on
the
the
if
case.)
value
register
of
the
is
0
Instruction
Coil
[Format]
[Description]
[Operation
[Example(s)]
(
"
Any
(except
Any
The
the
immediately
of
Register]
the
A
O
When
MB000100
MB000101
)
<H
bit
type
#
for
bit
type
coil
instruction
immediately
preceding
F
Q
L_
-
MB000100
MB000100
ON
OFF
ON
OFF
register
and
register
registers)
C
with
subscript
O
the
sets
precedingBregister
register
B
[~j
j
B
Q-Q
x
L__l
-
becomes
ON,
status
of
is
:
stored
O
:
indeterminate
*
(Stored
MB000101
MB000101
(except
the
OFF.
or
o
for
#
referenced
is
X
not
ON
:
not
and
stored
stored
becomes
and
C
register
to
0
depending
ON.
registers)
to
1
(OFF)
on
(ON)
if
the
the
if
the
status
case.)
status
of
of
the
4-21
Page 50
[
Set
coil
Reset
/
coil
instruction
(—
[S}-|
-[R]-|
/
)~|
4.4.4
Reset
Coil
Set
[Format]
[Description]
/
Set
coil
[Operation
[Example(s)]
<Example
of
Coil
The
and
OFF
the
,0
.
1>
(instruction
Any
bit
(except
Any
bit
(except
set
maintains
when
Register]
F
AT
10.
Case
[S]H
registers)
C
with
registers)
C
/
type
for
type
for
register
and
#
register
and
#
(—
{S}
coil
instruction
that
execution
B
X
where
the
turns
ON
status.
conditions
J
I
o
o
same
MBQOOOOO
MByOOOOl
)
-[RH
subscript
the
Conversely,
are
:
O
:
*
(Stored
output
Reset
coil
output
stored
ON
satisfied,
X
the
not
:
indeterminate
stored
not
or
destination
is
O
0
'
Any
bit
(except
Any
bit
(except
type
for
type
for
register
#
and
register
#
and
registers)
C
registers)
C
{R}
execution
when
reset
and
maintains
stored
depending
designated
coil
conditions
instruction
that
OFF
the
on
multiple
BOOJOO
with
turns
status.
case.)
times.
subscript
satisfi*
are
outp
the
The
(1)
(2)
When
When
MBy00002
MB000003
above
KBOOOOOO
NB000002
MB000003
example
HBOOOCOl
OBOOOOO
OBOOOOO OBOOOOO
-MM
-
acts
is
is
as
OFF, ON,
in
with
with
the
the
the
graph
"set
"reset
OBÿ
o:
5JP
below.
_
1
instruction,
coil"
coil"
instruction,
OBOOOOO
OBOOOOOttirns
turns
ON.
4-22
Page 51
4.
BASIC
INSTRUCTIONS
<Example
2>
When
all
execution
MBOOOOOO
OB(jOOOO
Mÿ000002
the
operation
above
During
step.
In
>1
processing,
case,
conditions
T
OBOOOOO
is
Set
coil
|
ON.
are
OMjX
0
o:
the
contents
ultimately
/
1000
ON.
Reset
the
of
instructions
coil
Rising
I
This
cessed
ON.
OBOOOOO
OBOOOOO
output
Pulse
part
of
assuming
is
are
(
[S]—
Instruction
the
program
processed
processed
is
rewritten
-{R]-|
(ÿi=-
as
as
is
pro¬
OFF.
ON.
each
)
is
|
/
OBOOOOO
with
)
1.4.5
Rising
[Format]
[Description]
[Operation
Pulse
of
[Example(s)]
Instruction
Any
bit
[
Any
bit
the
With
changes
one
scan.
register.
the
Register]
A
1
O
I
IB00001
When
BO
00
M
00001
IB
000100
MB
rising
from
F
O
100
IB
(
-=F-
type
type
The
B1I
x
is
00001
ON
OFF
ON
OFF
)
register register
I'
pulse
instruction,
OFF
to
designated
I
O
ON
turns
used
to
store
MB000100
-I
J
(except
with
ON,
the
register
J
o
from
for
#
subscript
when
status
:
O
:
*
(Stored
OFF,
previous
the
registers)
C
and
status
the
X
not
for
register
B
for
not
:
stored
(except
the
of
used
is
stored
indeterminate
or
MB000101
value
of
MB000101
o
J
and
#
the
of
storage
stored
depending
turns
IB00001.
registers)
C
immediately
ON
turns
previous
the
of
on
stays
and
ON
preceding
and
stays
value
case.)
the
ON
B
ON
during
register
during
the
of
scan.
1
B
MB000101
ON
OFF
_n
lscan
lscan
4-23
Page 52
Rising
Falling
Pulse
Pulse
Instruction
Instruction
(ÿF-
(
)
4.4.6
Falling
[Format]
Pulse
IB00001
OFF
OFF
ON
NOTE
In
the
is
used
value
Please
[
Instruction
Any
bit
f
bit
Any
[
Table
'
above
rise
for
IB00001.
of
be
careful
(—V)
type
type
4.10
Input
(Previous
example,
detection
register
register
Register
MB000100
value
OFF
ON
ON
the
of
makeamistake.
not
to
(except
subscript
with
Status
IB00001)
of
with
Rising
instructionisused
IB00001.
for
#
and
(except
MB000100
registers)
C
for
Pulse
MB000100
(IB00001
OFF
OFF
ON
for
not
used
is
and
#
C
Instruction
Result
stored)
rise
detection
only
registers)
for
1
storing
I
MB000101
OFF OFF
OFF
of
MB000100
the
bi
previoi
[Description]
[Operation
[Example(s)]
With
register
during
B
of
the
]0
When
MB000
IB00001
MB000100
MB000101
the
changes
scan.
1
register.
Register]
A
F
'ÿ
O
IB00001
100
00001
IB
falling
B
x
is
ON
OFF
ON
OFF
ON
OFF
pulse
from
designated
The
I
o
turns
used
to
MB000100
instruction,
ON
to
j
o
OFF,
store
-1L-
OFF,
register
O:
:
*
(Stored
MB000101
the
previous
n
1
scan
when
the
the
stored
indeterminate
MB000101
status
is
used
X
not
or
value
of
:
turns
not
stored
o
;
status
the
storage
for
stored
ON
of
IB00001.
1
scan
1
of
the
register
B
of
depending
and
immediately
turns
previous
the
the
on
ON
stays
ON
during
and
case.)
preceding
ON
stays
valueofthe
scan.
1
B
4-24
Page 53
4.
BASIC
INSTRUCTIONS
On-delay
[Format]
Timer
-fSet
On-delay
I
Table
4.11
Input
IB00001
(Previous
OFF OFF
:
.OFF
"
ON ON
NOTE
example,
above
the
In
is
used
value
Please
Instruction:
value
Set
value
Count
value:
for
of
be
detection
fall
IB00001.
careful
unit
:
constant,
subscript
any
register
value
integer
Count
Timer
Instruction:
Register
MB000100
value
OFF
the
not
to
of
measurement=0.01
]-
any
(0
with
Status
IB00001)
of
-
ON
instructionisused
of
IB00001.
makeamistake.
integer
655.35sec
to
register
type
subscript
unit
with
Falling
(IB00001
MB000100
seconds
register,
type
in
:
O.Olsec
(except
(except
Falling
|
of
measurements.
Pulse
Result
MB000100
stored)
OFF
ON ON
for
is
fall
used
not
(-(’}-)
any
or
unit)
for
and
#
#
and
for
C
Pulse
Instruction
detection
only
for
integer
registers),
C
registers)
Instruction
seconds
01
MB000101
OFF
OFF OFF
of
MB000100
storing
type
register
any
the
integer
(
(-{']-)
l
but
previous
with
type
)
[Description]
With
the
immediately
when
"Count
The
timer
becomes
counting
value
A
The
Thus,
(1)
OFF
is
equal
on-delay
exercise
When
MBOOOOOO
IFON
MB000100
IEND
the
In
executed,
on-delay
operation
started
used
timer
precedingBregister
value
the
in
to
timer
caution
in
the
IF
value".
Set
=
stopped
is
middle
the
from
actual
instruction
when
structure
:
{
:
example,
above
accordingly
instruction,
is
when
counting.
of
beginning
counted
(-f
using
it
statement.
T5.00
when
time
MWOOOll}
MBOOOOOO
is
not
the
ON.
the
status
(0.00s).
time
}-)
in
IF,
counted.
timeiscounted
The
status
immediately
the
of
When
counts
the
is
100
X
when
WHILE,
Timer
/
MB000101
is
OFF,
The
the
of
register
B
stored
the
or
FOR
(D
o
the
instruction
time
while
register
B
precedingBregister
turns
in
the
instruction
statement.
operation
the
status
becomes
ON
count
is
timer
of
remains
of
the
ON
again,
executed.
the
register.
(D
is
not
stopped.
4-25
Page 54
On-delay
|
Timer
Instruction:
unit
of
measurement=0.01
seconds
]-
(
)
|
-f
(2)
(3)
When
In
X
When
used
in
p
\-
:
o
WHILE
I<
ON
:
MB000100
:
INC
I
WEND
the
above the
timer
time
scan
in
used
MB000000
WHILE
00100
example,
®
set
FOR
structure
{
5.00
since
is
also
value,
structure
instruction
executed
time
so
statement
statement
/
MW00011
100
is
counted
=>i
Timer
MB000101
}
sequence
times.
Thus,
faster
(D
than
O
(3)
is
executed
the
time
real
is
time.
Instruction
sequence
times
100
counted
for
(D
(OS
1(
[Operation
[Example(s)]
Register]
the
of
A
o
_
MB000100
MB000101
FOR
:
MB000100
!
.FEND
"
In
MB000100
above
the
the
X
F
o
scan
ON
OFF
ON
OFF
time
B
X
.1=000000
example;
timer(Dis
set
value,
J
I
o
o
[T5.00
MW00011]
to
{
also
00099
5.00
since
MW00011
instruction
executed
so
time
stored
:
O
:
indeterminate
*
(Stored
MB000101
1 1
by
counted
is
or
not
O
00001
100
X
not
:
stored
Timer
MB000101
}
sequence
times.
Thus,
faster
stored
depending
(D
O
(J)
than
executed
is
time
the
real
on
time.
the
Instruction
sequence
100
is
counted
case.)
times
for
(T)
(0=
1C
4-26
MW00011
NOTE
MW00011
Set
unused
an
500
0
works
1ÿ5.00s-TS)
(Ts
=
scan
timer
as
register.
count
1
value)
set
register.
Thus,
is
it
essential
that
there
overlaj
is
no
Page 55
4.
BASIC
INSTRUCTIONS
Off-delay
[Format]
Timer
[Description]
Instruction:
Set
value
4
Set
value
Count
With
immediately
when The
timer
becomes
counting
value
A
the
With
Therefore,
structure
(1)
When
Off-delay
Count
:
value:
off-delay
the
precedingBregister
"Count
operation
ON
is
started
equal
off-delay
pay
statement.
used
MB000000
IFON
I
MB000100
i
IEND
unit
of
value’]-
constant,
subscript
integer
any
register
value
=
is
the
in
from
the
to
timer
attention
IF
in
Timer
measurement=0.01
with
timer
Set
stopped
middle
actual
structure
Instruction:
integer
any
(0
655.35sec
to
register
type
subscript
instruction,
value".
when
counting.
of
beginning
the
counted
instruction,
using
when
statement
{
5.00
is
MW00011
type
(except
OFF.
the
time
the
the
of
unit
seconds
register,
O.Olsec
:
in
(except
for
for
the
timeiscounted
The
status
status
of
When
(0.00s).
is
100
X
is
time
counted
off-delay
Timer
/
T}
measurement=0.01
#
(
or
unit)
#
and
-I
any
and
)
V
integer
C
registers),
registers)
C
while
of
the
register
B
immediately
the
register
the
B
storedinthe
when
instruction
count
the
instructionisexecuted.
in
(D
MB000101
O
seconds
type
any
the
(
register
integer
status
becomes
precedingBregister
again,
OFF
turns
register.
IF,
WHILE,
and
-l
with
type
of
OFF
FOR
>
the
the
I
)
(2)
(3)
the
In
executed,
When
b
WHILE
b
ON
MB000100
INC
WEND
In
the
scan
X
When
MB000000
FOR
MB000100
FEND
used
o
I
:
i
the
used
i
above
time
in
ooioo
<
1
above
timer0is
time
in
example,
is
not
WHILE
example,
set
value,
FOR
structure
1=00000
when
counted.
structune
{
5.00
since
also
so
to
[
5.00
MB000000
The
statement.
is
timer
Timer
MW00011
instruction
executed
timeiscounted
statement
00099
by
100
_
00001
Timer
MW00011
T]
OFF,
operation
©
MB000101
}
sequence
times.
Thus,
faster
0
MB000101
the
instructionoftimer0is remains
stopped.
=>l
Instruction
O
0
than
O
is
executed
the
time
real
time.
sequence
100
counted
is
Instruction
sequence
times
for
not
(I)
(0ÿ1
100
0
In
time
example,
timer
set
the
above
the
scan
X
is
©
value,
since
also
so
instruction
executed
time
is
counted
100
sequence
times.
Thus,
faster
©
than
is
executed
the
timeiscounted
real
time.
100
times
(05=1
for
100
4-27
Page 56
-(
delay
|
Off-
Timer
Instruction:
unit
of
measurement-0.01
seconds
(
>)[
[Operation
[Example(s)]
of
the
MB000100
MB
MW00011
Register]
A
F
O O
MB000100
000101
NOTE
In
the
sure
occur.
OFF
OFF
above
to
set
B
x
ON
ON
500
0
I
o
[
example,
unused
an
J
o
5.00
stored
:
O
indeterminate
:
*
(Stored
MWOOOlf].
MW00011
register
X
not
or
MB000101
O
1
functions
for
the
count
not
:
stored
1
(Ts
stored
depending
scan
=
the
as
register
set
count
value)
register
that
so
on
the
an
case.)
of
the
overlap
timer.
will
I
nc
4-28
i
-
!•
*
:
Page 57
4.
BASIC
INSTRUCTIONS
On-delay
[Format]
[Description]
Timer
Instruction:
-{
*Set
value value
Set
Count
With
immediately
when
The
timer
becomes
counting
A
value
With
Therefore,
structure
(1)
When
On-delay
|
unit
of
Count
value:
on-delay
the
"Count
operationisstopped
OFF
is
equal
off-delay
the
pay
statement.
used
value
:
constant,
subscript
integer
any
register
precedingBregister
value
the
in
started
the
to
timer
attention
in
IF
MB000000
IFON
i
MB000100
:
IEND
Timer
measurements
}-
integer
any
(0
to
type
with
subscript
timer
=
instruction,
value".
Set
middle
from
the
beginning
actual
counted
instruction,
when
structure
{S500
Instruction:
type
65535sec
register
(except
is
when
the
counting.
of
time
the
using
statement
MW00011
second
register,
:
in
(except
the
ON.
status
(Os).
XI
time
on-day
the
/
units
lsec
for
time
The
of
When
is
stored
counted
is
Timer
}
of
measurements
-Is
1-
or
unit)
#
and
and
#
counted
is
immediately
the
the
B
in
)
any
C
of
(
for
status
when
instruction
(D
MB000101
O
integer
registers),
C
registers)
while
the
register
the
count
the
in
second
type
any
the
register
B
precedingBregister
turns
register.
(
register
integer
status
becomes
again,
ON
-f
h
with
type
of
instructionisexecuted.
FOR
IF,
WHILE,
and
)
the
ON
the
|
(2)
(3)
the
In
executed,
used
When
o
b
WHILE
i
b
ON
MB000100
;
INC
WEND
the
In
scan
X
used
When
MBOOOOOO
FOR
;
MB000100
FEND
above
<
above
the
•:
example,
time
in
WHILE
ooioo
I
example,
timer(Dis
set
time
FOR
in
1=00000
is
not
structure
[S
value,
structure
{S500
when
MBOOOOOO
counted.
MW00011
500
since
instruction
also
executed
timeiscounted
so
statement.
to
00099
MW00011
The
timer
statement.
/
100
by
00001
is
OFF,
operation
Timer®
MB000101
]
sequence
times.
Timer
Thus,
faster
(T)
MB000101
}
the
instruction
remains
=>i
O
is
®
the
than
O
stopped.
executed
time
real
time.
timer(Dis
of
Instruction
sequence
100
is
counted
Instruction
sequence
times
for
not
(D
(0ÿ1
100
0
the
In
3ÿ99),
scan
X
above
the
timer(Dis
time
example,
value,
set
since
also
so
instruction
executed
time
counted
is
100
sequence
times.
Thus,
faster
(D
than
is
executed
the
time
real
is
time.
times
100
counted
for
(0ÿ1
100
4-29
Page 58
On-delay
[Operation
[Example(s)]
Timer
Instruction:
Register]
the
of
A
o
F
o
!
unit
of
measurements
I
B
x
O
O
second
stored
:
O
:
indeterminate
*
(Stored
or
(
H*
X
not
)
F
not
:
stored
|
stored
depending
on
the
case.)
MB000100
ON
UB000100
OFF
ON
MB000101
OFF
'
500
MW00011
NOTE
above
the
In
sure
occur.
set
to
0
example,
an
1
s
500s-Ts
(Ts
unused
500
MW00011
scan
=
MW00011
register
set
for
value)
functions
the
count
MB000101
}
as
register
the
O
count
register
that
so
an
the
of
overlap
timer.
will
Bt
noi
4-30
1
!
Page 59
Off-delay
Timer
Instruction:
Off-delay
j
unit
Timer
of
measurements
Instruction:
second
1
units
of
measurement-
*l-
)
-l
(
4.
INSTRUCTIONS
BASIC
second
1
-{
(
)
|
sl-
[Format]
[Description]
-[
Set
value value
Set
Count
With
immediately
when The
timer becomes is
started
value
A
With
Therefore,
structure
(1)
When
value:
the
Count
off-delay
value
:
constant,
subscript
any
register
integer
preceding
"Count
the
value
operationisstopped
middle
the
ON
in
from
the
equal
on-delay
statement.
used
pay
the
to
timer
attention
in
IF
MB000000
IFON
:
MB000100
:
IEND
*]-
any
(0
type
with
timer
=
beginning
instruction,
register
B
Set
value".
of
actual
instruction,
when
structure
{
500
integer
65535sec
to
register
subscript
when
counting.
(Os).
counted
using
statement.
MW00011
type
(except
OFF.
is
the
When
timeX
the
the
register,
lsec
in
:
(except
the
The
status
the
1
time
is
on-delay
/
S]
or
unit)
and
for
#
and
for
#
time
is
counted
is
status
the
of
register
B
storedinthe
counted
instruction
Timer®
MB000101
integer
any
registers),
C
registers)
C
while
of
the
B
immediately
turns
OFF
count
when
the
in
o
register
type
integer
any
the
status
register
instructionisexecuted.
IF,
becomes
precedingBregister
again,
register.
the
WHILE,
with
type
of
the
OFF
counting
and
FOR
(2)
(3)
In
the
executed,
When
b
WHILE
|—
ON
MB000100
INC
WEND
the
In
99),
S3
scan
X
When
MB000000
FOR
MB000100
FEND
used
o
I
<
i
used
:
i
above
time
in
00100
I
above
the
timer®is
time
in
example,
is
not
WHILE
[
example,
value,
set
FOR
structure
1=00000
[
when
counted.
structure
MW00011
500
since
also
executed
timeiscounted
so
statement
to
00099
5.00
MW00011
MB000000
The
timer
statement.
/
instruction
100
by
00001
/
is
OFF,
operation
_
Timer
MB000101
S}
sequence
times.
faster
Timer
MB000101
S]
®
Thus,
®
the
instructionoftimer®is
remains
stopped.
_
=>i
Instruction
o
sequence
executed
®
than
O
is
timeiscounted
the
real
100
time.
Instruction
sequence
times
®
(OSsI
for
®
not
100
In
X
the
99),
scan
above
the
timer®is
time
example,
value,
set
since
instruction
also
executed
timeiscounted
so
100
sequence
times.
Thus,
faster
®
than
is
executed
the
timeiscounted
real
time.
100
times
for
(0ÿ1
100
4-31
Page 60
I
Off-delay
Timer
Instruction:
unit
of
measurements
second
s}-
)
-{
(
I
[Operation
[Example(s)]
Register]
the
of
A
OOx
HB000100
MB000101
MV00011
In
F
MB000100
ON
OFF
ON
OFF
500
NOTE
the
above
sure
to
occur.
1
0~*‘
set
B
I
O
*
example,
unused
an
J
o
{
O
*
(Stored
MW00011
500
MW00011
register
or
X
not
stored
:
:
indeterminate
S}
-Ts
500s
functions
the
for
count
stored
not
:
stored
!
MB000101
(Ts
scan
=
as
register
depending
o
set
the
count
value)
register
that
so
on
the
an
case.)
of
the
overlap
timer.
will
I
n<
4-32
'4'*
;
Page 61
Examples
of
Relay
Circuit
Combinations
4.
BASIC
INSTRUCTIONS
Example
the
In
output
MB0000QQ
Examples
The
branch
several
logical
the
In
output
is
(Example
HBOjipO
(Example
MBOOQOOQ
ofaSeries
example
coil.
to
a
Branched
of
indication
The
parts.
(OR)
sum
examples
coil
a
to
1)
Simple
Branch
2)
Example
Branch
Circuit
below,
relays
IB00001
and
elementisusedtobranch
parallel
plurality
of
a
or
to
example
Parallel
relays
coils.
below,
IBOjIOOl
are
MB0QQ10A
Parallel
connection
of
are
of
connection
MBI
IB0j)j)02
which
in
Parallel
IB00001
connection
MB00j)10A
connected
Circuits
indication
relays.
connected
branching
OA
II
several
branches
in
series
series
in
parallel
and
OBOOIOO
-
Branch
OBOOIOO
and
their
OBOOIOO
the
contents
element
and
and
in
connection
o
parallel
is
parallel
logical
of
usedtodetermine
connections
the
B
and
product
register
the
result
are
is
to
the
used
Example
relay
A
the
In
is
determined
FOR
FEND
Branch
IB0j)j)03
Sequence
of
a
number
example
and
MB000000
1=00000
MBOpOOi
Circuit
may
be
below,
the
in
set
00015by00001
to
MB000010
Parallel
with
used
with
logical
MB000010.
product
connection
Subscript
subscript.
a
(AND)
HB00I00F
O
-
-
relays
of
MB000010
MB000000
j
MB000010
MBOOOOOF
to
4-33
Page 62
Instruction
AND
j
4.5
4.5.1
Logical
The
AND
Operation
(A),
AND
Instruction
[Format]
[Description]
(
OR
'
A
Any
Any
Any Any
Subscript
.
Constant
The
register
A
1-bit
A
0
0
1
:
,1
Instructions
),
and
V
integer integer
double-length
double-length
register
instruction
AND
and
Truth
Table
B
C.
0
0
0
1
0
0
1
1
XOR
type
type
designated
the
for
)
(
©
register
register
integer
integer
outputs
the
instructions
with
type type
logical
the
register
Logical
Product
available
are
subscript
register
register
product
the
to
(AND
with
A
as
subscript
(AND)
register.
AAB
:
logical
the
of
C)
=
operation
immediately
instructions.
preceding
[Operation
[Example(s)]
of
the
The
:
Register]
A
F
x
o
logical
)-
WOO
M
(H1234)
B
I
o
product
A
100
O
MW00100
of
OFF
O
H
(HO
OFF)
J
O
stored
:
O
:
indeterminate
*
(Stored
and
not
or
constant
a
stored
not
:
X
stored
is
MW00101
(H0034)
depending
stored
in
case.)
the
on
MW00101
.
4-34
Page 63
Instruction
OR
[Format]
V
integer
Any Any
integer
Any
double-length
double-length
Any
Subscript
Constant
type
type
register
register
register
integer
integer
with
type type
subscript
register register
with
subscript
4.
OR
XOR
BASIC
INSTRUCTIONS
Instruction
Instruction
[Description]
[Operation
of
[Example(s)]
Instruction
XOR
[Format]
The and
1-bit
A
0
0
1
1
Register]
the
A
x
The
h
©
instruction
OR
designated
the
Truth
B
0 0
1
0
1
Table
C
1
1
1
F
O
logical
MW00100
(H1234)
Any
Any
Any
Any
sum
integer
integer
double-length double-length
Subscript
Constant
O
of
V
type
register
outputs
register
the
for
I
o
MW00100
HOOFF
(HOOFF)
register
register
type
integer
integer
the
to
Logical
J.
o
logical
register.
the
A
Sum
stored
:
O
indeterminate
:
*
(Stored
and
a
constant
with
subscript
register
type
register
type
sum
(OR
X
or
not
MW00101
(OR)
of
AVB
:
not
:
stored
is
stored
(H12FF)
with
immediately
the
C)
=
stored
depending
in
subscript
the
on
MW00101.
precedingAregister
case.)
[Description]
[Operation
[Example(s)]
XOR
The
precedingAregister
1-bit
Truth
B.
A
0 0
0
1
0
1
1
1
Register]
the
of
F
A
x
O
exclusive
The
MW00100
b
(H5555)
instruction
Table
for
C.
0
1
1
0
B
I
O
O
logical
®
HOOFF
(HOOFF)
outputs
and
the
J
O
sum
the
the
designated
Exclusive
:
O
:
*
(Stored
of
MW00100
register
Sum
not
:
X
logical
exclusive
Logical
stored
indeterminate
stored
not
or
and
constant
a
MW00101
(H55AA)
sum
the
to
:
(XOR
stored
depending
is
(XOR)
register.
A
A©B
stored
on
=
the
in
immediately
the
of
C)
case.)
MW00101.
4-35
Page 64
Integer
[
Type
Entry
Instruction
(
)
|
h
4.6
4.6.1
Numerical
types
Data
the
Control
Integer
[Format]
[Description]
[Operation
Type
Operation
include
Pack
CP-9200SH
Entry
h
The
type
type
Register]
of
the
A
-x
Instructions
integer
the
Instruction
integer
Any Any
integer
Any
double-length
Any
double-length
Subscript
Constant
integer
operation.
instruction
entry
F
O
User's
type,
B
o
type,
type
type
register
entry
There
I
o
the
double-length
Manual
register
register
integer
integer
instruction
after,
on
appears.
J
o
integer
(SIE-C879-40.1)
subscript
with
register
type
register
type
or
data
type
X
not
:
enters
real
number
stored
O:
:
indeterminate,
*
(Stored
type,
for
.
with
into
data
stored
not
stored
and
the
details.
subscript
register
the
A
cannot
depending
real
be
number
and
used
on
the
type.
starts
an
untilareal
case.)
Refer
integ
numb
[Example(s)J
contents
The
hMWOOlOO
.
The
contents
MUM)
h
of
of
TOO
hMWOOlOO
(01234)
MW00101
h
(00001)
'
hMLOOlOO
(66770)
ML00100=66770
.
MW00100
ML00100
Lower
Upper
enteredinthe
are
enteredinthe
are
bits
16
bits
16
MW00200
(01234)
MW
(00001)
ML00200
==*
(66770)
:
MW00100
MW00101
:
register.
A
register.
A
00201
01234
= =
00001
H04D2
=
H0001
=
4-36
Page 65
4.
BASIC
INSTRUCTIONS
Real
Number
[Format]
[Description]
[Operation
of
Type
Entry
|h
Any
Any Any
Any
subscript
Any
Any
Subscript
Constant
The
real
number
entry
instruction
number
designated
real
to
a
Register]
the
A
O
Instruction
integer integer double-length
double-length
real
number
real
number
register
number
operation.
type
registers.
type
for
a
real
number
F
B
x
o
type type
type
can
number
type
I
o o
||-
(
)
register
register
integer
integer
register
type
type
entry
instruction
The
series
be
programmed
When
type
data
upon
O
J
with
subscript
register
type
type
register
operations
of
using
integer
an
entry
execution.
:
stored
:
indeterminate
*
(Stored
or
Real
Number
|
register
with
subscript
enters
data
integer,
double-length
or
instruction,
X
not
not
:
stored
stored
Type
with
into
the
beginning
double-length
the
data
depending
Entry
Instruction
register
F
a
with
integer
automatically
is
the
on
and
real
number
integer,
type
case.)
(|h)
starts
and
register
converted
a
|
real
type
real
is
[Example(s)]
The
content
Ih
DF00200
integer
The
DW00100
Ih
The
double-length
DL00100
Ih
DWOOOOO
Ih
(00001)
DL00001
Ih
(1234567)
DF00004
Ih
(-23E+00)
NOTE
The
of
data
type
integer
following
DF00200
DW00100
in
type
data
form
of
entered
are
are
DL00100
in
usage
the
in
convertedtoreal
convertedtoreal
are
DF00010
(1.0E
DF00012
=>
(1.234567E
DF00014
==»
(-2.5E+00)
is
allowed.
not
register.
F
number
+
number
00)
+06)
type
data
type
and
data
then
and
stored
then
in
stored
in
the
the
register.
F
F
register.
12345
h
DF00200
4-37
Page 66
Storage
\
Instructionÿ
a
4.6.3
Storage
Instruction
[Format]
[Description]
[Operation
[Example(s)]
The
designated
by
the
of
A
•o
The
"
Any
Any
Any
Any
registers)
C
Any
Any
Subscript
storage
type
the
(Integer
b
|b
(Real
Register]
F
O O
contents
12345
b
integer
integer,
type
type
double-length
double-length
number
real
real
number
register
instruction
register.
immediately
the
of
instruction)
entry
number
B
entry
I
o
the
of
A
register
register
integer
integer
register
type
register
type
stores
Whether
instruction)
J_
o
register
(except
with
type
type
for
subscript
register
register
(except
with
the
contents
register
the
A
preceding
stored
:
O
:
indeterminate
*
(Stored
stored
are
#
and
!with
for
subscript
or
entry
The
X
:
not
or
MW00100.
in
MW00100
C-registers)
(except
(except
subscript
and
#
(except
the
F
of
F
the
instruction.
contents
The
contents
stored
not
stored
depending
#
for
and
for
#
registers)
C
for
register
register
registers)
and
C
registers)
C
(except
#
and
is
of
the
the
of
for
registers)
C
the
or
A
selectedisdetermin
register
A
register
F
case.)
the
on
#
and
register
are
are
in
store
store
t
The
The
The
The
contents
1234567
b
contents
lb
1.23456
contents
1.234567
lb
contents
123456.7
lb
NOTE
(1)
The
12345
b
(2)
When
lower16bits
occur
the
of
of
the
the
of
F
the
of
F
following
double-length
a
even
if
register
A
register
F
register
register
form
are
data
the
are
are
are
of
usage
integer
stored
to
stored
are
stored
converted
converted
is
not
type
they
as
be
stored
ML00100.
in
==»
ML00100
DF00100
in
DF00100
(1.23456)
integer
into
DW00100
(00001)
double-length
into
DL00100
(123457)
allowed.
DF00200
dataisstored
Be
are.
exceeds
as
careful
the
they
and
form
integer
in
since
integer
are
sui
an
integer
range
real
the
in
then
stored
form
and
stored
type
operation
(-32768to32767)
number
DWOOlOi
in
DL001
in
register,
error
will
fori
tl
n
4-38
bMLOOlOO
(65535)
=>
MW00200
(—00001)
Page 67
4.
BASIC
INSTRUCTIONS
Addition
Instruction
[Format]
[Description]
[Operation
+
The
and
addition
occur
2147483647.
of
Register]
the
A
*1
Will
*1:
*2:
Will
(
)
+
Any
integer
integer
Any
Any
double-length
double-length
Any Any
real
Any
real
Subscript
Constant
addition
real
number
integer
of
if
the
F
*2
not
be
storedifthe
be
storedifthe
not
type
type
number
number
register
instruction
type
type
result
B
O
of
I
O
operation
operation
register register
integer
integer
register
type
register
type
performs
values.
values
addition
J
o
with
O
starts starts
type
type
An
is
of
:
:
*
(Stored
with
with
subscript
register
register
with
addition
overflow
greater
double
stored
with
subscript
of
operation
than
-length
X
:
indeterminate
not
or
f—
||—
be
.
Will
.
Will
a
a
subscript
integer
32767.
integer
stored
not
stored
storedifthe
be
storedifthe
|
Addition
double-length
type,
error
will
overflow
An
type
depending
operation
operation
Instruction
occur
operation
values
on
the
does
not
does
not
if
greater
is
case.)
start
start
integer
the
result
error
a
with
a
with
|—
||-
(
type,
than
.
+
will
.
)|
of
[Example(s)]
(10.0)
(0.15)
integer
of
real
of
12345
(200000)
number
1.23456
(00006)
Addition
I-MW00100+
(03000)
ML00102+ML00104
h
(100000)
Addition
DF00200+
II-
DF00204+DW00206
lb
II-DF00210+BL0Q212
(3.51)
NOTE
the
In
subtraction
case
(100000)
double-length
of
instructions
additionorsubtraction
multiplication
a
division
will
Remainder
b
instruction
64-bit
be
a
correction
a
ML00400XML00402
MOD
values
type
type
instruction
instruction
-r)
(
operation.
operation
b
values
integer
(+,
(X)
the
is
+
ML00404
MW00101
(15345)
ML00106
(300000)
DF00202
(11.23456)
DF00208
(6.15)
=s>
DF00214
(100003.51)
type
)
++,
will
is
used
the
is
immediately
_
a
(y)
c
ML00406
values,
be
in
an
32-bit
a
a
remainder
immediately
subsequent
X
b
c
+
d
d
operation
operation.
correction
preceding
instruction),
ML00408
=>
ML00404
y
c
using
addition
However,
operation
instruction
the
and
when
an
(where
and
operation
a
4-39
Page 68
Subtraction
|
4.6.5
Instruction
Subtraction
(
-
Instruction
)
|
(
)
-
[Format]
[Description]
[Operation
[Example(s)]
"Any
Any
Any
Any
Any
Any
Subscript
Constant
.
The
subtraction
type,
and
subtraction
will
error
-2147483648.
than
Register]
the
of
F
A
*1
*2
*1:
not
Will
Will
*2:
not
Subtraction
I-MW00100-12345
(03000)
ML00102
h
(100000)
integer integer
double
type
type
-length
double-length
number
real
number
real
register
instruction
number
real
result
occur
storedifthe
be
be
storedifthe
of
if
B
O
integer
ML00104
(200000)
of
the
I
o
register
register
integer
integer
register
type
register
type
performs
values.
type
integer
type
subtraction
J
o
operation operation
type
starts
starts
values
subscript
with
register
type
register
type
with
subtraction
An
valuesisless
result
stored
:
O
:
indeterminate
*
(Stored
a
with
a
with
with
subscript
underflow
double-length
of
X
:
or
not
.
Will
|-
Will
.
||-
MW
(-09345)
ML00106
(-100000)
subscript
of
than
stored
not
stored
stored
be
be
stored
001
01
integer
type,
operation
-32768.
integer
depending
the
operation
if
operation
the
if
double-length
error
will
underflow
An
type
case.)
the
on
does
not
not
does
occur
operatic
values
start
with
start
with
integ
if
is
a
f-
a
||_
tl
le
Subtraction
DF00200
II-
(10.0)
II-DF00204—
(0.15)
||-
DF00210—
(3.51)
NOTE
the
In
case
subtraction addition
,
multiplication
a
division
be
will
h
a
ML00400
MOD
of
number
real
1.23456
DW00206
(00006)
DL00212
(100000)
double-length
of
instructions
subtraction
or
instruction
instruction
64-bit
Remainder
a
X
(-r)
operation.
correction
b
ML00402+ML00404
type
values
integer
(+,
++,
-,
instruction
(X)
immediately
is
the
c
DF00202
=*
(8.76544)
DF00208
(-5.85)
DF00214
(-99996.49)
type
~)
will
used
is
is
the
operation
-r
MLOO406
values,
be
in
an
32-bit
a
remainder
a
immediately
subsequent
X
a
(y)
-
=
j
d
operation
operation.
correction
preceding
instruction),
b
c
+
ML
ML00404
y
00408
c
using
addition
However,
operation
instruction
the
an
when
(whei
and
operatic
a
4-40
Page 69
4.
BASIC
INSTRUCTIONS
Extended
[Format]
[Description]
[Operation
Addition
Instruction
++
The
extended
error
addition
Integer
Double-length
integer
Register]
the
of
A
X
(
)
++
Any
integer
Any
integer
Any
double-length double-length
Any
Subscript
Constant
will
F
O
register
addition
not
occur
instructionisidenticaltothe
type
type
B
o
register
type
register
type
integer
integer
instruction
even
Decimai
[
L
Hexadecimal
Decimal
T
Hexadecimal
L
I
o
the
if
numbers
numbers
J.
o
subscript
with
register
type
register
type
performs
operation
numbers
numbers
stored
:
O
indeterminate
:
*
(Stored
or
with
addition
results
addition
0-*l—
:
:
0000
-ÿ
0
:
00000000
:
80000000—
not
:
X
stored
not
Extended
|
subscript
an
in
instruction
32767
0001",7FFF
-*•
1—2147483647
Addition
of
integer
overflow.
-32768—
00000001—
FFFFFFFF
in
stored
depending
Instruction
be
Cannot
*
number
with
entry
type
Otherwise,
function.
*ÿ
-*•
used
type
real
a
instruction
values.
-1
8000—
-2147483648—
7FFFFFFF
00000000
case.)
the
on
in
a
operation
number
(|P).
operation
An
extended
the
0
FFFF
(
real
type
-1
)]
++
begins
0000
0
[Example
(s)]
used
This
in
the
instruction
addition
is
of
1-MW00100++
(32767)
NOTE
the
In
case
subtraction
However,
operation
instruction
operation
the
Remainder
ML00400XML00402+ML00404-rML00406
h
MOD
double-length
of
instructions
whenanaddition
(where
and
a
will
correction
a
in
integer
division
be
type
00001
(+,
multiplication
a
64-bit
a
operation
b
where
cases
values.
integer
--)
++,
-,
or
subtraction
instruction
operation.
(y)
c
is
it
desirable
MW00101
(-32768)
type
values,
32-bit
be
will
instruction
=
a
instructionisused
(-r)
the
is
aXb
+
d
d
that
operation
an
operation.
(X)
is
immediately
c
ML00408
ML00404
operation
a
in
immediately
the
subsequent
y
c
errors
using
remainder
do
addition
instruction),
occur
not
and
correction
preceding
4-41
Page 70
Extended
I
Subtraction
instruction
(
)
|
-
4.6.7
Extended
[Format]
[Description]
[Operation
[Example(s)]
Subtraction
of
the
'
Any Any
Any
Any
Subscript
Constant
The
extended
operation
the
extended
Integer
.Double
integer
Register]
A
x
This
instruction
in
subtraction
the
Instruction
integer
integer
double-length
double-length
error
type
-length
type
F
O
type
type
register
subtraction
will
subtraction
[Decimal
L
Hexadecimal
[Decimal
[.Hexadecimal
B
o.o
is
(
not
I
used
integer
of
)
-
register
register
integer
integer
instruction
occur
instruction
numbers
numbers
J
o
in
cases
with
type
type
even
if
numbers numbers
stored
:
O
:
indeterminate
*
(Stored
where
type
values.
subscript
register register
performs
the
is
identicaltothe
operation
:
0-1
:
0000
:
0
:
00000000
7FFFFFFF-
X
or
not
is
it
desirable
'
with
:
subscript
subtraction
results
subtraction
-32767
FFFF—
-2147483648
-1—
stored
not
stored
depending
that
Cannot
*
number
with
entry
of
integer
an
in
underflow.
instruction
32768-1
8000
FFFFFFFF—
-0000000
operation
7FFF—
-2147483647—
1
the
on
be
used
operation
type
number
real
a
instruction
type
0
0001
80000000
00000000
case.)
errors
do
real
a
in
type
(
[f-
values,
Otherwi;
in
functi<
not
begi
).
i
00i
1-
occi
MW00100-
1-
(-32768)
NOTE
In
subtraction
However,
correction
preceding
instruction),
Remainder
case
the
h
MW00400
MOD
-00001
double-length
of
instructions
an
when
operation
instruction
operation
the
correction
a
X
ML00402
integer
(+,
-,
addition
(where
andadivision
operation
b
or
a
multiplication
be
will
ML00404
+
MW00101
(32767)
type
«)
++,
subtraction
(y)
will
instruction
a
64-bit
aXb
-
=
c
ML00406
values,
be
a
instruction
instruction
(-r)
operation.
c
+
g-
d
an
32-bit
is
operation
operation.
is
used
X
(
immediately
the
ML00408
ML00404
using
)
is
y
c
addition
a
in
the
immediate
ai
remaindi
subsequei
4-42
Page 71
Multiplication
I
BASIC
4.
Instruction
INSTRUCTIONS
(
)
X
I
1.6.8
Multiplication
[Format]
[Description]
[Operation
of
[Example(s)]
Instruction
Any
X
Any
Any
Any
Any
real
Any
real
Subscript
Constant
multiplication
The
integer
type,
double-integer
multiplication
used.
Register]
the
F
A
*1
*2
*1:
*2:
Will
Will
not
not
Multiplication
(
X
integer integer
double double
number
number
and
B
O
stored
be
be
storedifthe
)
type type
-length
-length
register
instruction
real
type
result
I
O
operation
if
the
of
integer
register
register
integer integer
type type
number
values,
is
to
be
J
I
I
o
operation
type
with
type type
register
register
performs
type
X
and
stored
:
O
:
*
(Stored
starts
with
starts
with
values
subscript
register
register
with
with
subscript
multiplication
values.
are
in
stored
the
In
used
double-length
a
not
X
:
indeterminate
.
.
not
Will
Will
stored
be
storedifthe
stored
be
or
|-
a
|[-
a
subscript
case
pair.
as
a
stored
depending
if
the
integer
of
the
of
However,
integer
operation
operation
type,
multiplication
an
if
type
register,
case.)
the
on
does
not
start
with
does
start
not
double-length
integer
of
integer
a
with
|-
a
only
.
.
|[-
type
X
or
is
I-MW00100
(01234)
MW00102
b
(00010)
Multiplication
ML00100
b
(100000)
ML00106
b
(100000)
Multiplication
DF00200
lb
(10.0)
DF00204
lb
(0.15)
DF00210
lb
(0.15)
NOTE
integer
With
used
within
to
bits,
b
MW00100
(01234)
b
MW00102
(00010)
b
ML00200
(100000)
also
store
be
is
32768
16
X
3-MO
X
M
(10000)
double-length
of
X
ML00102-+
(009000)
X
ML00108-rML001
(100000)
of
real
DF00100
x
(3.0)
X
DW00206
(00002)
X
DL00212
(100000)
type
WOOl
number
and
03
independently.
32
+32767),
(-2147483648
bits
it
double-length
it
in
X
X
X
can
3
MW00103
(10000)
ML00202
(009000)
1
+-
integer
18000
10
(50000)
type
values
double-length
However,
+2147483647).
to
stored
be
in
integer
MW00101
(00370)
ML00104
(100000)
type
values
ML00104
(050000)
ML00112
(200000)
DF00202
(30.0)
DF00208
(0.3)
DF00214
(15000.0)
integer
this
in
integer
type
multiplication,
type
make
case,
When
register.
type
register.
a
program
the
result When
MW00101
(03702)
ML00104
(100000)
ML00204
(900000000)
X
instruction
so
that
is
within
result
the
the
result
16
bits
exceeds
can
(-
4-43
Page 72
I
Division
4.6.9
Instruction
Division
(
-4-
Instruction
)
4-
)
(
[Format]
[Description]
[Operation
[Example(s)]
-r
The
and
be
remainder
by-zero
length
range
of
the
*1:
*2:
Division
"
Any
integer
integer
Any
double-length
Any
double-length
Any Any
real
Any
real
Subscript
Constant
division
real
number
alone.
used
error
integer,
the
of
Register]
F
A
*2
*1
.
not
Will
not
Will
number number
register
instruction
of
a
will
A
B
O
be
storedifthe
be
stored
integer
of
register
type
register
type
type
Refer
to
division
occur.
real
or
register.
I
O
the
if
type
integer
integer
register
type
register
type
performs
values.
the
MOD
operation.
operation
An
number
J
o
operation
operation
values
subscript
with
type
type
with
division
Although
instruction
If
type
stored
:
O
:
indeterminate
*
(Stored
starts
with
starts
with
register
register
subscript
X
the
value
error
division
not
or
|—
a
.
Will
||
a
.
Will
of
and
will
in
X
;
with
integer
'4-
and
of
also
the
not
:
stored
be
not
storedifthe
be
subscript
type,
usually
are
the
REM
designated
the
occur
register
F
stored
depending
if
stored
double-length
used
instruction
register
the
result
if
falls
on
operation
the
operation
does
pair,
as
a
of
outside
case.)
the
does
not
not
start
integer
4-
can
concerning
is
di
a
0,
integer,
the
start
with
with
doul
numeri
a
a
1
1—
ty
visit
}—
.
a
1
.
(-MW00100X14-3
(01234)
MW001024-MW00103
b
(01234)
Division
b
b
Division
lb
!h
double-length
of
ML00100X
(100000)
ML001044-
(1000000)
of
DF002004-3.0
(1237.5)
DF002004-DF00204
(1237.5)
(00003)
ML001024-ML00110
(100000)
ML00110
(50000)
number
real
(3.0)
lhDF002004-DW00208
(1237.5)
DF002124-DL00214
lb
(100000.0)
(00003)
(40000)
integer
(50000)
_
type
type
values
MW00101
(00411)
MW00104
(00411)
values
ML00112
(200000)
ML00114
(000020)
DF00202
(412.5)
DF00206
(412.5)
DF00210
(412.5)
DF00216
(2.5)
4-44
Page 73
MOD
Instruction
BASIC
4.
MOD
REM
INSTRUCTIONS
Instruction
Instruction
[Format]
[Description]
[Operation
[Example(s)]
MOD
The
MOD
type
division
executed
double-length
of
Register]
the
A
x
quotient
The
MW00102.
!
M
(00010)
MOD
The
quotient
ML00108.
1-ML00100
(100000)
MOD
instruction
division
instruction
immediately
F.
O
100
WOO
of
the
to
A
or
integer
B
I
o o
o
of
an
integer
X
1
double-length
a
__
ML00102
X
(60000)
outputs
register.
after
after
division
J.
type
-S-
3
integer
the
remainder
Execute
the
storage
the
division
will
stored
:
O
indeterminate
:
*
(Stored
division
type
-5-
(34567)
instruction
instruction,
be
not
X
or
not
is
stored
division
ML00104
integer
of
an
the
MOD
(
guaranteed.
stored
not
:
stored
in
MW00101
M
(00003)
\f
is
stored
into
M
(173575)
ML00108
(32975)
type
instruction
=>).
If
the
the
remainder
depending
and
W001
01
W001
02
(00001)
ML00106
106
LOO
double-length
or
immediately
instruction
MOD
integer
of
an
case.)
the
on
the
remainderisstored
and
the
remainderisstored
integer
after
type
the
is
not
or
in
in
Instruction
REM
[Format]
[Description]
[Operation
[Example(s)]
(Note)
REM
The
register.
subtracting
of
designated
of
the
A
O O
The
value,
The
:
quotient
convenient
Any
real
Any
real
Constant
.
instruction
REM
this
In
the
the
REM
instruction variable
Y=A
Register]
F
x
remainderofthe
1.5,
(XX
B
determined
is
and
to
use
number
number
outputs
the
case,
variable
isX,and
n)
I
o o
division
remainder
the
type type
remainder
value
be
will
(0ÿ
J
and
are
instructions
register
register
the
with
remainder
refers
designated
as
follows
the
number
Y<X)
stored
:
O
:
indeterminate
*
(Stored
of
stored
the
in
or
real
MF00202.
generally
the
in
subscript
of
the
to
by
the
when
the
repeated
of
X
not
:
stored
not
number
determined
above
manner.
real
number
a
remainder
register.
F
register
F
subtractions
stored
depending
variable
together.
type
obtained
That
is,
value
is
is
the
on
MF00200
division
the
A,
n:
case.)
by
It
will
by
repeatedly
output
the
valueofthe
the
thus
the
to
value
constant
be
F
Y
]h
MF00200
(4.0)
REM
1.5
MF00202
(1.0)
4-45
Page 74
4.6.12
INC
Instruction
INC
Instruction
'
[Format]
[Description]
[Operation
[Example(s)]
of
INC
the
The
register.
occur
will
Integer
Double
Register]
A
o
Integer
integer
Any Any
integer
double-length
Any
double
Any
registers)
C
Subscript
instruction
INC
the
In
the
if
even
occur
Type
F
o
type
in
number
number
i
B
o
not
Decimal
Hexadecimal
-length
Decimal
Hexadecimal
type
type
-length
register
case
addition
the
number
Integer
number
I
o
register
register
adds
an
of
case
Type
(except
with
integer
integer
1
to
integer
result
double-length
of
a
l-
0
:
:
:
:
-*-0001
0000
0
1
00000000
O
J
o
*
(Stored
for
subscript
register
type
register
type
designated
the
register,
type
exceeds
32767.
32767
'21474836147
stored
:
:
indeterminate
or
C
#
and
(except
(except
with
integer
an
Likewise,
integer
32768
7FFF
00000000
X
not
:
not
stored
registers)
and
for
#
#
and
for
subscript
overflow
type
8000-
-2147483648-
(except
double-length
or
an
register.
1-0
FFFF
-
stored
depending
registers)
C
registers)
C
for
operation
overflow
80000000
the
on
#
and
integer
error
operation
0000
1
case.)
0
will
ty
n
err
I-MW00100+
INC
Double
-length
(-ML00100+
INC
NOTE
following
The
INC
INC
+
M
ML00100
100
WOO
integer
1
+
form
#W00100
DF00200
1
equivalent
|
type
equivalent
|
is
of
usage
(#
register)
(real
not
number
MW00100
ML00100
allowed.
type
register)
4-46
Page 75
DEC
Instruction
4.
DEC
BASIC
INSTRUCTIONS
Instruction
[Format]
[Description]
[Operation
[Example(s)]
DEC
The
DEC
type
not
occur
operation
Integer
Decimal Hexadecimal
Double-length
Decimal
Hexadecimal
Register]
the
of
A
o
Integer
h
Any
integer
Any
integer
double-length
Any
double-length
Any
registers)
C
Subscript
instruction
register.
MW00100—
Type
F
O
type
In
even
error
number
Integer
number
B
O
type
type
register
the
case
the
if
will
not
number
number
I
o o
1
register
register
integer integer
subtracts
of
subtraction
occur
:
:
Type
: :
......
][
(except
with
type
type
from
1
integer
an
result
the
caseofa
1
......
FFFF
-ÿ
0
0000
in
0 00000000
1
......
00000001ÿ00000000
stored
:
O
:
indeterminate
*
(Stored
equivalent
#
for
subscript
register
register
designated
the
register,
type
falls
32768
8000
......
2147483648
FFFFFFFF
X
or
not
MW00100
registers)
and
C
(except
(except
with
below
double-length
-*ÿ
......
for
#
and
#
and
for
subscript
integerordouble-length
underflow
an
-32768.
32767
......
7FFF
......
2147483647
80000000
C
(except
Likewise,
integer
-*ÿ
1
0001
stored
not
:
stored
depending
on
registers)
C
registers)
and
#
for
integer
operation
type
0
0000
......
7FFFFFFF
case.)
the
error
underflow
an
register.
0
1
will
MW00100
DEC
Double-length
ML00100
b
DEC
NOTE
The
ML00100
following
DEC
DEC
integer
"1
form
#W00100
DF00200
type
|
of
(#
(real
equivalent
usage
register)
number
is
not
ML00100
allowed.
register)
type
4-47
Page 76
Time
|
4.6.14
Add
Time
Instruction
Add
Instruction
(TMADD)
(TMADD)
|
[Format]
TMADD
[Description]
[Time
[Any
(except
Any
integer
subscript
registers)
The
TMADD
second
The
and
the
parameters
,
Register
0
.
1
When
the
the
data
register
B
"9999H"
register
B
the
added]
to;be
integer
for
(except
instruction
parameter
#
type
and
type
C
register
for
register'
registers)
with
and
#
performs
(time
to
resultisstoredinthe
1
and2should
Table
'
Data
offset
beasshown
Parameter
4.12
contents
Hours/minutes
Seconds
contents
ranges
turns
is
stored
listed
OFF.
turns
the
of
above,
Conversely,
the
for
ON.
parameter,
first
1he
seconds
C
addition
add)
is
first
Data
Upper
Lower
0000
operation
a
if
parameter
the
of
Any
integer
Any
integer
subscript
on
two
added
parameter.
in
to
Table
Format
range
byte
byte
0059
to
second
is
performed
parameter
[Time
to
type
type
time
data
first
the
It
is
essential
4.12.
(BCD) (hours):
(minutes):
parameter,
has
data
and
the
add]
register
register
(seconds,
parameter
0
to
23,
0
to
and
normally.
that
exceeds
operation
with
minutes,
(time
that
59
operation
After
the
is
be
to
the
formats
result
operation,
above
stopped.
hour
adde
are
t
ranj
Th
[Operation
[Example(s)]
of
the
The
8
Register]
A
F
O
O
time
data
TMADD
hrs
40
min
(MW00100)
MW00100 MW00101
DWOOOOO
DW00001
B
X
in
MW00100,
-
32
sec
(MW00101)
Before
"j
I
=Q=
O
——I
DW0000-DW0001
1
+
execution
0840H
0032H
0122H
0016H
O
*
(Stored
DW00000
hs22
min
(DWOOOOO
:
stored
:
indeterminate
16
)
(DW00001)
X
or
not
is
addedtothe
sec
=
After
execution
1002H.
0048H
0122H
0016H
stored
not
:
stored
DB000100
hrs
10
(MW00100)
.
depending
time
data
O
min
48
(MW00101)
2
case.)
the
on
in
MW00100-MW00101
sec
4-48
Page 77
4.
BASIC
INSTRUCTIONS
Time
Subtraction
[Format]
TMSUB
[Description]
Instruction
[Time
Any
[
(except
Any
integer
subscript
registers)
The
TMSUB
The
second subtracted The
formats
Register
0
1
When
the
the
the Then
data
register
B
"9999H"
the
in
range,
subtracted
integer
for
(except
instruction
parameter
from),
of
offset
contents
ranges
register
B
(TMSUB)
type
#
type
and
registers)
C
register
for
(time
and
the
the
first
4.13
Table
Data
Hours/minutes Seconds
of
the
listed
OFF.
turns
is
stored
turns
from]
register
with
#
C
and
makes
subtracted)
result
and
second
Parameter
contents
first
parameter,
above,
for
the
Conversely,
the
secondsofthe
ON.
1
Any
,
Any
subscript
subtraction
is
is
stored
in
parameters
Format
Data
Upper
Lower
0000-0059
second
operation
a
if
Time
Subtraction
[Time
integer
integer
between
subtracted
the
first
must
(BCD)
range
byte
(hours):
byte
(minutes):
parameter,
performed
is
parmeter
parameter
Instruction
subtracted]
register
type
register
type
time
two
from
parameter.
beasshowninTable
0
normally.
has
data
and
with
(hour/min/sec).
data
the
to
0
to
and
the
parameter
first
23,
59
operation
After
that
exceeds
operationisstopped.
(TMSUB)
(time
4.13.
result
opreation,
the
are
above
j
[Operation
[Example(s)]
of
Register]
the
A
O
The
MW00101.
hrs
8
(MW00100)
MW00100
MWOOlOl
DWOOOOO
DWOOOOl
F
o
data
time
TMSUB
40
min
I
B
x
in
DWOOOO-DWOOOl
MW00100,
32
sec
(MWOOlOl)
Before
o
execution
J.
o
DW00000
(DWOOOOO)
0840H
0032H
0122H
0016H
stored
:
O
:
indeterminate
*
(Stored
or
is
(DWOOOOl)
After
X
:
not
stored
not
subtracted
DB000100
(MW00100)
execution
0718H 0016H
0122H 0016H
stored
depending
from
O
the
time
(MW00101)
on
the
data
case.)
in
MW00100-
4-49
Page 78
Time
[
Spend
Instruction
(SPEND)
|
4.6.16
Time
Spend
[Format]
SPEND
[Description]
Instruction
[Time
Any
(except
Any
subscript
registers)
.
The
SPEND
Min/Sec),
The
second
subtracted
formats
The
4.15.
Register
(SPEND)
being
integer
for
integer
and
parameter
from),
offset
0
1
2
3
4
5
subtracted
#
(except
and
type
from
type
C
register
for
instruction
computes
and
of
first
the
Data
(BCD)
Year
Month/Day
Hours/minutes
Seconds
Total
result]
and
register
registers)
with
#
and
C
performs
elapsed
the
(time
subtracted)
the
resultisstored
and
second
4.14
Table
contents
(BCD)
(BCD)
(BCD)
number
of
'
'
Any Any
subscript
subtraction
time.
is
in
parameters
First
seconds
subtracted]
[Time
integer
integer
between
subtracted
first
the
must
Parameter
Data
0000to0099
is
byte
byte
byte
byte
the
is
Upper
Lower
Upper
Lower
0000to0059
This
which
converting
register
type
register
type
time
two
from
the
parameter.
showninTables
be
as
Format
(BCD)
range
(month):
(day):
1
(hours):
(minutes):
number
obtained
Year/Month/Day/
by
Hour/Minute/Second,
the
results
seconds.
integer)
operations,
of
(Double-length
_
.
with
data
first
to
1
31
to
0
to
0to59
records
of
which
(Yr/Mo/Day/H:
parameter
12,
23,
is
to
(tim
an
4.14
I/O
IN/OUT IN/OUT
IN/OUT
IN/OUT
OUT
[Operation
of
the
Register
When
the
in
the
B
range,
Then
the
Register]
A
o
offset
0
1
2
3
contents
the
ranges
data
register
"9999H"
register
B
F
O
Data
Year
Month/Day
Hours/minutes
Seconds
of
listed
OFF.
turns
stored
is
turns
B
I
x
o
Table
(BCD)
(BCD)
the
first
above,
Conversely,
for
ON.
J
o
4.15
contents
(BCD)
(BCD)
parameter,
the
the
secondsofthe
stored
:
O
indeterminate
:
*
(Stored
Second
0000to0099
Upper
Lower
Upper
Lower
0000to0059
second
operation
parameter
a
if
X
or
not
Parameter
Data
byte
byte
byte
byte
parameter,
performed
is
parameter
stored
not
:
stored
depending
Format
(BCD)
range
(month):
(day):
1
(hours):
(minutes):
normally.
data
has
and
to
1
31
to
0
to
0to59
and
that
operation
the
on
12,
23,
operation
After
exceeds
case.)
the
I/O
IN
IN
IN
IN
result
art
operation.
the
above
stopped
is
4-50
Page 79
4.
BASIC
INSTRUCTIONS
[Example(s)]
The
time
DW00000
98
vrs5mos
(MW00100)
MW00100 MW00101
MW00102
MW00103
MW00104 MW00105
DWOOOOO
DW00001
DW00002
DW00003
elapsed
DW00003
to
SPEND
11
(MW00101)
Before
from
the
is
MW00100,
davs15hrs
(MW00102
execution
H0098 H0511
H1504
H0047
H0098
H0402
H0813
H0008
time
stored
4
min
data
in
MW00100
to
DW00000
sec
47
(MW00103)
)
After
MW00100
to
DB000100
98
(DWOOOOO)
execution
H0000
H0039
H0651
H0039
3394299
(Decimal)
H0098
H0402
H0813
110008
Spend
Time
to
MW00103
MW00105.
O
4
vrs
mos
(DW00101)
Instruction
to
2
da
vs
the
time
13
hs
8
(DW00102)
(SPEND)
data
min
8
sec
(DW00103)
in
NOTE
the
In
taken
days.
in
operation
into
consideration.
results,
the
Also,
is
year
counted
the
numberofmonths
as
365
days
is
not
leap
and
a
counted.Itis
year
counted
is
not
4-51
Page 80
INV
Instruction
4.
7
Numerical
types
The
6
for
changing
register
A
Numerical
Sign
inversion
Complement
Absolute
BIN
BCD
Parity
ASCD
ASCD
ASCII
value
conversion
conversion
conversion
conversion
conversion
conversion
Conversion
numerical
of
the'
contents
the
or
F
Conversion
Instruction
(INV)
(COM)
of
1
(ABS)
(BIN)
(BCD)
(PARITY)
(ASCII)
1
(BINASC)
2
(ASCBIN)
3
conversion
register
Instructions
instructions
register
the
of
A
input
the
as
Table
4.16
Integer
o
o
o o
o
O
o
O
O
o
the
or
leaves
and
Numerical
Operation
Double-length
Integer
o o
o o o
X
X
X
register.
F
the
in
operation
shown
Conversion
Real
Number
o
x
o
x x
X
X
X
X
Table
-These
instructions
Inverts
or
Determines
A
Determines
.
register
Performs
register.
Performs
A
Counts
are
Converts
ASCII
Converts
codes.
Converts
stores
4.16
are
instructions
resultinthe
Numerical
sign
the
register.
F
register.
register.
ON.
_
F
or
BIN
BCD
the
_
the
codes.
the
_
the
them
the
the
register.
number
in
made
available
A
Conversion
the
of
_
complement
absolute
conversion
conversion
of
designated
_
binary
data
ASCII
codes
register.
A
the
use
register
contents
of1of
valueofthe
the
of
the
of
bitsinthe
character
in
A
binary
to
_
instructio
as
contents
or
F
Operation
of
the
the
valueinthe
valueinthe
contents
contents
register
A
string
register
data
registe
register
A
of
of
to
ASCII
to
and
of
the
the
that
t
A
J
.
4.7.1
Instruction
INV
[Format]
[Description]
[Operation
[Example(s)]
INV
Inverts
Register]
the
of
A
*1
*1:
Will
*2:
Will
Integer
bMWOOlOO
Double-length
b
Real
the
F
*2
be
not
be
not
type
(00100)
ML00100
(100000)
number
sign
stored
storedifthe
B
o
data
of
the
I
O
the
if
(A
INV
integer
INV
data
type
contents
J
O
operation
operation
register)
type
register)
(F
starts
starts
data
of
the
A
stored
:
O
indeterminate
:
*
(Stored
a|—
with
a
with
lb
(A
register)
register
X
not
or
Will
.
Will
.
MW00101
(-00100)
ML00102
(-100000)
or
not
:
stored
.
stored
be
be
storedifthe
register.
F
stored
depending
the
if
operation
operation
on
does does
the
not
not
case.)
start
start
with with
a
.
b
a
.
lb
4-52
DF00200
lb
(1.0)
INV
DF00202
(-1.0)
Page 81
COM
Instruction
4.
BASIC
INSTRUCTIONS
COM
Instruction
Instruction
ABS
[Format] [Description]
[Operation
[Example(s)]
Instruction
ABS
[Format]
[Description]
COM
Determines
Register]
the
of
A
x
Integer
b
Double-length
b
ABS
Determines
the
F
B
o o
o
data
type
MW00100
(H5555)
HM)
LOO
M
(H55555555)
the
complement
I
J.
o
(A
register)
COM
integer
COM
type
absolute
of
1
of
stored
O:
indeterminate
:
*
(Stored
(A
data
valueofthe
the
valueinthe
X
or
not
MW00101
(HAAAA)
register)
ML00102
(HAAAAAAAA)
valueinthe
not
:
stored
register.
A
stored
depending
register
A
or
the
on
register.
F
case.)
[Operation
[Example(s)]
Register]
the
of
A
*1
:
Will
*1
Will
:
*2
Integer
MW00100
b
(-00100)
Double-length
ML00100
b
(-100000)
number
Real
DF00200
lb
F
*2
be
not
be
not
type
(-1.0)
I
B
o
storedifthe
the
if
stored
(A
data
ABS
integer
ABS
type
ABS
o
operation operation
register)
type
data
J
O
starts starts
(F
register)
:
stored
O
-.indeterminate
*
(Stored
a
with
a
with
MW00101
.
(00100)
register)
(A
data
ML00102
.
(100000)
DF00202
X
or
not
Will
b
Will
|b
not
:
stored
be
storedifthe
be
storedifthe
stored
depending
operation
operation
on
does does
not
not
the
case.)
start
start
with
with
a
.
b
|b
a
.
4-53
Page 82
BIN
BCD
Instruction
Instruction
.
4.7.4
BIN
Instruction
[Format] [Description]
[Operation
[Example(s)]
BIN
This
instruction
number
register
A
following
Although
of
BCD
a
cases.
Register]
of
the
A
x
Integer
I-
MW00100
(H1234)
Double-length
(BIN
is
formula:
(a
Y
=
the
expression
F
O
type
numeral
output
formula
(e.g.
J
o
register)
type
a
the
If
value
will
123FH,
O
*
(Stored
data
(4-digit)
Y
applied
be
etc.),
stored
:
:
indeterminate
.
MW00101
(DO
(A
register)
converts
conversion).
the
abed,
X
1000)+(bX100)+(cX10)
above
B
I
o
o
(A
data
BIN
integer
expressed
numeral
of
BIN
the
+
even
a
correct
X
not
:
or
stored
not
34)
12
in
BCD
expressed
instruction
d
the
if
result
stored
depending
the
in
in
can
numeral
will
register
A
BCD
in
not
on
be
into
the
in
determined
register
the
A
be
obtained
case.)
the
a
integer
in
bin*
by
is
st
tj
t
i
4.7.5
Instruction
BCD
[Format]
[Description]
[Operation
of
[Example(s)]
b
ML00100
I
(H12345678)
:
BCD
This
instruction
expression
integer
(BCD
type
determinedbythe
(aX4096)+(bX
Y
=
Although
expressed
be
will
Register]
the
A
x
Integer
b
the
be
not
obtainedinsuch
B
F
o o
O
type
MW00100
(D01234)
in
data
BIN
converts
conversion).
register
A
above
BCD
I
(A
BCD
;
is
following
formula
(e.g.
a
J
o
register)
numeral
a
If
Oabcd,
formula:
256)
will
number
cases.
O:
ML00102
12345678)
expressed
(4-digit)
the
output
the
X
(c
+
applied
be
over
stored
indeterminate
:
*
(Stored
or
MW00101
16)
+
even
9999,
X
:
not
binary
in
decimal
value
d
the
if
negative
stored
not
stored
in
the
expression
of
the
Y
BCD
numeralinthe
numbers,
depending
on
register
A
of
the
instruction
A
etc.),
the
into
numeral
register
a
correct
case.)
BC
a
in
can
cann
resu
ti
1
4-54
Double-length
ML00100
b
(D
12345678)
integer
BCD
type
data
(A
register)
ML00102
Page 83
4.
BASIC
INSTRUCTIONS
.7.6
PARITY
Instruction
[Format]
[Description]
[Operation
of
[Example(s)]
Integer
Double-length
the
type
PARITY
This
instruction
(=1)
in
Register]
A
x
data
MW00100
h
(HFOFO)
integer
h
ML00100
(HF0F0F0F0)
the
F
O
(A
register)
register.
A
B
O
type
used
is
1
o
PARITY
(A
data
PARITY
compute
to
J
o
register)
the
number
stored
O
:
indeterminate
*
(Stored
or
MW00101
(00008)
MW00102
(00016)
X
not
of
not
:
stored
binary
stored
depending
PARITY
ASCII
expression
on
Instruction
Instructions
bits
that
case.)
the
are
ON
.7.7
ASCII
instruction
[Format]
[Storage
[Description]
register
The
ASCII
codes,
These
number]
and
are
character,
byte
upper
be
may
VW[
vwnnnnn+i
entered.
vwnnnnn+2
VWDDDD0+3
i
i
'
Any
integer
registers)
C
and
Any
integer
for
(except
-
#
instruction
them
stores
storedinthe
byte
upper
the
last
of
ASCII
Upper
]
Second
Fourth
Sixth
Eighth
type
register
register
type
and
registers
C
converts
the
in
order:
of
the
wordinthe
VW
byte
character
character
character
character
1—
If
the
the
of
(except
with
subscript
specified
the
designated
first
word.
first
storage
Lower
First
Third
Fifth
Seventh
length
last
word
for
#
character
storage
character,
length
If
the
register
"character
<=
byte
character
character
character
character
n
th
character
the
of
character
in
the
[Text]
register.
lower
storage
ASCH
of
is
a
string"
string
register
string
byte
the
0.
V—
characters
in
the
of
the
character
A
maximum
I,
S,
O,
is
odd,
is
a
instruction
first
string
of
D
M,
upper
the
0.
to
word,
odd,
is
32
characters
byte
ASCII
second
the
[Operation
[Example(s)]
of
Register]
the
A
O O
(1)
The
ASCII
F
B
o
character
MW00100
MW00100 MW00101
_I
o
string
J
o
"ABCD"
Upper
('B')
42H
('D')
44H
stored
:
O
:
indeterminate
*
(Stored
is
stored
"ABCD”
_
_
;
or
Lower
41H
43H
X
not
:
stored
not
in
MW00100
('A’)
(’C)
stored
depending
to
MW00100=4241H
MW00101=4443H
on
MW00101.
the
case.)
4-55
Page 84
ASCII
Instruction
BINASC
Instructions
[Format]
(2)
The
character
'
string
"ABCDEFG"
is
stored
MW00100
in
MW00103.
to
4.7.8
BINASC
Instruction
[Format]
[Description]
MWOOIOO
!
MW00101
MW00102
MW00103
BINASC
The
four
words).
vwnnnnn
vwmnnn+i
ASCII
integer
(except
integer
Any
(except
BINASC
digit
hexadecimal
HXYZW
|—
the
In
MW00100
Upper
42H
44H
46H
OOH
[Storage
type
and
for
#
type
#
and
for
instruction
(Hexadecimal
(Storage
of
case
Upper
Third
First
CB1)
CD')
CF')
t_
"0"
A
register
register
registers)
C
register
register)
C
converts
ASCII
BINASC
byte
digit
digit
“ABCDEFG”
Lower
CA')
41H
CC’)
43H
CE')
45H
CG')
47H
enteredinthe
is
number]
with
the
code
and
input
register)
VWDQXD
(Y)
(W)
subscript
16-bit
stores
data)
Lower
Fourth
Second
MW00100=4241H
MW00101=4443H
MW00102=4645H
MW00103=0047H
byte.
extra
binary
in
it
byte
digit
digit
the
(X)
(Z)
storedinthe
data
designated
V=S,
storage
I,
M,
O,
register
A
register
D
tc
(t\
[Operation
[Example(s)]
of
the
Register]
A
.
o
"1234H"
The
ASCII
H1234
1-
BINASC
MWOOIOO
MW00101
F
O'
code
B
O
binary
and
stored
i—
j
j
-
-
o o
data
storedinthe
MWOOIOO
in
MWOOIOO
byte
Upper
('2')
32H
('4')
34H
stored
:
O
indeterminate
:
*
(Stored
to
Lower
31H 33H
X
not
:
not
register
stored
or
A
MW00101.
byte
('!')
m
stored
depending
a
is
converted
MW00100=3231H
MW00101=3433H
to
on
the
four
case.)
digit
hexadecim
4-56
Page 85
4.
BASIC
INSTRUCTIONS
ASCBIN
[Format]
Instruction
ASCBIN
[Description]
[Operation
ASCBIN
The decimal
register.
vwnnnnn
VWDDDOO+l
Register]
the
of
A
X
[Storage
integer
Any
Any
integer
subscript
-with
ASCII
the
In
F
o
register
type
type
instruction
code
of
case
ASCBIN
Conversion
Upper
digit
Third
digit
First
B
I
o o
o
number]
register
register
16-bit
to
byte
(W)
J
converts
binary
VWHDXD
source
(YT
O
numerical
a
data.
(Conversion
register
Lower
Fourth
Second
stored
:
:
indeterminate
*
(Stored
digit digit
or
The
byte
X
not
value
converted
(X)
(Z)
stored
not
:
stored
ASCBIN
expressed
in
a
resultisstoredinthe
'
register)
V=S,
A
Upper
XY
I,O,M,
on
register
the
source
depending
Instruction]
digit
four
Lower
ZW
D
case.)
hexa¬
A
|
[Example(s)]
four-byte
The
binary
MW00100 MW00101
data,
ASCBIN
ASCII
and
the
MW00100
Datatobe
Upper
32H
34H
code
stored
resultisstored
converted
,
Lower
31H
33H
('2')
('4')
MW00100
in
in
(T)
('gy
to
MW00200.
=$
MW00200
MW00101
MW00200
is
converted
Upper
|
A
12H
to
register
|
two-byte
Lower
34H
4-57
Page 86
Comparison
|
Instructions
[
4.8
4.8.1
Numerical
Comparison
There
relationships.
[Format]
[Description]
[Operation
are
6
of
Comparison
Instructions
comparison
of
types
Any Any
Any
=
=#
Any
Any Any
>
Subscript
Constant
comparison
A
register
or
A
F
Register]
the
A
F
o
o
Instructions
instructions
integer
integer
double-length
double-length
real
real
type
type
number number
register
instruction
the
and
I
B
x
o
register
register
integer
integer
type
type
designated
J
with
type
register
register
stores
O
comparing
for
subscript
register
type
register
with
the
result
register
stored
:
O
:
indeterminate
*
(Stored
;
with
subscript
comparison
of
the
in
X
:
not
or
numerals
subscript
register
B
stored
not
stored
depending
and
of
the
(ON
inspecting
immediately
true).
when
the
on
equivalen
precedi
case.)
[Example(s)]
(1)
If
executed.
h
|
\-
j-
(2)
you
If
to
MW00010A
\-
|
|-
(-
the
value
MW00100
MB00010A
IFON
MW00101 MW00102
IEND
want
accept
the
MW00100
|
Instruction
MB00010A
IFON
MW00101
MW00102
MW00100
of
=/=
00100
MW00102
+
the
use
to
comparison
set
to
is
00100
=*=
MW00102
+
is
not
MW00103
+
comparison
result
ON.
sequence
--
+
the
100,
result
the
with
MW00103
instructions
MB00010A
=>MW00104
in
subsequent
a
coil.
Unless
MB00010A
MW00104
=>
O
the
-a
from
IFON
instruction,
value
of
MW00100
and
it
is
This
result
below
a
conveniei
is
10'
comparis
is
used
4-58
IEND
Page 87
NOTE
Use
1.
be
NO
the
used
after
)-
MW00100 MB00010A
I
IFQN
IEND
contact
receiving
+
instruction
comparison
the
00100
BASIC
4.
Comparison
I
IFON
result
(IFOFF)
with
or
a
if
an
ON
coil.
(OFF)
INSTRUCTIONS
Instruction
instruction
I
is
to
MB00010A
O
When
2.
before
3.
In
in
instruction
Do
4.
result
making
the
||-
1.1
+
1.1
lb
DF00010
lb
the
case
the
data
not
use
with
MW00100
b
MB00010A
comparison
a
comparison
1.0
+
2.1
1.0
+
*
real
of
displayed
may
not
instructions
a
coil.
*
instruction.
2.1
number
on
coincide
other
00100
of
type
the
with
than
I
real
number
since
data,
CP-717,
an
apparent
coil
instruction
MB00010B
type
there
the
registers,
=>DF00010
DB000200
O
=>DF00010
DB000200
O
a
minute
is
execution
result.
when
MB00010A
O
MB00010C
O
use
precision
result
receiving
a
]
of
||-
Wrong
Correct
a
the
instruction
difference
comparison
comparison
IFON
IEND
MW00100+00100
b
MB000010A
I
MB00010A
IFON
IEND
1
MB000010B
Wrong
MB00010A
O
MB000010C
O
Correct
4-59
Page 88
Range
|
Check
Instruction
(RCHK)
4.8.2
Range
Check
[Format]
[Description]
Instruction
!
Any
integer
integer
Any
double-length
Any
double-length
Any
subscript
with
Any
real
real
Any
subscript
Subscript
Constant
RCHK
The
the
A
(
the
f-
within
of
RCHK
(RCHK)
[Lower
type
type
number
number
register
instruction
specified
register
input
limit]
register
register
integer
integer
type
type
range
kept.
are
value)
[Lower
with
type type
register
register
examines
not.
or
limit],
Output
Upper
limit
subscript
register
register
with
the
contents
The
result
Input
limit]
value
[Upper
value
Any
integer
Any
integer
double-length
Any
Any
double-length
subscript
with
Any
real
Any
real
subscript
Subscript
Constant
entered
output
is
Result
regist*r=OFF
B
r»gist«r=ON
B
[Upper
type
type
number
number
.
register
in
the
to
the
1
bmit]
register
register
integer
integer
type
type
register
A
register.
B
with
type
type
register
register
whether
The
subscrii
registe
registf
wit
it
i
content
[Operation
[Example(s)]
of
Register]
the
A
o
the
If
*
upper
the
In
*
B
F
X
o
integer
For
MW00100
\-
RCHK
Input
1000>MW00100
lOOOSMWOOlOOÿ
MW00100
For
b
>
double-length
ML00100
RCHK
value
input
limit,
cases
I
O
operation
type
-1000,
(MW00100)
1000
-100000,
the
result
other
J
o
1000
integer
register)
{A
than
1000
type
100000
limit
Lower
is
(B
register)
the
above,
:
stored
O
:
indeterminate
*
(Stored
Output
operation
-
-
.
greater
ON.
=
the
X
:
not
or
(DBOOOOOO)
OFF
ON OFF
register=OFF
B
the
than
result
not
stored
(B
stored
depending
DBOOOOOO
DBOOOOOO
lower
register)
O
o
limit
on
=
the
and
OFF.
case.)
less
than
th<
4-60
(ML00100)
Input
100000
IOOOOOSMLOOIOOSS
MLOO
>ML00100
100
>
100000
100000
Output
(DBOOOOOO)
OFF
ON
OFF
Page 89
4.
INSTRUCTIONS
BASIC
For
real
number
|-
DF00100
RCHK
Input
10.5>DF00100
10.5SDF00100ÿ10.5
DF00100>10.5
type
-10.5,
(DF00100)
operation
10.5
Output
Range
DBOOOOOO
(DBOOOOOO)
OFF
ON
OFF
O
Check
Instruction
(RCHK)
4-61
Page 90
RQTL
|
Instruction/ROTR
Instruction
|
4.9
4.9.1
Data
Operation
ROTL
Instruction
[Format]
[Description]
[Operation
of
the
Instructions
ROTR
and
ROTL'
ROTR
The
ROTL
numberoftimes
the
for
bit
the
and
Register]
A
JL
ooo
Instruction
[Head
Any
bit
(except
registers)
C
Any
bit
with
(except
registers)
-C
ROTR)
(or
width.
JB
Address]
Bit
register
type
and
for
#
register
type
subscript
for
and
#
instructionisused
designated,
m-1
m-2
O
J
o
I
m—
Fig.
N=
-Bit
3
Number
4.5
:
O
*
(Stored
The
stored
:
integer integer
subscript
perform
to
bit
the
of
4
[Number
"
Any Any
with
Constant
on
width(m)
nr
rotations
of
ROTL
indeterminate
or
X
not
Operation
:
Rotations]
register
type
register
type
rotation,
designated
table
3
2
T
stored
not
stored
depending
[Bit
Width]
"
in
W=
the
Any
Any
with
Constant
.
left
by
the
integer
integer
subscript
right)
(or
head
type
type
bit
regist regist
directi
addn
*l
0
1
r
r
the
on
Head
case.)
bit
address
[Example(s)]
Before
execution
After
execution
Before
execution
(1)
ROTL
ROTL
Rotation
F
Qlol
1
F
symmetry
1
ll
|o|i|o|o|o|oi
M
M
(2)
ROTR
ROTR
F
|1[1|
i|i|
data
width
having
of
range
The
bit
MB00000A
c
|1
[0|
7
>
:
C
M
1
.1
M
The
bit
MBOOOOOO
C
o|
having
data
of
width
i|olo|o|i|i|o|ifoTT1
o[
10
(Bit
9
MM
J,
9
M
M
10
8
MB00000A
rotated
are
N=5
W=10
width
M
are
N=1
10)
=
4
jilololoi
*
4
M
M
loji
MBOOOOOO
rotated
W=10
4
(bit
times
five
0
0
I~l
H~m
(bit
once
0
MWOOOOO)
of
A
the
left.
to
MWOOOOO
MW00001
MWOOOOO
MWOOOOI
MWOOOOO)
of
0
right.
the
to
as
as
the
the
head
head
address
address
anc
and
4-62
After
execution
4
4
1|
1|lj0|
c
F
1
n
01
8
1|
o|0!o|1|1(01
1]
K-
0
lTol
,
Page 91
4.
BASIC
INSTRUCTIONS
MOVB
[Format]
Instruction
[Description]
[Address
OVB
M
The
head
of
the
Any
Any
with
MOVB
of
the
head
of
Transfer
type
bit
type
bit
subscript
instruction
transfer
transfer
directioninwhich
Although
bits
and
the
bit
transfer
overlap.
MOVB
[Transfer
Source
No.]
4
Transfer
data
Source
Bit]
register register
transfers
source
destination
relay
the
the
of
table
destination
Register
I
source
area
[Address
bits,
number
transfer
=>
=>
the
the
to
bit.
bits
[Transfer
Register
n
=>
of
Transfer
Any
bit
(except
register)
Any
bit
subscript
-with
designated
transfer
The
increases.
source
do
not
Destination
register
type
and
for
#
register
type
destination,
transfer
be
will
overlap,
Destination
No.]
I
Transfer
destination
data
area
W=
[Number
Any
integer
Any
integer
with
Constant
Bit]
C
numberofbit
which
is
carried
stored
as
out
long
cautionisneeded
W=
[Number
Transfers]
MOVB
|
of
type
type
subscript
data,
starts
bit
1
the
as
Instruction
Transfers]
register
register
starting
from
the
at
a
timeinthe
transfer
the
when
of
from
the
address
source
bits
|
do
[Operation
of
Register]
the
A
o
Transfer
source
(a)
<b)
c
d
e
f
JL
(h) (h)
the
When
transfer
FlB
o
o
h
m—1m—
0
I
0
Transfer
transfer
destination
I
o
2
m—
1
i l
1
c
d
e
f
g_
<f)
M
source
overlap
J
o
Number
3
1
1
destination
and
(1
)
stored
:
O
indeterminate
:
*
(Stored
of
transfers
X
or
not
5
4
110
4
4 4
1
10
Transfer
(g)
(h)
When
transfer
not
stored
:
stored
(m)
3
source
a
b
c
d
e
the
transfer
destination
depending
2
10
14
10
Transfer
1
M.
(h)
source
on
*1
0
1
1
1
destination
a
b
a
b
a
overlap
case.)
the
Address head
transfer
bit
source
Addressofthe
head
transfer
destination
and
(2)
of
the
bit
4-63
Page 92
MOVB
Instruction
[Example(s)]
The10bitsofdata
(bit
MB000010
,
MOVB
MWOOOOO
MW00001
0
MBOOOOOO
1001101100100001
0000000111001010
After
i
MWOOOOO
MW00001
1001101100100001
0
0
starting
MW00001).
of
transfer
000
=5
«ÿ
0
1
from
MBOOOOOO
MB000010
si/
010 000
0
1
W=10
Transfer
Transfer
(bit
range
f
range
of
0
1
MWOOOOO)
transferred
are
4-64
i
Page 93
4.
BASIC
INSTRUCTIONS
>.9.3
MOVW
Instruction
[Format]
[Description]
MOVW
The
from from
out
Although
destination
MOVW
[Transfer
Any
Any
with
MOVW
the
the
address
word
1
[Transfer
Source
integer
integer
subscript
instruction
head
a
at
transfer
the
do
Transfer
data
Register
type
type
of
the
of
time
not
Source
No.[
register register
transfer
the
head
the
in
source
overlap,
Register
J
source
area
[Transfer
Any
(except
Any
subscript
.registers)
source
integer
for
integer
designated
the
registers,
destination
=>
transfers
transfer
directioninwhich
be
=)
[Transfer
stored
needed
is
Transfer
destination
area
will
caution
No.]
Destination
type
register
C
and
#
registers)
register
type
(except
to
the
long
as
when
Destination
Register
with
for
#
and
number
the
transfer
register.
register
the
as
these
Register
data
No.}
W=
C
of
The
number
transfer
do
overlap.
No.]
MOVW
[Number
integer
Any
Any
integer
with
subscript
Constant
words
of
destination,
transfer
process
increases.
source
W=
and
[Number
Instruction
Transfers}
of
register
type
register
type
starting
data,
which
is
the
transfer
of
Transfers]
starts
carried
[Operation
[Example(s)]
Transfer
When
transfer
Register
the
of
A
O
The
MOVW
MWOOOOO
MW00001 MW00002
source
(a) (b)
c
d
e
f
£
(h)
transfer
the
destination
F
O
word
data
Transfer
c
d
e
f
g
(0
(g)
(h)
source
overlap
B
I
O
O
MWOOOOO
MWOOOOO
1234H 2345H
3456H
destination
and
(1)
J
O
MW00009
to
MW00100
Transfer
When
transfer
stored
:
O
:
indeterminate
*
(Stored
are
W=
Transfer
source
a
b
c
d
e
(0
(g)
00
transfer
the
destination
X
:
or
not
transferred
00010
MW00100
MW00101 MW00102
Transfer
stored
not
stored
destination
(a)
<b)
a
b
a
b
a
(h)
source
overlap
depending
to
MW00100
and
(2)
on
1234H
2345H 3456H
case.)
the
MW00109.
to
MW00009
9999H
MW00199
9999H
4-65
Page 94
i
XCHG
4.9.4
Instruction
XCHG
Instruction
[Format]
[Description]
XCHG
The
.
t
I
'
XCHG
[Data
Table
integer
Any
for
(except
Any
integer
subscript
registers)
instruction
XCHG
Data
1]
type
#
and,
type
(except
[Data
Table
register
registers)
C
register
for#
used
is
Table
J
Data
1
and
1]
Table
Data
with
C
exchange
to
Table
=
[Data
1
>
L#
2
[Data
Table
Any
integer
(except
registers)
Any
integer
subscript
with
C
and
the
Table
2]
;
2]
type
and
for
#
type
(except
registers)
contents
[Number
W
=
Data
Data
register
C
register
of
Table
Table
for
data
of
2
1
1
Transfers]
Data
[Number
f
Any
integer
Any
integer
subscript
with
Constant
table1and
Table
2
of
Transfers]
type type
data
regist
regist
table
[Operation
[Example(s)]
Register]
of
the
A
o
The
contents
MW00109.
XCHG
MWOOOOO
MW00001 MW00002
MW00003
MW00004
MW00005 MW00006
MW00007
MW00008
MW00009
Before
XCHG
F
B
o
o
MWOOOOO
1031H 1032H
1033H
1034H
1035H
1036H
1037H
1038H
1039H
1030H
a
b
c
d
e
f
t
JL
h
execution
instruction
r
I
o
of
MWOOOOO
!
MW00100 MW00101 MW00102
MW00I03
MW00104 MW00105
MW00106
MW00107 MW00108
MW00109
i
1
k
I
m
n
o
£
of
O
J
o
*
(Stored
MW00009
to
MW00100
2050H
2051H
2052H
2053H
2054H 2055H 2056H
2057H
2058H
2059H
the
or
X
not
stored
:
indeterminate
:
are
W=00010
After
transfer
>
i
1
k
1
m
n
o
£
After
XCHG
not
:
stored
stored
exchanged
MWOOOOO
MW00001 MW00002
MW00003
MW00004
MW00005 MW00006
MW00007
MW00008 MW00009
execution
instruction
depending
with
2050H
2051H
2052H
2053H
2054H
2055H 2056H 2057H
2058H
2059H
a
b
c
d
e
f
£
h
the
of
the
on
those
MW00100 MW00101 MW00102
MW00103
.
MW00104
MW00105
MW00106
MW00107
MW00108 MW00109
case.)
MW00100
of
1031E
1032E
1033Ii
1034E
1035E 1036E
1037E 1038E 1039E 1030E
.
4-66
Page 95
4.
BASIC
INSTRUCTIONS
SETW
Instruction
[Format]
[Description]
SETW
-
The
SETW
designated
The
storage
number.
Transfer
I,
V=S,
O,
[Transfer
Any
integer
and
for
#
Any
integer
subscript
registers)
instruction
by
the
process
data
M,
D
Destination
type
register
registers)
C
register
type
(except
for#
transfer
is
!
Register
(except
with
C
and
stores
destination
carried
Transfer
No.]
n=
the
data
by
out
destination
CUED
HEED
[Data
Any
integer
[
Any
integer
subscript
with
Constant
designated
register
word
1
Transferred]
be
to
register
type
type
as
number
in
direction
the
area
v
WEEDED
register
transfer
and
I
the
'
vwnnnnn+i
vwnnnnn+2
vwnnnnn+3
vwEDECD+(n-i)
vwnnmn+n
SETW
[Number
integer
[Any
Any
integer
subscript
with
Constant
data
in
number
of
increasing
Transfer
destination
register
Instruction
of
Transfers]
type
register register
type
registers
all
of
transfers.
register
no.
Number
of
Transfers
[Operation
[Example(s)]
of
the
Register]
A
O
The
contents
SETW
Transfer
00000
F
O
B
o
of
data
I
o o
MW00100
MW00100
J
to
D=00000
Transfer
stored
:
O
indeterminate
:
*
(Stored
MW00119
destination
00000
OOOOO
00000
00000
00000 00000
X
not
:
or
are
not
stored
set
W=00020
MW00100
M
MW00102
MW00103
MW00118 MW00119
stored
to
0.
WOO
depending
101
on
the
case.)
4-67
Page 96
BEXTD
Instruction
4.9.6
BEXTD
Instruction
[Format]
BEXTD
[Description]
Number
Transfers
(Number
bytes)
[Transfer
Any Any
with
The
BEXTD
byte
area
of
byte
In
VWOOODD
of
VWD00DD+1
of
VWDQXD+2'
\k
Source
integer
integer
subscript
by
the
transfer
the
Register
register
type
register
type
instruction
byte
in
the
destination
of
case
BEXTD
a
b
c
d
e
f
V=S,
No.]
stores
word
(Lower
(Upper
I,
(Transfer
Any
to
integer
(except
Any
integer
subscript
registers)
.
byte
the
sequence
register
VWCTDOD
byte)
byte)
M,
D
O,
Destination
type
#
and
for
type
(except
sequence
the
of
is
"0."
to
Register
register
registers)
C
register
for
with
and
#
storedinthe
transfer
VWAAAAA
OOH
OOH
OOH
OOH
OOH
OOH
B=
[Number
Any Any
with
Constant
No.J
C
transfer
destination
B=N
a
(Lower_byte)
(Upper
byte)
b
c
d
e
f
Transfers]
of
integer
type
integer
type
subscript
source
register.
AAAAA
VW
VWAAAAA+l
VWAAAAA+2
VWAAAAAÿ
AAAAA+4
VW
VW
AAAAA+5
register
register
The
regist
upp
[Operation
[Example(s)]
the
of
The
MW00200.
•!
Register
A
F
x
o
bytes
5
BEXTD
MW00100
MW00101 MW00102
MW00103
MW00104
B
I
O
beginning
MW00100
10H
11H 12H
13H
14H
OOH
J
O
with
to
(Lower
(Upper
stored
:
O
indeterminate
:
*
(Stored
MW00100
MW00200
byte)
byte)
X
:
not
or
expanded
are
B=00005
stored
not
stored
depending
five
into
(Lower
10H
(Upper
OOH
11H
OOH
12H
OOH
13H
OOH
14H
OOH
the
on
words
byte)
byte)
case.)
beginning
MW00200
MW00201
MW00202
MW00203
MW00204
wii
4-68
Page 97
4.
INSTRUCTIONS
BASIC
.9.7
BPRESS
Instruction
[Format]
[Description]
Number
Transfers
(Number
bytes)
BPRESS
The
source
upper
instruction.
of
of
vi'-
[Transfer
BPRESS
Any
integer
integer
Any
subscript
with
register
byte
In
the
Source
type
type
instruction
of
the
case
vwnnnnn
VW
vwnnnnn+2
vwnnnnn+3
vwnnnnrM-4
Register
register
register
area
transfer
of
00H
00H
00H
00H
00H
No.]
stores
byte
the
in
source
BPRESS
(Lower
a
(Upper
b
c
d
e
[Transfer
to
Any
integer
(except
Any
subscript
.registers)
the
lower
sequence
register
VWQOTH
byte)
byte)
Destination
for
#
integer
(except
byte
register
type
and
registers)
C
type
register
for
of
the
of
the
transfer
is
ignored.
to
VWAAAAA
Register
and
#
word
This
a
b
c
d
e
00
When
bytes
No.]
B=
with
C
sequence
destination
is
B=N
(Lower
(Upper
t
the
an
is
V=S,
BPRESS
|
[Number
Any
Any
with
Constant
stored
the
reverse
byte)
byte)
number
odd
I,O,M,
Instruction
of
Transfer
integer
type type
integer
subscript
the
in
register
of
the
VWAAAAA
VWAAAAA+l
VWAAAAA+2
of
transfered
number,
"0"
D
bytes]
register register
transfer
area.
BEXTD
is
set.
The
[Operation
[Example(s)]
Register
the
of
A
o
The5words
MW00200.
B
F.
o
O
beginning
BPRESS
MW00100
MW00101
MW00102
MW00103
MW00104
I
J
o
o
with
MW00100
(Lower
10H
(Upper
00H
11H
00H
12H
00H
13H
00H
14H
00H
stored
:
O
:
indeterminate
*
(Stored
MW00100
to
MW00200
byte)
byte)
X
:
or
not
are
compressed
B=00005
stored
not
stored
bytes
depending
into
(Lower
10H
(Upper
11H
12H
13H
14H
00H
f
When
the
is
five
number
an
odd
the
on
bytes
byte)
byte)
number,
case.)
beginning
MW00200
MW00201
MW00202
of
transfered
"0"
with
is
set.
4-69
Page 98
|
BSRCH
Instructionÿ
4.9.8
BSRCH
Instruction
[Format]
[Description]
[Operation
BSRCH
The
in
head
Before
search
correct.
In
If
of
the
[Head
search
the
Any
integer
Any
integer
subscript
with
Any
double-length
register
type
Any
double-length
register
type
subscript
with
real
Any
register
Any
real
register
BSRCH
specified
the
register
the
range
addition,
matched
no
Register]
A
F
o
o
number
of'
range]
register
type
register
type
type
number
type
number
with
subscript
instruction
number
execution
be
the
data
B.
O
ihte
ger
integer
search
sorted
result
is
I
o
Any
W=
Any
with
Constant
uses
range.
matched
of
the
of
in
will
found,
J
o
[Range
ascending
number]
word
type type
binary
The
register register
search
integer
integer
subscript
a
data)
BSRCH
instruction,
order.
notbecorrect
"-1"
is
stored.
stored
O
indeterminate
:
*
(Stored
D=
search
results
are
If
there
if
X
not
or
Any
Any
with
Any
type
Any
type
Any register
Any
register
Constant
method
stored
this
not
stored
[Search
data]
type
integer
type
integer
subscript
double-length
register double-length register
with
number
real real
number
subscript
with
to
(offset
in
the
necessary
is
it
is
not
are
two
stored
depending
register
register
integer
integer
subscript
type type
search
for
R=
the
numberofthe
specified
register.
that
the
done,
more
or
result
identical
the
on
[Search
integer
"Any
for
(except
registers)
Any
integer
with
subscript
C
#
and
registers)
specified
search
the
data
will
case.)
result)
type
and
#
type
in
not
data.
regist
C
regist
(except
data
range
the
be
f
[Example(s)]
matching
Data
resultisstored
the
BSRCH
MW00100
MW00101 MW00102
MW00199
01234
with
register
in
MW00100
98765
34567 01234
00000
searched
are
DW00000.
W=100
for
D=01234
DW00000
Offset
in
DW00000
registers
in
R=DW00000
number
DW00000.
MW00100
00002
MWOOIOO
of
—00102
t
MW00102
MW00199,
to
stored
is
00100
r
MWOOIOO
and
4-70
Page 99
4.
|
BASIC
INSTRUCTIONS
SORT
InstructiorT~j
SORT
Instruction
[Format]
[Description]
[Operation
[Example(s)]
SORT
of
the
(Head
Any
(except
Any
Any
(except
Any
with
Any
(except
Any
The
SORT
Register]
A
o
The
data
number
integer
type
#
for
and
integer
type
double-length
for
#
and
double-length
subscript
real
number
for
#
and
real
number
instruction
F
B
o
o
registers
in
SORT
MW00100
of
the
register
C
register
C
type
C
type
range]
sort
registers)
with
integer
registers)
integer
register
registers)
register
arranges
J
I
1
o
O
I
MW00100
subscript
register
type
register
type
with
data
O
*
(Stored
W=00020
subscript
:
:
to
-
the
in
specified
or
X
not
stored indeterminate
MW00199
W=
Any Any Any Any
with
Any Any
not
:
stored
are
[Number
stored
sorted
range
of
integer integer
double-length
double-length
subscript
real
number
real
number
register
type
type
register
register
type
type
range
depending
ascending
in
registers]
integer integer
register
register
in
on
the
with
subscript
register
type
register
type
with
ascending
case.)
order.
subscript
order.
4-71
Page 100
SHFTL
|
Instruction/SHFT-R
Instruction
4.9.10
SHFTL
Instruction
[Format]
[Description]
Before
execution
After
execution
and
SHFTL SHFTR
The
SHIFTL
of
shifts
As
shown
tits
become
SHFTR
[Head
Any
r
(except registers)
J
Any
with
(except
L
registers)
the
in
m
Xn-l
Thrown
X»-s
Instruction
Bit
type
bit
for
bit
type
subscript
for
(SHIFTR)
bit
sequence
Fig.
4.6,
0.
2
m
1
Xu
2
away
Number
shifts
of
Address]
register
and
#
register
and
#
bit
3
in
Xa-3
C
C
instruction
specified
data
in
4
in
Xa-4
Xa-5
H
that
Bit
5
N=
[Number
"
Any Any
with
Constant
shifts
by
head
overflows
width(m)
of
integer integer
subscript
the
to
bit
the
3
4
XJ
X*
0
Xo
Shifts]
register
type
register
type
(right)
left
address
bit
Xt
0
0
and
widthisthrown
2
1
0
entered
is
Width]
[Bit
'
Xo
W=
by
0
0
bit
only
width.
Any
integer
Any
integer
with
subscript
Constant
specified
the
away,
Head
and
bit
registe
type
registe
type
numl
insufficit
address
[Operation
[Example(s)]
of
the
f
(1)
(2)
A
o
Register]
F
o
SHFTL
SHFTL
MWOOOOO
MW00001
MWOOOOO
MW00001
SHFTR
Fig.
B
I
o
o
ten-bit
A
is
head
MBOOOOOA
|l|l|0|0|0[ry
i|o|o
[
[
five-bit
A
head
is
4.6
J.
o
wide
shifted
Shift
|o
is
entered.
0
wide
shifted
The
SHIFT
O
*
Operation
stored
:
:
indeterminate
(Stored
sectionofdata
bitstothe
five
N=5
W=10
bitstothe
5
A
A:
J,
|o|oT
sectionofdata
bitstothe
three
or
X
not
left.
not
:
stored
MB00000A
with
left.
3
mm
:
4
lilololol
with
right.
stored
depending
MB00005
(bit
Note:
(bit
the
on
MW00000)
A
of
upper
The
thrown
are
MWOOOOO)
of
5
case.)
five
away.
as
bits
as
t
t
4-72
SHFTR
MB000005
MWOOOOO
MWOOOOO
N=3
lljllllllll
W=5
|oj
0
5
oj
is
entered.
[lj
L|
0
1
Note:
The
are
lower
thrown
three
away.
bi
Loading...