'CR1000X Series Datalogger 'Example datalogger program for Apogee Instruments SU-202/205 ultraviolet sensors 'date: December 31, 2020 'program author: Jacob Bingham 'Wiring: 'White -> Single ended chanel 1 (analog in) 'Black -> Ground (Signal and power ground) 'Red -> Power (5 - 24 VDC) 'Clear -> Ground (Shield) 'Note for non-Campbell Scientific systems: If the power supply ground is not shared with the signal ground on the datalogger, a bridge wire connecting the two grounds will be needed. 'Explanation of Constants and Variables Used in Datalogger Program 'BattV = datalogger battery voltage 'PanelT = datalogger panel temperature 'UV = incoming global ultraviolet (UV) radiation in umol m-2 s-1 (micromoles per square meter per second) 'Declare Public Variables Public BattV, PanelT Public UV, OutputmV Const CalFac = 0.4 '(Watts per square meter) Change this value to match your sensor model, and/or desired units of measurements 'Define Data Tables DataTable (Ultraviolet,1,-1) DataInterval (0,1,Min,10) Minimum(1,BattV,IEEE4,0,False) Sample(1,PanelT,IEEE4) Average(1,UV,IEEE4,False) EndTable 'Main Program BeginProg Scan(1,Sec,0,0) Battery(BattV) PanelTemp(PanelT,_60Hz) VoltDiff(UV,1,mV5000,1,True,0,_60Hz,5,0) 'Apply calibration factor UV = OutputmV * CalFac 'Call Output Tables CallTable Ultraviolet NextScan EndProg