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
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
Thanks. It was exactly what I was looking for.