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