As I understand sending a "M!" command with "SDI12Recorder" will send a "D0!" after the sensor response time expires.
Is it possible instead to send a "M!" command and "D0!" command in seperate instructions so that the program does not pause while waiting for the sensor?
I need to do this as our SDI12 level sensor works with "M!" but not with "C!" (Note CR800 OS6 worked fine with "C!" but newer versions do not, it is the same with the CR1000).
I have checked the sensors reponses using Terminal Emulator and both "M!" & "C!" commands buffer the same value but using the CRBasic "SDI12Recorder" command it produces "NAN"
新对话如下:
CJ
I had this exact same problem last week, all my woes began with updating the OS to OS10 (CR800).
How I got past the problem was to use a slowsequence command to execute the SDI12recorder command at a slower interval than the main program is running. (Thanks Simon!)
Try pasting this code at the end of your program (before the EndProg of course)
Slowsequence
Scan (2,Min,3,0)
SDI12Recorder(Destination,SDIPort,SDIAddress,"M!",1.0,0)
NextScan
It worked for me, so give it a try.
Cheers
Grant
新对话如下:
Can you please tell us what the sensor is that does not work with OS 18 please so we can investigate this.
新对话如下:
Thanks for the info Grant we may have to do that.
The sensor we are using is the ES&S PumpPro 6150 level sensor however it also happens with the 6100 version.
In the mean time we have been checking the SDI-12 communications between the logger and sensor. We have also tested a Hydrolab Sensor configured with just pH for comparison (which works on the newer OS CR800 & CR1000). The most obvious thing we noticed is the data format where the ES&S sensor replies with:
00291 (Address 0 / 029 Seconds Wait / 1 Parameter)
and the Hydrolab:
103501 (Address 1 / 035 Seconds Wait / 01 Parameter)
The logger then sends a 0D0! to the level sensor and inturn receives the expected data (0+0004.795), however it then goes on to send a 0D1! and receives an invalid result which overwrites the good data, which explains why we get NAN as a result.
Is 0D1! Being sent correctly?
This is the code we normally use to read the level sensor:
#########################################
If IfTime(4,5,Min) OR ReadSensors=-1 Then SDI_Cmd="C!" Else SDI_Cmd="C"
SDI12Recorder (Level_Raw(),3,0,SDI_Cmd,1.0,0)
#########################################
And here is a short dump from the Terminal Emulator in SDI12 Snoop Mode:
###ES&S LevelPro 6100 / ES&S PumpPro 6150###
T 11:24:10.02 0C!
T 11:24:10.12 00291..
T 11:24:10.12 ..&B....N 0D0!..&B......0+0004.795....&B..... 0D1!..&B......0....&B.....
###Hydrolab MS5 Sensor###
T 13:24:00.03 1C!
T 13:24:00.13 103501..
T 13:24:00.13 ..&B....u01D0!..&B....".1+7.76..
(Also on a separate note for some reason there is no R for Recieve only T & the time stamp does not update and also noticed it jumps around erratically)
At the moment we have only had success with the M! command in a slowsequence:
#########################################
SlowSequence
Scan (1,Min,0,0)
If Read6150=-1
SDI12Recorder (Level_Raw,3,0,"M!",1.0,0)
Read6150=0
EndIf
NextScan
#########################################
新对话如下:
CJ
With my particular issue, I was scanning at 10 seconds, but the Sontek Doppler had a 120 second average time. My guess was there wasn't enough time for the Doppler to respond before get another new "C!".
What is your scan rate? I notice the response time for the depth is 29 seconds and the pH is 35 seconds, may well be the same issue I had, hence why the 1 min slowsequence is working.