Appendix B. Example Programs
B-3
B.3 CR200(X) Example Program
CRBasic Example B-3. CR200(X) Example Program
'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)
'05103 Wind Speed & Direction Sensor measurements 'WS_ms' and 'WindDir'
'WS_ms
PulseCount
(WS_ms,P_LL,1,1,0.098,0)
'WindDir
ExDelSE
(WindDir,1,1,1,mV2500,20000,0.142,0)
If
WindDir>=360 Or WindDir<0
Then
WindDir=0
'Call Data Tables and Store Data
CallTable
Hour
NextScan
EndProg
Summary of Contents for Wind Monitor Series
Page 2: ......
Page 6: ......
Page 24: ...Wind Monitor Series 16...
Page 26: ...Appendix A Importing Short Cut Code Into CRBasic Editor A 2...
Page 30: ...Appendix B Example Programs B 4...
Page 34: ...Appendix C Wind Direction Sensor Orientation C 4...
Page 36: ...Appendix D Wind Direction Measurement Theory D 2...
Page 37: ......