![background image](http://html1.mh-extra.com/html/omron/cs1-h-series/cs1-h-series_operation-manual_742526057.webp)
42
Function Block Applications Guidelines
Section 2-4
• 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-4
Function Block Applications Guidelines
This section provides guidelines for using function blocks with the CX-Pro-
grammer.
2-4-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
2-4-2
Determining Variable Types (Inputs, Outputs, Externals, and
Internals)
Using Input Variable to
Change Passed Values
To paste a function block into the program and then change the value (not the
address itself) to be passed to the function block for each instance, use an
input variable.
The following two restrictions apply.
• An address can be set in an input parameter, but an address itself cannot
be passed to an input variable (even if an address is set in the input
parameter, the value for the size of the input variable data type is passed
to the function block). Therefore, when the first or last of multiple words is
specified in the instruction operand within the function block, an input vari-
able cannot be used for the operand. Specify either to use internal vari-
ables with AT settings, specify the first or last element in an internal array
variable, or use an external variable (as described in
2-4-4 Array Settings
for Internal Variables
).
&3
Unit No.
PARA
&50
Program
Instance for function block definition A
The value itself is
passed
Changing the pass value to an input variable.
Содержание CS1-H Series
Страница 3: ...iv...
Страница 5: ...vi...
Страница 7: ...viii TABLE OF CONTENTS...
Страница 15: ...xvi Application Precautions 4...
Страница 151: ...136 Procedures Section 3 2...
Страница 153: ...138 Data Types Appendix A...
Страница 177: ...162 External Variables Appendix C...
Страница 181: ...166 Revision History...