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?
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.
'Created by Short Cut (4.0)
'Declare Variables and Units
Public scan_now As Boolean
Units PTemp_C=Deg C
Units AirTC=Deg C
'Define Data Tables
If IfTime (0,15,min) Then scan_now=true
If scan_now=true Then
'Default CR6 Datalogger Battery Voltage measurement 'BattV'
'Default CR6 Datalogger Wiring Panel Temperature measurement 'PTemp_C'
'HMP155 (constant power) Temperature & Relative Humidity Sensor measurements 'AirTC' and 'RH'
If RH>100 And RH<108 Then RH=100
'CS300 Pyranometer measurements 'SlrMJ' and 'SlrkW'
If SlrkW<0 Then SlrkW=0
'Call Data Tables and Store Data