Omron SYSMAC CJ - REFERENCE MANUAL 01-2008 Reference Manual page 1156

Sysmac cs/cj/one nsj series programmable controllers
Table of Contents

Advertisement

File Memory Instructions
Write data
#3536
S3
Characters: 56
Delimiter
#2C00
Comma
S4
Overwriting an Existing File
Set C = 0001 and specify an existing filename to overwrite an existing file.
Write data
Characters: 56
#3536
S3
Delimiter
Comma
#2C00
S4
Reference
During normal instruction execution processing, TWRIT(704) is used only to
start the writing of the file memory. The instruction execution times given
toward the end of this manual are thus the times required to start writing, not
to complete it.
Actual writing (transfer) is performed by the file access processing in periph-
eral servicing. Therefore, once TWRIT(704) has been executed, writing is
continuously executed even if the execution condition is OFF in following
cycles.
The time required to complete data transfer for TWRIT(704) will depend on
the amount of data being transferred, the service time allocated to file access
processing, and other conditions. As a guideline, if the cycle time is 10 ms and
the file is in the root directory, it will take about 440 ms (new file) or 260 ms
(existing file) to write 100 bytes, and about 450 ms (new file) or 270 ms s
(existing file) to write 255 bytes. These guideline values will vary widely
depending on the type of Memory Card being used and the number of files in
the Memory Card.
When transfer has been completed, the File Memory Operation Flag
(A34313) will turn OFF. This flag can be used for exclusive control of file mem-
ory instructions.
The source data is read from absolute PLC memory addresses in RAM, so
the entire block of data will be read even if the data spans two or more data
areas. For example, if the first source address is in the Work Area but the
amount of data exceeds the capacity of this area, TWRIT(704) will continue
reading data at the beginning of the next area (in this case, the Timer Area).
Refer to Appendix D in the CS/CJ-series Programmable Controllers Operation
Manual (W339) for a memory map showing the location of data areas in RAM.
When TWRIT(704) is executed, the "number of write bytes" specified in S1 is
written to A346 and A347 (Number of Data Items to Transfer) and this value is
decremented by 1 as each byte is transferred. The content of these words can
be checked to verify that the expected number of bytes were transferred.
Specified text file
1234,
Append file
(C: &0)
1234,56,
Specified text file
1234,
Overwrite
(C: &1)
56,
Section 3-26
1117

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents