2 Instruction Descriptions
2-848
NJ-series Instructions Reference Manual (W502)
FileRemove
The FileRemove instruction deletes the specified file from the SD Memory Card.
The FileRemove instruction deletes the file specified by file name FileName from the SD Memory Card.
The following figure shows a programming example. Here, the file named ‘ABC.bin’ is deleted.
Instruction Name FB/FUN Graphic expression ST expression
FileRemove Delete File FB FileRemove_instance(Execute,
FileName, Done, Busy, Error,
ErrorID);
Variables
Name Meaning I/O Description Valid range Unit Default
FileName File name Input Name of file to delete Depends on data type.
--- ''
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
Function
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.
FileRemove
Execute Done
FileName Busy
Error
ErrorID
FileRemove_instance
FileRemove_instance(A, ’ABC.bin’, abc,
def, ghi, jkl);
LD
ST
‘ABC.bin’
A
FileRemove
Execute Done
FileName Busy
Error
ErrorID
FileRemove_instance
def
ghi
jkl
abc