163
Statement Descriptions
Section 5-5
b. Calling a function block from another function block
Variable Settings
• Setting the variables of the ST program and SFC program (call source)
The ST program and SFC program have the following variables, and the
following values are passed with the called function block.
• Function block (call source) variable settings
The function block (call source) has the following variables, and the follow-
ing values are passed with the called function block.
Variable name in ST task/
SFC program
Values passed to (or received from) variables in
the called function block
IN1
Passed to FB_IN1 (input variable).
IN2
Passed to FB_IN2 (input variable).
IN3
Passed to FB_IN3 (input variable).
OUT1
Received from FB_OUT1 (output variable).
OUT2
Received from FB_OUT2 (output variable).
OUT3
Received from FB_OUT3 (output variable).
A
Note
Data type: BOOL
Passed to EN (internal variable).
B
Note
Data type: BOOL
Received from ENO (internal variable).
Instance_FB
Note
Data type: FUNC-
TIONBLOCK
Calling function block definition: Function block
Variable type
Function block (call
source) variable name
Values passed to (or received
from) variables in the called
function block
Input variables
IN1
Passed to FB2_IN1.
IN2
Passed to FB2_IN2.
IN3
Passed to FB2_IN3.
Output variables
OUT1
Received from FB2_OUT1.
OUT2
Received from FB2_OUT2.
OUT3
Received from FB2_OUT3.
Program
ST
Instance_ST
(ST)
Example) ...
Instance_FB(
...,...);
INSTANCE_FB is an instance name of data type FUNCTIONBLOCK.
(ST)
Example) ...
(Ladder diagram)
Function block (ST)
Function block (FB)
Function block (FB)
Содержание SYSMAC CX-Programmer 9
Страница 2: ......
Страница 4: ...iv ...
Страница 6: ...vi ...
Страница 8: ......
Страница 16: ...xvi ...
Страница 20: ...xx ...
Страница 26: ...xxvi Application Precautions 4 ...
Страница 27: ...Part 1 Function Blocks ...
Страница 28: ......
Страница 154: ...128 Procedures Section 3 2 ...
Страница 155: ...Part 2 Structured Text ST ...
Страница 156: ......
Страница 160: ...134 CX Programmer Specifications Section 4 2 ...
Страница 206: ...180 Procedures Section 6 1 ...
Страница 208: ...182 System defined external variables supported in function blocks Appendix A ...
Страница 230: ...204 Revision History ...
Страница 231: ......