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.

Data TimeStamp jumping by ~1 year per second


tonynf89 May 18, 2021 10:36 AM

CR5000, RS-232 comm, LoggerNet 2.1.0.15

I am just starting to learn the CR5000. Just trying to create a simple program to read the panel temperature and store it to a data table. For some reason whenever I collect data the timestamp jumps to some crazy year and time. When I watch the real time graphical data display, it shows the timestamp jumping approximate 194 day, 4 hours, 20 minutes, and 16 seconds per refresh. This is where I assume I am collecting crazy timestamps on my data.  The timestamp (station clock) does not jump around like this. 

Here is my example program;

'CR5000


'Variables to be used in the Program
Public PanelT, TempData

'DataTable Definitions
'Create a data table named TempData that holds 1000 records
DataTable (TempData,1,1000)
'Set data storage interval to 1 minute
DataInterval (0,1,Min,10)
'Sample the Panel T
Sample (1,PanelT,FP2)

EndTable

'Main Program
BeginProg
'Set program scan interval to 1 second
Scan (1,Sec,3,0)
'Measure Panel Temperature; store result in variable PanelT
PanelTemp (PanelT,250)
'Call the datatable
CallTable TempData
'Return to top of program; program executed at next scan interval
NextScan
EndProg


Nico May 19, 2021 07:57 PM

 

Public PanelT, TempData

DataTable (TempData,1,1000)
  DataInterval (0,1,Min,10)
  Sample (1,PanelT,FP2)
EndTable

BeginProg
  Scan (1,Sec,3,0)
    PanelTemp (PanelT,250)
    CallTable TempData
  NextScan
EndProg

 You don't use variables as Table names.

Also, if you have your main scan run at 1Hz and your table logs a sample every minute only your main loop is doing a lot of nothing ;-)

Try this to get a feel for it..

Public PanelT
Units PanelT = degC DataTable (TempData,1,1000) DataInterval (0,1,Min,10)
Sample (1,PanelT,IEEE4) Average (1,PanelT,IEEE4,False) Maximum (1,PanelT,IEEE4,False,False) Minimum (1,PanelT,IEEE4,False,False) EndTable BeginProg Scan (1,Sec,3,0) PanelTemp (PanelT,250) CallTable TempData NextScan EndProg

Pls let us know if that solved your problem. My compiler here didn't complain about using a varible as a table name.. so this might be a bug in CRbasic.

Also, can you check the 'Station Status' in 'Connect Screen' and tell us if there are any errors/warnings being reported?


tonynf89 May 20, 2021 06:41 AM

Thanks for the reply Nico,

Between the time I made this post and before you replied I checked the status and found the lithium battery for the SRAM/clock had failed (it was installed in 2006) so I have a new one on order. A funny thing is happening though; the manual says I should be able to operate this station without the battery when plugged in but the screen on the station just goes fully black when I turn it on (I even installed new lead-acid batteries at the same time). I also get no communication when trying to talk to it with loggernet. When I get the new battery in a few days I will come back with a further update. I just added this post now incase this black screen response was something someone may be familiar with.

Thanks again  


tonynf89 May 20, 2021 01:12 PM

Hi,

I received the battery and installed and tried your program, but still having the same timestamp issue,

I checked the status table and I am seeing these values which may be concerning;

Revboard : -1

LithiumBattery : -1 (despite putting in a brand new battery and confirming voltage)

If there are other specific values that I should be looking out for please let me know


Nico May 21, 2021 05:56 AM

You should be able to connect to the station via RS232 and DeviceConfigUtility though.. no matter the display.

Display fully black might be a contrast setting having run into it's upper limits, but I don't know. The largest loggers I work with are CR3000s.

The first thing you should do (unless you got data/code on the logger you need) is to upgrade/reset the firmware to start with a blank sheet..
For the smaller systems you prime DCU by putting it into firmware upgrade mode + connect RS232 and then just switch on the logger.. after that it's all factory reset and should work (solving your LCD issue I hope).


JDavis May 21, 2021 02:16 PM

I agree with the recommendation to try sending the last OS revision to your CR5000. When a lithium battery is super low, it can cause memory corruption. Sending the OS should clear out the corruption.

https://www.campbellsci.com/cr5000

The Loggernet version you showed in your title is really old. You can download PC400 for free. It lacks some features that Loggernet has, but is up to date.

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