Mitsubishi QD51 Programming Manual page 538

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

Advertisement

11 INSTRUCTIONS AND FUNCTIONS
RSET
Instruction
• Moves data from memory to a random file buffer, in preparation for the PUT instruction.
RSET <character string variable>=<character string expression>
Syntax
character string variable
character string expression
RSET A$=" MITSUBISHI"
Examples
• The RSET instruction moves data from memory to a random file buffer, in preparation for
Description
the PUT instruction.
• In order to execute the RSET instruction, it is necessary to open a file as a random file in
advance.
• It is necessary to use the FIELD instruction to define a character string variable before
executing the RSET instruction.
• If the character string expression is shorter than the field length assigned to the character
string variable by the FIELD instruction, the RSET instruction stores the character string
right-justified in the field.
The extra part of the field is filled by blank spaces.
Example
• If the character string expression is longer than the field length assigned by the FIELD
instruction, the excess part of the character string is truncated from the right.
Example
• It is required to convert a numeric value into a character string using one of functions MKI$,
MKS$, and MKD$, before using the RSET to transfer it to the random file buffer.
11 - 368
Right SET
• • • •
• • • •
• • • •
RSET
A$
Field length: 10 Character string: NAGOYA
Field length:
10 Character string: NAGOYASEISAKUSYO
N
REMARK
See the FIELD, PUT, GET and LSET instructions, and Chapter 6.
Specify a character string variable defined by the
FIELD instruction.
Specify the character string data to be written.
Stores " MITSUBISHI" in A$ right-justified.
Random file buffer
M I
T
S
N
A
G
O
Field length 10
A
G
O
Y
A
S
E
Field length 10
MELSEC-Q
U
B
I
S
H
I
Y
A
I
S
11 - 368

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents