beautypg.com

Filemanage – Campbell Scientific CR9000X Measurement and Control System User Manual

Page 384

background image

Section 9. Program Control Instructions

Remarks

The FileList function returns a list of file names from the specified device into
the Destination array. FileList will return a -1 if the Device does not exist or a
-2 if Destination is not a variable.

Parameter
& Data Type

Enter

FILELIST PARAMETERS

Device

String in quotes

String that indicates the device that will be queried for files. The Device name must be
enclosed in quotes. The options are “CPU” (datalogger’s CPU) or “CRD” (compact flash
card).

Dest

Variable array

Variable array in which the names of the files will be stored. Each element of the array
will hold one file name. Should be dimensioned to the possible number of files on the
drive.
To query more than one device type for a list of files in a program, Dest can be a two
dimensional array, where the most significant array is used for the device type. For
example, Dest(2, 10) would allow two FileList functions, FileList(“CPU”, File(1,1)) and
FileList(“CRD”,File(2,1)), without the second function overwriting the results of the first.
Results from the first FileList function would be stored in FileList(1,1) through
FileList(1,n) and results from the second FileList function would be stored in
FileList(2,1) through FileList(2,n).

FileManage

Used to manage files from within a running datalogger program.

Syntax

FileManage("Device:FileName", Attribute)

Remarks

FileManage is an instruction that allows the active datalogger program to
manipulate program files that are stored in the datalogger.

Parameter

Enter FILEMANAGE

PARAMETERS

Device:FileName
String in quotes

The file that should be manipulated. The Device on which the file is stored
must be specified and the entire string must be enclosed in quotation
marks. Device = CPU, the file is stored in datalogger memory. Device =
CRD, the file is stored on a PCMCIA card. .

Attribute
Constant or
Variable

Code

1

2

4

6

8

16

32

Action to be taken

Program not active.

Run on Power-up.

Run now

Run now and on power up.

Delete

Delete all

Hide

This is a blank page.

9-54