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.

Has anyone successfully integrated Seabird Instrumentation with a CR1000? Particularly a SBE37


HKing Mar 26, 2018 07:27 PM

Hi, I have an SBE 37 from seabird, and have spend a few days trying to make the two work together. I originally started using SDI12, as the new SBE37 supports that, and made no headway using Short cut to create an SDI12 multiprobe code. 

After that I dove into serial communictions via the cr1000 and that was all new to me. After reading lots of manuals and trying many different attempts, commands etc. I was still only getting a NAN. I am concerend the data from the SBE37 might be binary, so I may return to working with SDI12.

So, before I spend to much more time trying this has anyone succesfully integrated the two before or something similar? 

Thanks. 


JDavis Mar 26, 2018 07:35 PM

 This is an example program for a Seabird Microcat confuged for output format 1. Baud rate is set at 9600. Other Seabird sensors are similar.

'CR1000 Series Datalogger
Public PTemp, batt_volt
Const MicroCatPort = Com2
'Variables for MicroCAT output format 1
Public MicroCATValue(5)
Alias MicroCATValue(1) = Temperature
Alias MicroCATValue(2) = Conductivity
Alias MicroCATValue(3) = Pressure
Alias MicroCATValue(4) = Salinity
Alias MicroCATValue(5) = SoundVelocity
Units Temperature = C
Units Conductivity = S/m
Units Pressure = decibars
Units Salinity = psu
Units SoundVelocity = m/s
Dim responseString As String * 128

'Define Data Tables.
DataTable (Test,1,-1) 'Set table size to # of records, or -1 to autoallocate.
  DataInterval (0,60,Sec,10)
  Minimum (1,batt_volt,FP2,0,False)
  Sample (1,PTemp,FP2)
  Sample (5,MicroCATValue(),IEEE4)
EndTable



'Main Program
BeginProg
  SerialOpen (MicroCatPort,9600,0,0,256)
  Scan (1,Sec,0,0)
    PanelTemp (PTemp,250)
    Battery (batt_volt)
    'Enter other measurement instructions
    'Call Output Tables
    'Example:
    CallTable Test
  NextScan
  SlowSequence
  Scan (10,Sec,3,0)
    SerialFlush (MicroCatPort)
    'I have had customers need send send carriage returns first to wake up the MicroCAT
    SerialOut (MicroCatPort,"TS" & CHR(13) & CHR(10),"",0,0) 'Trigger a sample and output
    SerialIn (responseString,MicroCatPort,600,13,128) 'Read in response, it takes about 3 seconds for the MicroCAT to begin sending the response
    If Len(responseString > 10) Then
      Erase(MicroCATValue())
      SplitStr (MicroCATValue(),responseString,"",5,0)
    Else
      Move (MicroCATValue(),5,NAN,1)
    EndIf
    SerialOut (MicroCatPort,"QS" & CHR(13) & CHR(10),"",0,0) 'Put back to sleep
  NextScan
EndProg

 


HKing Mar 27, 2018 01:45 PM

Thank you! That is very similar to where I ended up, but I see the changes I need to make.  You are also correct that the SBE37 does have an MCAT in it. 

I have one remaining question though. I see that your serial out is through Com2 but your Serial in is through ComRS232. Can the Serial out and in not be on the same comport? Or could it, for example, be Serial out Com2 and Serial in Com1? Because I do not want to go cutting my cable up so I can us the RS232 (Not Isolated) port on the cr1000 and Com2. 


JDavis Mar 27, 2018 02:48 PM

You are right, when I changed the program to use a constant for the port, I forgot to change COMRS232 to MicroCatPort in the SerialIn.


HKing Mar 27, 2018 03:05 PM

Okay, so the cr1000 can send and recieve both on Com2. I have used your above code, with a few edits this morning, and I am still only getting a NAN. When I open the Terminal Emlator, and go into W and watch my com port. I can see that my TS is going out, But, I am not getting a response from the MicroCat. I saw your note abouy havving to add some carriage returns and I set it up to send 5. I Got nothing back then either. 

Take and look and see if you see anything out of place or more suggestions. 

'CR1000 Series Datalogger
Public PTemp, batt_volt
Public Flag(1) As Boolean
Public Flagreport(1) As Boolean

Const MicroCatPort = ComRS232

'Variables for MicroCAT output format 1
Public MicroCATValue(5)
Alias MicroCATValue(1) = Temperature
Alias MicroCATValue(2) = Conductivity
Alias MicroCATValue(3) = Pressure
Alias MicroCATValue(4) = Doxy
Alias MicroCATValue(5) = Salinity

Units Temperature = C
Units Conductivity = S/m
Units Pressure = decibars
Units Doxy = ml/L
Units Salinity = psu

Dim responseString As String * 150

'Define Data Tables.
DataTable (Test,1,-1) 'Set table size to # of records, or -1 to autoallocate.
DataInterval (0,60,Sec,10)
Minimum (1,batt_volt,FP2,0,False)
Sample (1,PTemp,FP2)
Sample (5,MicroCATValue(),IEEE4)
EndTable

'Main Program

BeginProg
SerialOpen (MicroCatPort,9600,0,0,256)
Scan (1,Sec,0,0)
PanelTemp (PTemp,250)
Battery (batt_volt)

'Enter other measurement instructions
'Call Output Tables
'Example:
CallTable Test
NextScan
SlowSequence
Scan (10,Sec,3,0)
SerialFlush (MicroCatPort)
'SerialOut(MicroCatPort,CHR(13),"",5,500)  'currenty turned off
'I have had customers need send send carriage returns first to wake up the MicroCAT
SerialOut (MicroCatPort,CHR(84) & CHR(83) & CHR(13) & CHR(10),"",0,0) 'Trigger a sample and output 'replaced "TS" with CHR(84)&CHR(83) which is equivilant to TS. 
'Delay(1,5,Sec) 'added this becase possibly not enoug time for MCAT to respond. Currently Turned off. 
SerialIn (responseString,ComRS232,600,13,150) 'Read in response, it takes about 3 seconds for the MicroCAT to begin sending the response
If Len(responseString > 10) Then
Erase(MicroCATValue())
SplitStr (MicroCATValue(),responseString,"",5,0)
Else
Move (MicroCATValue(),5,NAN,1)
EndIf
'SerialOut (MicroCatPort,"QS" & CHR(13) & CHR(10),"",0,0) 'Put back to sleep 'currenty turned off becase do not want MCAT to go to sleep. 

'for trigguring manual reading. Not active currently. 

' If Flag(1) = True Then
' Flagreport(1) = "High"
' SerialFlush (MicroCatPort)
' SerialOut(MicroCatPort,CHR(13),"",5,500)
' 'I have had customers need send send carriage returns first to wake up the MicroCAT
' SerialOut (MicroCatPort,"TS" & CHR(13) & CHR(10),"",0,0) 'Trigger a sample and output
' SerialIn (responseString,ComRS232,600,13,128) 'Read in response, it takes about 3 seconds for the MicroCAT to begin sending the response
' If Len(responseString > 10) Then
' Erase(MicroCATValue())
' SplitStr (MicroCATValue(),responseString,"",5,0)
' Else
' Move (MicroCATValue(),5,NAN,1)
' EndIf
' 'SerialOut (MicroCatPort,"QS" & CHR(13) & CHR(10),"",0,0) 'Put back to sleep
' Flag(1) = False
' Flagreport(1) = "Low"
' Else
' EndIf
NextScan
EndProg


JDavis Mar 27, 2018 03:17 PM

You should connect the sensor up to a PC and attempt to send commands with a terminal program. If the commands don't work in a terminal, the sensor either isn't wired correctly, or configured correctly.


HKing Mar 27, 2018 03:49 PM

Using Tera Term I am able to connect and send and recieve information from the SBE37. And I am using the RS232 Port not instead of the com ports, still no succes. 


JDavis Mar 27, 2018 05:04 PM

If the terminal on the datalogger shows it is doing the same as you did manually in Tera Term, check the wiring. You could have Tx and Rx swapped.


HKing Mar 27, 2018 08:22 PM

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