Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

CR800 output file Header Lines


zach.ohlinger Apr 13, 2016 10:00 PM

I currently have a CR800 running with LoggerNet. Here is my CR8 file:

_______________________________________________________________________________________________

'CR800 Series Datalogger
'Program Name:  ESPAMonitor_V6.0-Transducer.CR8 
'Release date: March 23,2016
'
'This program is designed for use with pressure transducers.  The program has been
'changed to use subroutines for various functions so that commenting out of the unused
'protions of the program can be done easier.  All transducer functions run from the
'subroutine. There is a subroutine for each transducer location with the max number of
'tranducers the program can run being 2.
'
'Changes from previous version:
'changed program scan time to 30 seconds
'added input designators to Cor_Data for IT purposes
'added program for CS451 SDI-12 transdcuer for the replacement of the Keller trnaducer
'
'"Cor_data" is reflective of staff gage reading and is set using the Public table,
'"Gage Height" entery which defaults to Raw_Data.  This value must be set for each transducer
'used.  Gage Height2 is used to set staff gage readings for the additional transducer.
'
'"Diff_Head" is used to give the difference between Cor_Data and Cor_Data2 for the fresh water
'orifice at Blue Lakes Trout that supplies Pristines Springs.
'
'Keller America Acculevel pressure transducer wiring and setup.
'Standard units of 0.0046 and 0.06 are used in the single ended voltage measure for
'multiplier and offset respectively of a 0-5psi transducer.  For other psi ranges see notes
'below.
'slope m = 0.0046 for 5 psig transducer
'(this gives output in volts) = ((5psi * 2.317)/2500mV)TCDiff (Thermo1,1,mV2_5C,1,TypeT,TRef,True ,0,250,1.0,0)
' NOTE:   for 2.5 psig transducer use 0.00232
' NOTE:   for 15 psig transducer use 0.0139
'offset b = 0.06
'Wiring of sensor to SE1 for one sensor.
'Black - 12V
'Red - H
'White - Gnd
'Sheild - Gnd in lower terminal strip
'
'
'
'Water Temperature Sensor (Campbell 108-L)
'The 108-L sensor will be used to monitor the temperature of the spring flows. The sensor will
'be run down the same conduit as the transducer.
'The temperature sensor will use the single ended input number 6 (SE6).
'A multiplier of 1 and offset of 0 gives degrees C, a multiplier of 1.8 and offset of 32
'gives degrees F.
'The variable is called WTemp.
'Black - excitation channel VX1
'Red - single ended input#6
'Purple - ground
'Clear - ground
'
'
'CS451 transducer connection
'Red - +12V
'White - C1
'Blue - Gnd
'Yellow - Gnd
'Clear - Gnd
'Black - Gnd

'To keep the output file manageable, comment out unrequired sections of the Data Table.


'Declare Variables and Units
Public Batt_Volt_V1,Batt_Volt_V2, Panel_Temp, TempF,I1_Cor_Data_ft
Public Thermo1, Thermo2,
Public Raw_Data, First_Run,Gage_Height, Old_Head, Offset, Head_Change
Public InternalBattery

'Units
'Aquarius
Units Batt_Volt_V1 = YBL.15 minute@Tucker Springs Large Pipe
Units Panel_Temp = degrees C
Units TempF = degrees F
Units Thermo1 = QR.15 minute@Tucker SpringsSamll Pipe
Units Thermo2 = doug
Units InternalBattery = Volts
Units I1_Cor_Data_ft = QR.15 minute@Tucker Springs Large Pipe
Units Batt_Volt_V2 = YBL.15 minute@Tucker Springs Small Pipe

'Constants
'L is the weir length
Const L=8.0


'Data retrieval tables
'Stores data every 15 minutes to file.
  DataTable (Minutes_Data,True,-1)
    DataInterval (0,1,min,10)
    Minimum (1,Batt_Volt_V1,FP2,False,False)
    Average (1,I1_Cor_Data_ft,FP2,False)
    Minimum (1,Batt_Volt_V2,FP2,False,False)
    Average (1,Thermo1,FP2,False)
    Sample (1,TempF,FP2)
    Sample (1,Offset,FP2)
  
  EndTable

'SUBROUTINE SECTION
'All subroutines for the program are located in this section.  The subroutines make it
'easier for deployment as you need only to coment out the "Call Subroutine Name" to keep
'the program from running that portion.

'Subroutine for single transducer
  Sub Transducer_One
    SW12 (1 )
    Delay (0,1,Sec)
    VoltSe (Raw_Data,1,mV2500,1,1,0,250,0.00464,0.06)
    SW12 (0 )
   
     If First_Run = 0 Then
    Gage_Height = Raw_Data
    First_Run = 1
   EndIf
  
   Head_Change = Gage_Height - Old_Head
  
   If Head_Change = 0 Then
     I1_Cor_Data_ft = Raw_Data + Offset
   Else
     Offset = Gage_Height - Raw_Data
     I1_Cor_Data_ft = Raw_Data + Offset
     Old_Head = Gage_Height
   EndIf  
  EndSub

'*******MAIN PROGRAM********
BeginProg
'Scans/runs progrm every 30 seconds.
  Scan (30,sec,2,0)

'Datalogger Battery Voltage measurement, Batt_Volt:
'Datalogger Panel Temperature measurement, Panel_Temp:
    Battery(Batt_Volt_V1)
    Battery(Batt_Volt_V2)
    PanelTemp (Panel_Temp,250)
    TempF=Panel_Temp*1.8+32

 Call Transducer_One
 TCDiff (Thermo1,1,mV2_5C,2,TypeT,Panel_Temp,True,0,250,1.0,0)
 TCDiff (Thermo2,1,mV2_5C,3,TypeT,Panel_Temp,True,0,250,1.0,0)
 
 
'Get internal battery voltage from Status Table
InternalBattery = status.Lithiumbattery

'Call Data Tables and Store Data
  CallTable(Minutes_Data)
 
NextScan
EndProg

_______________________________________________________________________________________________

Here is what the output looks like:

_______________________________________________________________________________________________

"TOA5","21289","CR800","21289","CR800.Std.28.01","CPU:Aquarius_Test.CR8","25081","Minutes_Data"
"TIMESTAMP","RECORD","Batt_Volt_V1_Min","I1_Cor_Data_ft_Avg","Batt_Volt_V2_Min","Thermo1_Avg","TempF","Offset"
"TS","RN","YBL.15 minute@Tucker Springs Large Pip","QR.15 minute@Tucker Springs Large Pipe","YBL.15 minute@Tucker Springs Small Pip","QR.15 minute@Tucker SpringsSamll Pipe","degrees F",""
"","","Min","Avg","Min","Avg","Smp","Smp"
"2016-04-13 12:00:00",475,12.22,0.258,12.23,22.71,74.14,-0.063
"2016-04-13 12:15:00",476,12.22,0.257,12.23,22.66,74.09,-0.063
"2016-04-13 12:30:00",477,12.22,0.257,12.23,22.66,74.03,-0.063
"2016-04-13 12:45:00",478,12.22,0.257,12.23,22.58,73.98,-0.063
"2016-04-13 13:00:00",479,12.22,0.257,12.23,22.58,73.93,-0.063
"2016-04-13 13:15:00",480,12.22,0.257,12.23,22.74,74.03,-0.063
"2016-04-13 13:30:00",481,12.22,0.257,12.23,22.76,74.09,-0.063
"2016-04-13 13:45:00",482,12.22,0.257,12.23,22.68,74.03,-0.063

_______________________________________________________________________________________________

I was wondering if I could somehow get the "YBL.15 minute@Tucker Springs Large Pip", "QR.15 minute@Tucker Springs Large Pipe", "YBL.15 minute@Tucker Springs Small Pip", and "QR.15 minute@Tucker SpringsSamll Pipe" which are currently in the Units Header line to be in their own header line so that they don't override the units?

Any help would be greatly appreciated.

Thanks,

Zach


JDavis Apr 13, 2016 10:34 PM

The FieldNames instructions allow inputting a description, which would be in a different place in the header than unit labels.


zach.ohlinger Apr 13, 2016 10:55 PM

Does that replace:

"TIMESTAMP","RECORD","Batt_Volt_V1_Min","I1_Cor_Data_ft_Avg","Batt_Volt_V2_Min","Thermo1_Avg","TempF","Offset"

with:

"TIMESTAMP","RECORD","YBL.15 minute@Tucker Springs Large Pip","QR.15 minute@Tucker Springs Large Pipe","YBL.15 minute@Tucker Springs Small Pip","QR.15 minute@Tucker SpringsSamll Pipe","TempF","Offset"?

If that's the case then I don't know if that will work either. I'm really looking for a way to add a Header Line that would look something like:

"","","YBL.15 minute@Tucker Springs Large Pip","QR.15 minute@Tucker Springs Large Pipe","YBL.15 minute@Tucker Springs Small Pip","QR.15 minute@Tucker SpringsSamll Pipe","",""

Is that possible?

Log in or register to post/reply in the forum.