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.

about pulsecount


cafeilde Sep 16, 2010 02:16 PM

Hi everybody!
I enconter a question about TE525MM.
I used CR1000 to measure TE525MM for rain in the main scan interval of one minute.
But when in the rainy day, the total_rain in the 30 min interval table equal to zero.
Who can tell me why?
HOPE FOR YOUR REPLY!

the program likes this bellow!

DataTable (MIN_30,1,100)
DataInterval (0,30,min,10)
CardOut (0,2560)
Minimum (1,batt_volt,FP2,0,False)
Sample (1,panel_temp,FP2)
Totalize (1,Rain,FP2,False)
EndTable
BeginProg
Scan (60,Sec,3,0)
'for te525mm use multiplier of 0.1 in PulseCount Instrction.
PulseCount(Rain,1,2,2,0,0.1,0)
CallTable MIN_30
NextScan
EndProg


JDavis Sep 16, 2010 03:32 PM

I don't see anything wrong in the program.

Have you tried pouring water into the raingage to see if the Rain variable in the Public(realtime) Table changes from 0?


Grant Sep 17, 2010 11:22 AM

cafeilde

Is the code you supplied above exactly like in the program?

We had a recent issue where the raingauge pulses could be seen in the public table, but would not log (yes we tried it on different loggers with different OS)

What was changed to get it to work was some extra spaces in the code.
eg in the above example PulseCount(Rain,1,2,2,0,0.1,0) had a space after the pulse channel, so looked like PulseCount(Rain,1,2 ,2,0,0.1,0). We are not sure why as logic would say that if the pulsecount code was wrong, we should not see it in the public table.

We took out the spaces and it worked.

Go figure!


cafeilde Sep 17, 2010 03:14 PM

The program above is only a part of the original program!

I don't think it's a 'space' quention. Because, in my program, there isn't a space in the Pulsecount order.

It works in SequentialMode and runs slowly.
Could you give me some advice to improve my program?

the original program is (From tables to main program ):
'*** Final Output Data Tables ***

DataTable (MIN_30,1,100)
DataInterval (0,30,min,10)
CardOut (0,2560)
Minimum (1,batt_volt,FP2,0,False)
Sample (1,panel_temp,FP2)
WindVector (1,WS,WindDir,FP2,False,0,0,0)
FieldNames ("WS_S_WVT,WindDir_D1_WVT,WindDir_SD1_WVT")
Sample (1,P,IEEE4)
Totalize (1,Rain,FP2,False)
EndTable

DataTable (road1,True,100)
CardOut (0,76800)
Sample (4,B(1),FP2)
EndTable

DataTable (road2,True,100)
CardOut (0,76800)
Sample (6,C(1),FP2)
EndTable

DataTable (PWS100,True,100)
CardOut (0,76800)
Sample (16,PWS100data(),IEEE4)
Sample (2,PWS100code(3),String)
EndTable

'*** Program ***
BeginProg
'Open Serial Port to the PWS100
SerialOpen (Com3,115200,3,0,10000)
'Commands can be included here to setup the
'sensor if it has not been preconfigured
Scan (60,Sec,3,0)
'Datalogger panel temperature
PanelTemp (panel_temp,250)
'Measure battery voltage
Battery (batt_volt)

'034A/034B Wind Speed & Direction Sensor measurements WS_ms and WindDir:
PulseCount(WS,1,1,2,1,0.799,0.2811)
If WS=0.2811 Then WS=0
BrHalf(WindDir,1,mV2500,1,1,1,2500,True,0,_50Hz,712.0,0) 'range 5000 mV 'excitation for the CR3000 and CR5000 dataloggers
If WindDir>=360 Then WindDir=0

'cs106 measurement pressure
'Measurement is made every scan outside the "If" statement
VoltSe (CS106_temp,1,mV2500,2,False,0,_50Hz,0.240,500)
'Turn on CS106 one minute before the hour
If (IfTime (29,30,min)) Then WriteIO (&b10000000,&b10000000)
'Copy the correct value to a current variable called "P" at the top of the hour
'Turn off CS106 after the measurement
If (IfTime (0,30,min)) Then
P = CS106_temp
WriteIO (&b10000000,&b0)
EndIf

'for te525mm use multiplier of 0.1 in PulseCount Instrction.
PulseCount(Rain,1,2,2,0,0.1,0)


'cc640 gets jpg format pictures
If IfTime (0,10,Min) Then
PulsePort (7,1000)
EndIf

'pws100
'Poll for message 0 from the PWS100 using msend
'In this case getting a message for the last 60 s of data
'First flush the buffer
SerialFlush (Com3)
SerialOut (Com3,"msend 0 60 0" & CR,"",0,0)
'Read in the data waiting for up to two seconds
'for the response
SerialIn (InString,Com3,200,LF,2000)
'If we received something parse the data and store
If Len(InString)>0 Then
SplitStr (PWS100data(),InString," ",16,0)
SplitStr (PWS100code(),InString," ",4,4)
CallTable PWS100
EndIf
'************************************************
'IRS_21
If IfTime (0,2,Min) Then
SW12(1)
Delay (0,2,Sec)
SerialOpen (32,19200,48,100,10000)
SerialFlush (32)
SerialOut (32,"&A" & CR & LF,"",0,0)
SerialIn (returnedstring,32,100,CR & LF,100)
SerialClose (32)
SW12(0)
EndIf

SplitStr (A(),returnedstring," ",2,1)
If Len(A(2))>0 Then
SplitStr (B(),returnedstring," ",4,0)
SurTmp0=(SurTmp0*.1)-50
SurWatDp0=((1560)-(16.55*SurWatDp0)+(.041*SurWatDp0^2))/1000
CallTable road1
Else
SplitStr(C(),returnedstring," ",6,0)
SurTmp=(SurTmp*.1)-50
SurSal=(SurSal*.1)
SurFrePn=(SurFrePn*.1)*-1
SurWatDp=((1560)-(16.55*SurWatDp)+(.041*SurWatDp^2))/1000
CallTable road2
EndIf

'**********************************************************

'Call Data Tables and Store Data
CallTable MIN_30

NextScan


EndProg


Steve Mar 7, 2012 05:12 PM

Hello,
What was the outcome here? Did you solve your issue? I'm having a similar one.


Grant Mar 7, 2012 09:30 PM

Steve

Not sure what the outcome was with the original issue.

A bit more info on yours may help though.

Is it a new installation or an existing one?

If new, a check of the wiring and a snippet of code pasted here will start

If existing, check your cable for chews or breaks, use a piece of wire to short between the ground terminal and the pulse port used to simulate switch closures and see if the logger is at fault or the wiring.

Cheers

Grant

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