Caution On Handling Data Files; Handling Data Files During Multitask Processing - Mitsubishi QD51 Programming Manual

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

Advertisement

6 I/O Processing of Data Files

6.4 Caution on Handling Data Files

6.4.1 Handling data files during multitask processing

OPEN "0 : ABC. DAT" FOR INPUT
Program
A
OPEN"0:ABC.DAT"FOR INPUT
Program
B
6 - 12
When data is input or output to the same data file simultaneously by multiple programs
during multitask processing, it is processed as follows.
• Random files can be opened by multiple programs simultaneously.
In such cases, the OS of the communication module will perform exclusive control for
each data I/O instruction, so the user does not have to perform any exclusive control.
• Sequential files can be opened by multiple programs simultaneously only during input
processing (INPUT mode) or during append processing (APPEND mode). In such
cases, the OS of the communication module will perform exclusive control for each
data I/O instruction, so the user does not have to perform any exclusive control.
Example
When two programs are concurrently running and sequential file ABC.DAT in drive 0
is to be read.
INPUT#1, A$
A$ #1
A$ #2
When data is read in order of 1), 2) and 3):
"MELSEC" is stored in A$ of
"BASIC" is stored in C$ of
Perform exclusive control using the ZRESERVE/ZRELEASE functions when all the
data is to be read by program A or program B. For details on exclusive control, see
Section 8.2.
• Always perform exclusive control using ZRESERVE/ZRELEASE functions when output
processing (OUTPUT mode) is to be used by one of the programs.
If the exclusive control is not used, an error may be generated in the program that opened
the file simultaneously. For details on exclusive control, see Section 8.2.
1)
MELSEC
AD51H
INPUT #2, B$
Program A
"AD51H" is stored in B$ of
Program A
BASIC
<EOF>
2)
Program B
MELSEC-Q
INPUT#1, C$
3)
ABC.DAT file
in Drive
0
6 - 12

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents