EasyManuals Logo

Omron SYSMAC CP2E-E D Series User Manual

Omron SYSMAC CP2E-E D Series
578 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #52 background imageLoading...
Page #52 background image
4 Understanding Programming
4-8
CP2E CPU Unit Software User’s Manual(W614)
4-3 Function Blocks
Function blocks can be used in programming SYSMAC CP-series PLCs.
A function block is a basic program element containing a standard processing function that has been
defined in advance. Once the function block has been defined, the user just has to insert the function
block in the program and set the I/O in order to use the function.
As a standard processing function, a function block is not created with actual physical addresses, but
local variables. The user sets parameters (addresses or values) in those variables to use the function
block. The addresses used for the variables themselves are automatically assigned by the system (CX-
Programmer) each time they are placed in the program.
In particular, each function block is saved by the CX-Programmer as an individual file that can be
reused with programs for other PLCs. This makes it possible to create a library of standard processing
functions.
Function blocks allow complex programming units to be reused easily. Once standard program sections
have been created as function blocks and saved in files, they can be reused just by placing a function
block in a program and setting the parameters for the function block’s I/O. Reusing standardized func-
tion blocks reduces the time required for programming/debugging, reduces coding errors, and makes
programs easier to understand.
4-3-1 Overview of Function Blocks
4-3-2 Advantages of Function Blocks
ccaa
bb
#0000
MOV
dd
Standard program
section written
with variables
Function block A
Define in advance.
Insert in program.
Save function
block as file.
Library
Function
block A
Reuse
To another PLC program
Program 1
Copy of function block A
Input
Variable Variable Output
Setting Setting
Copy of function block A
Input
Variable Variable Output
Program 2
Copy of function block A
Variable Output

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron SYSMAC CP2E-E D Series and is the answer not in the manual?

Omron SYSMAC CP2E-E D Series Specifications

General IconGeneral
BrandOmron
ModelSYSMAC CP2E-E D Series
CategoryComputer Hardware
LanguageEnglish

Related product manuals