![background image](http://html.mh-extra.com/html/omron/sysmac-cp-series/sysmac-cp-series_user-manual_742262077.webp)
4-33
4 Understanding Programming
CP2E CPU Unit Software User’s Manual(W614)
4-7
S
p
ecifying
Offsets f
o
r Ad
dres
ses
4
4-7-1 Ov
er
vie
w
Examples:
z
Word Addresses
The word address is offset by the amount specified by n (number of offset words) from A (start word
address).
Start Word Address
It is possible to specify the start word address with a word address or with a symbol (except the
NUMBER data type cannot be used).
Offsetting is possible only for addresses in the Holding, Word, and DM Areas.
The I/O comment for the start bit address is displayed.
When specifying symbols, make the symbol table setting as the array variation. The number of
arrays will be the maximum number of 1 word at least.
Offset
The offset can be specified as a decimal constant, word address (but CIO Area addresses cannot
be specified), or one-word symbol (i.e., symbols with the following data types: INT, UINT, WORD,
CHANNEL).
If a word address or symbol is specified, the contents of the specified word is used as the offset.
If the offset exceeds bit 15 in the specified word, offsetting will continue from bit 00 in the next word.
If the offset is specified indirectly, make sure that the final bit address does not exceed the upper
limit of the memory area by using input comparison or other instruction.
Examples:
10.0 [2]
10.02
10.02
a [2]
10.02
10.00 [
W
0]
a [
b
]
Offset; sym
b
ol
b
= &2
Start
b
it address; sym
b
ol a = 10.0
10.02
Offset
w
hen
W
0 = &2
(
w
ord address in I/O memory)
Start
b
it address
(
b
it address in I/O memory)
Offset (decimal
v
al
u
e)
Start
b
it address; sym
b
ol a = 10.0
(
b
it sym
b
ol named a)
Offset (decimal
v
al
u
e)
Start
b
it address
(
b
it address in I/O memory)
W
ord
Bit 15 14 13 12 11 10 9 8 7 6 5
0
Start
w
ord address
Offset
A [n]
4 3 2 1
A
+n
D0[2]
D2
D2
a [2]
D2
[
W
0]
a [
b
]
Offset;
sym
b
ol
b
(one-
w
ord sym
b
ol) = &2
Start
w
ord address;
sym
b
ol a (one-
w
ord sym
b
ol) = D0
D2
Offset (decimal
v
al
u
e)
Start
w
ord address
(
w
ord address in I/O memory)
Offset;
W
0 = &2
(
w
ord address in I/O memory)
Start
b
it address
(
b
it address in I/O memory)
Offset (decimal
v
al
u
e)
Start
w
ord address;
sym
b
ol a (one-
w
ord sym
b
ol) = D0
D0
Summary of Contents for SYSMAC CP Series
Page 3: ......
Page 32: ...1 Overview 1 4 CP2E CPU Unit Software User s Manual W614 ...
Page 44: ...3 CPU Unit Operation 3 8 CP2E CPU Unit Software User s Manual W614 ...
Page 116: ...6 I O Allocation 6 8 CP2E CPU Unit Software User s Manual W614 ...
Page 144: ...7 PLC Setup 7 28 CP2E CPU Unit Software User s Manual W614 ...
Page 170: ...10 Interrupts 10 14 CP2E CPU Unit Software User s Manual W614 ...
Page 200: ...11 High speed Counters 11 30 CP2E CPU Unit Software User s Manual W614 ...
Page 272: ...12 Pulse Outputs 12 72 CP2E CPU Unit Software User s Manual W614 ...
Page 278: ...13 PWM Outputs 13 6 CP2E CPU Unit Software User s Manual W614 ...
Page 460: ...18 Programming Device Operations 18 28 CP2E CPU Unit Software User s Manual W614 ...
Page 576: ...Revision 2 CP2E CPU Unit Software User s Manual W614 ...
Page 577: ......