![background image](http://html1.mh-extra.com/html/omron/sysmac-cs1d-cpu/sysmac-cs1d-cpu_reference-manual_7422681153.webp)
1114
File Memory Instructions
Section 3-26
The File Write Error Flag (A34308) will be turned ON and the instruction will
not be executed if the specified file is not the correct data type or the file data
has been corrupted.
A few seconds is required for the CPU Unit to detect a Memory Card after it
has been inserted. If a Memory Card is going to be accessed soon after
power is turned ON or after a Memory Card is inserted, use the Memory Card
Detected Flag (A34315) in a NO input condition as shown below to be sure
that the Memory Card has been detected.
The source data words starting at S are accessed and read during the periph-
eral servicing after FWRIT(701) is executed. If the source data is changed
before the file memory write processing is completed, the changed data may
be written to the file.
3-26-4 WRITE TEXT FILE: TWRIT(704)
Purpose
Reads ASCII data from I/O memory and stores that data in the Memory Card
as a text file (writing a new file or appending a file). The data is stored in the
TXT format.
This instruction is supported by CS/CJ-series CPU Units with unit version 4.0
or later only.
Ladder Symbol
Variations
Applicable Program Areas
Operand
C: Control word
#0000: Append file.
#0001: Create new file or overwrite.
S1: Number of write bytes
Specifies the number of bytes to write in the range 0 to 255 decimal or 0000 to
00FF hexadecimal.
FWRIT
C
D1
D2
S
A34313
A34315
Execution
condition
Memory Card
Detected Flag
File Memory
Operation Flag
C
S1
S2
S3
TWRIT
S4
C: Control word
S1: Number of bytes to write
S2: Directory and file name
S3: Write data
S4: Delimiter
Variations
Executed Each Cycle for ON Condition
TWRIT(704)
Executed Once for Upward Differentiation
@TWRIT(704)
Executed Once for Downward Differentiation
Not supported
Immediate Refreshing Specification
Not supported
Function block
definitions
Block program
areas
Step program
areas
Subroutines
Interrupt
tasks
OK
OK
OK
OK
OK
Summary of Contents for SYSMAC CS1D-CPU**
Page 3: ...iv...
Page 29: ...xxx...
Page 185: ...146 List of Instructions by Function Code Section 2 4...
Page 1389: ...1350 CJ series Instruction Execution Times and Number of Steps Section 4 2...
Page 1390: ...1351 Appendix A ASCII Code Table ASCII SP Four leftmost bits Four rightmost bits...
Page 1391: ...1352 ASCII Code Table Appendix A...