Appendix d. example crbasic program – Campbell Scientific CC640 Digital Camera User Manual

Page 55

Advertising
background image

Appendix D. Example CRBasic
Program

The following is a CR800 example program. The CR1000 and CR3000 are
programmed similarly.

'CR800 Series

'This program allows the user to take a picture on command, time an image, or take a picture based
'on a threshold.
'For the threshold method, the measurement instruction is not included, but the method to take the
'picture is.
'Any or all can be used in the same program

'Declare Variables
Public takepicture,temperature

Sub manual_picture
PulsePort

(4,1000)

takepicture=0
EndSub

'Main Program
BeginProg
Scan(10,Sec,1,0)

'take a picture manually - set takepicture equal to 1 in a numeric

'screen while connected to the logger

If

takepicture=1

Then

Call

manual_picture

EndIf


'Threshold

taken

picture

If temperature <> 95 Then

Call

manual_picture

EndIf


'trigger

camera

If

IfTime

(0,15,Min)

Then

PulsePort

(4,1000)

EndIf


NextScan
EndProg

D-1

Advertising