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.

How to retrieve WindVector data


James Sep 28, 2010 09:21 AM

Hallo to all,

I use the following Data Table to save the average windspeed and direction of the day. How do I retrieve the windspeed and direction data in my program to make some calculations ?


DataTable(Kennedy,True,-1)
DataInterval(0,1440,min)
Average (1,Radiation,False)
WindVector (WS_ms,WindDir,False,0,1)
Totalize (1,Rain_mm,False)
EndTable


Sincerely
James James Kennedy


jra Sep 28, 2010 08:28 PM

Hi James,

It looks like you're using a CR200. In the CRBasic Editor Help, go to the index and type: datatable access. Take a look at the tablename.fieldname syntax. That will copy data from a stored data table to a public variable.

In your program you'll need two new variables, I called them day_ws and day_wd. In the body of your program use this:
day_ws = Kennedy.ws_ms_WVc(1,1)
day_wd = Kennedy.ws_ms_WVc(2,1)

You can see the program's fieldnames by using the CRBasic editor Tools menu, Show Labels.

If you were using a CR800 series, CR1000 or CR3000 you could use the GetRecord instruction.

I hope I understood your question correctly. Let us know if you have other questions.

Regards,
Janet


James Sep 29, 2010 03:23 PM

Thanks. It was exactly what I was looking for.

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