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.

Show adress in datable collect


quiqueapolo Apr 17, 2017 09:53 AM

Hi:

I want to show sensor adress in Datatable to know what sensor gime information. How could I do?

This is my code.

'CR1000 Series Datalogger

'date: 10/1/13
'program author: Chris Chambers
'Program to read 1 set of Decagon SRS-NDVI (1 up and 1 down-facing) on a CR1000. This program gives the output for NDVI, but PRI probes can be substitued for
'NDVI sensors and the PRI will be calculated properly. Two more sensors can be added to the same CR1000 in ports C5 and C7. More sensors on one logger
'will require multiplexing or SDI-12 sensors on a common dataline.

'Wiring:
'Upward-facing, hemispherical SRS-NDVI
'White wire (power) -> SW12V
'Red wire (data) -> C1
'Bare wire (ground) -> G

'Downward-facing, 20 degree field-stop SRS-NDVI
'White wire (power) -> SW12V
'Red wire (data) -> C3
'Bare wire (ground) -> G

'Declare Public Variables
'Example:
Public PTemp, batt_volt

'Declare Other Variables
'Example:
'Dim Counter

'Declare Constants
'Example:
'CONST PI = 3.141592654

Public UpOut(3)
Public DownOut(3)

'Public PRI
Public NDVI

Alias UpOut(1) = UpRed
Alias DownOut(1) = DownRed
Alias UpOut(2) = UpNIR
Alias DownOut(2) = DownNIR

Alias UpOut(3) = Ind1
Alias DownOut(3) = Ind2

Units UpRed = W/m^2 nm
Units DownRed = W/m^2 nm sr
Units UpNIR = W/m^2 nm
Units DownNIR = W/m^2 nm sr

'Define Data Tables
DataTable (NDVIdata,1,-1)
'Se establece tiempo cada cuanto se almacenan los datos
DataInterval (0,1,Min,1)
Minimum (1,batt_volt,FP2,0,False)
Sample (1,PTemp,FP2)
'save NDVI data
Sample (1,NDVI,FP2) 'Sample (1,PRI,FP2)
'save raw data outputs
'Sample (1,DownNIR,FP2)
'Sample (1,UpNIR,FP2)
'Sample (1,DownRed,FP2)
'Sample (1,UpRed,FP2)
'Sample (1,Ind1,FP2)
'Sample (1,Ind2,FP2)

EndTable

'Define Subroutines
'Sub
'EnterSub instructions here
'EndSub

'Main Program
SequentialMode
BeginProg
'Aqui se establece el tiempo de escaneo, es decir, cada cuanto tiempo el sensor lee
Scan (2,Sec,0,0)
PanelTemp (PTemp,250)
Battery (batt_volt)

'Apply power to white wire of both sensors through SW-12
PortSet (9,1)
'Delay for at least 250 mSec for sensors to enter SDI-12 mode.
Delay (0,1,Sec)
'Query sensor for 3 SDI-12 outputs. Default address for all Decagon Digital sensors is 0.
SDI12Recorder (UpOut(),1,9,"M!",1.0,0)
SDI12Recorder (DownOut(),1,7,"M!",1.0,0)
'Turn SW12V off
PortSet (9,0)
'calculate NDVI from individual outputs of both sensors. See equation 1 of the SRS manual
NDVI = (DownNIR/UpNIR - DownRed/UpRed)/(DownNIR/UpNIR + DownRed/UpRed)
'Enter other measurement instructions

'Call Output Tables
CallTable NDVIdata
NextScan
EndProg

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