41
Function Blocks
Section 1-5
Easy-to-read “Block Box”
Design
The I/O operands are displayed as local variable names in the program, so
the program is like a “black box” when entering or reading the program and no
extra time is wasted trying to understand the internal algorithm.
Different Processes Easily
Created from a Single
Function Block
Many different processes can be created easily from a single function block by
using input variables for the parameters (such as timer SVs, control con-
stants, speed settings, and travel distances) in the standard process.
Reduced Coding Errors
Coding mistakes can be reduced, because blocks that have already been
debugged can be reused.
Data Protection
The local variables in the function block cannot be accessed directly from the
outside, so the data can be protected. (Data cannot be changed unintention-
ally.)
Improved Reusability
through Programming
with Variables
The function block's I/O is entered as local variables, so the data addresses in
the function block do not have to be changed as they do when copying and
reusing a program section.
Creating Libraries
Processes that are independent and reusable (such as processes for individ-
ual steps, machinery, equipment, or control systems) can be saved as func-
tion block definitions and converted to library functions.
The function blocks are created with local variable names that are not tied to
physical addresses, so new programs can be developed easily just by reading
the definitions from the file and placing them in a new program.
Nesting Multiple
Languages
Mathematical expressions can be entered in structured text (ST) language.
Nesting function blocks is supported for CX-Programmer Ver. 6.0 or higher.
For example, it is possible to express only special operations in ST language
within a function block in a ladder diagram.
For details on using function blocks, refer to the
CX-Programmer Ver. 7.0
Operation Manual: Function Blocks
(Cat. No. W447).
Function block (ladder language)
Call (Nesting)
Function block (ST language)
Summary of Contents for Sysmac CP1H
Page 2: ......
Page 3: ...CP1H X40D CP1H XA40D CP1H Y20DT D CP1H CPU Unit Operation Manual Revised October 2014...
Page 4: ...iv...
Page 10: ...x...
Page 18: ...xviii...
Page 22: ...xxii...
Page 34: ...xxxiv Conformance to EC Directives 6...
Page 76: ...42 Function Blocks Section 1 5...
Page 176: ...142 CP series Expansion I O Unit Wiring Section 3 6...
Page 372: ...338 Analog I O XA CPU Units Section 5 5...
Page 578: ...544 Trouble Shooting Section 8 7...
Page 622: ...588 Sample Application Section 9 12 Network Settings Network Tab Network Settings Driver Tab...
Page 668: ...634 Standard Models Appendix A...
Page 744: ...710 Auxiliary Area Allocations by Address Appendix D...
Page 771: ...737 Connections to Serial Communications Option Boards Appendix F Connecting to Unit...
Page 772: ...738 Connections to Serial Communications Option Boards Appendix F...
Page 800: ...766 Specifications for External Power Supply Expansion Appendix H...
Page 806: ...772 Index W Work Area 165 work bits 165 work words 165 write protection 379...
Page 808: ...774 Revision History...
Page 809: ......