Example Programs; Cr1000 Example Program - Campbell Wind Monitor Series Instruction Manual

Hide thumbs Also See for Wind Monitor Series:
Table of Contents

Advertisement

Appendix B. Example Programs
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
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)
'range, 5000 mV excitation for CR3000 and CR5000 dataloggers
If
WindDir>=360 OR WindDir<0
'Call Data Tables and Store Data
CallTable(Hour)
NextScan
EndProg
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
B-1.
TABLE B-1. Wiring for Example Programs
Color
Wire Label
Red
WS Signal
Black
WS Reference
Green
WD Signal
Blue
WD Volt Excit
White
WD Reference
Clear
Shield
(1,WS_ms,WindDir,FP2,False,0,0,0)
Then
CR1000
P1
SE 1
VX 1
WindDir=0
CR6
CR200X
U4
P_LL
U2
SE 1
U1
VX1
'mV5000
B-1

Advertisement

Table of Contents
loading

This manual is also suitable for:

0510805108-45053050510605103-4505103

Table of Contents