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 #85 background imageLoading...
Page #85 background image
60
Function Block Applications Guidelines
Section 2-5
Note Make sure that the data size to be processed by the instruction is
the same as the number of elements. For details on the data sizes
processed by each instruction, refer to 2-7 Instruction Support and
Operand Restrictions.
2. Set the data in each of the array elements using the MOV instruction in the
function block definition.
3. Specify the first (or last) element of the array variable for the operand. This
enables specification of the first (or last) address in a range of words.
Examples are provided below.
Handling a Single String of Data in Multiple Words
In this example, an array contains the directory and filename (operand S2) for
an FREAD instruction.
Variable Table
Input-output variable or internal variable, data type = WORD, array setting
with 10 elements, variable names = filename[0] to filename[9]
Data Settings and Internal Function Block Processing
Input-output variables:
Set the input parameter to the address of the first word in the data (ex-
ample: D100). The data (#5C31, #3233, #0000, etc.) is set in D100 to
D109 in advance from the main user program.
Internal variables:
Use ladder programming within the function block to set data into the
array.
Handling Control Data in Multiple Words
In this example, an array contains the number of words and first source word
(operand S1) for an FREAD instruction.
Variable table
Input-output variable or internal variable, data type = DINT, array setting
with 3 elements, variable names = read_num[0] to read_num[9]
Data Settings and Internal Function Block Processing
Input-output variables:
Set the input parameter to the address of the first word in the data (ex-
ample: D200). The data is set in D200 to D205 in advance from the
main user program.
Internal variables:
Use ladder programming within the function block to set data into the
array.
Ladder Programming
Specify the first element of the array
in the instruction o
p
erand.
FREAD (omitted) (omitted) read_num[0] (omitted)
Set data in each array element.
Specify the first element
of the array in the instruction
o
p
erand.
FREAD (omitted) (omitted) file_name[0] (omitted)
MOV #0000 file_name[2])
MOV #3233 file_name[1]
MOV #5C31 file_name[0]
Specify the first element of the array
in the instruction o
p
erand.
FREAD (omitted) read_num[0] (omitted) (omitted)
Set data in each array element.
Specify the first element of the array
in the instruction operand.
FREAD (omitted) read_num[0] (omitted) (omitted)
MOVL &100 read_num[0] (No._of_words)
MOVL &0 read_num[1] (1st_source_word)

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