background image

Appendix B.  Example Programs 

B-10 

Wire tie back all unused SC110 wires so they don’t short against 

any metal. 

TABLE B-5.  SR50A (Configured for MD485) Wiring to MD485 

(9-pin connector plugged into MD485 RS-232 port) 

Wire Color 

Wire Description 

MD485 Wire Channel 

(except where indicated) 

Red 

Power source 

CR1000 

12V

 

Green 

Any ‘

A

’ terminal 

White 

Any ‘

B

’ terminal 

Black 

Ground 

 

Shield 

Shield/Earth ground 

CR1000 

G

 

 

CRBasic Example B-4.  CR1000 Programming Example Using an MD485 and SC110 9-pin 

Male Connector 

'CR1000 Series Datalogger 
'Program: SR50A_RS485_Port_C1-C2.CR1 
 
'This program contains a number of features not found in Short Cut. 

'The initial distance value from the SR50A head to the ground is 
'measured by setting the flag SR50A_MID to TRUE. Set this flag after 
'installing the SR50A in the field. Setting this flag will initiate 
'a measurement cycle and the resulting value stored as the initial 
'distance. The initial distance is used to calculate snow depth. 
'The PreserveVariables instruction is used to store the initial 
'distance in non-volatile memory. If power is lost at the site the 
'initial distance value will be restored.' 
 
'A control flag is used to initiate the SR50A measurement cycle. This 
'allows for manual control in the field to check distances without 
'waiting for the correct time interval to occur. It is also used by 
'the datalogger to initiate an automated measurement cycle. 

'Every measurement cycle is composed of 11 individual measurements 
'that are spatially sorted to eliminate any low or high values. 
'One measurement is made with each scan. This program has a 10 
'second scan rate so it will take 100 seconds to do all 11 scans or 
'1 minute and 40 seconds. 
'Declare Constants 
 
'Default serial address of SR50A is 33. Polling command consists of 
'a lower case 'p' followed by the address and a carriage return. 

Const

 POLL_A = "p33" & 

CHR

(13) 

 
'Declare Variables and Units 

Public

 BattV    : 

Units

 BattV    = Volts  

'CR1000 battery voltage 

Public

 PnlTmp_C : 

Units

 PnlTmp_C = °C    

'CR1000 panel temperature 

Public

 AirTempC : 

Units

 AirTempC = °C    

'Air temperature 

 

'Controls SR50A measurement. This flag can be manually controlled to 
'run tests in the field or is automatically set 2 minutes before the 
'hourly data storage interval. This is done so 11 measurements can 
'be made and sorted before the values are stored. 

Public

 SR50ACtrl 

As Boolean 

NOTE 

Содержание SR50A

Страница 1: ...INSTRUCTION MANUAL SR50A SR50A 316SS and SR50AH Sonic Ranging Sensors Revision 10 16 C o p y r i g h t 2 0 0 7 2 0 1 6 C a m p b e l l S c i e n t i f i c I n c...

Страница 2: ......

Страница 3: ...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...

Страница 4: ...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 comply...

Страница 5: ...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...

Страница 6: ......

Страница 7: ...1 3 Mounting Options 8 7 2 SDI 12 Wiring 10 7 3 SDI 12 Programming 10 7 3 1 SDI12Recorder Instruction 11 8 Operation 11 8 1 Quality Numbers 12 8 2 Temperature Compensation 12 8 3 SDI 12 Measurements...

Страница 8: ...e Auto Output Mode D 7 D 3 3 3 Auto Measure Polled Output Mode D 7 D 4 4 Distance to Target or Depth D 8 D 4 5 Distance to Ground D 8 D 4 6 Measurement Interval Units D 8 D 4 7 Measurement Interval Va...

Страница 9: ...s Setup Changes E 3 E 5 Setting the Font Size E 3 E 6 Configuring the Serial Port E 4 E 7 Testing the Configuration E 4 E 8 Configuring the Com Port to Send an Operating System E 6 E 9 Jumper Settings...

Страница 10: ...Contents iv B 4 CR1000 Programming Example Using an MD485 and SC110 9 pin Male Connector B 10 B 5 CR6 RS 485 Programming Example B 13 B 6 CR1000 Heater Program Example B 16 B 7 CR6 Heater Program Exam...

Страница 11: ...It is also compatible with our retired Edlog dataloggers For Edlog datalogger support see an older manual at www campbellsci com old manuals 2 Precautions READ AND UNDERSTAND the Safety section at th...

Страница 12: ...ownload on www campbellsci com and the ResourceDVD It is included in installations of LoggerNet PC200W PC400 or RTDAQ Use the following procedure to get started A temperature measurement is required F...

Страница 13: ...s Sensors folder Select SR50A Sonic Ranging Sensor SDI 12 Output Click to move the selection to the Selected device window Data defaults to meters which can be changed by clicking the Unit of measure...

Страница 14: ...e datalogger support software data display to make sure it is making reasonable measurements 5 Overview The SR50A series sensors measure the distance from the sensor to a target They determine the dis...

Страница 15: ...and SR50ATH manual for more information SDI 12 RS 232 and RS 485 output options are available for measuring the SR50A The SR50A is factory configured as an SDI 12 sensor address 0 because Campbell da...

Страница 16: ...sor Length 10 1 cm 4 in Sensor Diameter 7 6 cm 3 in Sensor Weight no cable Aluminum Chassis 0 4 kg 0 88 lb Stainless Steel Chassis 0 795 kg 1 75 lb Cable Weight 15 ft 0 25 kg 0 55 lb IP Rating Electri...

Страница 17: ...t objects outside this 30 degree beam will not be detected nor interfere with the intended target Any unwanted target must be outside the 30 degree beam angle Determine the required clearance for the...

Страница 18: ...ousing to Grill 7 1 3 Mounting Options To achieve an unobstructed view for the SR50A s beam the SR50A is typically mounted to a tripod mast tower leg or user supplied pole using the CM206 6 ft crossar...

Страница 19: ...50A Series Sonic Ranging Sensors 9 FIGURE 7 3 SR50A Mounted to a Crossarm via the 19517 Mounting Kit FIGURE 7 4 Another Angle of the 19517 Mounting Kit FIGURE 7 5 SR50A Mounted to a 19484 Mounting Ste...

Страница 20: ...SDI 122 White Ground G Clear Shield G 1 Dedicated SDI 12 port on CR5000 2 U channels are automatically configured by the measurement instruction To use more than one probe per datalogger either connec...

Страница 21: ...nstruction sends a request to the sensor to make a measurement and then retrieves the measurement from the sensor See Section 8 3 SDI 12 Measurements p 13 for more information When using a CR200 X the...

Страница 22: ...Range Quality Range Description 0 Not able to read distance 152 to 210 Good measurement quality numbers 210 to 300 Reduced echo signal strength 300 to 600 High measurement uncertainty Although not ne...

Страница 23: ...the default address of 0 to the address of 1 the following command can be sent 0A1 Only one sensor of the same address should be connected when using the change address command 8 3 2 SDI 12 Commands T...

Страница 24: ...ommand Set the distance to ground parameter in the SR50A The distance must be in meters with no more than three decimal places A Address is returned aXI DDD DD Extended command Set the distance to gro...

Страница 25: ...y Procedures p 15 Replace the transducer assembly every three years if it is not in a humid environment Replace the transducer housing assembly every year in humid environments Standard SR50A housing...

Страница 26: ...SR50A Series Sonic Ranging Sensors 16 FIGURE 9 2 Remove Six Screws from the Transducer Housing FIGURE 9 3 Remove Transducer Housing and Disconnect Wires...

Страница 27: ...SR50A Series Sonic Ranging Sensors 17 FIGURE 9 4 Location of Desiccant in Transducer Housing Assembly FIGURE 9 5 Remove and Replace Desiccant...

Страница 28: ...ideration should be taken in a control type application to deal with invalid readings For example if the sensor is used to initiate a water level alarm multiple readings should be used to ensure that...

Страница 29: ...This technique also helps to automatically filter out zero readings that can occasionally be produced For example for a given station a reading is taken every 5 seconds for 1 minute and the median va...

Страница 30: ...SR50A Series Sonic Ranging Sensors 20...

Страница 31: ...nd exit Short Cut Make note of the file name used when saving the Short Cut program 2 Open CRBasic Editor 3 Click File Open Assuming the default paths were used when Short Cut was installed navigate t...

Страница 32: ......

Страница 33: ..._MID to TRUE Set this flag after installing the SR50A in the field Setting this flag will initiate a measurement cycle and the resulting value stored as the initial distance The initial distance is us...

Страница 34: ...n the field or is automatically set 2 minutes before the hourly data storage interval This is done so 11 measurements can be made and sorted before the values are stored Public SR50ACtrl As Boolean Se...

Страница 35: ...mber of features not found in Short Cut The initial distance value from the SR50A head to the ground is measured by setting the flag SR50A_MID to TRUE Set this flag after installing the SR50A in the f...

Страница 36: ...t This flag can be manually controlled to run tests in the field or is automatically set 2 minutes before the hourly data storage interval This is done so 11 measurements can be made and sorted before...

Страница 37: ...alues If SR50ACtrl Then SR50A Sonic Ranging Sensor SDI 12 Output measurements DT Q SDI12Recorder SR50A_Raw C1 0 M1 1 0 Calculate the temperature corrected distance SR50A n 1 SR50A_Raw 1 SQR AirTempC 2...

Страница 38: ...ed by setting the flag SR50A_MID to TRUE Set this flag after installing the SR50A in the field Setting this flag will initiate a measurement cycle and the resulting value stored as the initial distanc...

Страница 39: ...ls 4 Diagnostics Units Diagnostics value Alias ParseVals 5 Chcksum Units Chcksum value Array to hold 11 SR50A measurements composed of a distance and quality number Public SR50A 11 2 Sorted array of 1...

Страница 40: ...d If TimeIntoInterval 58 60 Min Then SR50ACtrl True EndIf Set this flag to true to get the initial distance from the SR50A to the ground If SR50A_MID Then SR50ACtrl True If SR50ACtrl Then Transmit ser...

Страница 41: ...to free up the RS 232 port on the datalogger MD485 is powered using a 14291 Field Power Cable TABLE B 3 14291 Field Power Cable Connections Field Power Cable Markings CR1000 Datalogger or Directly to...

Страница 42: ...wer is lost at the site the initial distance value will be restored A control flag is used to initiate the SR50A measurement cycle This allows for manual control in the field to check distances withou...

Страница 43: ...ult_SR50A 11 2 Public TCDT Units TCDT meters Temperature corrected distance Public Q Units Q unitless Quality number Public Inital_Dist Units Inital_Dist meters Distance to ground Public Snow_Depth Un...

Страница 44: ...ACtrl Then Transmit serial command p33 CR SerialOut Com1 POLL_A 0 0 Flush the serial buffer SerialFlush Com1 Recieve serial string from SR50A SerialIn SR50AData Com1 200 CHR 13 50 Pars string into sep...

Страница 45: ...ial distance is used to calculate snow depth The PreserveVariables instruction is used to store the initial distance in non volatile memory If power is lost at the site the initial distance value will...

Страница 46: ...blic SR50A 11 2 Sorted array of 11 SR50A measurements composed of a distance and quality number Measurements are sorted by the distance value from smallest to largest Public Result_SR50A 11 2 Public T...

Страница 47: ...A to the ground If SR50A_MID Then SR50ACtrl True If SR50ACtrl Then Transmit serial command p33 CR SerialOut ComC1 POLL_A 0 0 Flush the serial buffer SerialFlush ComC1 Recieve serial string from SR50A...

Страница 48: ...Black Ground G G Shield Shield Earth ground G G SR50AH Heater Power Cable Wire Color Heater Wire Description CR1000 Wire Channels CR6 Wire Channels Black Power source SW 12 SW12 1 White Power ground...

Страница 49: ...11 SR50A measurements composed of a distance and quality number Measurements are sorted by the distance value from smallest to largest Public Result_SR50A 11 2 Public TCDT Units TCDT meters Temperatu...

Страница 50: ...make 11 snow depth measurements sort them and store the corrected values If SR50ACtrl Then SR50A Sonic Ranging Sensor SDI 12 Output measurements DT Q SDI12Recorder SR50A_Raw 1 0 M1 1 0 Calculate the...

Страница 51: ...nd Units Public BattV Units BattV Volts CR6 battery voltage Public PnlTmp_C Units PnlTmp_C C CR6 panel temperature Public AirTempC Units AirTempC C Air temperature Public HtrCntrl As Boolean Array to...

Страница 52: ...If Set this flag to true to get the initial distance from the SR50A to the ground If SR50A_MID Then SR50ACtrl True Logic to make 11 snow depth measurements sort them and store the corrected values If...

Страница 53: ...Appendix B Example Programs B 21 CallTable Daily CallTable Hour NextScan EndProg...

Страница 54: ...Appendix B Example Programs B 22...

Страница 55: ...jumpers on one group at a time Never install more than three jumpers and never mix the jumpers among the SDI 12 RS 232 or RS 485 locations The other jumper located on the SR50A places the sensor in e...

Страница 56: ......

Страница 57: ...1 RS 232 Wiring FIGURE D 1 and TABLE D 1 show wiring for the SR50A in RS 232 mode The ground used with the RS 232 connector pin 5 must use the same ground as the SR50A For the example below the power...

Страница 58: ...eld G G D 2 RS 485 Operation The SR50A sensor comes from the factory with the internal jumpers set to SDI 12 mode To use the SR50A in the RS 485 mode of operation the jumpers need to be set as outline...

Страница 59: ...Wiring Using a MD485 TABLE D 3 and FIGURE D 2 show the wiring for the SR50A in RS 485 mode TABLE D 3 Connections for RS 485 Mode Color Function Connection Black Power Ground System Ground and or RS 2...

Страница 60: ...E 1 The following settings apply to Device Configuration Utility or any program used for communications Baud Rate Current SR50A SettingNote Data Bits 8 Parity None Stop Bits 1 Flow Control None Local...

Страница 61: ...3 Initial Terminal Window in Device Configuration Utility To enter Setup mode type setup in the terminal window and press the Enter key The word setup and all options in the setup menu are not case s...

Страница 62: ...Interval Units Seconds Minutes Hours Seconds Measurement Interval Value Integer 1 255 60 Output Unit Meters Centimeters Millimeters Feet Inches Meters Setting Description Options Default Value Quality...

Страница 63: ...SR50A immediately begins a measurement and transmits the resulting data packet when the measurement is complete Typically the SR50A transmits the data packet within 1 second of receiving the command p...

Страница 64: ...be in meters regardless of the output units that are selected If the exact value cannot be obtained it is better to slightly overestimate the value rather than underestimating it If a Distance to Gro...

Страница 65: ...s settings Upper and lower case letters are accepted and a carriage return character must also terminate the string setup CR D 5 2 Poll Command The poll command is used to obtain the sensor s output...

Страница 66: ...egrees C t33 tt ttt CR Temperature command with factory address of 33 and a temperature value in Celsius D 6 RS 232 RS 485 Data Output Format D 6 1 Measurement Output The measurement output string for...

Страница 67: ...red VVXXX The three digits XXX are for factory use and should always read 111 CC This is a two character checksum of the data packet The checksum is the two s complement of the data packet sum includi...

Страница 68: ...WWWWW This is the checksum of the firmware CC This is a two character checksum of the data packet The checksum is the two s complement of the data packet sum including control characters The least sig...

Страница 69: ...leases E 1 Configure Tera Term for Serial 9600 BPS Communication 1 Click on the Tera Term icon and bring up the software Tera Term always starts up with the New connection window as shown in FIGURE E...

Страница 70: ...2 Setup Selections 3 Select Terminal from the drop down menu list in Setup The SR50A T does not echo characters sent to it To see what you re typing Local Echo needs to be switched on by checking the...

Страница 71: ...acters on a white background To change the settings click the radio button next to Background and click on the Reverse button Click on the OK button when finished making changes See FIGURE E 4 FIGURE...

Страница 72: ...d FIGURE E 6 FIGURE E 6 Configuring the Serial Port 7 All changes needed to work with the SR50A T are complete You are back at the main screen with the cursor blinking in the upper left corner of the...

Страница 73: ...mware Update E 2 1 Configure Tera Term to Send SR50A T Firmware Update Device Configuration Utility cannot be used to send a firmware update to a SR50A T General setup requires the following COM port...

Страница 74: ...der For this example the file SR50A_May_29_2007_V_1_3 TXT will be sent to a SR50AT This firmware update is used for either the SR50A or SR50AT To send a firmware update to the SR50A T the jumpers must...

Страница 75: ...k holes in the disk assembly Set the two screws aside f The bottom disk assembly and the transducer housing have a V shaped notch that lines up with a mating V in the metal housing Separate the bottom...

Страница 76: ...ocess is occurring in Tera Term Directly above the Send File window you will see the lines of code being sent to the SR50A T Do not click on any of the buttons in the Send File window The window will...

Страница 77: ...s screws back in the countersunk holes Do not over tighten the screws They should be snug b Older transducer heads use a removable O ring Carefully seat the O ring back into place and make sure you wo...

Страница 78: ...Appendix E Tera Term QuickStart E 10...

Страница 79: ...to reduce power requirements The heater power must be turned off when operating at temperatures of 25 C or more CRBasic programs that control the heater are provided in Appendix B 4 Heater Program Ex...

Страница 80: ...nsducer and desiccant replacement is slightly different for the SR50AH When ordering replacement transducers ensure that the Replacement Transducer Maintenance Kit pn 32571 is ordered The procedure to...

Страница 81: ...old packets to be removed for replacement During reassembly ensure that the desiccant does not come in contact with the metal backing of the transducer If only the desiccant is being inspected or rep...

Страница 82: ...e pattern as shown 6 Replace the transducer assembly and the second O ring that seats under the transducer assembly 7 Reassemble the sensor in the reverse order Please observe the orientation of the p...

Страница 83: ......

Страница 84: ...ua Apinag s nbr 2018 Perdizes CEP 01258 00 S o Paulo SP BRASIL www campbellsci com br vendas campbellsci com br Campbell Scientific Canada Corp 14532 131 Avenue NW Edmonton AB T5L 4X4 CANADA www campb...

Отзывы: