07.01.2015 Views

CR200/CR200X Series Dataloggers - Campbell Scientific

CR200/CR200X Series Dataloggers - Campbell Scientific

CR200/CR200X Series Dataloggers - 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.

Section 10. CRBASIC Programming Instructions<br />

If ... Then ... Else … ElseIf ... EndIf<br />

Allows conditional execution, based on the evaluation of an expression. Else is<br />

optional. ElseIf is optional (EndSelect and EndIf call the same function).<br />

Syntax<br />

If [condition] Then [thenstatements] Else [elsestatements]<br />

-or-<br />

If [condition 1] Then<br />

[then statements]<br />

ElseIf [condition 2] Then<br />

[elseif then statements]<br />

Else<br />

[else statements]<br />

EndIf<br />

InterruptSequence<br />

Specifies code to run when an interrupt condition occurs.<br />

Syntax<br />

InterruptSequence<br />

LoggerIdentify<br />

Sets an identification string in the datalogger that will be returned when another<br />

string is sent to the datalogger.<br />

Syntax<br />

LoggernetIdentify (RequestString",ReturnString")<br />

Scan … NextScan<br />

Establishes the program scan rate. ExitScan and ContinueScan are optional.<br />

Syntax<br />

Scan (Interval, Units)<br />

...<br />

Next Scan<br />

...<br />

ContinueScan<br />

...<br />

Next Scan<br />

ScanLEDOff<br />

Turns off the LED on the datalogger's front case that indicates a program scan is<br />

occurring.<br />

Select Case … Case … Case Is … Case Else … EndSelect<br />

Executes one of several statement blocks depending on the value of an<br />

expression. CaseElse is optional. (EndSelect and EndIf call the same <strong>CR200</strong>(X)<br />

function).<br />

Syntax<br />

Select Case testexpression<br />

Case [expression 1]<br />

[statement block 1]<br />

Case [expression 2]<br />

[statement block 2]<br />

Case Is [expression fragment]<br />

Case Else<br />

[statement block 3]<br />

EndSelect<br />

97

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

Saved successfully!

Ooh no, something went wrong!