Omron CX-PROGRAMMER V8.1 Operation Manual page 189

Function blocks/ structured text
Table of Contents

Advertisement

Statement Descriptions
164
Variable type
Internal variables
Internal variables
(instance)
• Function block (call destination) variable settings
The function block (call destination) has the following variables, and
the following values are passed with the call source (ST program, SFC
program, or call source function block).
Variable type
Input variables
Output variables
Examples
■ Example of Entry Method 1
Instance_FB(EN:=A,FB_IN1:=IN1,FB_IN2:=IN2,FB_IN3:= IN3,
FB_OUT1=>OUT1,FB_OUT2=> OUT2,FB_OUT3=> OUT3,ENO=>B)
• It is all right for the arguments and return values to be listed in irregular
order.
• The input variables' arguments must be at the beginning of the list, or just
after the EN variable if the EN variable is listed.
• Output variables may be omitted if the data is not used.
• Specification method 2 cannot be used together with specification method
A in the same function block call statement.
■ Examples of other Entry Formats
• EN not entered:
Instance_FB(FB_IN1:=IN1,FB_IN2:=IN2,FB_IN3:= IN3,
FB_OUT1=>OUT1,FB_OUT2=> OUT2,FB_OUT3=> OUT3,ENO=>B)
• EN and ENO not entered:
Instance_FB(FB_IN1:=IN1,FB_IN2:=IN2,FB_IN3:= IN3,
FB_OUT1=>OUT1,FB_OUT2=> OUT2,FB_OUT3=> OUT3)
• ENO not entered:
Instance_FB(EN:=A,FB_IN1:=IN1,FB_IN2:=IN2,FB_IN3:=IN3,
FB_OUT1=>OUT1,FB_OUT2=>OUT2,FB_OUT3=>OUT3)
• FB_OUT2 data not required:
Instance_FB(EN:=A,FB_IN1:=IN1,FB_IN2:=IN2,FB_IN3:=IN3,
FB_OUT1=>OUT1,FB_OUT3=>OUT3,ENO=>B)
Function block (call
source) variable name
A
Note Data type: BOOL
B
Note Data type: BOOL
Instance_FB
Note Data type: FUNC-
TIONBLOCK
Function block (call
destination) variable name
FB_IN1
FB_IN2
FB_IN3
FB_OUT1
FB_OUT2
FB_OUT3
Section 5-5
Values passed to (or received
from) variables in the called
function block
Passed to EN.
Received from ENO.
Calling function block definition:
Function block 2
Values received from (or
passed to) variables in the
calling function block
Received from IN1.
Received from IN2.
Received from IN3.
Passed to OUT1.
Passed to OUT2.
Passed to OUT3.

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac ws02-cxpc1-v8Sysmac cx-programmer 8.1

Table of Contents