
B-1
Appendix B. Example Programs
The following programs measure the wind monitor 05103 every 5 seconds, and
store mean wind speed, unit vector mean direction, and standard deviation of
the direction every 60 minutes. Wiring for the examples is given in TABLE
TABLE B-1. Wiring for Example Programs
Color
Wire Label
CR1000
CR6
CR200X
Red
WS Signal
P1
U4
P_LL
Black
WS Reference
⏚
⏚
⏚
Green
WD Signal
SE 1
U2
SE 1
Blue
WD Volt Excit
VX 1
U1
VX1
White
WD Reference
⏚
⏚
⏚
Clear
Shield
⏚
⏚
⏚
B.1 CR1000 Example Program
CRBasic Example B-1. CR1000 Example Program
'CR1000
'Declare Variables and Units
Public
Batt_Volt
Public
WS_ms
Public
WindDir
Units
Batt_Volt=Volts
Units
WS_ms=meters/second
Units
WindDir=Degrees
'Define Data Tables
DataTable
(Hour,True,-1)
DataInterval
(0,60,Min,10)
WindVector
(1,WS_ms,WindDir,FP2,False,0,0,0)
FieldNames
("WS_ms_S_WVT,WindDir_D1_WVT,WindDir_SD1_WVT")
EndTable
'Main Program
BeginProg
Scan
(5,Sec,1,0)
'Default Datalogger Battery Voltage measurement Batt_Volt:
Battery
(Batt_Volt)
'05103 Wind Speed & Direction Sensor measurements WS_ms and WindDir:
'WS_ms
PulseCount
(WS_ms,1,1,1,1,0.098,0)
'WindDir
BrHalf
(WindDir,1,mV2500,1,1,1,2500,True,20000,_60Hz,355,0)
'mV5000
'range, 5000 mV excitation for CR3000 and CR5000 dataloggers
If
WindDir>=360 OR WindDir<0
Then
WindDir=0
'Call Data Tables and Store Data
CallTable
(Hour)
NextScan
EndProg
Содержание Wind Monitor Series
Страница 2: ......
Страница 6: ......
Страница 24: ...Wind Monitor Series 16...
Страница 26: ...Appendix A Importing Short Cut Code Into CRBasic Editor A 2...
Страница 30: ...Appendix B Example Programs B 4...
Страница 34: ...Appendix C Wind Direction Sensor Orientation C 4...
Страница 36: ...Appendix D Wind Direction Measurement Theory D 2...
Страница 37: ......