数据记录仪pro CR1000X系列数据记录仪的例子gram for Apogee Instruments S2-121/122 series PRI sensors (1 upward and downward facing sensor pair) 'date: December 31 2020 'program author: John Huber 'Wiring: 'White -> High side differential channel (1 for upward, 3 for downward) (570 nm detector) 'Black -> Low side differential channel (1 for upward, 3 for downward) (570 nm detector) 'Yellow -> High side differential channel (2 for upward, 4 for downward)(532 nm detector, different differential channel from 532 nm detector) 'Blue -> Low side differential channel (2 for upward, 4 for downward) (532 nm detector, different differential channel from 532 nm detector) 'Clear -> Shield ground 'Explanation of Constants and Variables Used in Datalogger Program 'LowMultUp = calibration multiplier for 532 nm detector in upward sensor 'LowMultDn = calibration multiplier for 532 nm detector in downward sensor 'HighMultUp = calibration multiplier for 570 nm detector in upward sensor 'HighMultDn = calibration multiplier for 570 nm detector in downward sensor 'BattV = datalogger battery voltage 'PanelT = datalogger panel temperature 'LowWaveUp = Calibrated detector reading for the 532 nm detector in upward sensor 'LowWaveDn = Calibrated detector reading for the 532 nm detector in downward sensor 'HighWaveUp = Calibrated detector reading for the 570 nm detector in upward sensor 'HighWaveDn = Calibrated detector reading for the 570 nm detector in downward sensor 'LowmVUp = mV output of the 532 nm detector in upward sensor 'LowmVDn = mV output of the 532 nm detector in downward sensor 'HighmVUp = mV output of the 570 nm detector in upward sensor 'HighmVDn = mV output of the 570 nm detector in downward sensor 'LowReflect = Reflectance at 532 nm 'HighReflect = Reflectance at 570 nm 'PRI = PRI Reading 'Note that all calibration multipliers are sensor-specific, as well as detector specific; those listed below are examples and must be changed based on the specific sensor being used. 'Declare Public Variables Public BattV, PanelT Public LowWaveUp, LowWaveDn, HighWaveUp, HighWaveDn, LowmVUp, LowmVDn, HighmVUp, HighmVDn, LowReflect, HighReflect, PRI 'Declare Calibration Coefficients (sensor-specific) 'These variables must be changed to reflect the detector specific multipliers for the sensor(s) being used. Public LowMultUp = 0.1 Public LowMultDn = 0.1 Public HighMultUp = 0.1 Public HighMultDn = 0.1 Units LowWaveUp = Watts/m2 Units HighWaveUp = Watts/m2 Units LowWaveDn = Watts/m2 Units HighWaveDn = Watts/m2 Units LowmVUp = mV Units HighmVUp = mV Units LowmVDn = mV Units HighmVDn = mV 'Define Data Tables DataTable (PRITable,1,-1) DataInterval (0,1,Min,10) Minimum(1,BattV,IEEE4,0,False) Sample(1,PanelT,IEEE4) Average(1,PRI,IEEE4,False) Average(1,LowReflect,IEEE4,False) Average(1,HighReflect,IEEE4,False) EndTable 'Main Program BeginProg Scan(1,Sec,0,0) Battery(BattV) PanelTemp(PanelT,_60Hz) 'Upward Facing Sensor 'Measure detector mV signals VoltDiff(HighmVUp,1,mV200,1,True,0,_60Hz,1.0,0) VoltDiff(LowmVUp,1,mV200,2,True,0,_60Hz,1.0,0) 'Downward Facing Sensor 'Measure detector mV signals VoltDiff(HighmVDn,1,mV200,3,True,0,_60Hz,1.0,0) VoltDiff(LowmVDn,1,mV200,3,True,0,_60Hz,1.0,0) 'Apply multipliers HighWaveUp = HighmVUp * HighMultUp LowWaveUp = LowmVUp * LowMultUp HighWaveDn = HighmVDn * HighMultDn LowWaveDn = LowmVDn * LowMultDn 'Calculate Reflectance Values HighReflect = (HighWaveDn / HighWaveUp) LowReflect = (LowWaveDn / LowWaveUp) 'Calculate PRI PRI = (LowReflect - HighReflect) / (LowReflect + HighReflect) 'Call Output Tables CallTable PRITable NextScan EndProg