EasyManua.ls Logo

Omron NJ501-1500

Omron NJ501-1500
990 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
2 Instruction Descriptions
2-794
NJ-series Instructions Reference Manual (W502)
FileWriteVar
The FileWriteVar instruction writes the value of a variable to the specified file in the SD Memory Card.
The value is written in binary format.
* If you omit the input parameter, the default value is not applied. A building error will occur.
The FileWriteVar instruction writes the value of variable WriteVar to the file specified by FileName in the
SD Memory Card. The value is written in binary format. You can specify an enumeration, array, array
element, structure, or structure member for WriteVar.
If a file with the name FileName does not exist on the SD Memory Card, it is created. FileName
includes the path. If a specified directory does not exist in the SD Memory Card, it is created.
If a file with the name FileName already exists in the SD Memory Card, the following processing is per-
formed depending on the value of overwrite enable OverWrite.
Instruction Name FB/FUN Graphic expression ST expression
FileWriteVar Write Variable to
File
FB FileWriteVar_instance(Execute,
FileName, WriteVar, OverWrite,
Done, Busy, Error, ErrorID);
Variables
Name Meaning I/O Description Valid range Unit Default
FileName File name
Input
Name of file to which to
write variable
Depends on data type.
---
''
WriteVar Variable Variable to write *
OverWrite Overwrite
enable
TRUE: Enable overwrite.
FALSE: Prohibit overwrite.
FALSE
Boolean
Bit strings Integers
Real
numbers
Times, durations,
dates, and text strings
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
FileName OK
WriteVar
OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK
An enumeration, array, array element, structure, or structure member can also be specified.
OverWrite OK
Function
Value of OverWrite Processing
TRUE (Enable overwrite.) The existing file is overwritten.
FALSE (Prohibit overwrite.) The file is not overwritten and an error occurs.
FileWriteVar
Execute Done
FileName Busy
WriteVar Error
OverWrite ErrorID
FileWriteVar_instance

Table of Contents

Related product manuals