Function Blocks - Omron CP1L CPU Getting Started Manual

Cp1l cpu unit
Hide thumbs Also See for CP1L CPU:
Table of Contents

Advertisement

Function Blocks

Function blocks are programming elements (templates) that group a set of
processes (functions) into a single block. The user can define a function block in
advance, and then use it by simply inserting it into a program and setting its I/O.
Create and save standard program sections as function blocks. The function
blocks can then be placed in a program, and be easily reused by simply setting the
I/O parameters.
[Device 1 Control]
A1
B1
T1
Take a ladder program for "Device 1 Control".
Replace the program I/Os with parameters. Save the algorithm as a template.
The template is defined as a function block (FB).
Define as function block
Insert function block instance
into ladder program
The defined function block can be used in ladder programs as function block
instances.
X1
TIM
Program elements
1
#0100
Processing
Y1
(algorithm)
Z1
Device Control
EN
ENO
X
A
B
Y
Z
A-4 CP1L Programming Examples
[Device n Control]
Inputs
An
Bn
An
Bn
Tn
[Device 1 Control]
P On
Device Control
EN
ENO
A1
A
X
B1
Y
B
Z
[Device 2 Control]
P On
Device Control
EN
ENO
A2
A
X
B2
B
Y
Z
Set I/O parameters
SYSMAC CP1L Getting Started Guide
Outputs
Xn
Xn
TIM
n
#0100
A
Yn
Yn
Zn
Zn
X1
Y1
Z1
X2
Y2
Z2
151

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents