Dear All,
I am installing to connect CR200 with Vibrating wire interface that using SDI12.
This is a programming that I created.
'CR200 Series
'Created by Short Cut (2.8)
'Declare Variables and Units
Public BattV
Public Level
Public Value1(4)
Units BattV=Volts
'Define Data Tables
DataTable(Table1,True,-1)
DataInterval(0,60,Min)
Sample(1,Level)
EndTable
DataTable(Table2,True,-1)
DataInterval(0,60,Min)
Sample(1,BattV)
EndTable
'Main Program
BeginProg
Scan(60,Sec)
'Default Datalogger Battery Voltage measurement BattV
Battery(BattV)
SWBatt(1)
SDI12Recorder(Level,"0M!",1,0)
SDI12Recorder(Value1(),"0D0!",1,0)
'Call Data Tables and Store Data
CallTable(Table1)
CallTable(Table2)
NextScan
EndProg
Level received is zero, I think that, SDI12 is ok. but Value1() is incorrect.
This is link for these documents
1. http://www.mediafire.com/imageview.php?quickkey=bgtdheqpuhxsujn&thumb=4,
2. http://www.mediafire.com/?56s47dnko4nc5om)
The Pic1.pgn for the result and The document for Vibrating wire interface.
Thanks
Nguyen Van Hung
Our dataloggers automatically send the D0 command after the M0 command so you should be able to remove the second instruction and put the Value array in place of the Level variable in the first call.
You migh also like to check out Campbell's own AVW200 interface which also supports SDI-12 and more.
Dear Andrew Sandford,
Thanks for your support.
I removed the first command and replace level by value1(), but I do not receive the result.
'CR200 Series
'Created by Short Cut (2.8)
'Declare Variables and Units
Public BattV
Public Level
Public Value1(4)
Units BattV=Volts
'Define Data Tables
DataTable(Table1,True,-1)
DataInterval(0,60,Min)
Sample(1,Level)
EndTable
DataTable(Table2,True,-1)
DataInterval(0,60,Min)
Sample(1,BattV)
EndTable
'Main Program
BeginProg
Scan(60,Sec)
'Default Datalogger Battery Voltage measurement BattV
Battery(BattV)
SWBatt(1)
SDI12Recorder(Value1(),"0M!",1,0)
'SDI12Recorder(Value1(),"0D0!",1,0)
'Call Data Tables and Store Data
CallTable(Table1)
CallTable(Table2)
NextScan
EndProg
Thanks
Nguyen Van Hung
That should work although I can see a couple of possible issues:
a) I think the interface may take longer than 60 sec to perform its measurements, so the scan rate of the program needs to be longer.
b) if you are following their wiring the interface will be powered from SW12Batt. You are turning this on (but never off as far as I can see). I would expect you may need to wait for a second or so (ask Key), after turning the interface on before it will respond to the SDI-12 command.
Otherwise check the wire, check the address of the interface and check it can do measurements independent of SDI-12 first.
Yes, I waited for a few seconds but I always receive zero.
I also am contacting with the manufacture to solve this issue.
Thanks for your support.
I will continue test the equipment and need support you.
The previous response from 25yasmi is spurious (he/she/it just planted some SPAM links with a made up message). Please ignore what was said. It will be deleted later today.
Hi Sandford,
I use Vibrating wire interface that has 8 channels.
I use two channels of vibrating wire interface(VW)
I test SDI-12 command of the VW via Terminal of Loggnet and they work ok.
But when I program in CR200 with SDI12Recorder command. They only get value of 0D0!.
I want to use 0D2! command to get other value. but not work ok.
This is the program.
'CR200 Series Datalogger
'Read Vibrating Wire Nari Sensors on a VW - 108 Interface throught SDI 12
'Program author: Nguyen Van Hung
'Company:Measurement and Control Equipment Company Limited.
'847 Huyen Ky, Phu Lam, Ha Dong, Hanoi, Vietnam
'HP:+84904251826, mail: mcttvietnam@gmail.com
'1 - Aug 2, 2011
'2 - Aug 22, 2011
'Declare Variables and Units
Public BattV
Public VWP_Hz(2)
Public Temp(2)
Public mH20(2)
Dim kPa(2)
Public mV(2)
Dim i
Dim Im(2),Temp_R(2)
Units BattV=Volts
' A,B,C Factors for kPa
'1. HL1: S/N:1718, 35kPa, A = -1.3050E-05,B = 0.0904, C = 155.8315
Const A_1= -1.3050E-05
Const B_1= 0.0904
Const C_1= 155.8315
Const Offset_1= 0.000
'2. HL2: S/N:1681, 400kPa, A = 6.1540E-07,B = -0.1792, C = 1392.0670
Const A_2= 6.1540E-07
Const B_2= -0.1792
Const C_2= 1392.0670
Const Offset_2= -0.31
' *************
Const A=.001403040 'Coefficients for Steinhart-Hart equation
Const B=0.000237318 ' used to convert resistance to Temp
Const C=0.00000009
'Define Data Tables
DataTable(DL6,True,-1)
DataInterval(0,30,Min)
Sample(1,VWP_Hz(1))
Sample(1,mH20(1))
Sample(1,Temp(1))
Sample(1,VWP_Hz(2))
Sample(1,mH20(2))
Sample(1,Temp(2))
Sample(1, BattV)
EndTable
'Main Program
BeginProg
Scan(15,Min)
'Default Datalogger Battery Voltage measurement BattV
Battery(BattV)
'Delay(8,sec)
SDI12Recorder(VWP_Hz(),"0M!",1,0)
'Convert kHz^2
VWP_Hz(1)= VWP_Hz(1)*VWP_Hz(1)/1000
VWP_Hz(2)= VWP_Hz(2)*VWP_Hz(2)/1000
' Calc mH20
kPa(1) = A_1*VWP_Hz(1)*VWP_Hz(1)+ B_1*VWP_Hz(1)+C_1
mH20(1)= kPa(1)*0.102 +Offset_1
kPa(2) = A_2*VWP_Hz(2)*VWP_Hz(2)+ B_2*VWP_Hz(2)+C_2
mH20(2)= kPa(2)*0.102 +Offset_2
'Delay(8,sec)
SDI12Recorder(mV(),"0D2!",1,0) ' Read thermistor
'Calc Temp
'mV(1)= Value(9)
'mV(2)= Value(10)
'Calc for Thermistor
For i=1 To 2
mV(i)= mV(i)/1000
Im(i)= (2.5 - mV(i))/3300
Temp_R(i)= mV(i)/Im(i)
Next
'Calculate temperature for thermistor
For i= 1 To 2
Temp(i)=1/(.001403040+.000237318*Temp_R(i)+.00000009*Temp_R(i)^3)
Temp(i)=Temp(i)-273.15
Next
'Call Data Tables and Store Data
CallTable(DL6)
NextScan
EndProg
Please support me.
Thanks
Nguyen Van Hung
Hi All,
I know that Our dataloggers automatically send the D0 command after the M0 command and I get this data but when I send 0D2! then I can not receive the data.
Thanks
Nguyen Van Hung
The datalogger should automatically issue as many D commands as necessary to collect the number of values available.
In response to the logger issuing the M command the sensor should respond with the time to wait and the number of measurements it will return. After that time the logger will send 0D1!, 0D2!, 0D3! etc to get as many values as the sensor originally indicated would be returned. (The sensor can return more than one value at a time of course).
The M command only allows up to 9 values to be returned. Other commands allow more, or more commonly sensors allow other data to be got using different numbered M commands.
To see this described see the SDI-12 document:
http://www.sdi-12.org/sdi-12/SDI-12_version1_3%20January%2012%202009.pdf
If the sensor is not following that process, recent versions of the logger operating systems (post Sept 2010) for the CR200 do support sending the D command independently of the M command. Make sure you have a recent OS if the sensor really needs this.
Hi Andrew sandford,
I have not got value of 0D2! Command of SDI-12 Protocol from Sensors,
However, I have checked 0M!, 0D0!, 0D2! via Terminal loggner and it works ok.
As result that I got it from CR200, I have got value of 0D0!. that as I know in a few documents, 0D0!, 0D2!, commands will automatic after we send 0M! command to sensors.
I think that, I have meet the issue with cr200, I downloaded os newest from website of campbell sientific but it is not successful.
Can you use the terminal mode and tell us the response you get to the 0M! command and then the responses you get to the 0D0!, 0D1! and the 0D2! commands. From your program can you give the variable declaration for the destination variable in your program and what values are written in that destination by the logger, please.
Hi Andrew,
I understand your comments and I have done it.
However, I will send you the result when I go to the site in a few days.
Thanks.
Hi Andrew,
The equipments worked ok. I downloaded newest OS for Cr200.
Thanks for your support.
Best Regards,
I've skimmed over all of these posts, and the one things that I would recommend doing is figuring out which instruction WILL work by using the terminal bypass mode where you can actually the sdi-12 sensor directly and test everything prior to playing guessing games with the code.
if you need help with the bypass let me know and i'll elaborate.
Mike
Intermountain Env
www.inmtn.com
Hi Mike,
Thanks for your information.
I have seen your website. it is very helpful for us.
Please send me your mail. I need contact to direct to ask you a few questions.
Hi Nguyen Van Hung:
In all my CR200 programs with sdi12 sensors we dont have the quatation marks around the sdi12 command:
you have:
SDI12Recorder(VWP_Hz(),"0M!",1,0)
we have:
SDI12Recorder(VWP_Hz(),0M!,1,0)
Not sure it makes a difference but I rememmber having issues with this when testing and there is a subtle difference between the CR200 and higher grade packbus loggers like the CR800/1000 etc. I suspect it has to do with the fact that the CR200 cant work with strings.
Hope this fixes it up for you.