56
Function Block Applications Guidelines
Section 2-5
CP-series CPU Units
Note
DM area of CP1L-L
If there is an instruction in the user program that accesses an address in an
FB instance area, the CX-Programmer will output an error in the following
cases.
• When a program check is performed by the user by selecting
Program -
Compile
from the Program Menu or
Compile All Programs
from the
PLC
Menu.
• When attempting to write the program through online editing (writing is
not possible).
2-5
Function Block Applications Guidelines
This section provides guidelines for using function blocks with the CX-Pro-
grammer.
2-5-1
Deciding on Variable Data Types
Integer Data Types
(1, 2, or 4-word Data)
Use the following data types when handling single numbers in 1, 2, or 4-word
units.
• INT and UINT
• DINT and DINT
• LINT and ULINT
Note
Use signed integers if the numbers being used will fit in the range.
Word Data Types
(1, 2, or 4-word Data)
Use the following data types when handling groups of data (non-numeric
data) in 1, 2, or 4-word units.
• WORD
• DWORD
• LWORD
Text String Data
Use the following data type for text string data.
• STRING
Function block instance
area
Initial value of
start address
Initial value
of size
Allowed data areas
Non-retained
H512
896
CIO, WR, HR, DM
(See note.)
Retained
H1408
128
HR, DM (See note.)
Timer
T3072
1024
TIM
Counter
C3072
1024
CNT
Address
CP1L-L
D0000 to D9999
Provided
D10000 to D31999
Not Provided
D32000 to D32767
Provided
Summary of Contents for CX-PROGRAMMER V8.1
Page 3: ...iv...
Page 5: ...vi...
Page 7: ......
Page 15: ...xvi...
Page 19: ...xx...
Page 25: ...xxvi Application Precautions 4...
Page 26: ...Part 1 Function Blocks...
Page 27: ......
Page 153: ...128 Procedures Section 3 2...
Page 154: ...Part 2 Structured Text ST...
Page 155: ......
Page 159: ...134 CX Programmer Specifications Section 4 2...
Page 205: ...180 Procedures Section 6 1...
Page 207: ...182 System defined external variables supported in function blocks Appendix A...
Page 229: ...204 Revision History...
Page 230: ......