13
Function Blocks
Section 1-2
The function blocks are created with variable names that are not tied to actual
addresses, so new programs can be developed easily just by reading the def-
initions from the file and placing them in a new program.
Supports Nesting and
Multiple Languages
Mathematical expressions can be entered in structured text (ST) language.
With CX-Programmer Ver. 6.0 and later versions, function blocks can be
nested. The function block nesting function allows just special processing to
be performed in a ST-language function block nested within a ladder-lan-
guage function block.
1-2-3
Function Block Structure
Function blocks consist of function block definitions that are created in
advance and function block instances that are inserted in the program.
Function Block
Definitions
Function block definitions are the programs contained in function blocks. Each
function block definition contains the algorithm and variable definitions, as
shown in the following diagram.
1. Algorithm
Standardized programming is written with variable names rather than real I/O
memory addresses. In the CX-Programmer, algorithms can be written in
either ladder programming or structured text.
2. Variable Definitions
The variable table lists each variable’s usage (input, output, input-output, or
internal) and properties (data type, etc.). For details, refer to
1-3 Variables
.
Number of Function Block
Definitions
The maximum number of function block definitions that can be created for one
CPU Unit is either 128 or 1,024 depending on the CPU Unit model.
Function block (ladder language)
Call (Nesting)
Function block (ST language)
tim_a
TIMER
tim_b
TIMER
ON_TIME
INT
OFF_TIME
INT
TIMX tim_a OFF_TIME
tim_b
TIMX tim_b ON_TIME
tim_a
ENO
Name
Type
Internal
Internal
Input
Input
Function Block Definition
Example: CLOCK PULSE
Algorithm
Example: CLOCK PULSE
1. Algorithm
2. Variable Definitions
Variable definitions
Usage
Содержание 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: ......