Appendix B. Example Programs
B-3
CRBasic Example B-3. CR200(X) Program Measuring the 03002
'CR200/CR200X Series
'Declare Variables and Units
Public
BattV
Public
WS_ms
Public
WindDir
Units
BattV=Volts
Units
WS_ms=meters/second
Units
WindDir=degrees
'Define Data Tables
DataTable
(Hour,True,-1)
DataInterval
(0,60,Min)
WindVector
(WS_ms,WindDir,False,0,0)
FieldNames
("WS_ms_S_WVT,WindDir_D1_WVT,WindDir_SD1_WVT")
EndTable
'Main Program
BeginProg
'Main Scan
Scan
(5,Sec)
'Default Datalogger Battery Voltage measurement 'BattV'
Battery
(BattV)
'03002 Wind Speed & Direction Sensor measurements 'WS_ms' and 'WindDir'
'WS_ms
PulseCount
(WS_ms,P_LL,1,1,0.75,0.2)
If
WS_ms<0.21
Then
WS_ms=0
'WindDir
ExDelSE
(WindDir,1,1,1,mV2500,20000,0.1408,0)
If
WindDir>=360
OR
WindDir<0
Then
WindDir=0
'Call Data Tables and Store Data
CallTable
Hour
NextScan
EndProg
Содержание 03002
Страница 2: ......
Страница 3: ......
Страница 7: ......
Страница 27: ......
Страница 31: ...Appendix B Example Programs B 4 ...
Страница 35: ...Appendix C Wind Direction Sensor Orientation C 4 ...
Страница 37: ......
Страница 38: ......