164
Statement Descriptions
Section 5-5
• 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).
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)
Internal variables
A
Note
Data type: BOOL
Passed to EN.
B
Note
Data type: BOOL
Received from ENO.
Internal variables
(instance)
Instance_FB
Note
Data type: FUNC-
TIONBLOCK
Calling function block definition:
Function block 2
Variable type
Function block (call
destination) variable name
Values received from (or
passed to) variables in the
calling function block
Input variables
FB_IN1
Received from IN1.
FB_IN2
Received from IN2.
FB_IN3
Received from IN3.
Output variables
FB_OUT1
Passed to OUT1.
FB_OUT2
Passed to OUT2.
FB_OUT3
Passed to OUT3.
Variable type
Function block (call
source) variable name
Values passed to (or received
from) variables in the called
function block
Summary of Contents for CX-PROGRAMMER V8.1
Page 3: ...iv...
Page 5: ...vi...
Page 7: ......
Page 15: ...xvi...
Page 19: ...xx...
Page 25: ...xxvi Application Precautions 4...
Page 26: ...Part 1 Function Blocks...
Page 27: ......
Page 153: ...128 Procedures Section 3 2...
Page 154: ...Part 2 Structured Text ST...
Page 155: ......
Page 159: ...134 CX Programmer Specifications Section 4 2...
Page 205: ...180 Procedures Section 6 1...
Page 207: ...182 System defined external variables supported in function blocks Appendix A...
Page 229: ...204 Revision History...
Page 230: ......