04.01.2015 Views

CR1000 Manual - Campbell Scientific

CR1000 Manual - Campbell Scientific

CR1000 Manual - Campbell Scientific

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Appendix A. CRBasic Programming Instructions<br />

A.14 File Management<br />

FindSpa<br />

Searches a source array for a value and returns the value's position in the array.<br />

Syntax<br />

FindSpa(SoughtLow, SoughtHigh, Step, Source)<br />

Move<br />

Moves the values in a range of variables into different variables or fills a range of<br />

variables with a constant.<br />

Syntax<br />

Move(Dest, DestReps, Source, SourceReps)<br />

Commands to access and manage files stored in <strong>CR1000</strong> memory.<br />

CalFile<br />

Stores variable data, such as sensor calibration data, from a program into a nonvolatile<br />

<strong>CR1000</strong> memory file. CalFile pre‐dates and is not used with the FieldCal<br />

function.<br />

Syntax<br />

CalFile(Source/Dest, NumVals, "Device:filename", Option)<br />

Encryption<br />

Encrypts / decrypts a message (string variable) shared between two devices.<br />

Syntax<br />

Result = Encryption(Dest, Source, SourceLen, Key, Action)<br />

FileCopy<br />

Copies a file from one drive to another.<br />

Syntax<br />

FileCopy(FromFileName, ToFileName)<br />

FileClose<br />

Closes a FileHandle created by FileOpen.<br />

Syntax<br />

FileClose(FileHandle)<br />

FileEncrypt<br />

Performs an encrypting algorithm on the file. Allows distribution of CRBasic files<br />

without exposing source code.<br />

Syntax<br />

Boolean Variable = FileEncrypt(FileName)<br />

FileList<br />

Returns a list of files that exist on the specified drive.<br />

Syntax<br />

FileList(Drive,DestinationArray)<br />

515

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

Saved successfully!

Ooh no, something went wrong!