Omron CP1H CPU Operation Manual page 74

Cp1h cpu unit
Hide thumbs Also See for CP1H CPU:
Table of Contents

Advertisement

Function Blocks
Easy-to-read "Block Box"
Design
Different Processes Easily
Created from a Single
Function Block
Reduced Coding Errors
Data Protection
Improved Reusability
through Programming
with Variables
Creating Libraries
Nesting Multiple
Languages
40
The I/O operands are displayed as local variable names in the program, so
the program is like a "black box" when entering or reading the program and no
extra time is wasted trying to understand the internal algorithm.
Many different processes can be created easily from a single function block by
using input variables for the parameters (such as timer SVs, control con-
stants, speed settings, and travel distances) in the standard process.
Coding mistakes can be reduced, because blocks that have already been
debugged can be reused.
The local variables in the function block cannot be accessed directly from the
outside, so the data can be protected. (Data cannot be changed unintention-
ally.)
The function block's I/O is entered as local variables, so the data addresses in
the function block do not have to be changed as they do when copying and
reusing a program section.
Processes that are independent and reusable (such as processes for individ-
ual steps, machinery, equipment, or control systems) can be saved as func-
tion block definitions and converted to library functions.
The function blocks are created with local variable names that are not tied to
physical addresses, so new programs can be developed easily just by reading
the definitions from the file and placing them in a new program.
Mathematical expressions can be entered in structured text (ST) language.
Nesting function blocks is supported for CX-Programmer Ver. 6.0 or higher.
For example, it is possible to express only special operations in ST language
within a function block in a ladder diagram.
Function block (ladder language)
For details on using function blocks, refer to the CX-Programmer Ver. 7.0
Operation Manual: Function Blocks (Cat. No. W447).
Call (Nesting)
Function block (ST language)
Section 1-5

Advertisement

Table of Contents
loading

Table of Contents