Ny-Series Instructions Reference Manual (W560 - Omron NY532-5400 Reference Manual

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

Advertisement

Additional Information
The root directory of the file name is the top level of the SD Memory Card.
Precautions for Correct Use
• Execution of this instruction is continued until processing is completed even if the value of Execute
changes to FALSE or the execution time exceeds the task period. The value of Done changes to
TRUE when processing is completed. Use this to confirm normal completion of processing.
• Refer to Using this Section on page 2-3 for a timing chart for Execute, Done, Busy, and Error.
• If the specified file is larger than the size of ReadVar, an error does not occur and only data that cor-
responds to the size of ReadVar is read.
• If the specified file is smaller than the size of ReadVar, an error does not occur and only data that cor-
responds to the size of the specified file is read. The remaining area in ReadVar will retain the values
from before execution of this instruction.
• Data is read in byte increments. The lower bytes are read before the upper bytes (little endian).
• If ReadVar is a structure, adjustment areas between members may be inserted depending on the
composition.
• Do not simultaneously access the same file. Perform exclusive control of SD Memory Card instruc-
tions in the user program.
• You cannot specify a device variable for ReadVar. If you specify a device variable, the value that was-
read is not assigned to ReadVar.
• An error occurs in the following cases. Error will change to TRUE.
• The SD Memory Card is not in a usable condition.
• The file specified by FileName does not exist.
• The value of FileName is not a valid file name.
• The file specified by FileName is being accessed.
• If more than four SD Memory Card instructions that do not have a FileID variable (i.e., FileWrite-
Var, FileReadVar, FileCopy, DirCreate, FileRemove, DirRemove, and FileRename) are executed
at the same time.
• The value of FileName exceeds the maximum number of bytes allowed in a file name.
• An error that prevents access occurs during SD Memory Card access.
Sample Programming
This sample reads the contents of the file 'File1.dat' and stores it in array variable Var1.
LD
Internal
Variables
External
Variables

NY-series Instructions Reference Manual (W560)

Variable
OperatingEnd
BOOL
Trigger
BOOL
Operating
BOOL
ARRAY[0..999]
Var1
OF INT
RS_instance
RS
FileReadVar_instance
FileReadVar
Variable
_Card1Ready
Data type
Initial value
FALSE
FALSE
FALSE
[1000(0)]
Data type
Comment
BOOL
SD Memory Card Ready Flag
2 Instruction Descriptions
Comment
Processing completed.
Execution condition
Processing
Read data
2-1251
2

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents