fsMediaSize (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Firmware version:

4.10 / 1.00.00


This function returns the size of the media.

It may take some time for large media.

 

Input:

media : INT (0..3)

The media to examine.

 

Returns: DINT

Size of the media in KB

-1

- Media not found

-16

- Media not present.

-24

- Unknown file system.

 

Declaration:

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

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
 
VAR
   a  : DINT;
END_VAR;
 
BEGIN
   ...
   // Get the size of the internal drive
   a := fsMediaSize(media := 1);
   ...
END;
 
END_PROGRAM;