2 Instruction Descriptions
2-800
NJ-series Instructions Reference Manual (W502)
The root directory of the file name is the top level of the SD Memory Card.
• 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-2 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.
• 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.
Related System-defined Variables
Name Meaning Data type Description
_Card1Ready SD Memory Card
Ready Flag
BOOL This flag indicates if the SD Memory Card is physically
inserted and is mounted normally, i.e., if it can be accessed
by instructions and communications commands.
TRUE: Can be used.
FALSE: Cannot be used.
_Card1Protect SD Memory Card Write
Protected Flag
BOOL This flag indicates if the SD Memory Card is write protected
when it is inserted and ready to use.
TRUE: Write protected.
FALSE: Not write protected.
_Card1Err SD Memory Card Error
Flag
BOOL This flag indicates if an unspecified SD Memory Card (e.g.,
an SDHC card) is mounted or if the format is incorrect (i.e.,
not FAT16 or corrupted).
TRUE: Error.
FALSE: No error.
_Card1Access SD Memory Card
Access Flag
BOOL This flag indicates if the SD Memory Card is currently being
accessed.
TRUE: Being accessed.
FALSE: Not being accessed.
_Card1PowerFail SD Memory Card
Power Interruption Flag
BOOL This flag indicates if an error occurred in completing process-
ing when power was interrupted during SD Memory Card
access. This flag is not cleared automatically.
TRUE: Error.
FALSE: No error.
Additional Information
Precautions for Correct Use