Omron CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 Reference Manual page 986

Programmable controllers
Hide thumbs Also See for CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009:
Table of Contents

Advertisement

TWRIT
Instruction
WRITE TEXT FILE
Symbol
Applicable Program Areas
Function block
Area
definitions
Usage
OK
Operands
Operand
C
Control word
S1
Number of bytes to write
S2
Directory and file name
S3
Write data
S4
Delimiter
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.
S2: First directory/filename word
• Specifies the first word of the words containing the file's directory path and filename. Input the path
and filename in ASCII text.
• Directory name:
The directory name can be 1 to 65 characters long. If the name is less than 65 characters, do not pad
with spaces. Specify the absolute path from the root directory's \ (#5C) character.
• Filename:
Filename identifier: The identifier can be 1 to 8 characters long. If the name is less than 8 characters,
do not pad with spaces. Add a NUL character (#00) at the end of the filename. (The NUL character is
not included as one of the 8 characters.)
• Filename extension: None
• Separate the directory name and filename with a \ (#5C) delimiter.
Note The words containing the directory path and filename (starting at S2) must be in the same data area.
S1+2
F1
F2
S2
F3
F4
S2+1
:
:
F73
F74
S2+38
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Mnemonic
Variations
TWRIT
@TWRIT
Block program areas
Step program areas
OK
OK
Description
Store the character string beginning with the leftmost byte in S2, in the order
leftmost byte
rightmost byte and lower word address
The directory name and filename can be up to 74 bytes long, including the
NULL (00 Hex) at the end of the filename.
Function
code
Reads ASCII data from I/O memory and stores that
704
data in the Memory Card as a text file (writing a new
file or appending a file).
TWRIT
TWRIT(704)
C
C: Control word
S1
S1: Number of bytes to write
S2
S2: Directory and file name
S3
S3: Write data
S4
S4: Delimiter
Subroutines
OK
3. Instructions
Function
SFC action or
Interrupt tasks
transition programs
OK
OK
Data type
Size
UINT
1
UINT
1
WORD
1
WORD
1
WORD
1
higher word address.
3
949

Advertisement

Table of Contents
loading

Table of Contents