10
CJ2 CPU Unit Software User’s Manual
Section 4 CPU Unit Initialization
4-1 Overview of CPU Unit Initialization ........................................................................................ 4-2
4-1-1 CPU Unit Initial Settings.............................................................................................................. 4-2
4-2 PLC Setup ................................................................................................................................ 4-8
4-3 Creating I/O Tables .................................................................................................................. 4-9
4-3-1 I/O Tables....................................................................................................................................4-9
4-3-2 Automatic Allocation.................................................................................................................. 4-10
4-3-3 Manual Allocation......................................................................................................................4-10
4-4 Setting Routing Tables.......................................................................................................... 4-11
4-4-1 Routing Tables ..........................................................................................................................4-11
4-4-2 Cases in Which Routing Tables Are Required ..........................................................................4-13
4-4-3 Setting and Transferring Routing Tables ...................................................................................4-14
4-5 Setting Allocated DM Area Words for Special I/O Units and CPU Bus Units ................... 4-15
4-5-1 Setting Allocated DM Area Words for Special I/O Units and CPU Bus Units............................ 4-15
4-5-2 Setting Procedure ..................................................................................................................... 4-15
4-6 CPU Bus Unit Setup Area ..................................................................................................... 4-16
4-6-1 CPU Bus Unit Setup Area......................................................................................................... 4-16
4-6-2 Setting Procedure ..................................................................................................................... 4-16
Section 5 Understanding Programming
5-1 Programming ........................................................................................................................... 5-3
5-1-1 Programming Overview............................................................................................................... 5-3
5-1-2 Basic Ladder Diagram Concepts ................................................................................................ 5-6
5-1-3 ST Language...............................................................................................................................5-8
5-1-4 SFC Overview .............................................................................................................................5-9
5-2 Tasks....................................................................................................................................... 5-11
5-2-1 Overview of Tasks ..................................................................................................................... 5-11
5-2-2 Cyclic Tasks ..............................................................................................................................5-14
5-2-3 Interrupt Tasks ..........................................................................................................................5-20
5-2-4 Designing Tasks........................................................................................................................ 5-30
5-3 Sections.................................................................................................................................. 5-40
5-3-1 Overview of Sections ................................................................................................................5-40
5-4 Function Blocks..................................................................................................................... 5-42
5-4-1 Function Blocks.........................................................................................................................5-42
5-4-2 Features of Function Blocks......................................................................................................5-43
5-4-3 Function Block Specifications ................................................................................................... 5-44
5-5 Symbols.................................................................................................................................. 5-47
5-5-1 Overview ................................................................................................................................... 5-47
5-5-2 Types of Symbols ......................................................................................................................5-48
5-5-3 Global Symbols......................................................................................................................... 5-50
5-5-4 Local Symbols...........................................................................................................................5-50
5-5-5 Network Symbols (CJ2H-CPU6
@-EIP and CJ2M-CPU3@ Only) .............................................5-51
5-5-6 Variables in Function Blocks ..................................................................................................... 5-55
5-5-7 Symbol Data Types ................................................................................................................... 5-56
5-5-8 Automatic Address Allocation to Symbols.................................................................................5-61
5-6 Instructions ............................................................................................................................ 5-62
5-6-1 Basic Understanding of Instructions .........................................................................................5-62
5-6-2 Specifying Operands................................................................................................................. 5-69
5-6-3 Data Formats ............................................................................................................................5-77
5-6-4 I/O Refresh Timing....................................................................................................................5-81