Mitsubishi QD51 Programming Manual page 338

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

Advertisement

11 INSTRUCTIONS AND FUNCTIONS
OPEN
Instruction
• Opens a file and enables it for input/output processing.
OPEN "[<drive number>:][<system name>\]<file name>"
Syntax
[ FOR <mode>] AS
drive name
system name
file name
mode
file number
OPEN "2:ABCD" FOR
Examples
OUTPUT AS #1
• The OPEN instruction opens a file and enables it for input/output processing.
Description
• It assigns a <file number> and input/output buffer to the file specified by <system name>
and <file name> and defines the mode of the file. Afterward, data input/output operations
to this file are performed by referring to this file number.
• In order to input or output data to/from a file, it is always necessary to execute the OPEN
instruction first to open the file.
• <drive number> is specified using the following numbers:
• When specifying a file in MEMORY CARD 1 drive of AD51H-S3
• When specifying a file in MEMORY CARD 2 drive of AD51H-S3
• When specifying drive A of the console
• When specifying drive C of the console
• When specifying drive D of the console
If a drive number other than the ones listed above is specified, a "Bad drive number" error
occurs.
• <mode> specifies whether input or output processing can be performed to the file. Specify
one of the following options:
INPUT: Inputs data to the sequential file.
OUTPUT: Outputs data from the sequential file.
APPEND: Adds data to the end of the existing sequential file.
11 - 168
OPEN
[#]<file number>
• • • •
Specify the memory card or FD drive containing the
file to be opened.
• • • •
Specify the system name under which the file to be
opened is stored.
• • • •
Specify the file name to be opened.
• • • •
Specify to enable the sequential file for either input,
output, or append processing.
• • • •
Specify the file number of the file to be created in the
range from 1 to 8.
• • • •
Opens the sequential file with the file name "ABCD"
on drive A of the console for output as file number
1.
• • • • • • • • • • • • • • • • • • • • • • • • •
• • • • • • • • • • • • • • • • • • • • • • • • •
• • • • • • • • • • • • • • • • • • • • • • • • •
MELSEC-Q
• • • • •
0
• • • • •
1
2
3
4
11 - 168

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents