' Program Name: Program to operate 1 x Implexx Sap Flow Sensor on a CR350 data logger. ' ' (C) Copyright 2023. This program, and associated information, is copyright to, and property ' of Edaphic Scientific Pty Ltd. This program is not to be copied or disseminated to any ' person, under any format, with out the written permission of Edaphic Scientific Pty Ltd. ' ' Date: 21/11/2024 ' Program author: Implexx Sense 'Wiring 'Green -> G (Ground) 'White -> C1 (Data) 'Brown -> 12V (Power 12V continuous) Const MEAST_INTERVAL_MIN = 15 'Declare Public Variables Public Logger_Temp, Batt_volt '===== SAP FLOW VARIABLES ================================================ 'M! Command - Main variables Public SapFlow(9) Alias SapFlow(1)=SapFlowTotal : Units SapFlowTotal=L/hr Alias SapFlow(2)=SFD_Outer : Units SFD_Outer=cm3//cm2hr Alias SapFlow(3)=SFD_Inner : Units SFD_Inner=cm3/cm2/hr Alias SapFlow(4)=Alpha_Outer Alias SapFlow(5)=Alpha_Inner Alias SapFlow(6)=Beta_Outer Alias SapFlow(7)=Beta_Inner Alias SapFlow(8)=Tmax_Outer : Units Tmax_Outer=secs Alias SapFlow(9)=Tmax_Inner : Units Tmax_Inner=secs '===== STEM TEMPERATURE VARIABLES ========================================= 'M1! Command - Outer thermistor measurements 'M2! Command - Inner thermistor measurements Public Stem_Temp_Outer(6) Public Stem_Temp_Inner(6) Alias Stem_Temp_Outer(1) = Pre_Temp_Down_Outer : Units Pre_Temp_Down_Outer=deg_C Alias Stem_Temp_Outer(2) = Max_Temp_Down_Outer : Units Max_Temp_Down_Outer=deg_C Alias Stem_Temp_Outer(3) = Post_Temp_Down_Outer : Units Post_Temp_Down_Outer=deg_C Alias Stem_Temp_Outer(4) = Pre_Temp_Upper_Outer : Units Pre_Temp_Upper_Outer=deg_C Alias Stem_Temp_Outer(5) = Max_Temp_Upper_Outer : Units Max_Temp_Upper_Outer=deg_C Alias Stem_Temp_Outer(6) = Post_Temp_Upper_Outer : Units Post_Temp_Upper_Outer=deg_C Alias Stem_Temp_Inner(1) = Pre_Temp_Down_Inner : Units Pre_Temp_Down_Inner=deg_C Alias Stem_Temp_Inner(2) = Max_Temp_Down_Inner : Units Max_Temp_Down_Inner=deg_C Alias Stem_Temp_Inner(3) = Post_Temp_Down_Inner : Units Post_Temp_Down_Inner=deg_C Alias Stem_Temp_Inner(4) = Pre_Temp_Upper_Inner : Units Pre_Temp_Upper_Inner=deg_C Alias Stem_Temp_Inner(5) = Max_Temp_Upper_Inner : Units Max_Temp_Upper_Inner=deg_C Alias Stem_Temp_Inner(6) = Post_Temp_Upper_Inner : Units Post_Temp_Upper_Inner=deg_C '===== STEM WATER CONTENT VARIABLES ======================================== 'M3! Command Public Stem_Water(6) Alias Stem_Water(1) = SWC_Outer : Units SWC_Outer=% Alias Stem_Water(2) = SWC_Inner : Units SWC_Inner=% Alias Stem_Water(3) = Heat_Capacity_Outer : Units Heat_Capacity_Outer=kJ/m^3 Alias Stem_Water(4) = Heat_Capacity_Inner : Units Heat_Capacity_Inner=kJ/m^3 Alias Stem_Water(5) = Pulse_Energy : Units Pulse_Energy=J/m Alias Stem_Water(6) = Pulse_Duration : Units Pulse_Duration=sec '===== SENSOR POWER SUPPLY VARIABLES ====================================== 'M4! Command Public PowerSupply(5) Alias PowerSupply(1) = AvgVolts : Units AvgVolts=Volts Alias PowerSupply(2) = AvgCurrent : Units AvgCurrent=amps Alias PowerSupply(3) = MaxVolts : Units MaxVolts=Volts Alias PowerSupply(4) = MinVolts : Units MinVolts=Volts Alias PowerSupply(5) = Diagnostic '===== NEEDLE DISTANCE VARIABLES ========================================== 'M5! Command - Time to maximum temperature in the upstream needle (outer and inner) Public uTmax(2) Alias uTmax(1) = uTmax_Outer : Units uTmax_Outer=sec Alias uTmax(2) = uTmax_Inner : Units uTmax_Inner=sec '===== DATA TABLES ======================================================== DataTable (Sap_Flow_Data,1,-1) DataInterval (0,MEAST_INTERVAL_MIN,Min,10) Sample (9,SapFlow(),IEEE4) EndTable DataTable (Stem_Temp_Data,1,-1) DataInterval (0,MEAST_INTERVAL_MIN,Min,10) Sample (6,Stem_Temp_Outer(),IEEE4) Sample (6,Stem_Temp_Inner(),IEEE4) EndTable DataTable (Stem_Water_Data,1,-1) DataInterval (0,MEAST_INTERVAL_MIN,Min,10) Sample (6,Stem_Water(),IEEE4) EndTable DataTable (Diagnostic_Data,1,-1) DataInterval (0,MEAST_INTERVAL_MIN,Min,10) Sample (1,Batt_volt,FP2) Sample (1,Logger_Temp,FP2) Sample (1,Tmax_Outer(),IEEE4) Sample (1,Tmax_Inner(),IEEE4) Sample (2,uTmax(),IEEE4) Sample (5,PowerSupply(),FP2) EndTable '===== MAIN PROGRAM ======================================================= BeginProg Scan (MEAST_INTERVAL_MIN,Min,0,0) PanelTemp (Logger_Temp,50) Battery (Batt_volt) 'Query sensor for SDI-12 outputs SDI12Recorder (SapFlow(),C1,0,"M!",1.0,0) SDI12Recorder (Stem_Temp_Outer(),C1,0,"M1!",1.0,0) SDI12Recorder (Stem_Temp_Inner(),C1,0,"M2!",1.0,0) SDI12Recorder (Stem_Water(),C1,0,"M3!",1.0,0) SDI12Recorder (PowerSupply(),C1,0,"M4!",1.0,0) SDI12Recorder (uTmax(),C1,0,"M5!",1.0,0) 'Call Output Tables CallTable Sap_Flow_Data CallTable Stem_Temp_Data CallTable Stem_Water_Data CallTable Diagnostic_Data NextScan EndProg