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

Table of Contents

Advertisement

Procedures
1,2,3...
98
■ Method 1: Using the F Key in the Ladder Section Window and Inputting
the Instance Name
1. In the Ladder Section Window, place the cursor in the program where the
instance is to be inserted and press the F Key. (Alternately, select Func-
tion Block Invocation from the Insert Menu.) The New Function Block In-
vocation Dialog Box will be displayed.
When using ST language, a function block can be called by selecting
"FUNCTION BLOCK" as the variable's data type, using the desired in-
stance name, and entering the following function block call statement.
Specify arguments in parentheses after the instance name (to pass input
variable values from the calling function block to input variables in the
called function block) and also specify return values (to receive output vari-
able values from the called function block to output variables in the calling
function block). The instance name can be set to any internal variable with
the "FUNCTION BLOCK" data type.
2. Input the instance name, select the function block from which to create an
instance, and click the OK Button.
3. As an example, set the instance name in the FB Instance Field to sample,
set the function block in the FB Definition Field to FunctionBlock1, and
click the OK Button. As shown below, a copy of the function block definition
called FunctionBlock1 will be created with an instance name of sample.
The instance will be automatically registered in the global symbol table
with an instance name of sample and a data type of FUNCTION BLOCK.
■ Method 2: Registering the Instance Name in the Global Symbol Table in
Advance and Then Selecting the Instance Name
If the instance name is registered in the global symbol table in advance, the
instance name can be selected from the global symbol table to create other
instances.
Press F Key with cursor here.
Following dialog
Input the instance name.
box is displayed.
Select the function block from
which to create an instance.
Instance name
Function block definition
An instance called sample
is created from the function
block definition called
FunctionBlock1.
Section 3-2

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cx-programmer 9Sysmac ws02-cxpc1-v9

Table of Contents