Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

SDI-12 and YSI 6600 water quality sonde


Hap Aug 11, 2011 09:20 PM

I am trying to find step by step documentation to connect a YSI 6600 water quality sonde via SDI-12 to a Campbell CR1000 using LoggerNET Admin. An initial CR basic program
for communicating with the sonde would also be helpful. I am currently getting a SDI failed message when in transparent mode. LoggerNet is connecting to the CR1000 but
not the sonde. The sonde has a default SDI12 address of zero.
Connections
Sonde ground to CR1000 Power Out G
Sonde +12VDC to CR1000 Power Out 12V
Sonde SDI-12 to CR1000 Com1 C1

Command line and responses in Terminal Emulator
CR1000>SDI12
Enter Cx Port 1, 3, 5, 7
1
Entering SDI12 Terminal
?!
SDI Failed

Any help is greatly appreciated.


Sam Aug 12, 2011 11:58 PM

1) The datalogger must have a program using the SDI12Recorder instruction. This will configure the C port for use with SDI-12. For example the following could be loaded on the logger to force C1 to be configured for SDI-12 communications.

Dim Dest(1)
BeginProg
SDI12Recorder (Dest,1,0,"M!",1.0,0)
EndProg


2) Keep in mind that the YSI sondes can take upwards of 60 seconds to return data and often times more than 9 values are returned. If using M!, you can only get 9 or less values. Also your program will pause waiting for data. If using C! you can get 20+ values from the sensor and the program will not pause on the instruction, but will read NAN until data has been returned by the sensor. So there are a variety of ways to skin this cat.

----------------------------------------------------
Public PTemp, batt_volt

Const SDI12Vals = 16 'max number SDI12 values to be returned
Dim YSIDataTrig As Boolean 'boolean to control saving of YSI data
Public YSI(SDI12Vals) 'array to hold SDI12 values returned

DataTable (Test,1,1000)
DataInterval (0,15,Sec,10)
Minimum (1,batt_volt,FP2,0,False)
Sample (1,PTemp,FP2)
EndTable

DataTable (YSIData,YSIDataTrig,1000)
Sample (SDI12Vals,YSI(),IEEE4)
EndTable

BeginProg
Scan (1,Sec,0,0)
PanelTemp (PTemp,250)
Battery (batt_volt)

SDI12Recorder (YSI(),1,0,"C!",1.0,0)
If YSI(1) < 1e9 Then YSIDataTrig = TRUE

CallTable (YSIData)
YSIDataTrig = FALSE
CallTable Test

NextScan
EndProg

------------------------------------------------------


Public PTemp, batt_volt

Const SDI12Vals = 16 'max number SDI12 values to be returned
Const SDI12Freq = 15 'minutes
Dim YSIDataTrig As Boolean
Dim SDI12Read As Boolean
Public YSI(SDI12Vals) 'array to hold SDI12 values returned
Public SDI_Str As String

DataTable (Test,1,1000)
DataInterval (0,15,Sec,10)
Minimum (1,batt_volt,FP2,0,False)
Sample (1,PTemp,FP2)
EndTable

DataTable (YSIData,YSIDataTrig,1000)
Sample (SDI12Vals,YSI(),IEEE4)
EndTable

BeginProg
Scan (1,Sec,0,0)
PanelTemp (PTemp,250)
Battery (batt_volt)
CallTable Test
NextScan

SlowSequence
Scan (1,Sec,3,0)

If TimeIntoInterval (0,SDI12Freq,Min) Then
SDI12Read = TRUE
SDI_Str = "C!"
YSI(1) = NAN
EndIf

If SDI12Read Then
SDI12Recorder (YSI(),1,0,SDI_Str,1.0,0)
SDI_Str = "C"
'This cmd without the ! returns the value 1e9 in the first location YSI(1) until the nnn timeout then issues the xD0! cmd
'Also, using the "C" cmd without the ! will stop the next measurement cmd from being issues following data retrieval
If YSI(1) < 1e9 Then
SDI12Read = FALSE
YSIDataTrig = TRUE
EndIf
EndIf

CallTable (YSIData)
YSIDataTrig = FALSE

NextScan

EndProg

---------------------------------------------------
Public PTemp, batt_volt

Const SDI12Vals = 16 'max number SDI12 values to be returned
Public YSI(SDI12Vals) 'array to hold SDI12 values returned

DataTable (Test,1,1000)
DataInterval (0,15,Sec,10)
Minimum (1,batt_volt,FP2,0,False)
Sample (1,PTemp,FP2)
EndTable

DataTable (YSIData,1,1000)
Sample (SDI12Vals,YSI(),IEEE4)
EndTable

BeginProg
Scan (1,Sec,0,0)
PanelTemp (PTemp,250)
Battery (batt_volt)
CallTable Test
NextScan

SlowSequence
Scan (5,Min,3,0)
SDI12Recorder (YSI(),1,0,"M!",1.0,0)
CallTable (YSIData)
NextScan
EndSequence
EndProg

--------------------------------------------------
Public PTemp, batt_volt

Const SDI12Vals = 16 'max number SDI12 values to be returned
Public YSI(SDI12Vals) 'array to hold SDI12 values returned

DataTable (Test,1,1000)
DataInterval (0,15,Sec,10)
Minimum (1,batt_volt,FP2,0,False)
Sample (1,PTemp,FP2)
EndTable

DataTable (YSIData,1,1000)
Sample (SDI12Vals,YSI(),IEEE4)
EndTable

BeginProg
Scan (1,Sec,0,0)
PanelTemp (PTemp,250)
Battery (batt_volt)
CallTable Test
NextScan

SlowSequence
Scan (5,Min,3,0)
SDI12Recorder (YSI(),1,0,"C!",1.0,0)
CallTable (YSIData)
NextScan
EndSequence
EndProg


dealtoledo Jan 27, 2012 07:52 PM

What would be the wiring configuration using a YSI 6600 and the Model 6096 Flying lead adaptor?


DanielChai Sep 21, 2012 04:05 PM


If SDI12Read Then
SDI12Recorder (YSI(),1,0,SDI_Str,1.0,0)
SDI_Str = "C"
'This cmd without the ! returns the value 1e9 in the first location YSI(1) until the nnn timeout then issues the xD0! cmd
'Also, using the "C" cmd without the ! will stop the next measurement cmd from being issues following data retrieval
If YSI(1) < 1e9 Then
SDI12Read = FALSE
YSIDataTrig = TRUE
EndIf
EndIf

for this part, do we need to invoke the xD0! command by ourselves or the SDI12Recorder() will do it automatically?

Thanks


Sam Sep 25, 2012 04:36 AM

XD0! will be issued automatically when the timeout hits

Log in or register to post/reply in the forum.