15 pulsecountreset instruction – Campbell Scientific CR3000 Micrologger User Manual
Page 246

Section 7. Installation
246
'Data Tables
'Table output on two intervals depending on condition.
'note the parenthesis around the TriggerVariable AND statements
'Status table datafilldays field is low
DataTable
(TwoInt,(int_fast
AND
TimeIntoInterval
(0,5,Sec))
OR
(int_slow
AND
_
TimeIntoInterval
(0,15,sec)),-1)
Minimum
(1,batt_volt,FP2,0,False)
Sample
(1,PTemp,FP2)
Maximum
(1,counter(1),Long,False,False)
Minimum
(1,counter(1),Long,False,False)
Maximum
(1,deltaT,FP2,False,False)
Minimum
(1,deltaT,FP2,False,False)
Average
(1,deltaT,IEEE4,false)
EndTable
'Main Program
BeginProg
Scan
(1,Sec,0,0)
PanelTemp
(PTemp,250)
Battery
(Batt_volt)
counter(1) = counter(1) + 1
'thermocouple measurement
TCDiff
(AirTempC,1,mV20C,1,TypeT,PTemp,True ,0,250,1.0,0)
'calculate the difference in air temperature and panel temperature
deltaT = airtempC - PTemp
'when the difference in air temperatures is >=3 turn LED on
'and trigger the data table's faster interval
If
deltaT >= 3
Then
PortSet
(4,true)
int_fast = true
int_slow = false
Else
PortSet
(4,false)
int_fast = false
int_slow = true
EndIf
'Call Output Tables
CallTable
TwoInt
NextScan
EndProg
7.8.15 PulseCountReset Instruction
PulseCountReset is used in rare instances to force the reset or zeroing of CR3000
pulse accumulators (see Measurement Inputs
(p. 60)
).
PulseCountReset is needed in applications wherein two separate PulseCount()
instructions in separate scans use the same pulse-input channel. While the
compiler does not allow multiple PulseCount() instructions in the same scan to
use the same channel, multiple scans using the same channel are allowed.
PulseCount() information is not maintained globally, but for each individual
instruction occurrence. So, if a program needs to alternate between fast and slow