5 Understanding Programming
5-44
CJ2 CPU Unit Software User’s Manual
When function blocks are used, memory is required for the following two items:
1. Function block definitions
2. Instance generation processing when function blocks are pasted into the user program as function
block instances
Therefore, the number of steps used in memory will increase with the number of instances of function
blocks created in the program (item 2).
5-4-3 Function Block Specifications
Item Specifications
Defining and creat-
ing function blocks
Number of function
block definitions
CJ2H-CPU6@(-EIP) or CJ2M-CPU@5/@4: 2,048 max.
CJ2M-CPU@3/@2/@1: 256 max.
Function block
names
64 characters max.
Variables Variable names 15,000 characters max.
Variable types Input variables (Inputs), output
variables (Outputs), input-out-
put variables (In Out), internal
variables (Internals), and exter-
nal variables (Externals)
Number of variables used in a
function block (not including
internal variables, external vari-
ables, EN, and EN0)
Maximum number of variables
per function block definition
• Input-output variables: 16
max.
• Input variables + input-output
variables: 64 max.
• Output variables + input-out-
put variables: 64 max.
Allocation of addresses used by
variables
Automatic allocation (The alloca-
tion range can be set by the
user.)
Actual address specification Supported
Array specifications Supported (one-dimensional
arrays only and only for internal
variables and input-output vari-
ables)
Language Function blocks can be created in ladder programming language or
structured text.
Creating instances Number of
instances
CJ2H-CPU6@(-EIP) or CJ2M-CPU@5/@4: 2,048 max.
CJ2M-CPU@3/@2/@1: 256 max.
Instance names 15,000 characters max.
FB Program Area 20K steps
Supported only by the CJ2M CPU Units. This area is used to store
function block definitions.
Storing function
blocks as files
Project files The project file (.cxp/cxt) Includes function block definitions and
instances.
Program/network
symbol files
The file memory program file (*.obj) includes function block defini-
tions and instances.
Function block
library files
Each function block definition can be stored as a single file (.cxf) for
reuse in other projects.
Number of Steps Used by Function Blocks