Campbell Scientific WINDSONIC1 WINDSONIC 2-D Sonic Wind Sensors - Page 29

Example CR800 Datalogger Program for Measuring a WindSonic4, TABLE 7-12.

Page 29 highlights

WindSonic Two-Dimensional Sonic Anemometer Totalize (1,one,diagNaN) FieldNames ("no_data_TOT") EndTable BeginProg one = 1 Scan (1,Sec) SDI12Recorder (wind_direction,0R0!,1,0) If (wind_direction = NAN ) Then wind_speed = NAN diag = NAN EndIf disable_flag = (wind_direction=NAN) OR (diag0) CallTable stats NextScan EndProg 7.4.3 Example CR800 Datalogger Program for Measuring a WindSonic4 TABLE 7-12. Wiring for CR800 Program Example Description SDI-12 data SDI-12 power SDI-12 reference shield Color Green Red Black Clear CR800 C1 +12 Vdc G G 'CR800 Series Datalogger Public windsonic(3) Alias windsonic(1) = wind_direction Alias windsonic(2) = wind_speed Alias windsonic(3) = diag Units wind_direction = degrees Units wind_speed = m/s Units diag = unitless Dim disable_flag AS Boolean Dim one Units one = samples DataTable (stats,TRUE,-1) DataInterval (0,30,Min,10) WindVector (1,wind_speed,wind_direction,IEEE4,disable_flag,0,0,0) FieldNames ("mean_wind_speed,mean_wind_direction,std_wind_dir") Totalize (1,one,IEEE4,disable_flag) FieldNames ("n_TOT") Totalize (1,one,IEEE4,diag1) FieldNames ("diag_1_TOT") Totalize (1,one,IEEE4,diag2) FieldNames ("diag_2_TOT") Totalize (1,one,IEEE4,diag4) FieldNames ("diag_4_TOT") Totalize (1,one,IEEE4,diag8) FieldNames ("diag_8_TOT") Totalize (1,one,IEEE4,diag9) FieldNames ("diag_9_TOT") 21

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46

WindSonic Two-Dimensional Sonic Anemometer
Totalize (1,one,diag<>NaN)
FieldNames ("no_data_TOT")
EndTable
BeginProg
one = 1
Scan (1,Sec)
SDI12Recorder (wind_direction,0R0!,1,0)
If (wind_direction = NAN ) Then
wind_speed = NAN
diag = NAN
EndIf
disable_flag = (wind_direction=NAN) OR (diag<>0)
CallTable stats
NextScan
EndProg
7.4.3
Example CR800 Datalogger Program for Measuring a WindSonic4
TABLE 7-12.
Wiring for CR800 Program Example
Description
Color
CR800
SDI-12 data
Green
C1
SDI-12 power
Red
+12 Vdc
SDI-12 reference
Black
G
shield
Clear
G
'CR800 Series Datalogger
Public windsonic(3)
Alias windsonic(1) = wind_direction
Alias windsonic(2) = wind_speed
Alias windsonic(3) = diag
Units wind_direction = degrees
Units wind_speed = m/s
Units diag = unitless
Dim disable_flag AS Boolean
Dim one
Units one = samples
DataTable (stats,TRUE,-1)
DataInterval (0,30,Min,10)
WindVector (1,wind_speed,wind_direction,IEEE4,disable_flag,0,0,0)
FieldNames ("mean_wind_speed,mean_wind_direction,std_wind_dir")
Totalize (1,one,IEEE4,disable_flag)
FieldNames ("n_TOT")
Totalize (1,one,IEEE4,diag<>1)
FieldNames ("diag_1_TOT")
Totalize (1,one,IEEE4,diag<>2)
FieldNames ("diag_2_TOT")
Totalize (1,one,IEEE4,diag<>4)
FieldNames ("diag_4_TOT")
Totalize (1,one,IEEE4,diag<>8)
FieldNames ("diag_8_TOT")
Totalize (1,one,IEEE4,diag<>9)
FieldNames ("diag_9_TOT")
21