Hi,
I would like to know how i can get the gust direction form the last 10 and/or 60 minutes form a one minute table in the form of a rtmc expression.
The datatable is: "Server:CR1000.TableMinute.Windskm_Max"
With kind regards.
Hi,
Is it possible someone can point me in the right direction please?
Thanks in advance.
...there must be a way to get this working...
Please someone can shine a light on it? 😁
Hi, still struggling with it.
i honestly havent got a clue how to solve this...:(
Hi Makada, I do not fully understand your question, you can add me to the chat to see if I can help you.
http://t.me/cranbelo
Hi CBO,
I dont onderstand, you can reply here.....
Hi CBO,
I dont onderstand, you can reply here.....
Hello Makada, I am not sure I completely understand your request here. However, perhaps if you look at it from the datalogger side, there is an output instruction which may get you what you want.
Look in CRBasic Help for the "SampleMaxMin" instruction. This instruction follows a "Maximum" or "Minimum" instruction in the output table. See the CRBasic Help > Example program for where it should be used.
This may help you get the value you are looking for.
Hi NSW,
Thanks for your reply.
Yes i know how to do it in crbasic, but i want to do it in rtmc pro.
With kind regards.
Hi,
Im still searching for this instruction.
With kind regards.
I came up with this, but unfortunately that didnt work:(
It came up with a value, but from the gustdirection from the minute table ("Server:CR1000.TableMinute.Windr_SMM")
which change that value every minute. Not from the maxrun gust...
IIF(Maxrun("Server:CR1000.TableMinute.Windskm_Max")>"Server:CR1000.TableMinute.Windskm_Max", "Server:CR1000.TableMinute.Windr_SMM", 0)
Hi,
Maybe Andrew or Smile can help me with this?
You have helped me out in the past 😁
Hi,
Any solution for this please?
Hi,
Any solution for this please?
Have you tried something along the lines...
StartRelativeToNewest(nsecPerHour, OrderCollected); MaxRunOverTime("Server:CR1000.TableMinute.Windskm_Max",Timestamp("Server:CR1000.TableMinute.Windskm_Max"),nSecPerHour)
Hi Vim,
Your example doesnt result the winddirection from max windskm .
What did it result in when you tried it and what is the difference between...
"Server:CR1000.TableMinute.Windr_SMM" and "Server:CR1000.TableMinute.Windskm_Max"?
The difference is as follow:
"Windskm_Max" is the maximum windspeed.
"Windr_SMM" is the direction from maximum windspeed.
Your example just result in the maximum windspeed.
Try...
StartRelativeToNewest(nsecPerHour, OrderCollected); MaxRunOverTime("Server:CR1000.TableMinute.Windr_SMM",Timestamp("Server:CR1000.TableMinute.Windr_SMM"),nSecPerHour)
Hi,
Ive tried that already.
That gives the maximum winddirection in degrees...
Hi,
Any solution for this please?
Hi,
Any solution for this please?
Anyone please?
Anyone please:)
What makes it difficult in RTMC is there is not a Find function.
You have already worked out how to calculate the maximum gust. The next step is to then find the timestamp of a gust that is equal to that value. The only way I can think to do it in an RTMC expression is with a lot of IIF functions.
Once you have the timestamp, you can use the ValueAtTime expression to read the direction out of the table.
Hi JDavis, thanks for your reply.
I tried the function below but that didnt work...
The gust winddirection is in: "Database:CR1000_Table1.WindDir_SMM"
The gust windspeed is in: "Database:CR1000_Table1.WS_kph_3s_Max"
ValueAtTime("Database:CR1000_Table1.WindDir_SMM",Timestamp(MaxRun("Database:CR1000_Table1.WS_kph_3s_Max")))
This is from one of the engineers:
Can you add to your program?
The SampleMaxMin instruction is used to sample one or more variable(s) when another variable (or range of variables) reaches its maximum or minimum for the defined output period. A common use-case for this instruction is to output the wind direction at the time the maximum or minimum wind speed is recorded.
DataTable (HOUR,1,720)
Maximum (1, Windskm, FP2, 0, True)
SampleMaxMin(1, Wind_Deg, FP2,0)
EndTable
Hi,
Thanks for your answer.
Yes i have the samplemaxmin in my program.
And i have the timestamp from the max gust.
But i cant get the valueattime to find the gustdirection in the table to work which JDavis suggested, see my previous post.
I want to have the gust direction calculated in rtmc.
I have a report range in my rtmc pro screen in which i can change the timespan.
I have all the data shown fine when i change the timespan from hour to week to month to year, but the only data i cant show in those timeframes is the gustdirection...
Another customer pointed me to this forum post since they were wanting to do the same thing.
The solution is to use the ValueAtTime() function where the item being returned is the wind direction, but the third parameter (interval) is where the magic happens. The interval needs to be the difference in time between the most recent record's timestamp and the timestamp of the max wind as found by the MaxRunOverTime() instruction as follows. If I wanted to find the max wind direction for a day, then the formula is:
StartRelativeToNewest(nsecPerDay, OrderCollected); ValueAtTime( "WD_Source", Timestamp("WD_Source"), Timestamp("WD_Source") - Timestamp( MaxRunOverTime( "WS_Source", Timestamp("WS_Source"), nsecPerDay ) ), "$invalid" )