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.

pulsecount not measuring


Steve Mar 7, 2012 05:10 PM

Hello,
I am having issues with CR10x and CR1000 loggers measuring a switch closure on the pulse ports.
The sensor is outputting counts according to the proper calibration, holding the 5v low for .5sec and generating no more than 1 pulse per second. Scan rate is 10 and 60 sec on two CR1000 and 5 sec on the 10x. The input location is capturing none to a quarter of the pulses.
Program checks out.
When directly connected and watching the input or public location during tests, a pulse value (0.254) fleetingly appears in the numeric data display but returns to zero and the running cumulative location does not increment accordingly.
Any thoughts or anyone have this issue before?


aps Mar 7, 2012 06:09 PM

If the pulse count instruction is measuring OK, i.e. you are seeing the destination value change, but the totalisation is not totalising then you have a program problem.

Please post the program.


Steve Mar 7, 2012 06:55 PM

Sorry Andrew, I wish it were that simple. The program has checked out.
When I say the value fleetingly appears, it only appears in the public table data when directly connected and monitoring the data table real time, doesn't stick around. It's like the instruction is clearing the buffer faster than it can process the measurement. Most of the time, it doesn't even show the value. The sensor is putting out the count measurement, the logger is not catching it. Below is the program

Public StationID
Public Lat_deg
Public Lat_min
Public Long_deg
Public Long_min
Public flag8 As Boolean
Public BatVolts
Public Intrnl_T
Public mmH2O
Public mmH2O_24h
Public ETI_max
Public H2O_storm
Public H2D_WE_mm

DataTable(Table1,true,-1)
OpenInterval
DataInterval(0,1,min,10)
Sample(1,mmH2O, FP2)
Sample(1,H2D_WE_mm, FP2)
Sample(1,mmH2O_24h, FP2)
Sample(1,ETI_max,FP2)
Totalize(1,mmH2O,FP2,0)
Minimum(1,BatVolts, FP2, 0, False)
Sample(1,Intrnl_T,fp2)
EndTable

DataTable(Table5,true,-1)
OpenInterval
DataInterval(0,5,Min,10)
Sample(1,mmH2O, FP2)
Sample(1,H2D_WE_mm, FP2)
Sample(1,mmH2O_24h, FP2)
Sample(1,ETI_max,FP2)
Totalize(1,mmH2O,FP2,0)
Minimum(1,BatVolts, FP2, 0, False)
Sample(1,Intrnl_T,fp2)

EndTable
Sub Subroutine3
'load fixed variables at startup
'set station id
StationID = 427
'set station geographical location
Lat_deg = 49
Lat_min = 76
Long_deg = -114
Long_min = 83
PortSet(8,1)
EndSub

BeginProg
'LOAD FIXED VARIABLES AT STARTUP
If CheckPort(8) = False Then
Call Subroutine3
EndIf
Scan(5,Sec, 3, 0)
'measure ETI in mm per tip/switch closure
PulseCount(mmH2O,1, 1, 2, 0, 1, 0)
'add to the 1 minute accumulation
H2O_storm = H2O_storm + mmH2O
'add to Twice Daily water equivalent running total
H2D_WE_mm = H2D_WE_mm + mmH2O
'add to 24 hour water equivalent running total
mmH2O_24h = mmH2O_24h + mmH2O
'check against gauge max of 762 mm
ETI_max = ETI_max + mmH2O
'other measurements
PanelTemp(Intrnl_T, 250)
Battery(BatVolts)
CallTable Table1
CallTable Table5
NextScan
EndProg


Grant Mar 7, 2012 09:42 PM

Steve

If you are connected to the logger and watching the public table, you will only see the value at each scan period, in your case every 5 seconds.

What the loggers public table does is show the value for that variable (pulse counts * multiplier) every scan.

If you look at the other tables, Table1 and Table5, you will see the values of what has being recorded in those tables.

Cheers

Grant


aps Mar 8, 2012 11:47 AM

That program should work in as far as it goes, as it needs more code to calculate ET etc. I would expect you to see mmH2O hold a value of 1 (not 0.254) for the scan after the one in which the tip occured. It will be reset to zero on the next scan after that. The totalized values in the storage tables should hold the 1 and 5 min totals respectively of tips in the preceeding 1 and 5 min periods repectively.

What you would not likely see is the sample value to mmH2O to hold anything other than zero, unless a tip happened in the in scan just before the table stores data. Storing the sampled value seems pointless for that reason.

For the public totalised variables there is no code in the program to reset these to zero, so they should just carry on incrementing forever with the program as it stands.

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