19
SECTION 2
Specifications
This section provides specifications for reference when using function blocks, including specifications on function blocks,
instances, and compatible PLCs, as well as usage precautions and guidelines.
2-1 Function Block Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2-1-1 Function Block Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2-1-2 Function Block Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2-2 Instance Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
2-2-1 Composition of an Instance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
2-2-2 Parameter Specifications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
2-2-3 Operating Specifications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
2-3 Restrictions on Function Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
2-4 Function Block Applications Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
2-4-1 Deciding on Variable Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
2-4-2 Determining Variable Types (Inputs, Outputs, Externals, and Internals) 42
2-4-3 AT Settings for Internal Variables. . . . . . . . . . . . . . . . . . . . . . . . . . . 43
2-4-4 Array Settings for Internal Variables . . . . . . . . . . . . . . . . . . . . . . . . 44
2-4-5 Specifying Addresses Allocated to Special I/O Units . . . . . . . . . . . 45
2-4-6 Using Index Registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
2-5 Precautions for Instructions with Operands Specifying the First or Last
of Multiple Words . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
2-6 Instruction Support and Operand Restrictions . . . . . . . . . . . . . . . . . . . . . . . . 52
2-6-1 Sequence Input Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
2-6-2 Sequence Output Instructions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
2-6-3 Sequence Control Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
2-6-4 Timer and Counter Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
2-6-5 Comparison Instructions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
2-6-6 Data Movement Instructions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
2-6-7 Data Shift Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
2-6-8 Increment/Decrement Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . 67
2-6-9 Symbol Math Instructions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
2-6-10 Conversion Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
2-6-11 Logic Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
2-6-12 Special Math Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
2-6-13 Floating-point Math Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
2-6-14 Double-precision Floating-point Instructions. . . . . . . . . . . . . . . . . . 80
2-6-15 Table Data Processing Instructions. . . . . . . . . . . . . . . . . . . . . . . . . . 82
2-6-16 Data Control Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
2-6-17 Subroutine Instructions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
2-6-18 Interrupt Control Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
2-6-19 High-speed Counter and Pulse Output Instructions
(CJ1M-CPU21/22/23 Only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88