![Omron SYSMAC CX-Programmer 9 Operation Manual Download Page 43](http://html1.mh-extra.com/html/omron/sysmac-cx-programmer-9/sysmac-cx-programmer-9_operation-manual_744241043.webp)
17
Function Blocks
Section 1-2
■
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
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.
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.
P_On
1.0
&10
CONTROL
EN ENO
ON_TIME
OFF_TIME
&20
CASCADE_01
P_On
1.1
&10
CONTROL
EN ENO
ON_TIME
OFF_TIME
&15
CASCADE_02
P_On
1.2
&8
CONTROL
EN ENO
ON_TIME
OFF_TIME
&7
CASCADE_03
Function Block Definition
Example: CONTROL
Algorithm
Variables
Instance
CASCADE_02
Algorithm
Internal and I/O
variables
Instance
CASCADE_01
Algorithm
Internal and I/O
variables
Instance
CASCADE_03
Algorithm
Internal and I/O
variables
Cyclic task 0
Cyclic task 1
Example:
There are 3 FB
instances and each
has its own I/O and
internal variables.
P_On
1.0
&130
CONTROL
EN ENO
PARA_1
PARA_2
&100
CASCADE
P_On
1.1
&150
CONTROL
EN ENO
PARA_1
PARA_2
&50
CASCADE
P_On
1.2
&200
CONTROL
EN ENO
PARA_1
PARA_2
&100
CASCADE
Function block definition
Example: CONTROL
Algorithm
Variables
Instance
CASCADE
Algorithm
Internal and I/O
variables
Cyclic task 0
Cyclic task 1
The same instance can be
used at multiple locations.
Summary of Contents for SYSMAC CX-Programmer 9
Page 2: ......
Page 4: ...iv ...
Page 6: ...vi ...
Page 8: ......
Page 16: ...xvi ...
Page 20: ...xx ...
Page 26: ...xxvi Application Precautions 4 ...
Page 27: ...Part 1 Function Blocks ...
Page 28: ......
Page 154: ...128 Procedures Section 3 2 ...
Page 155: ...Part 2 Structured Text ST ...
Page 156: ......
Page 160: ...134 CX Programmer Specifications Section 4 2 ...
Page 206: ...180 Procedures Section 6 1 ...
Page 208: ...182 System defined external variables supported in function blocks Appendix A ...
Page 230: ...204 Revision History ...
Page 231: ......