Omron WS02-CXPC1-V9 - V9 Operation Manual page 41

Table of Contents

Advertisement

Function Blocks
Parameters
Note
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.
Instance of Function Block Definition A
Input 0.00
a
Input 3.00
c
Set the constants or
input source addresses
from which to pass data.
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.
Program
Input D100
Input D200
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.
(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
Output 2.00
b
Set the constant or
output destination
address to which to pass
data.
Instance of Function Block Definition A
m
k
Output D300
n
Section 1-2
15

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cx-programmer 9Sysmac ws02-cxpc1-v9

Table of Contents