1 cr1000 example program – Campbell Scientific 03001-L R.M. Young Wind Sentry Set User Manual
Page 13

R.M. Young Wind Sentry
TABLE 5-3. Wiring for Example Programs
Color Description
CR1000
CR10X
Black
Wind Spd. Signal
P1
P1
White
Wind Spd. Reference
G
Clear
Wind Spd. Shield
G
Red
Wind Dir. Signal
SE 1
SE 1
Black
Wind Dir. Excitation
EX 1
E1
White
Wind Dir. Reference
AG
Clear
Wind Dir. Shield
G
5.4.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(Table1,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)
'03001 or 03101 RM Young Wind Sentry Wind Speed Sensor measurement - WS_ms:
PulseCount(WS_ms,1,1,1,1,0.75,0.2)
If WS_ms<0.21 Then WS_ms=0
'03001 or 03301 RM Young Wind Sentry Wind Direction Sensor measurement - WindDir:
BrHalf(WindDir,1,mV2500,1,1,1,2500,True,0,_60Hz,355,0)
'Use mV5000 range and 5000 mV excitation for CR3000 and CR5000 dataloggers.
If WindDir>=360 OR WindDir<0 Then WindDir=0
9