beautypg.com

B&B Electronics VFG3000 - Manual User Manual

Page 238

background image

C

REATE

F

ILE

(

NAME

)

V

LINX

F

IELDBUS

G

ATEWAY

M

ANAGER

U

SER

M

ANUAL

P

AGE

222

C

REATE

F

ILE

(

NAME

)

A

RGUMENT

T

YPE

D

ESCRIPTION

name

cstring

The file to be created.

D

ESCRIPTION

Creates an empty file on CompactFlash. Note that the filing system used on the card does not
support long filenames, and that if backslashes are included in the pathname to separate path
elements, they must be doubled-up per Fieldbus Gateway Manager’s rules for string constants
as described in the chapter on Writing Expressions. To avoid this complication, forward
slashes can be used in place of backslashes without the need for such doubling. The function
returns a value of one if it succeeds, and a value of zero if it fails. Note that the file is not
opened after it is created—a subsequent call to

OpenFile()

must be made to read or write

data.

F

UNCTION

T

YPE

This function is active.

R

ETURN

T

YPE

int

.

E

XAMPLE

Success := CreateFile(“/logs/custom/myfile.txt”)