1113
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