EasyManuals Logo

Omron CX-PROGRAMMER V8.1 User Manual

Omron CX-PROGRAMMER V8.1
231 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #82 background imageLoading...
Page #82 background image
57
Function Block Applications Guidelines
Section 2-5
2-5-2 Determining Variable Types (Inputs, Outputs, In Out, 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 input-output
array variable (set the input parameter to the first address) (CX-Program-
mer version 7.0 or higher), specify the first or last element in an internal
array variable, or use an external variable (as described in 2-5-4 Array
Settings for Input-Output Variables and Internal Variables).
Values are passed in a batch from the input parameters to the input vari-
ables before algorithm execution (not at the same time as the instruction
in the algorithm is executed). Therefore, to pass the value from a parame-
ter to an input variable when the instruction in the function block algorithm
is executed, use an internal variable or external variable instead of an
input variable.
&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.
D00100 DATA_1
W500
XFER
&10
DATA_1
DATA_2
DATA_2
Program
Instance for function block definition A
The actual value is
passed
If the size of the data type in
DATA_1 is 1 word, the value
for the word D00100 is
passed.
If the size of the data type in
DATA_2 is 2 words, the value
for the 2 words W500 and
W501 is passed.
An input variable cannot be used to specify
the address of an operand that specifies
the first (or last) address of multiple words.
For example, the XFER (BLOCK
TRANSFER) instruction cannot be used to
transfer 10 words from the address
beginning with DATA_1 to the address
beginning with DATA_2.
The address can be specified, but the address itself is not passed.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron CX-PROGRAMMER V8.1 and is the answer not in the manual?

Omron CX-PROGRAMMER V8.1 Specifications

General IconGeneral
BrandOmron
ModelCX-PROGRAMMER V8.1
CategorySoftware
LanguageEnglish

Related product manuals