Setting Function Block Parameters Using The Enter Key - Omron WS02-CXPC1-V9 - V9 Operation Manual

Table of Contents

Advertisement

Procedures
1,2,3...
Restrictions
Note
3-2-5

Setting Function Block Parameters Using the Enter Key

1,2,3...
1. For a ladder diagram, select a data type of Function block in the global
symbol table, input the instance name, and registered the instance.
For ST, select a data type of Function block, use the instance name, and
use a call statement for the function block as follows to call the function
block:
Input the instance name (any internal variable name with a function block
data type) followed by the arguments in parentheses (i.e., specify the input
variable values of the calling function block to pass to the input variables of
the called function block). Also include the return values (i.e., specify the
output variable values of the called function block to pass back to the out-
put variables of the calling function block).
2. Press the F Key in the Ladder Section Window. The Function Block Invo-
cation Dialog Box will be displayed.
3. Select the instance name that was previously registered from the pulldown
menu on the FB Instance Field. The instance will be created.
Observe the following restrictions when creating instances. Refer to 2-4 Pro-
gramming Restrictions for details.
• No more than one function block can be created in each program circuit.
• The rung cannot be branched to the left of an instance.
• Instances cannot be connected directly to the left bus bar, i.e., an EN
must always be inserted.
If changes are made in the I/O variables in a variable table for a function block
definition, the bus bar to the left of all instances that have been created from
that function block definition will be displayed in red to indicate an error. When
this happens, select the function block, right-click, and select Update Invoca-
tion. The instance will be updated for any changes that have been made in
the function block definition and the red bus bar display indicating an error will
be cleared.
After an instance of a function block has been created, input parameters must
be set for input variables and output parameters must be set for output vari-
ables to enable external I/O.
• Values, addresses, and program symbols (global symbols and local sym-
bols) can be set in input parameters. (See note a.)
• Addresses and program symbols (global symbols and local symbols) can
be set in output parameters. (See note b.)
Note (a) The function block's input variable data size and the program's
symbol data size must match.
(b) The function block's output variable data size and the program's
symbol data size must match.
1. Inputs are located on the left of the instance and outputs on the right. Place
the cursor where the parameter is to be set and press the Enter Key. (Al-
ternately, select Function Block Parameter from the Insert Menu.) The
New Parameter Dialog Box will be displayed as shown below.
Section 3-2
99

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cx-programmer 9Sysmac ws02-cxpc1-v9

Table of Contents