background image

Appendix B.  Example Programs 

B-3 

'Define Data Tables 

DataTable

(Hourly,True,-1) 

  

DataInterval

(0,60,Min,10) 

  

Sample

(1,LWmV,FP2) 

  

Totalize

(1,LWMDry,FP2,False) 

  

Totalize

(1,LWMCon,FP2,False) 

  

Totalize

(1,LWMWet,FP2,False) 

EndTable

 

 

DataTable

(Daily,True,-1) 

  

DataInterval

(0,1440,Min,10) 

  

Minimum

(1,BattV,FP2,False,False) 

EndTable

 

 

'Main Program 

BeginProg

 

  'Main Scan 

  

Scan

(5,Sec,1,0) 

    'Default Data Logger Battery Voltage measurement 'BattV' 

    

Battery

(BattV) 

 

    'Default Wiring Panel Temperature measurement 'PTemp_C' 

    

PanelTemp

(PTemp_C,60) 

 

    'LWS Dielectric Leaf Wetness Sensor measurement 'LWmV' 

    

BrHalf

(LWmV,1,mV5000,U2,U1,1,2500,False,10000,60,2500,0) 

 

    'Determine Minutes Dry 'LWMDry', Minutes Wet or Contaminated 'LWMCon', 
    'and Minutes Wet 'LWMWet'. The value 0.08333333 is the scan rate divided by  
    '60 s (5 s/60 s = 0.08333333). 

    LWMDry=0 
    LWMCon=0 
    LWMWet=0 
    

If

 LWmV<274 

Then

 

      LWMDry=0.08333333 
    

Else

 

      

If

 LWmV>=284 

Then

 

        LWMWet=0.08333333 
      

Else

 

        LWMCon=0.08333333 
      

EndIf

 

    

EndIf

 

 

    'Call Data Tables and Store Data 

    

CallTable

 Hourly 

    

CallTable

 Daily 

  

NextScan

 

EndProg

 

 

 

Summary of Contents for LWS

Page 1: ...LWS Dielectric Leaf Wetness Sensor Revision 11 18 Copyright 2008 2018 Campbell Scientific Inc...

Page 2: ...ucts to CSI CSI will return such Products by surface carrier prepaid within the continental United States of America To all other locations CSI will return such Products best way CIP port of entry per...

Page 3: ...ing address is CAMPBELL SCIENTIFIC INC RMA _____ 815 West 1800 North Logan Utah 84321 1784 For all returns the customer must fill out a Statement of Product Cleanliness and Decontamination form and co...

Page 4: ...beginning work Wear a hardhat and eye protection and take other appropriate safety precautions while working on or around tripods and towers Do not climb tripods or towers at any time and prohibit cl...

Page 5: ...s 4 7 Installation 5 7 1 Field Installation 5 7 2 Wiring 6 7 3 Programming 6 7 3 1 Voltage Measurement 6 7 3 2 Minutes Dry Minutes Wet or Contaminated and Minutes Wet 7 7 3 3 Interpreting Data 7 8 Mai...

Page 6: ...le of Contents ii Tables B 1 CR1000X Example Program Wiring B 1 B 2 CR6 Example Program Wiring B 2 CRBasic Examples B 1 CR1000X Program for Measuring the LWS B 1 B 2 CR6 Program for Measuring the LWS...

Page 7: ...fic Although the LWS is rugged it should be handled as a precision scientific instrument Over time the accumulation of dust and bird droppings can cause the dry output to rise We recommend that the se...

Page 8: ...le Sensors and Devices box type LWS You can also locate the sensor in Sensors Miscellaneous Sensors folder Double click LWS Dielectric Leaf Wetness Sensor Enter the Dry threshold mV and Wet threshold...

Page 9: ...the output of the sensor in LoggerNet PC400 RTDAQ or PC200W to make sure it is making reasonable measurements Short Cut uses the execution interval to make the minutes wet dry and contaminated calcul...

Page 10: ...spectrum but selectively reject much of the energy in the near infrared The surface coating of the LWS absorbs well in the near infrared region but the white color reflects most of the visible radiati...

Page 11: ...2 Wiring p 6 and Section 7 3 Programming p 6 Short Cut does this work for you See Section 4 QuickStart p 1 for a Short Cut tutorial 7 1 Field Installation The LWS includes two holes for mounting the...

Page 12: ...in Section 4 QuickStart p 1 If you wish to import Short Cut code into CRBasic Editor to create or add to a customized program follow the procedure in Appendix Appendix A Importing Short Cut Code Into...

Page 13: ...minutes wet can then be totaled and stored for any given period table interval Minutes wet or contaminated can be considered a wet condition or a contaminated condition depending on the user s evaluat...

Page 14: ...debris will cause the dry output to increase and change the Boolean threshold Clean the sensing surface with a moist cloth periodically or when elevated dry output is detected The LWS leaf wetness se...

Page 15: ...Cut program following the procedure in Section 4 QuickStart p 1 Finish the program On the Advanced tab click the CRBasic Editor button The program opens in CRBasic with the name noname CR_ Provide a n...

Page 16: ...00X Brown or White Excitation VX1 Orange or Red Analog Out SE1 Clear Analog Ground CRBasic Example B 1 CR1000X Program for Measuring the LWS CR1000X Declare Variables and Units Public BattV Public PTe...

Page 17: ...f LWmV 274 Then LWMDry 0 08333333 Else If LWmV 284 Then LWMWet 0 08333333 Else LWMCon 0 08333333 EndIf EndIf Call Data Tables and Store Data CallTable Hourly CallTable Daily NextScan EndProg B 2 Examp...

Page 18: ...urement BattV Battery BattV Default Wiring Panel Temperature measurement PTemp_C PanelTemp PTemp_C 60 LWS Dielectric Leaf Wetness Sensor measurement LWmV BrHalf LWmV 1 mV5000 U2 U1 1 2500 False 10000...

Page 19: ...Asia Location Bangkok Thailand Email info campbellsci asia Website www campbellsci asia China Location Beijing P R China Email info campbellsci com cn Website www campbellsci com cn Spain Location Ba...

Reviews: