background image

 

A-1 

Appendix A.  Importing Short Cut Code 

Into CRBasic Editor 

This tutorial shows: 

 

Importing a 

Short Cut

 program into a program editor for additional 

refinement 

 

Importing a wiring diagram from 

Short Cut

 into the comments of a 

custom program 

Short Cut

 creates files, which can be imported into 

CRBasic Editor

. Assuming 

defaults were used when 

Short Cut

 was installed, these files reside in the 

C:\campbellsci\SCWin folder: 

 

.DEF (wiring and memory usage information) 

 

.CR2 (CR200(X)-series datalogger code) 

 

.CR300 (CR300-series datalogger code) 

 

.CR6 (CR6-series datalogger code) 

 

.CR8 (CR800-series datalogger code) 

 

.CR1 (CR1000 datalogger code) 

 

.CR1X (CR1000X-series datalogger code) 

 

.CR3 (CR3000 datalogger code) 

 

.CR5 (CR5000 datalogger code) 

Import 

Short Cut

 code and wiring diagram into 

CRBasic Editor

1.  Create the 

Short 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 name and save the program. 

Once the file is edited with 

CRBasic Editor

Short Cut

  can no 

longer be used to edit the program it created.  

2.  The program can now be edited, saved, and sent to the data logger. 

3.  Import wiring information to the program by opening the associated .DEF 

file. By default, it is saved in the c:\campbellsci\SCWin folder. Copy and 

paste the section beginning with heading “–Wiring for CRXXX–” into the 

CRBasic program, usually at the head of the file. After pasting, edit the 

information such that an apostrophe (

'

) begins each line. This character 

instructs the data logger compiler to ignore the line when compiling. You 

can highlight several lines of CRBasic code then right-click and select 

Comment Block

. (This feature is demonstrated at about 5:10 in the 

CRBasic | Features

 video.) 

 

NOTE 

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: