Omron SYSMAC CS Series Programming Manual page 47

Hide thumbs Also See for SYSMAC CS Series:
Table of Contents

Advertisement

Basic Concepts
Operand
Specifying
The offset from the beginning of the area is
indirect DM/
specified. The contents of the address will be
EM addresses
treated as BCD data (0000 to 9999)to specify
the word address in Data Memory (DM) or Ex-
in BCD Mode
tended Data Memory (EM). Add an asterisk (*)
at the front to specify an indirect address in
BCD Mode.
Contents
D
Operand
Specifying a
An index register (IR) or a data register (DR) is speci-
register
fied directly by specifying IR# (#: 0 to 15) or DR#
directly
(#: 0 to 15).
Specifying
Indirect
an indirect
address
address
(No offset)
using a reg-
ister
Constant
offset
DR offset
Auto Incre-
ment
Auto Dec-
rement
Description
*D@@@@@
00000 to 9999
(BCD)
Description
The bit or word with the PC memory
address contained in IR# will be speci-
fied.
Specify ,IR# to specify bits and words
for instruction operands.
The bit or word with the PC memory
address in IR# + or – the constant is
specified.
Specify +/– constant ,IR#. Constant off-
sets range from –2048 to +2047 (deci-
mal). The offset is converted to binary
data when the instruction is executed.
The bit or word with the PC memory
address in IR# + the contents of DR# is
specified.
Specify DR# ,IR#. DR (data register)
contents are treated as signed-binary
data. The contents of IR# will be given a
negative offset if the signed binary value
is negative.
The contents of IR# is incremented by
+1 or +2 after referencing the value as
an PC memory address.
+1: Specify ,IR#+
+2: Specify ,IR# + +
The contents of IR# is decremented by
–1 or –2 after referencing the value as
an PC memory address.
–1: Specify ,–IR#
–2: Specify ,– –IR#
Notation
*D00200
0 1 0 0
Contents
Specifies D0100
Add an asterisk (*).
Notation
Application examples
IR0
MOVR 0010 IR0
Stores the PC memory address for
CIO 0010 in IR0.
IR2
MOVR 000102 IR2
Stores the PC memory address for bit
02 of CIO 0001 in IR2.
,IR0
LD ,IR0
Loads the bit with the PC memory
address in IR0.
MOV #0001 ,IR1
,IR1
Stores #0001 in the word with the PC
memory in IR1.
+5,IR0
LD +5 ,IR0
Loads the bit with the PC memory
address in IR0 + 5.
MOV #0001 +31 ,IR1
+31,IR1
Stores #0001 in the word with the PC
memory address in IR1 + 31
DR0 ,IR0
LD DR0 ,IR0
Loads the bit with the PC memory
address in IR0 + the value in DR0.
MOV #0001 DR0 ,IR1
Stores #0001 in the word with the PC
DR0 ,IR1
memory address in IR1 + the value in
DR0.
,IR0 ++
LD ,IR0 ++
Increments the contents of IR0 by 2
after the bit with the PC memory
address in IR0 is loaded.
MOV #0001 ,IR1 +
,IR1 +
Increments the contents of IR1 by 1
after #0001 is stored in the word with
the PC memory address in IR1.
,– –IR0
LD ,– –IR0
After decrementing the contents of IR0
by 2, the bit with the PC memory
address in IR0 is loaded.
MOV #0001 ,–IR1
,–IR1
After decrementing the contents of IR1
by 1, #0001 is stored in the word with
the PC memory address in IR1.
Section 2-1
Application
examples
MOV #0001
*D00200
27

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cs1g/h-cpu-ev1 seriesCj1g-cpu seriesSysmac cj series

Table of Contents