04.01.2015 Views

CR1000 Manual - Campbell Scientific

CR1000 Manual - Campbell Scientific

CR1000 Manual - Campbell Scientific

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Appendix A. CRBasic Programming Instructions<br />

FileManage<br />

Manages program files from within a running datalogger program.<br />

Syntax<br />

FileManage("Device: FileName", Attribute)<br />

FileOpen<br />

Opens an ASCII text file or a binary file for writing or reading.<br />

Syntax<br />

FileHandle = FileOpen("FileName", "Mode", SeekPoint)<br />

FileRead<br />

Reads a file referenced by FileHandle and stores the results in a variable or<br />

variable array.<br />

Syntax<br />

FileRead(FileHandle, Destination, Length)<br />

FileReadLine<br />

Reads a line in a file referenced by a FileHandle and stores the result in a variable<br />

or variable array.<br />

Syntax<br />

FileReadLine(FileHandle, Destination, Length)<br />

FileRename<br />

Changes the name of file on a <strong>CR1000</strong> drive.<br />

Syntax<br />

FileRename(drive:OldFileName, drive:NewFileName)<br />

FileSize<br />

Returns the size of a file stored in <strong>CR1000</strong> memory.<br />

Syntax<br />

FileSize(FileHandle)<br />

FileTime<br />

Returns the time the file specified by the FileHandle was created.<br />

Syntax<br />

Variable = FileTime(FileHandle)<br />

FileWrite<br />

Writes ASCII or binary data to a file referenced in the program by FileHandle.<br />

Syntax<br />

FileWrite(FileHandle, Source, Length)<br />

Include<br />

Inserts code from a file (Filename) at the position of the Include () instruction at<br />

compile time. Include cannot be nested.<br />

Syntax<br />

Include("Device:Filename")<br />

516

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!