Short: I want to use a boolean variable to act as a toggle to force a scan while i am logged in. Is this possible?
Long: I am developing a installation of sensors with a CR6 in a remote location , within the main parameter of highly reduced power use (long term deployment, limited power source). i cannot change these settings
Im writing to the table every 15 minutes, which works but not when out in the field trouble shooting. when i need new data immediately.
i want to use a boolean variable to act as a toggle to force a scan. is this possible?
for example something along the lines of IF 'toggle' = true then 'scan' EndIf,
Unfortunately this is not working as 'scan is not a known command'
Do you have advice around this?
thanks
Jackson
Hi,
probably seeing your program will help you better.
However I would do so.
If the main table now runs every 15 minutes I would do it faster depending on your need, for example 10 sec.
so it will be enough to make run_now "true" to do an extemporaneous scan without waiting for the 15th minute. We only need to pay attention to the processing of historical data if for example totals are calculated.
'CR6 Series
'Created by Short Cut (4.0)
'Declare Variables and Units
Public BattV
Public PTemp_C
Public AirTC
Public RH
Public SlrkW
Public scan_now As Boolean
Units BattV=Volts
Units PTemp_C=Deg C
Units AirTC=Deg C
Units RH=%
Units SlrkW=kW/m^2
'Define Data Tables
DataTable(Table60,True,-1)
DataInterval(0,60,Min,10)
Sample(1,AirTC,FP2)
Sample(1,RH,FP2)
Average(1,SlrkW,FP2,False)
Sample(1,BattV,FP2)
Sample(1,PTemp_C,FP2)
EndTable
'Main Program
BeginProg
'Main Scan
Scan(10,Sec,1,0)
If IfTime (0,15,min) Then scan_now=true
If scan_now=true Then
'Default CR6 Datalogger Battery Voltage measurement 'BattV'
Battery(BattV)
'Default CR6 Datalogger Wiring Panel Temperature measurement 'PTemp_C'
PanelTemp(PTemp_C,50)
'HMP155 (constant power) Temperature & Relative Humidity Sensor measurements 'AirTC' and 'RH'
VoltSE(AirTC,1,mV1000,U1,False,0,50,0.14,-80)
VoltSE(RH,1,mV1000,U2,False,0,50,0.1,0)
If RH>100 And RH<108 Then RH=100
'CS300 Pyranometer measurements 'SlrMJ' and 'SlrkW'
VoltSE(SlrkW,1,mV1000,U3,True,0,50,1,0)
If SlrkW<0 Then SlrkW=0
scan_now=false
EndIf
'Call Data Tables and Store Data
CallTable Table60
NextScan
EndProg