Omron WS02-CXPC1-V9 - V9 Operation Manual page 43

Table of Contents

Advertisement

Function Blocks
■ Reference Information
A variety of processes can be created easily from a single function block by
using parameter-like elements (such as fixed values) as input variables and
changing the values passed to the input variables for each instance.
Example: Creating 3 Instances from 1 Function Block Definition
Function Block Definition
Example: CONTROL
Algorithm
Variables
Example:
There are 3 FB
instances and each
has its own I/O and
internal variables.
If internal variables are not used, if processing will not be affected, or if the
internal variables are used in other locations, the same instance name can be
used at multiple locations in the program.
Function block definition
Example: CONTROL
Algorithm
Variables
Some precautions are required when using the same memory area. For
example, if the same instance containing a timer instruction is used in more
than one program location, the same timer number will be used causing coil
duplication, and the timer will not function properly if both instructions are exe-
cuted.
Cyclic task 0
Instance
CASCADE_01
P_On
Algorithm
Internal and I/O
variables
Instance
CASCADE_02
P_On
Algorithm
Internal and I/O
variables
Cyclic task 1
Instance
CASCADE_03
P_On
Algorithm
Internal and I/O
variables
Cyclic task 0
CASCADE
P_On
EN
&100
PARA_1
The same instance can be
used at multiple locations.
&130
PARA_2
Instance
CASCADE
CASCADE
P_On
Algorithm
EN
&50
Internal and I/O
PARA_1
variables
&150
PARA_2
Cyclic task 1
CASCADE
P_On
EN
&100
PARA_1
&200
PARA_2
Section 1-2
CASCADE_01
1.0
CONTROL
EN
ENO
&20
ON_TIME
&10
OFF_TIME
CASCADE_02
1.1
CONTROL
EN
ENO
&15
ON_TIME
&10
OFF_TIME
CASCADE_03
1.2
CONTROL
EN
ENO
&7
ON_TIME
&8
OFF_TIME
1.0
CONTROL
ENO
1.1
CONTROL
ENO
1.2
CONTROL
ENO
17

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cx-programmer 9Sysmac ws02-cxpc1-v9

Table of Contents