![Omron CS1-H Series Operation Manual Download Page 24](http://html1.mh-extra.com/html/omron/cs1-h-series/cs1-h-series_operation-manual_742526024.webp)
9
Function Blocks
Section 1-2
2. Variable Definitions
The variable table lists each variable’s usage (input, output, or internal) and
properties (data type, etc.). For details, refer to
1-3 Variables
.
Number of Function Block
Definitions
The maximum number of function block definitions that can be created for one
CPU Unit is either 128 or 1,024 depending on the CPU Unit model.
Instances
To use an actual function block definition in a program, create a copy of the
function block diagram and insert it in the program. Each function block defini-
tion that is inserted in the program is called an “instance” or “function block
instance.” Each instance is assigned an identifier called an “instance name.”
By generating instances, a single function block definition can be used to pro-
cess different I/O data with the same function.
Note
Instances are managed by names. More than one instance with the same
name can also be inserted in the program. If two or more instances have the
same name, they will use the same internal variables. Instances with different
names will have different internal variables.
For example, consider multiple function blocks that use a timer as an internal
variable. In this case all instances will have to be given different names. If
more than one instance uses the same name, the same timer would be used
in multiple locations, resulting in duplicated use of the timer.
If, however, internal variables are not used or they are used only temporarily
and initialized the next time an instance is executed, the same instance name
can be used to save memory.
a
b
c
a
b
c
Not yet in program
and memory not yet
allocated
(abstract).
1. Algorithm
Function Block Definition FB1
2. Parameters
Standard
program unit
with variable
names a, b, c,
etc.
Program
Instance
Block instance in program with memory
allocated. (object)
Instance FB1_1 of function block definition FB1
Memory
used
Input
data
Output data
Output data
Automatic
allocation
Automatic
allocation
Memory
for FB1_1
Memory
for FB1_2
Different I/O data
can be processed
with the same
function.
Instance FB1_2 of function block definition FB1
Input
data
Output data
Output data
Insert in
program.
Insert in
program.
Table defining usage
and properties of
variables a, b, c, etc.
Summary of Contents for CS1-H Series
Page 3: ...iv...
Page 5: ...vi...
Page 7: ...viii TABLE OF CONTENTS...
Page 15: ...xvi Application Precautions 4...
Page 151: ...136 Procedures Section 3 2...
Page 153: ...138 Data Types Appendix A...
Page 177: ...162 External Variables Appendix C...
Page 181: ...166 Revision History...