File Management

File Management functionsClosed A function calculates a result according to the current value of its inputs. A function has no internal data and is not linked to declared instances. provide the ability to:


  • A shared directory connection is setup through the Web server.

Sequential Read / Write Function Blocks

These function blocksClosed A function block groups an algorithm and a set of private data. It has inputs and outputs. enableClosed Enable signal for the drive, Hardware-Enable with 24V signal to X8, Software-Enable command by setup Software, fieldbus or permanently set. Both are required for enabling the drive. sequential read / write operations in disk files:

Name

Description

FileClose

Closes an open file.

FileCopy

Copies a file's contents to a new file.

FileDelete

Removes a file from the file system.

FileEOF

Test if the end of the file is reached in a file that is open for reading.

FileExists

Tests if a file exists.

FileOpenA

Create or open a file in append mode.

FileOpenR

Open a file for reading.

FileOpenW

Create or resetClosed New start of the microprocessor. a file and open it for writing.

FileReadBinData

Read binary data from a file.

FileReadLine

Reads a string value from a text file.

FileRename

Renames a file.

FileSeek

Sets the current positionClosed Position means a point in space which is described by different coordinates. Depending on the used system and transformation it can consist of a maximum of six dimensions (coordinates).This means three Cartesian coordinates in space and coordinates for the orientation. In ACS there can be even more than six coordinates. If the same position is described in different coordinate systems the values of the coordinates are different. in an open file.

FileSize

Gets the size of a file.

FileWriteBinData

Write binary data to a file.

FileWriteLine

Writes a string value to a text file.

SD card Functions

These functions handle mounting of SD cards:

Name

Use

File Management

Verify the SD card is mounted.

File Management

Mount the SD card.

File Management

Unmount the SD card.

Each file is identified in the application by a unique handle manipulated as a DINT value.

  • The file handles are allocated by the target system.
  • Handles are returned by the Open function blocks and used by all other function blocks for identifying the file.

Related Function Blocks

LogFileCSV log values of variables to a CSV file


    • Files are opened and closed directlyClosed The orientation components of a vector in space. by the Operating System of the target.
      • Opening some files can be dangerous for system safety and integrity.
      • The number of open files (from FileOpenA, FileOpenR, and FileOpenW) is limited by the resources available on the target system.
    • Verify each file successfully opened using FileOpenA, FileOpenR, and FileOpenW.
      • The FileOpenW has a corresponding FileClose to close the file.
      • Closing the file releases the file ID, making it available for operations on other files.