Introducing Function Blocks; Overview And Features - Omron CP - PROGRAMMING MANUAL 05-2007 Programming Manual

Cp1h/cp1l cpu unit
Table of Contents

Advertisement

Introducing Function Blocks

Program error
UM (User Memory) Overflow Error
Illegal Instruction Error
1-4
Introducing Function Blocks
1-4-1

Overview and Features

46
Description
An attempt was made to execute instruc-
tion data stored beyond the last address in
user memory (UM) defined as program
storage area.
An attempt was made to execute an
instruction that cannot be executed.
Function blocks can be used with CP-series CPU Units. Refer to the CX-Pro-
grammer Ver. 7.0 Operation Manual Function Blocks (W447) for details on
actually using function blocks.
Function blocks conforming to the IEC 61131-3 standard can be used with
CX-Programmer Ver. 5.0 and higher. These function blocks are supported by
CS/CJ-series CPU Units with unit version 3.0 or later and by CP-series CPU
Units. The following features are supported.
• User-defined processes can be converted to block format by using func-
tion blocks.
• Function block algorithms can be written in the ladder programming lan-
guage or in the structured text (ST) language. (See note.)
• When ladder programming is used, ladder programs created with non-
CX-Programmer Ver. 4.0 or earlier can be reused by copying and past-
ing.
• When ST language is used, it is easy to program mathematical pro-
cesses that would be difficult to enter with ladder programming.
Note The ST language is an advanced language for industrial control
(primarily Programmable Logic Controllers) that is described in IEC
61131-3. The ST language supported by CX-Programmer con-
forms to the IEC 61131-3 standard.
• Function blocks can be created easily because variables do not have to
be declared in text. They are registered in variable tables.
A variable can be registered automatically when it is entered in a ladder or
ST program. Registered variables can also be entered in ladder programs
after they have been registered in the variable table.
• A single function block can be converted to a library function as a single
file, making it easy to reuse function blocks for standard processing.
• A program check can be performed on a single function block to easily
confirm the function block's reliability as a library function.
• Programs containing function blocks (ladder programming language or
structured text (ST) language) can be downloaded or uploaded in the
same way as standard programs that do not contain function blocks.
Tasks containing function blocks, however, cannot be downloaded in task
units (uploading is possible).
• One-dimensional array variables are supported, so data handling is eas-
ier for many applications.
Section 1-4
Related flags
The UM (User Memory) Overflow Flag
(A295.5) turns ON.
The Illegal Instruction Flag (A295.14)
turns ON.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents