![Omron CS1-H Series Скачать руководство пользователя страница 61](http://html1.mh-extra.com/html/omron/cs1-h-series/cs1-h-series_operation-manual_742526061.webp)
46
Function Block Applications Guidelines
Section 2-4
3.
Add the unit number offset to the real I/O memory address within the Index
Register (e.g., IR0).
Example 2: Specifying the Designated Bit in the CIO Area (e.g., CIO Word
n+a, Bit b)
Programs: Use either of the following methods.
• Word addresses: Specify the constant offset of the Index Register using
an indirect specification (e.g., +a,IR0).
• Bit addresses: Specify an instruction that can specify a bit address within
a word (e.g., &b in second operand of SETB instruction when writing and
TST instruction when reading).
Example: Special I/O Units
2-4-6
Using Index Registers
Index Registers IR0 to IR15 function as pointers for specifying I/O memory
addresses. These Index Registers can be used within function blocks to
directly specify addresses using IR0 to IR15 and not the variable names
(Index Register direct specification: IR0 to IR15; Index Register indirect speci-
fication: ,IR0 to ,IR15)
Note
After storing the real I/O memory addresses in the Index Registers using the
MOVR(560) instruction, Index Registers can be indirectly specified using gen-
eral instructions. This enables all I/O memory areas to be specified dynami-
cally.
&3
Unit No.
&10
Unit No.
Offset
MOVR
Relay
IR0
+L
IR0
Offset
IR0
SETB
+1,IR0
&2
Instance for function block definition A.
1) Specify the first CIO Area word n (n = CIO 2000 + unit number
×
10)
Used constants:
Unit number (input variable, INT data type)
Offset (internal variable, DINT data type)
Relay (internal variable, WORD data type, 400 array elements, AT
setting = 2000)
Multiplies unit number by
&10 and stores in offset.
Stores the real I/O memory
address for the relay in IR0.
Adds offset to IR0.
2) Specify the designated bit in the CIO
Area (e.g., CIO word n+1, bit 02)
Turns ON CIO word n+1,
bit 02.
Содержание CS1-H Series
Страница 3: ...iv...
Страница 5: ...vi...
Страница 7: ...viii TABLE OF CONTENTS...
Страница 15: ...xvi Application Precautions 4...
Страница 151: ...136 Procedures Section 3 2...
Страница 153: ...138 Data Types Appendix A...
Страница 177: ...162 External Variables Appendix C...
Страница 181: ...166 Revision History...