Procedure To Create New File And Write Data - Mitsubishi Electric MELSEC IQ-R series Reference Manual

Programmable controller
Hide thumbs Also See for MELSEC IQ-R series:
Table of Contents

Advertisement

Procedure to create new file and write data

The procedure varies depending on types of file. Refer to procedure according to file types.
File type
Header statement file
Sequence program file
Device comment file
Device initial value file
FB file
File other than above
Before creating a file, secure the free space of the target memory. It can be checked and secured by an
Engineering tool.
When creation of temporary file is required
1.
Create a new temporary file.
Register the file name and reserve the required capacity for the file.
The extension of the temporary file must be other than DAT, PRG, QPG, PFB, QCD, DCM, QDI, DID.
• Page 220 Create new file (command: 1820)
2.
Write data to the file.
For writing data, use open and close command to prohibit access from other devices.
Execute the commands in the following order.
• Page 236 Open file (command: 1827)
• Page 242 Write to file (command: 1829)
• Page 244 Close file (command: 182A)
3.
Create a file with the target file extension using the copy function.
After copying a file, delete the temporary file of the copy source as necessary.
• Page 226 Copy file (command: 1824)
• Page 223 Delete file (command: 1822)
When creation of temporary file is not required
1.
Check for file existence.
Any of the following commands can be used.
• Page 211 Read directory/file information (command: 1810)
• Page 217 Search directory/file information (command: 1811)
2.
Create a new file.
Register the file name to reserve the required capacity for the file.
• Page 220 Create new file (command: 1820)
3.
Write data to the file.
For writing data, use open and close command to prohibit access from other devices.
Execute the commands in the following order.
• Page 236 Open file (command: 1827)
• Page 242 Write to file (command: 1829)
• Page 244 Close file (command: 182A)
12 FILE CONTROL
192
12.1 Execution Procedure
File extension
MELSEC-Q/L series
DAT
QPG
QCD
QDI
MELSEC iQ-R series
PRG
DCM
DID
PFB
Reference
Page 192 When creation of temporary file is
required
Page 192 When creation of temporary file is
not required

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsecq seriesMelsec l series

Table of Contents