Presentation is loading. Please wait.

Presentation is loading. Please wait.

3/20/2017 | 10:30 – 12:00 | Cottonwood Room

Similar presentations


Presentation on theme: "3/20/2017 | 10:30 – 12:00 | Cottonwood Room"— Presentation transcript:

1

2 3/20/2017 | 10:30 – 12:00 | Cottonwood Room
SDI-12 Sensors 3/20/2017 | 10:30 – 12:00 | Cottonwood Room

3 Introduction Ken Conner 7 Years At Campbell Scientific
Technical Product Manager For Water Resources

4 Agenda Other text if needed

5 Agenda What Is SDI-12? Terms/Definitions Protocol Overview Pros & Cons
Programming For SDI-12 Capturing SDI-12 Traffic SDI-12 v1.4 Frequently Asked Questions

6 What Is SDI-12?

7 What Is SDI-12? Serial-Digital Interface at 1200 Baud
International Standard That Governs Electrical Characteristics Timing Communication Protocol Developed In 1988 “…The key players included: Campbell Scientific, Environmental Systems Corporation, Handar, Hydrolab Corporation, Omnidata, Stevens Water Monitoring Systems, Sutron Corporation, Tavis Corporation; and USGS/HIF. The result of their work was version 1.0 of the SDI-12 Specification, which was released in October of Campbell Scientific was the primary author of this document.”

8 What Is SDI-12? Maintained By SDI-12 Support Group Since 1991
First Hardware Manufactured/Sold 1990 (BDR300) Widely Used By USGS & Other Surface/Groundwater Monitoring Agencies Version 1.4 Released August, 2016

9 Terms & Definitions

10 Terms & Definitions SDI-12: Serial-Digital Interface at 1200 baud.
Address: A single character (0-9, A-Z, a-z) used to identify Sensor: Device that responds to commands. Typically, a sensor that measures phenomena. Recorder: Device that issues commands to one or more sensors. Typically a datalogger or data acquisition system that aggregates and stores sensor data. Bus: Common physical connection between sensors and recorder.

11 Terms & Definitions ! : Exclamation mark, commonly described as ‘bang’. Termination character for all commands issued by a recorder. Parameter: A field returned by an sensor

12 Protocol Overview

13 Protocol Overview ASCII Character – Human Readable Protocol
Recorder/Sensor (Master/Slave) Architecture All Sensors Require A Unique Address One Recorder Can Poll Many Sensors (62) Only One Recorder Per Bus

14 SDI-12 Basic Command Set Name Command Description Acknowledge Active
Check to see if a sensor is alive Send Identification aI! Query a sensor for sensor information Start Verification aV! Query a sensor for system information Change Address aAb! Change a sensors address Address Query ?! Request the address of a sensor Start Measurement aM!...aM9! Tell the sensor to start a measurement Start Concurrent Measurement aC!...aC9! Tell the sensor to start a concurrent measurement Send Data aD0!...aD9! Request data from a sensor after a measurement Continuous Measurements aR0!...aR9! Get continuous data from a sensor

15 Protocol Overview SDI-12 RECORDER SDI-12 SENSOR #1 SDI-12 SENSOR #2
Ground Supply Data SDI-12 SENSOR #2 SDI-12 SENSOR #3

16 Measurement Sequence | 0M!
SDI-12 RECORDER SDI-12 SENSOR #1 Ground Supply Data [BREAK] 0M! 00052[CR][LF] 0[CR][LF] 0D0! [CR][LF]

17 Measurement Sequence | 0M!+1M!
SDI-12 RECORDER SDI-12 SENSOR #1 Ground Supply Data SDI-12 SENSOR #2 [BREAK] 00052[CR][LF] 0M! 0[CR][LF] 0D0! [CR][LF] [BREAK] 10052[CR][LF] 1M! 1[CR][LF] 1D0! [CR][LF]

18 Measurement Sequence | 0C!+1C!
SDI-12 RECORDER SDI-12 SENSOR #1 Ground Supply Data SDI-12 SENSOR #2 [BREAK] 0C! 00052[CR][LF] 1C! [CR][LF] 0D0! 1D0! 10052[CR][LF] [CR][LF]

19 Measurement Sequence | 0R0!
SDI-12 RECORDER SDI-12 SENSOR #1 Ground Supply Data [BREAK] 0R0! [CR][LF]

20 Pros & Cons

21 Pros & Cons Pros Cons Long cable lengths ‘Slow’ measurements
Calibration data stored in sensor May require factory calibration Multiple sensors per bus Timing can be tricky Multiple values per sensor Requires array notation in CRBasic Sensor complexity hidden in the sensor May be unclear how the sensor is processing data Knowledge highly transferable to all SDI-12 sensors Sensors may be more expensive than analog equivalent

22 Programming For SDI-12

23 SDI12Recorder (Dest,SDIPort,SDIAddress,“SDICommand”,Multiplier,Offset)
Programming For SDI-12 UPDATE TO LATEST LOGGER OPERATING SYSTEM Optional parameters and features added in OS29|OS4 Old SDI12Recorder (Dest,SDIPort,SDIAddress,“SDICommand”,Multiplier,Offset) New SDI12Recorder (Dest,SDIPort,SDIAddress,“SDICommand”,Multiplier,Offset,FillNAN,WaitonTimeout)

24 Optional Parameters | FillNAN
Defines how many elements of the destination array are filled with NAN if SDI-12 communications fail. OLD NEW Public SDI12(9) BeginProg Scan (1,Sec,3,0) Move (SDI12(),1,NAN,9) SDI12Recorder (SDI12(),1,0,"M!",1.0,0) NextScan EndProg Public SDI12(9) BeginProg Scan (1,Sec,3,0) SDI12Recorder (SDI12(),1,0,"M!",1.0,0,-1) NextScan EndProg

25 Optional Parameters | WaitonTimeout
Determines whether the logger will sit and wait for a concurrent measurement, or issue the get data command on the next scan. OLD NEW Public SDI12(9) BeginProg Scan (1,Sec,3,0) Move (SDI12(),1,NAN,9) Do While SDI12(1) = NAN SDI12Recorder (SDI12(),1,0,"M!",1.0,0) Loop NextScan EndProg Public SDI12(9) BeginProg Scan (1,Sec,3,0) SDI12Recorder(SDI12(),1,0,"M!",1.0,0,-1,1) NextScan EndProg

26 New Features | Address Parameter
Multiple sensors can now be queried with a single SDI12Recorder() instruction by stringing together addresses. OLD New Public SDI12_1(9) Public SDI12_2(9) BeginProg Scan (1,Sec,3,0) SDI12Recorder(SDI12_1(),1,0,"M!",1.0,0) SDI12Recorder(SDI12_2(),1,0,"M!",1.0,0) NextScan EndProg Public SDI12(2,9) BeginProg Scan (1,Sec,3,0) SDI12Recorder(SDI12(),1,"01","M!",1.0,0,-1,0) NextScan EndProg

27 New Features | Command Parameter
Multiple commands can now be issued with one SDI12Recorder instruction by stringing together measurement commands. OLD NEW Public SDI12(2,4) BeginProg Scan (10,Sec,1,0) SDI12Recorder (SDI12(1,1),C1,"0","M!",1.0,0) SDI12Recorder (SDI12(2,1),C1,"0","M1!",1.0,0) NextScan EndProg Public SDI12(2,4) BeginProg Scan (10,Sec,1,0) SDI12Recorder (SDI12(),C1,"00","M!M1!",1.0,0,-1,1) NextScan EndProg

28 Programming | SDI-12 Recorder
Basic SDI-12 Recorder Program Public SDI12(6) Alias SDI12(1) = Stage Alias SDI12(2) = StdDev_Stage Alias SDI12(3) = Bad_Measurements Alias SDI12(4) = Good_Measurements Alias SDI12(5) = Supply_Voltage Alias SDI12(6) = Error_Code Units Stage = ft Units Supply_Voltage = VDC BeginProg SW12 (1) Scan (60,Sec,1,0) SDI12Recorder (SDI12(1,1),C1,"0","C1!",1.0,0,-1,1) NextScan EndProg

29 Programming | SDI-12 Recorder
Long Response Time SDI-12 Recorder Program Public Logger_Voltage Public SDI12(6) DataTable (CS475A_NOAA,TRUE,-1 ) DataInterval (0,1,Hr,10) Minimum (1,Logger_Voltage,FP2,False,False) Sample (6,SDI12(),IEEE4) EndTable BeginProg Scan (10,Sec,1,0) Battery (Logger_Voltage) If TimeIsBetween (58,60,60,min) Then SDI12Recorder (SDI12(),C1,"0","C1!",1.0,0,-1,0) EndIf CallTable CS475A_NOAA NextScan EndProg

30 Programming | SDI-12 Sensor
The logger can be programmed to behave like SDI-12 sensor. Public Logger_Voltage Public Logger_Temperature Dim Counter As Long Public SDI12_Recorder(3) Dim SDI12_Sensor(3) BeginProg Scan (1,Sec,1,0) Battery (Logger_Voltage) PanelTemp (Logger_Temperature,60) SDI12Recorder (SDI12_Recorder(),C1,0,"M!",1.0,0,-1,1) NextScan SlowSequence Do Delay (0,500,mSec) SDI12SensorSetup (3, C2,0,1) SDI12_Sensor(1) = Logger_Voltage SDI12_Sensor(2) = Logger_Temperature SDI12_Sensor(3) = Counter += 1 SDI12SensorResponse (SDI12_Sensor()) Loop EndSequence EndProg

31 Programming | SDI-12 Sensor
SDI-12 is a language common to many data logger SDI-12 RECORDER CR300 Ground Supply Data Incompatible Sensor

32 Capturing SDI-12 Traffic

33 Capturing SDI-12 Traffic
The logger can passively listen on an SDI-12 bus and collect data of interest. Public Traffic As String * 100 Public SDI12(5) BeginProg SerialOpen (ComRS232,1200,10,0,100) Scan (1,Sec,1,0) Do While SerialInChk (COMRS232) SerialIn (Traffic,COMRS232,100,CHR(10),100) If InStr (1,Traffic,"+-",3) Then SplitStr (SDI12(),Traffic,"+-",5,0) ExitDo EndIf Loop NextScan EndProg

34 Capturing SDI-12 Traffic
SDI-12 RECORDER SDI-12 SENSOR Ground Supply Data CR300

35 SDI-12 v1.4

36 SDI-12 v1.4 SDI-12 functionality expanded with version 1.4
Identify Measurements Command Identify Measurement Parameters Command High Volume Data Commands (ASCII & Binary)

37 SDI-12 v1.4 Name Measurement Identify Measurement aIM!…aIM9!
aIC!...aIC9! Returns response time and number of measurements for a given measurement command Identify Measurement Parameter aIM_001!...aIM_009! aIC_001!...aIC_009! Returns information about a specific parameter. I.e. name, units, etc.

38 SDI-12 v1.4 Command Values Returned M! Up to 9 Measurements
One measurement at a time C! Up to 99 Measurements Multiple measurements simultaneously R! 1 Measurement One measurement immediately HA! Up to 999 Measurements High volume data, multiple measurements simultaneously

39 Frequently Asked Questions

40 Frequently Asked Question
Q: How long can my sensor cable be? A: It depends, but is governed by the electrical properties of the sensor, cable and recorder. Lengths of 300 m or more are not uncommon. Q: How many sensors can I connect to a single bus? A: It depends. Just like length this is governed by the electrical properties of the devices. The SDI-12 protocol allows for 62 unique addresses, but you’ll probably never connect 62 sensors to a single bus.

41 Frequently Asked Questions
Can I connect a sensor directly to my PC? It depends on what you want to do. You can passively monitor SDI-12 traffic with a PC, but sending commands can’t be done without an external device that acts as an RS-232 to SDI-12 adapter. CSI loggers can fill this role as well as: WaterLog: H-4191 Stevens: SDI-12 Xplorer NR Systems: SDI-12 Verifier

42 Frequently Asked Questions
Q: Can two recorders query the same sensor? A: Technical yes, but its complicated and risky. A better option is to have one device passively monitor SDI-12 traffic on the bus.

43 Links Of Interest

44 The End Other text if needed


Download ppt "3/20/2017 | 10:30 – 12:00 | Cottonwood Room"

Similar presentations


Ads by Google