![background image](http://html1.mh-extra.com/html/omron/sysmac-cx-programmer-9/sysmac-cx-programmer-9_operation-manual_744241041.webp)
15
Function Blocks
Section 1-2
Parameters
Each time an instance is created, set the real I/O memory addresses or con-
stants for input variables, output variables, and input-output variables used to
pass input data values to instances and obtain output data values from
instances. These addresses and constants are called parameters.
Using Input Variables and Output Variables
With input variables and output variables, it is not the input source address
itself, but the contents at the input address in the form and size specified by
the variable data type that is passed to the function block. In a similar fashion,
it is not the output destination address itself, but the contents for the output
address in the form and size specified by the variable data type that is passed
from the function block.
Even if an input source address (i.e., an input parameter) or an output desti-
nation address (i.e., an output parameter) is a word address, the data that is
passed will be the data in the form and size specified by the variable data type
starting from the specified word address.
Note
(1) Only addresses in the following areas can be used as parameters: CIO
Area, Auxiliary Area, DM Area, EM Area (banks 0 to C), Holding Area,
and Work Area.
The following cannot be used: Index and Data Registers (both direct and
indirect specifications) and indirect addresses to the DM Area and EM
Area (both in binary and BCD mode).
(2) Local and global symbols in the user program can also be specified as
parameters. To do so, however, the data size of the local or global symbol
must be the same as the data size of the function block variable.
(3) When an instance is executed, input values are passed from parameters
to input variables before the algorithm is processed. Output values are
a
b
c
Input 0.00
Instance of Function Block Definition A
Input 3.00
Output 2.00
Set the constants or
input source addresses
from which to pass data.
Set the constant or
output destination
address to which to pass
data.
m
k
n
Examples:
If m is type WORD, one word of data from D100 will be passed to the
variable.
If n is type DWORD, two words of data from D200 and D201 will be
passed to the variable.
If k is type LWORD, four words of data from the variable will be passed
to the D300 to D303.
Program
Input D100
Instance of Function Block Definition A
Output D300
Input D200
Summary of Contents for SYSMAC CX-Programmer 9
Page 2: ......
Page 4: ...iv ...
Page 6: ...vi ...
Page 8: ......
Page 16: ...xvi ...
Page 20: ...xx ...
Page 26: ...xxvi Application Precautions 4 ...
Page 27: ...Part 1 Function Blocks ...
Page 28: ......
Page 154: ...128 Procedures Section 3 2 ...
Page 155: ...Part 2 Structured Text ST ...
Page 156: ......
Page 160: ...134 CX Programmer Specifications Section 4 2 ...
Page 206: ...180 Procedures Section 6 1 ...
Page 208: ...182 System defined external variables supported in function blocks Appendix A ...
Page 230: ...204 Revision History ...
Page 231: ......