Function Block Structure - Omron CX-PROGRAMMER V8.1 Operation Manual

Function blocks/ structured text
Table of Contents

Advertisement

Function Blocks
Supports Nesting and
Multiple Languages
1-2-3

Function Block Structure

Function Block
Definitions
Number of Function Block
Definitions
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.
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.
Function block (ladder language)
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 are the programs contained in function blocks. Each
function block definition contains the algorithm and variable definitions, as
shown in the following diagram.
Function Block Definition
Example: CLOCK PULSE
Algorithm
Variable definitions
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.
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.
Call (Nesting)
Function block (ST language)
Example: CLOCK PULSE
1. Algorithm
tim_b
TIMX tim_a OFF_TIME
tim_a
TIMX tim_b ON_TIME
2. Variable Definitions
Usage
Name
Internal
tim_a
Internal
tim_b
Input
ON_TIME
OFF_TIME
Input
Section 1-2
ENO
Type
TIMER
TIMER
INT
INT
13

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CX-PROGRAMMER V8.1 and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Sysmac ws02-cxpc1-v8Sysmac cx-programmer 8.1

Table of Contents

Save PDF