beautypg.com

4 crbasic program example, Maintenance and troubleshooting – Campbell Scientific OBS3 Turbidity Sensor User Manual

Page 9

background image

Interfacing the OBS-3 Turbidity Monitor with Campbell Scientific Dataloggers

5

2.4 CRBasic Program Example

'CR1000

'Declare Variables and Units
Public Batt_Volt
Public FTU

Units Batt_Volt=Volts

'Define Data Tables
DataTable(Table1,True,-1)
DataInterval(0,60,Min,10)
Average(1,FTU,IEEE4,False)
Maximum(1,FTU,IEEE4,False,True)
EndTable

DataTable(Table2,True,-1)
DataInterval(0,1440,Min,10)
Minimum(1,Batt_Volt,FP2,False,False)
EndTable

'Main Program
BeginProg
Scan(30,Min,1,0)

'Default Datalogger Battery Voltage measurement Batt_Volt:

Battery(Batt_Volt)

'OBS-3 Turbidity Probe (D&A Instruments) measurement FTU:

PortSet(9,1)
Delay(0,3,Sec)
VoltDiff(FTU,1,mV5000,1,True,0,_60Hz,0.4,0)

'MULTIPLIER: (2000 FTU)/(5000 mV) = 0.4

PortSet(9,0)

'Call Data Tables and Store Data

CallTable(Table1)
CallTable(Table2)
NextScan
EndProg

3. Maintenance and Troubleshooting

Follow the maintenance and troubleshooting procedures that are outlined in the
OBS-3 technical manual provided by D & A Instrument Company.