4 Understanding Programming
4-32
CP2E CPU Unit Software User’s Manual(W614)
4-7
Specifying Offsets for Addresses
When an address is specified for an instruction operand, it is possible to change the specified address
by specifying in brackets an offset for the specified address.
z
Bit Addresses
The bit address is offset by the amount specified by n (number of bits) from A (start bit address).
Start Bit Address
It is possible to specify the start bit address with a bit address or with a symbol (except the NUMBER
data type cannot be used).
Offsetting is possible for all addresses except the DM Areas.
When specifying symbols, make the symbol table setting as the array variation. The number of
arrays will be the maximum number of 1 bit at least.
The I/O comment for the start bit address is displayed.
Offset
The offset can be specified as a decimal constant, word address (but CIO Area addresses cannot
be specified), or a one-word symbol (i.e., symbols with the following data types: INT, UINT, WORD,
CHANNEL).
Words in the Auxiliary Area (A) can only be specified as a decimal constant.
If a word address 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.
4-7-1
Overview
W
hen the start address
is CIO 0.00 and
W
0 is
&2, 2 is added,
res
u
lting in CIO 0.02.
W
hen the start
address is D100 and
W
1 is &3, 3 is added,
res
u
lting in D103.
An offset of 12 is
added to the start
address of D100,
res
u
lting in D112.
An offset of 4 is added
to the start address of
CIO 10.00, res
u
lting in
CIO 10.04.
Examples of
Specifying Bit
Address Offsets
Examples of
Specifying
W
ord
Address Offsets
0.00[
W
0]
10.00[4]
MOV
MOV
W
ord
Bit
15
14 13 12
11 10
9
8
7
6
5
4
3
2
1
0
Nu
m
b
er of
b
its to offset: +n
A [n]
Offset
Starting
b
it address
Starting
b
it address A
Содержание SYSMAC CP Series
Страница 1: ...USER S MANUAL Cat No W614 E1 01 SYSMAC CP Series CP2E E D CP2E S D CP2E N D CP2E CPU Unit Software ...
Страница 3: ......
Страница 32: ...1 Overview 1 4 CP2E CPU Unit Software User s Manual W614 ...
Страница 44: ...3 CPU Unit Operation 3 8 CP2E CPU Unit Software User s Manual W614 ...
Страница 116: ...6 I O Allocation 6 8 CP2E CPU Unit Software User s Manual W614 ...
Страница 144: ...7 PLC Setup 7 28 CP2E CPU Unit Software User s Manual W614 ...
Страница 170: ...10 Interrupts 10 14 CP2E CPU Unit Software User s Manual W614 ...
Страница 200: ...11 High speed Counters 11 30 CP2E CPU Unit Software User s Manual W614 ...
Страница 272: ...12 Pulse Outputs 12 72 CP2E CPU Unit Software User s Manual W614 ...
Страница 278: ...13 PWM Outputs 13 6 CP2E CPU Unit Software User s Manual W614 ...
Страница 460: ...18 Programming Device Operations 18 28 CP2E CPU Unit Software User s Manual W614 ...
Страница 576: ...Revision 2 CP2E CPU Unit Software User s Manual W614 ...
Страница 577: ......