6 - 12 6 - 12
MELSEC-Q
6 I/O Processing of Data Files
6.4 Caution on Handling Data Files
6.4.1 Handling data files during multitask processing
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.
A
A
Program
A
MELSEC
AD51H
BASIC
<EOF>
ABC.DAT file
in Drive
0
When data is read in order of 1), 2) and 3):
"MELSEC" is stored in A$ of Program A "AD51H" is stored in B$ of Program B
"BASIC" is stored in C$ of Program A
OPEN "0 : ABC. DAT" FOR INPUT
INPUT#1, A$
INPUT#1, C$
OPEN"0:ABC.DAT"FOR INPUT
A$ #1
A$ #2
INPUT #2, B$
Program
B
1)
2)
3)
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.
Содержание 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...