beautypg.com

Appendix a. crbasic program for version 18 – Campbell Scientific RDP500 Remote Data Platform User Manual

Page 29

background image

Appendix A. CRBasic Program for
Version 18

'CR1000 Series Datalogger
'FISCHER & PORTER/BELFORT WEIGHING RAINGAUGE RETROFIT.

'VERSION: RDP500_V18.CR1
'Note: The PRT is not needed to achieve the specification, however it is included in this
' system in an effort to create a sensor-temperature dataset that can be analized by
' any questioning party.
'Change Log:
' 2008-08-08
' Program released for manual
' 2010-04-20
' Changed data record interval from 5 min to 15 min.
' Added rounding of precip to 1/100th of inch
' Expanded information available through keypad display
' Added PreserveVariables program modifier



'------------------------------------------------------------------------------------
'Wiring Setup.

'S shape load cell INTERFACE SSM-AJ-100
'Red +

--- V_Ex1

'Black -

--- V_G

'Green Sig + --- 1H
'White Sig - --- 1L
'Shield ---

V_G


'PRT

'Red ---

TIM_G

'ReD ---

TIM_H


'TIM
'H ---

7H

'L ---

7L

'G ---

V_G

'Black ---

V_Ex2



PreserveVariables

'Declare Public Variables

Public PTemp_C

'degrees. Temperature of datalogger wiring panel

Public PTemp_F

'degrees. Temperature of datalogger wiring panel

Public batt_volt

'Volts. external power supply voltage


Public PRT_raw

'millivolts. Raw mV reading from PRT

Public PRT_C

'deg C. PRT temp in Celcius

Public PRT_F

'deg F. PRT temp in Fahrenheit


Public LC_mV

'millivolts. Raw mV reading from the load sell

Public LC_mV_Avg

'millivolts. Averaged raw mV reading from the load cell

Public Lc_mV_Ofst

'millivolts. Load cell mV offset with no load (TARE)

Public LC_mV_Diff

'millivolts. Absolute difference between LC_mV_Avg and LC_mV

Public mVtoGram

'grams/millivolts. Conversion factor

Public LC_gr

'grams. weight applied to load cell


A-1