2-853
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
SD Memory Card Instructions
2
FileRename
The following figure shows a programming example. Here, the name of the file ‘ABC.bin’ is changed to
‘DEF.bin.’
The root directory of the file name is the top level of the SD Memory Card.
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 com-
mands.
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 pro-
tected 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
processing when power was interrupted during SD
Memory Card access. This flag is not cleared automat-
ically.
TRUE: Error.
FALSE: No error.
Additional Information
FileRename_instance(A, ’ABC.bin’, ‘DEF.bin’,
TRUE, abc, def, ghi, jkl);
LD
ST
‘ABC.bin’
‘DEF.bin’
TRUE
def
ghi
jkl
abc
A
FileRename
Execute Done
FileName Busy
NewName Error
OverWrite ErrorID
FileRename_instance