fsMediaFree (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

All

Firmware version:

4.10 / 1.00.00


This function returns the amount of free space on the media.

It may take some time for large media.

 

Input:

media : INT (0..3)

The media to examine.

 

Returns: DINT

Size of the free space in KB

-1

- Media not found

-16

- Media not present.

-24

- Unknown file system.

 

Declaration:

FUNCTION fsMediaFree : DINT;
VAR_INPUT
  media : INT;
END_VAR;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
 
VAR
  a : DINT;
END_VAR;
 
BEGIN
  ...
  // Get the amount of free space on the internal drive
  a := fsMediaFree(media := 1);
  ...
END;
 
END_PROGRAM;