7
Introducing the Function Blocks
Section 1-1
Note
The structured text (ST language) conforms to the IEC 61131-3 standard, but
CX-Programmer Ver. 5.0 supports only assignment statements, selection
statements (CASE and IF statements), iteration statements (FOR, WHILE,
REPEAT, and EXIT statements), RETURN statements, arithmetic operators,
logical operators, comparison functions, numeric functions, standard string
functions, numeric string functions, OMRON expansion functions, and com-
ments. For details, refer to
SECTION 5 Structured Text (ST) Language Spec-
ifications
in
Part 2: Structured Text (ST).
Functions not
supported by
CX-Program-
mer Ver. 4.0
or earlier.
Defining
and creat-
ing func-
tion blocks
Variables
Variable names
30,000 characters max.
Variable types
Input variables (Inputs), output variables (Out-
puts), input-output variables (In Out), internal
variables (Internals), and external variables
(Externals)
Number of variables used in
a function block
(not including internal vari-
ables, external variables,
EN, and EN0)
Maximum number of variables per function block
definition
• Input-output variables: 16 max.
• Input var input-output variables: 64 max.
• Output var input-output variables: 64
max.
Allocation of addresses
used by variables
Automatic allocation (The allocation 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 variables)
Language
Function blocks can be created in ladder programming language or structured
text (ST, see note).
Creating
instances
Number of
instances
CJ2H Units:
•
CJ2H-CPU6
@
(-EIP): 2,048 max. per CPU Unit
CS1-H/CJ1-H CPU Units:
•
Suffix -CPU44H/45H/64H/65H/66H/67H/64H-R/65H-R/66H-R/67H-R: 2,048
max. per CPU Unit
•
Suffix -CPU42H/43H/63H: 256 max. per CPU Unit
CJ1M CPU Units:
•
CJ1M-CPU11/12/13/21/22/23: 256 max. per CPU Unit
CP1H CPU Units:
• All models: 256 max. per CPU Unit
CP1L CPU Units:
• CP1L-M/L: 256 max. per CPU Unit
NSJ Controllers:
• SJ
@
-
@@@@
-G5D: 2,048 max. per Controller;
NSJ
@
-
@@@@
-M3D: 256 max. per Controller
FQM1 Flexible Motion Controllers:
• FQM1-CM002/MMA22/MMP22: 256 max. per Controller
Instance
names
15,000 characters max.
Storing
function
blocks as
files
Project files
The project file (.cxp/cxt) Includes function block definitions and instances.
Program
files
The file memory program file (*.obj) includes function block definitions and
instances.
Function
block library
files
Each function block definition can be stored as a single file (.cxf) for reuse in
other projects.
Item
Specifications
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: ......