11 - 139 11 - 139
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
LSET
Instruction
Left SET
• Moves data from memory to the random file buffer in order to prepare it for the PUT
instruction.
LSET <character string variable> = <character string expression>
character string variable
• • • •
Specify the character string variable defined by the
FIELD instruction.
Syntax
character string expression
• • • •
Specify the character string data to be written.
Examples
LSET A$=”MITSUBISHI”
• • • •
Reserves “MITSUBISHI” in A$ justified to the left.
Random file buffer
LSET
A$
M
I
T
S
U
B
I
S
H
I
Description
• The LSET instruction moves the data from the memory to the random file buffer to prepare
it for the PUT instruction.
• The file must be open as a random file to execute this instruction.
• The character string variable must be defined with the FIELD instruction prior to executing
the LSET instruction.
• If the character string length is shorter than the field length assigned to the character string
variable, the LSET instruction stores the character string justified to the left.
The spare area in the field will be filled with spaces.
Example
N
A
G
O
Y
A
Field length 10 character string NAGOYA
Field length 10
• If the length of the character string expression is longer than the field length assigned by
the FIELD command, the characters on the right side will be truncated.
Example
N
A
G
O
Y
A
Field length 10 character string NAGOYASEISAKUSYO
Field length 10
S
E
I
S
• Numeric values must be converted to character strings using MKI$, MKS$ or MKD$
function before they are sent to the random file buffer.
REMARK
See the FIELD, PUT, GET and RSET 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...