beautypg.com

File functions, File functions – 12 – Rockwell Automation FactoryTalk View Site Edition Users Guide User Manual

Page 558

background image

F

ACTORY

T

ALK

V

IEW

S

ITE

E

DITION

U

SER

S

G

UIDE

20–12

• •

File functions

Use the built-in file functions to check whether a file exists, or to check the amount of free
disk space.

The file parameter is the path name, surrounded by quotes. The drive parameter is the
drive letter.

To have an expression containing these functions evaluated more than once, assign the
expression to an event rather than to an object in a graphic display.

COSD (expression)

The cosine of the expression in degrees

TAND (expression)

The tangent of the expression in degrees

ARCSIND (expression)

The arc sine of the expression in degrees

ARCCOSD (expression)

The arc cosine of the expression in degrees

ARCTAND (expression)

The arc tangent of the expression in degrees

This function

Returns this value

Example

FILE_EXISTS(“file”)

1 (true) if the specified
file exists

FILE_EXISTS(“C:\Documents and
Settings\All Users\Shared Documents\
RSView Enterprise\SE\ActivityLog\
Activity.exp”)

Returns 1 (true) if the file exists or 0 (false) if
the file does not exist.

Use this function to set a tag when a specified
file has been created or deleted.

FREE_BYTES(drive)

The number of bytes
free on the specified
drive

FREE_BYTES(c)

Returns the number of bytes available on
drive C, up to a maximum of 2.1 GB.

Use this function to display a message or
trigger an alarm when disk space is getting
low.

This function

Returns this value