Campbell Scientific CR1000 Measurement and Control System User Manual

Page 516

Advertising
background image

Appendix A. CRBasic Programming Instructions

516 

 

 

FileManage 
Manages program files from within a running datalogger program. 

Syntax 

FileManage("Device: FileName", Attribute)

FileOpen 
Opens an ASCII text file or a binary file for writing or reading. 

Syntax 

FileHandle = FileOpen("FileName", "Mode", SeekPoint)

FileRead 
Reads a file referenced by FileHandle and stores the results in a variable or 
variable array. 

Syntax 

FileRead(FileHandle, Destination, Length)

FileReadLine 
Reads a line in a file referenced by a FileHandle and stores the result in a variable 
or variable array. 

Syntax 

FileReadLine(FileHandle, Destination, Length)

FileRename 
Changes the name of file on a CR1000 drive. 

Syntax 

FileRename(drive:OldFileName, drive:NewFileName)

FileSize 
Returns the size of a file stored in CR1000 memory. 

Syntax 

FileSize(FileHandle)

FileTime 
Returns the time the file specified by the FileHandle was created. 

Syntax 

Variable = FileTime(FileHandle)

FileWrite 
Writes ASCII or binary data to a file referenced in the program by FileHandle. 

Syntax 

FileWrite(FileHandle, Source, Length)

Include 
Inserts code from a file (Filename) at the position of the Include () instruction at 
compile time. Include cannot be nested. 

Syntax 

Include("Device:Filename")

Advertising