Field ( Assigns The Area For The Specified Variable To The Random File Buffer ) - Mitsubishi QD51 Programming Manual

Logic controller
Hide thumbs Also See for QD51:
Table of Contents

Advertisement

11 INSTRUCTIONS AND FUNCTIONS
FIELD
Instruction
• Assigns the area for the specified variable to the random file buffer.
FIELD
Syntax
AS <character string value> ] ...
file number
field length
character string variable
FIELD #1, 128 AS A$, 128
Examples
AS B$
• The FIELD instruction assigns an area of the specified variable in the random file buffer
Description
that is specified by <file number>. The program writes and reads data with the random file
buffer through these variables.
• The FIELD instruction has to be executed before reading data by the GET instruction or
writing data by the PUT instruction.
• Use the LSET instruction and RSET instruction to write data to the random file buffer.
• The total number of bytes (total of <field length>) retained by one FIELD instruction should
not exceed the buffer size (256 bytes). A "Field overflow" error occurs if the total number of
retained bytes exceeds 256.
11 - 67
FIELD
<#> <file number> , <field length> AS <character string variable> [, <field length>
• • • •
• • • •
• • • •
• • • •
REMARK
• Multiple FIELD instructions can be executed in the random file buffer of the same
file number. Each FIELD instruction assigns the variable from the beginning of the
random file buffer, so all assignments become valid simultaneously.
• See the OPEN instruction and Chapter 6.
Specify the file number of the random file specified
by the OPEN instruction.
Specify the number of characters to assign to the
buffer.
Specify the character string variable that
corresponds to the part specified by the field length.
Defines variables A$ and B$, which are used in the
program, in the random file buffer of file number 1,
and specifies 128 bytes as the assigned number of
bytes for each.
Buffer in the random file
MELSEC-Q
A$
B$
128 bytes
128 bytes
11 - 67

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents