Filewritevar - Omron NY532-5400 Reference Manual

Ny-series
Hide thumbs Also See for NY532-5400:
Table of Contents

Advertisement

2 Instruction Descriptions

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.
Instruction
FileWriteVar
Write Variable to
File
Variables
Name
Meaning
FileName
File name
WriteVar
Variable
OverWrite
Overwrite
enable
* If you omit the input parameter, the default value is not applied. A building error will occur.
Bit strings
FileName
OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK
WriteVar
An enumeration, array, array element, structure, or structure member can also be specified.
OverWrite
OK
Function
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. However,
the directory is created only when only the lowest directory level of the specified path does not exist.
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.
Value of OverWrite
TRUE (Enable overwrite.)
FALSE (Prohibit overwrite.)
2-1244
Name
FB/FUN
FB
I/O
Description
Name of file to which to
write variable
Input
Variable to write
TRUE: Enable overwrite.
FALSE: Prohibit overwrite.
The existing file is overwritten.
The file is not overwritten and an error occurs.
Graphic expression
FileWriteVar_instance
FileWriteVar
Execute
Done
FileName
Busy
WriteVar
Error
OverWrite
ErrorID
Valid range
66 bytes max. (65 sin-
gle-byte alphanumeric
characters plus the final
NULL character)
Depends on data type.
Integers
Processing
NY-series Instructions Reference Manual (W560)
ST expression
FileWriteVar_instance(Execute,
FileName, WriteVar, OverWrite,
Done, Busy, Error, ErrorID);
Unit
Default
''
---
*
FALSE
Times, durations, dates,
and text strings
OK

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents