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.

RTMC Pro expression windgust direction

Makada Aug 22, 2018 12:57 PM


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.

Makada Aug 26, 2018 02:06 AM


Is it possible someone can point me in the right direction please?

Thanks in advance. 

Makada Aug 30, 2018 11:22 AM

...there must be a way to get this working...

Makada Sep 7, 2018 05:12 AM

Please someone can shine a light on it? 😁

Makada Sep 29, 2018 02:26 AM

Hi, still struggling with it.

i honestly havent got a clue how to solve this...:(

CBO Oct 2, 2018 12:21 PM

Hi Makada, I do not fully understand your question, you can add me to the chat to see if I can help you.


Makada Oct 3, 2018 02:31 AM

Hi CBO, 

I dont onderstand, you can reply here.....

Makada Oct 3, 2018 02:31 AM

Hi CBO, 

I dont onderstand, you can reply here.....

nsw Oct 12, 2018 08:39 AM

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.

Makada Oct 13, 2018 10:08 AM

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.

Makada Mar 26, 2019 06:34 AM


Im still searching for this instruction. 

With kind regards.

Makada Mar 26, 2019 09:46 AM

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)

Makada Mar 26, 2019 02:14 PM


Maybe Andrew or Smile can help me with this?

You have helped me out in the past 😁

Makada Mar 29, 2019 08:40 AM


Any solution for this please?

Makada Apr 2, 2019 02:10 PM


Any solution for this please?

Vim Apr 3, 2019 12:58 AM

Have you tried something along the lines...

StartRelativeToNewest(nsecPerHour, OrderCollected); MaxRunOverTime("Server:CR1000.TableMinute.Windskm_Max",Timestamp("Server:CR1000.TableMinute.Windskm_Max"),nSecPerHour)

Makada Apr 3, 2019 07:48 AM

Hi Vim, 

Your example doesnt result the winddirection from max windskm .

Vim Apr 3, 2019 09:28 AM

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"?

Makada Apr 3, 2019 10:42 AM

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.

Vim Apr 4, 2019 01:15 AM


StartRelativeToNewest(nsecPerHour, OrderCollected); MaxRunOverTime("Server:CR1000.TableMinute.Windr_SMM",Timestamp("Server:CR1000.TableMinute.Windr_SMM"),nSecPerHour)

Makada Apr 4, 2019 02:40 AM


Ive tried that already. 

That gives the maximum winddirection in degrees...

Makada Apr 7, 2019 03:57 AM


Any solution for this please?

Makada Apr 14, 2019 05:32 AM


Any solution for this please?

Makada Jun 12, 2019 03:33 PM

Anyone please?

Makada Jun 29, 2019 02:35 AM

Anyone please:)

JDavis Jul 1, 2019 03:17 PM

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.

Makada Jul 2, 2019 10:04 AM

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"


Terri Jul 5, 2019 12:52 PM

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)

Makada Jul 5, 2019 01:41 PM


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...

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