hello, is it possible to record CR1000 data only between 8:00 am and 8:00 pm ?
Thanks
Chris
The DataTable instruction has a TrigVar parameter that effectively turns the table on and off. A simple solution would be to use the TimeIsBetween instruction to set the TrigVar parameter.
thanks for your anwer
i try this solution in my program but it doesn't work .... nothing at 10h00am ... what's wrong ?
StationName (05_PH2016_SRS)
SequentialMode
BeginProg
If TimeIsBetween (10,17,24,Hr)Then
Scan (5,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,0,"M!",1.0,0)
SDI12Recorder (DownOut_Pur(),3,0,"M!",1.0,0)
SDI12Recorder (DownOut_Mel(),5,0,"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_Pur = (DownNIR_Pur/UpNIR - DownRed_Pur/UpRed)/(DownNIR_Pur/UpNIR + DownRed_Pur/UpRed)
NDVI_Mel = (DownNIR_Mel/UpNIR - DownRed_Mel/UpRed)/(DownNIR_Mel/UpNIR + DownRed_Mel/UpRed)
'Call Output Tables
CallTable NDVIdata
NextScan
Else
PortSet (9,0)
EndIf
EndProg
thanks
Move your "TimeIsBetween" after Scan. As it sits now, TimeIsBetween is only evaluated once, at compile time, and is never checked again.
Dana W.
I would use the TimeIsBetween in the DataTable instruction in the TrigVar parameter. You do not need an If statement.
Public PTemp, batt_volt
DataTable (Test,TimeIsBetween (10,17,24,Hr),9999) 'Set table size to # of records, or -1 to autoallocate.
DataInterval (0,15,Sec,10)
Minimum (1,batt_volt,FP2,False,False)
Sample (1,PTemp,FP2)
EndTable
'Main Program
BeginProg
Scan (1,Sec,0,0)
PanelTemp (PTemp,250)
Battery (batt_volt)
CallTable Test
NextScan
EndProg
ok Thanks ..