'CR1000X Series Datalogger 'Example datalogger program for Apogee Instruments S2-441 series PAR - Far red sensors. 'Date: December 11 2020 'Program author: John Huber 'Wiring: 'White -> C1 Comm port (SDI12 signal) 'Black -> G port (Ground) 'Red -> 12V port (Input power) 'Clear -> Shield ground 'Explanation of constants and variables used in datalogger program: 'BattV = Datalogger battery voltage (Volts DC). 'PanelT = Datalogger panel temperature (Degrees C). 'Output(2) = The initial holding array for the sensor's data 'PAR = Alias for the PAR reading in umol/m^2/sec for the PAR detector 'FarRed = Alias for the 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 Output(2), PARFarRed 'Declare Aliases Alias Output(1) = PAR Alias Output(2) = FarRed '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) 'Retrieve PAR and calibrated PAR and Far red data SDI12Recorder(Output(),C1,0,"M1!",1.0,0.0) 'Calculate the PAR-Far red ratio PARFarRed = PAR / FarRed CallTable PARFar NextScan EndProg