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.

Rain total specific month


Makada Mar 26, 2020 10:57 AM

Hi,

I have a one minute table running 24/7 with weatherdata.

Basically i want to have a total rain from a specific month. 

I know how i can get total from present month, but how can i get for example, the total rain from january from the one minute table in RTMC?

Maybe someone can provide an example?

Thanks in advance .


Makada Mar 26, 2020 04:28 PM

I found this topic, but i cant get it to work...

Ideally i need a start and end time.

To get monthly raintotals for every month seperately in one RTMC screen.

https://www.campbellsci.com/forum?forum=1&l=thread&tid=875


Makada Apr 3, 2020 09:31 PM

Anyone got a solution hopefully😁


Makada Apr 8, 2020 08:20 PM

...there must be a way to get this data i think👍


AMK Apr 8, 2020 08:45 PM

This is similar, but does the reset weekly. I think there is a RESET_MONTHLY too. This only gives you a plot, not a database.  

TotalOverTimeWithReset("Telemetry:logger.table.TB_PRECIP_Tot"*0.01,
Timestamp("Telemetry:logger.table.TB_PRECIP_Tot"*0.01),
RESET_WEEKLY)

See plot example here: 

https://andrewsforest.oregonstate.edu/sites/default/files/lter/data/weather/realtime/plots/primet-precip.png


Makada Apr 9, 2020 05:45 AM

Hi AMK, 

Thanks for your reply. 

Thats looking great .

I thought theres a a function in RTMC records back.

I cant imagine theres no function in RTMC to have a total or min max between a start date and end date.

Ive seen your website and data graphs,  which are awesome and i can learn from them.

Do you mind asking you the total crbasic code, so i can implement some of your code in mine?


Makada Apr 24, 2020 09:06 PM

Anyone got a solution hopefully


JDavis Apr 24, 2020 11:09 PM

It is easiest if you add a monthly table into the datalogger program.

There is no direct way to do it in RTMC.


Makada Jun 10, 2022 09:40 AM

 

iif(TotalOverTimeWithReset("Database:CR1000_Table1.SunHrs_Tot",Timestamp("Database:CR1000_Table1.SunHrs_Tot"),RESET_CUSTOM,

ToInt(FormatTime(Timestamp("Database:CR1000_Table1.SunHrs_Tot"), $"%m%d%H%M")) = 06070000)
-
TotalOverTimeWithReset("Database:CR1000_Table1.SunHrs_Tot",Timestamp("Database:CR1000_Table1.SunHrs_Tot"),RESET_CUSTOM,

ToInt(FormatTime(Timestamp("Database:CR1000_Table1.SunHrs_Tot"), $"%m%d%H%M")) = 06080000),<0,
TotalOverTimeWithReset("Database:CR1000_Table1.SunHrs_Tot",Timestamp("Database:CR1000_Table1.SunHrs_Tot"),RESET_CUSTOM,

ToInt(FormatTime(Timestamp("Database:CR1000_Table1.SunHrs_Tot"), $"%m%d%H%M")) = 06080000),TotalOverTimeWithReset("Database:CR1000_Table1.SunHrs_Tot",Timestamp("Database:CR1000_Table1.SunHrs_Tot"),RESET_CUSTOM,

ToInt(FormatTime(Timestamp("Database:CR1000_Table1.SunHrs_Tot"), $"%m%d%H%M")) = 06070000)
-
TotalOverTimeWithReset("Database:CR1000_Table1.SunHrs_Tot",Timestamp("Database:CR1000_Table1.SunHrs_Tot"),RESET_CUSTOM,

ToInt(FormatTime(Timestamp("Database:CR1000_Table1.SunHrs_Tot"), $"%m%d%H%M")) = 06080000))

 

Finally got some code to have specific total for specific day in RTMC.

In this case sunhours total for the 7th of June 2022.

Can be adjusted to show specific month too, me thinks.

Downside: it is using some system resources to get data in the datafield.

Maybe someone is able to simplify the code a bit?

With the kindest regards,

Mark

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