Function Block Applications Guidelines; Deciding On Variable Data Types; Determining Variable Types (Inputs, Outputs, Externals, And Internals) - Omron CX-PROGRAMMER 5.0-FUNCTION BLOCK OPERATION Operation Manual

Function blocks
Table of Contents

Advertisement

Function Block Applications Guidelines

2-4
Function Block Applications Guidelines
2-4-1

Deciding on Variable Data Types

Integer Data Types
(1, 2, or 4-word Data)
Word Data Types
(1, 2, or 4-word Data)
2-4-2
Determining Variable Types (Inputs, Outputs, Externals, and
Internals)
Using Input Variable to
Change Passed Values
42
• 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).
This section provides guidelines for using function blocks with the CX-Pro-
grammer.
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.
Use the following data types when handling groups of data (non-numeric
data) in 1, 2, or 4-word units.
• WORD
• DWORD
• LWORD
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.
Program
Instance for function block definition A
&3
&50
Changing the pass value to 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).
The value itself is
passed
Unit No.
PARA
Section 2-4

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cx-programmer 5.0Sysmac ws02-cxpc1-e-v50Cs1-hCj1-hCj1m

Table of Contents