11 - 368 11 - 368
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
RSET
Instruction
Right SET
• 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
• • • •
Specify a character string variable defined by the
FIELD instruction.
character string expression
• • • •
Specify the character string data to be written.
RSET A$=" MITSUBISHI"
• • • •
Stores " MITSUBISHI" in A$ right-justified.
Examples
Random file buffer
RSET
A$
M
I
T
S
U
B
I
S
H
I
Description
• The RSET instruction moves data from memory to a random file buffer, in preparation for
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
N
A
G
O
Y
A
Field length: 10 Character string: NAGOYA
Field length 10
• 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
N
A
G
O
Y
A
Field length:
10 Character string: NAGOYASEISAKUSYO
Field length 10
S
E
I
S
• 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.
REMARK
See the FIELD, PUT, GET and LSET instructions, and Chapter 6.
Содержание A1SD51S
Страница 183: ...11 13 11 13 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS RUN Before swap A 0 H924 A 1 H1159 After swap A 0 H1159 A 1 H924 OK...
Страница 331: ...11 161 11 161 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the CON ON OFF STOP and ZOPEN functions and Section 7 4...
Страница 557: ...11 387 11 387 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the CHR SPACE and SPC functions...
Страница 629: ...11 459 11 459 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the ZOPEN ZSEND and ZCNTL instructions and Section 7 3 4...
Страница 645: ...11 475 11 475 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the ZEVENT ZSIGNAL and DEF ZEVENT instructions...