![Campbell Met One 034B Instruction Manual Download Page 27](http://html1.mh-extra.com/html/campbell/met-one-034b/met-one-034b_instruction-manual_3885385027.webp)
B-1
Appendix B. Example Program
The following CR1000 program measures the 034B every 5 seconds, and
stores mean wind speed, unit vector mean direction, and standard deviation of
the direction every 60 minutes. Wiring for the example is given in TABLE
TABLE B-1. Wiring for Example Program
Colo
u
r
Description
CR1000
Red
Wind Speed Signal
P1
Black
Wind Speed Reference
⏚
Green
Wind Direction Signal
SE 1
Blue
Wind Direction Excitation
EX 1
White
Wind Direction Reference
⏚
Clear
Wind Direction Shield
⏚
CRBasic Example B-1. CR1000 Program That Measures the 034B
'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
(Table1,True,-1)
DataInterval
(0,60,Min,10)
WindVector
(1,WS_ms,WindDir,FP2,False,0,0,0)
FieldNames
("WS_ms_Avg,WindDir_Avg,WindDir_StDev")
EndTable
'Main Program
BeginProg
Scan
(5,Sec,1,0)
'Default Datalogger Battery Voltage measurement Batt_Volt:
Battery
(Batt_Volt)
'034A/034B Wind Speed & Direction Sensor measurements WS_ms and WindDir:
PulseCount
(WS_ms,1,1,2,1,0.7989,0.28)
If
WS_ms=0.2811
Then
WS_ms=0
BrHalf
(WindDir,1,mV2500,1,1,1,2500,True,0,_60Hz,720.0,0)
'Use 5000 mV
If
WindDir>=360
OR
WindDir < 0
Then
WindDir=0
'excitation for
'Call Data Tables and Store Data
'the CR3000 and
CallTable
(Table1)
'CR5000 dataloggers
NextScan
EndProg