Mitsubishi QD51 Programming Manual page 532

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

Advertisement

11 INSTRUCTIONS AND FUNCTIONS
RESTORE
Instruction
• Specifies a line number in such a way that a subsequent READ instruction reads values of
the DATA instruction, starting from the first data in the DATA instruction in the specified
line number.
RESTORE
Syntax
line number
RESTORE 60
Examples
• The RESTORE instruction specifies a line number in such a way that a subsequent READ
Description
instruction reads values of the DATA instruction, starting from the first data in the DATA
instruction in the specified line number.
• If <line number> is omitted, the READ instruction after the execution of the RESTORE
instruction reads values from the first DATA instruction in the program.
• If <line number> is specified, the READ instruction after the execution of the RESTORE
instruction starts reading from the first value of the DATA instruction in the specified line
number.
• <line number> can also be specified using a label name.
Program Example
10 ' This program specifies the position of data read by the READ instruction, using the RESTORE
instruction
20 RESTORE 200
40 READ A$,B$,C$:PRINT A$,B$,C$
60 RESTORE 100
80 READ A$,B$,C$:PRINT A$,B$,C$
90 END
100 DATA Tokyo, Osaka, Nagoya
200 DATA Sapporo, Sendai, Kanazawa
RUN
Sapporo
Tokyo
OK
11 - 362
RESTORE
[<line number>]
Sendai
Kanazawa
Osaka
Nagoya
REMARK
See the READ and DATA instructions, and Section 3.5.2.
• • • •
Specify the line number of the next DATA instruction
to be read.
• • • •
Starts reading data in the DATA instruction in line 60.
:
' Reads data in line 200
:
' Reads and display the data
:
' Reads data in line 100
:
' Reads and displays the data
MELSEC-Q
11 - 362

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents