Data Storage Elementary Functions
The following DataStorage_EF elementary functions are supported in Control Expert for all tasks in the M580 BMEH58•040 non-safety Hot Standby CPUs, and for process tasks in the M580 BMEH58•040S safety Hot Standby CPUs.
EF
|
Hot Standby CPU State
|
Primary
|
Standby
|
Wait
|
CREATE_FILE
|
X
|
X
|
X
|
DELETE_FILE
|
X
|
X
|
X
|
GET_FILE_INFO*
|
X
|
X
|
X
|
GET_FREESIZE*
|
X
|
X
|
X
|
OPEN_FILE
|
X
|
X
|
X
|
RD_FILE_TO_DATA
|
X
|
X
|
X
|
SET_FILE_ATTRIBUTES
|
X
|
X
|
X
|
WR_DATA_TO_FILE
|
X
|
X
|
X
|
* Read-only function
|
NOTE: Changes made to an SD card in either the primary or standby CPU, using an elementary function, are not replicated in the SD card of the other CPU in the event of a switchover.
The
CREATE_FILE function creates a file called
FILENAME, if it does not already exist. If a file by that name already exists, the
CREATE_FILE command behaves the same as the
OPEN_FILE command.
The
DELETE_FILE function deletes a file identified by its
FILENAME. Close a file, using the
CLOSE_FILE function before deleting it.
The
GET_FILE_INFO function retrieves information about a specified target file. Execute the
OPEN_FILE function for the target file before executing the
GET_FILE_INFO function, because the identity of the target file comes from the output parameter of the
OPEN_FILE block.
The
GET_FREESIZE function displays the amount of available space on the SD memory card.
The
OPEN_FILE function opens a specified file, provided the file already exists.
The
RD_FILE_TO_DATA function allows data to be read from a file, at the current position of the file, and enables it to be copied to a variable.
The
SET_FILE_ATTRIBUTES function enables the setting of file attributes that set or clear the read-only flag for that file.
The
WR_DATA_TO_FILE function writes the value of a specified variable to the selected file. The data written is added after the current position in the file.