![background image](http://html1.mh-extra.com/html/omron/cs1-h-series/cs1-h-series_operation-manual_742526058.webp)
43
Function Block Applications Guidelines
Section 2-4
• Values are passed in a batch from the input parameters to the input vari-
ables before algorithm execution (not at the same time as the instruction
in the algorithm is executed). Therefore, to pass the value from a parame-
ter to an input variable when the instruction in the function block algorithm
is executed, use an internal variable or external variable instead of an
input variable.
Passing Values from or
Monitoring Output
Variables
To paste into the program and then pass values outside (the program) from
the function block for each instance, or monitor values, use output variables.
The following restrictions apply.
• Values are passed from output variables to output parameters all at once
after algorithm execution.
External Variables:
Condition Flags, Clock
Pulses, Auxiliary Area
Bits, Global Symbols in
Program
Condition Flags (e.g., Always ON Flag, Equals Flag), Clock Pulses (e.g., 1.0
second clock pulse bit), pre-registered Auxiliary Area Bits (e.g., First Cycle
Flag), and global symbols used in the program are all external variables
defined by the system.
Internal Variables:
Internally Allocated
Variables and Variables
Requiring AT Settings
Variables that are not specified as Inputs, Outputs, or Externals are Internals.
Internal variables include variables with internally allocated addresses, vari-
ables requiring addresses with AT settings (e.g., I/O allocation addresses,
addresses specially allocated for Special I/O Units), or variables requiring
array settings. For details on conditions requiring AT settings or array settings,
refer to
2-4-3 AT Settings for Internal Variables
, and
2-4-4 Array Settings for
Internal Variables
.
2-4-3
AT Settings for Internal Variables
Always specify AT settings for internal variables under the following condi-
tions.
• When addresses allocated to Basic I/O Units, Special I/O Units, or CPU
Bus Units are used and these addresses are registered to global symbols
that cannot be specified as external variables (e.g., data set for global
symbols is unstable).
D00100
DATA_1
W500
XFER
&10
DATA_1
DATA_2
DATA_2
Program
Instance for function block definition A
The actual value is
passed
If the size of the data type in
DATA_1 is 1 word, the value
for the word D00100 is
passed.
If the size of the data type in
DATA_2 is 2 words, the value
for the 2 words W500 and
W501 is passed.
An input variable cannot be used to specify
the address of an operand that specifies
the the first (or last) address of multiple
words.
For example, the XFER (BLOCK
TRANSFER) instruction cannot be used to
transfer 10 words from the address
beginning with DATA_1 to the address
beginning with DATA_2.
The address can be specified, but the address itself is not passed.
W 0.00
OK_ Flag
NG_ Flag
W 0.01
Program
Instance for function block definition A.
The actual value is
passed.
Variable for passing a value outside or monitoring:
Use an output variable.
Содержание 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...