15
APPENDIX E
CRBASIC PROGRAMMING
Programming the MEMS Tiltmeter with CRBASIC
Description:
CRBASIC is the programming Language used with Campbell Scientific CRBASIC Dataloggers.
Campbell’s Loggernet Software is typically used when programming in CRBASIC. The MEMS
sensor should be read with the VoltDiff instruction and the output averaged 100x. No Thermistor
in this example.
Sample Program:
'Declare Public Variables for Reading MEMS Sensor
Public MEMS_1
Public MEMS_2
Public MEMS_3
Public MEMS_Output
'Output of the MEMS Sensor
'Store MEMS Output every 2 minutes
DataTable (MEMS_EXAMPLE,1,-1)
Sample (1,MEMS_Output,IEEE4)
EndTable
BeginProg
'2 min scan interval
Scan (2,min,0,0)
'Read MEMS Sensor on Differential Channel 1 and average 100x Readings
Delay(0,100,mSec)
MEMS_3 = 0
For MEMS_1 = 1 To 100
VoltDiff (MEMS_2,1,mV5000,1,False,0,250,0.001,0)
MEMS_3 = MEMS_2
Next
MEMS_Output = MEMS_3 / 100
CallTable MEMS_EXAMPLE
NextScan
EndProg
Summary of Contents for 6160
Page 2: ......
Page 4: ......
Page 15: ...9 Figure 6 Sample Model 6160 or 6150 Calibration Sheet ...