'CR1000X Series Datalogger 'Example datalogger program for Apogee Instruments S2-141 series PAR - Far red sensors. 'Date: December 11 2020 'Program author: John Huber 'Wiring: 'White -> High side differential channel 1 (Far red detector) 'Black -> Low side differential channel 1 (Far red detector) 'Yellow -> High side differential channel 2 (PAR detector) 'Blue -> Low side differential channel 2 (PAR detector) 'Clear -> Shield ground 'Explanation of constants and variables used in datalogger program: 'BattV = Datalogger battery voltage (Volts DC). 'PanelT = Datalogger panel temperature (Degrees C). 'PARMult = The calibration factor for the PAR detector (See your sensor's calibration sheet for this number) 'FarRedMult = The calibration factor for the Far red detector (See your sensor's calibration sheet for this number) 'NOTE: All calibration factors are sensor-specific. The factors listed in this example program are placeholders used as examples only. 'PARmV = The raw voltage output from the PAR detector in millivolts 'FarRedmV = The raw voltage output from the FarRed detector in millivolts 'PAR = The calibrated PAR reading in umol/m^2/sec for the PAR detector 'FarRed = The calibrated Far red reading in umol/m^2/sec for the Far red detector 'PARFarRed = Ratio of PAR and Far red light 'Declare Public Variables Public BattV, PanelT Public PARmV, FarRedmV, PAR, FarRed, PARFarRed 'Declare Constants 'Calibration Coefficients: Refer to your sensor's calibration sheet and change these to match. Const PARMult = 70 Const FarRedMult = 50 'Define Data Tables. DataTable (PARFar,1,-1) DataInterval (0,1,Min,10) Minimum (1,BattV,FP2,False,False) Sample (1,PanelT,FP2) Average(1,PAR,IEEE4,False) Average(1,FarRed,IEEE4,False) Average(1,PARFarRed,IEEE4,False) EndTable 'Main Program BeginProg Scan (1,Sec,0,0) PanelTemp (PanelT,60) Battery (BattV) 'Measure detector output voltages VoltDiff(FarRedmV,1,mV200,1,True,0,_60Hz,1.0,0.0) VoltDiff(PARmV,1,mV200,1,True,0,_60Hz,1.0,0.0) 'Apply Calibration Factors PAR = PARmV * PARMult FarRed = FarRedmV * FarRedMult 'Calculate the PAR-Far red ratio PARFarRed = PAR / FarRed CallTable PARFar NextScan EndProg