Hi . I made a programm for my CR800 on short cut that get wind measurements from Gill's windsonic 2d anemometer but I only got NAN as response . I'm running against the time . Anyone can help? thanks
Can you post your program? A description of the wiring would help in troubleshooting as well.
'CR800 Series
'Created by Short Cut (3.2)
'Declare Variables and Units
Dim WSStr As String * 21
Dim ByteRet
Dim ChkSumF As Boolean
Public BattV
Public PTemp_C
Public WSData(3)
Public N(9)
Alias WSData(1)=WindDir
Alias WSData(2)=WS_ms
Alias WSData(3)=WSDiag
Alias N(1)=SmplsF
Alias N(2)=Diag1F
Alias N(3)=Diag2F
Alias N(4)=Diag4F
Alias N(5)=Diag8F
Alias N(6)=Diag9F
Alias N(7)=Diag10F
Alias N(8)=NNDF
Alias N(9)=CSEF
Units BattV=Volts
Units PTemp_C=Deg C
Units WindDir=degrees
Units WS_ms=meters/second
Units WSDiag=unitless
'Define Data Tables
DataTable(Table1,True,-1)
DataInterval(0,60,Min,10)
Sample(1,WindDir,FP2)
Average(1,WS_ms,FP2,False)
Sample(1,WSDiag,FP2)
EndTable
DataTable(Table2,True,-1)
DataInterval(0,1440,Min,10)
Minimum(1,BattV,FP2,False,False)
EndTable
'Main Program
BeginProg
'Open Com1 for communications with the
'WindSonic1 (RS-232 38.4K baud) Two Dimensional Ultrasonic Wind Sensor
SerialOpen(Com1,38400,3,0,505)
'Main Scan
Scan(5,Sec,1,0)
'Default CR800 Datalogger Battery Voltage measurement 'BattV'
Battery(BattV)
'Default CR800 Datalogger Wiring Panel Temperature measurement 'PTemp_C'
PanelTemp(PTemp_C,_60Hz)
'WindSonic1 (RS-232 38.4K baud) Two Dimensional Ultrasonic Wind Sensor measurements 'WindDir', 'WS_ms', and 'WSDiag'
'Get data from WindSonic1 (RS-232 38.4K baud) Two Dimensional Ultrasonic Wind Sensor
SerialInRecord(Com1,WSStr,&h02,0,&h0D0A,ByteRet,00)
WindDir=Mid(WSStr,3,3)
WS_ms=Mid(WSStr,7,6)
WSDiag=Mid(WSStr,16,2)
ChkSumF=HextoDec(Mid(WSStr,20,2)) Eqv CheckSum(WSStr,9,18)
'Set diagnostic variables as needed
If ByteRet=0 Then WSDiag=NAN
Move(SmplsF,9,0,1)
Select Case WSDiag
Case=0
SmplsF=1
Case=1
Diag1F=1
Case=2
Diag2F=1
Case=4
Diag4F=1
Case=8
Diag8F=1
Case=9
Diag9F=1
Case=10
Diag10F=1
Else
NNDF=1
EndSelect
If Not (ByteRet<>0 Imp ChkSumF) Then CSEF=1
'Call Data Tables and Store Data
CallTable Table1
CallTable Table2
NextScan
EndProg
windsonic CR800
red 12v
green c1
white c2
black g
clear ground
Newer Windsonic1 ship with the baud rate set to 9600. Your program is using the 38400 baud rate.
Here is a section in the help in ShortCut that indicates how to tell which baud rate your sensor shipped with.
Unlike 38.4K baud sensors, 9.6K baud sensors are marked with a yellow heat shrink label on the cable and a white painted dot next to the connector socket on the sensor.
Yes . I do. But my sensor is a 38400. it simply doesn't work. Is my anemometer broken?
Use the terminal on the CR800 to look at the serial comms watch. As long as the sensor is wired up correctly, you should see data streaming from it. The data format is human readable.
For instructions on how to get into the 'W' comms watch mode in the terminal, refer to the appendix in this application note:
http://www.campbellsci.com/documents/technical-papers/serial.pdf
An unlikely possibility is the sensor is configured for polled mode. Additional troubleshooting can be found in the manual from Gill.
http://gillinstruments.com/products/anemometer/windsonic.htm
This video tutorial: https://www.campbellsci.com/videos?video=26 shows how to use the serial comms watch. Your port will be different, COM1 instead of SDI-12.
Hi. Sorry for taking too long to answear.
First you guys should know what is hapening.
I recieved a windsonic 1. Then its integration with the datalogger didn't work.
That's the why I posted you before.
So I have decided call the sensor's owner and he said that his sensor comunication protocol
was changed by a third party company from RS232 to SDI12.( is that possible?).
Therefore, I made another short cut program and the sensor still isn't working.
I've checked the sniffer mode on terminal emulator
and the only thing it shows me is: T 30 52 30 21 0R0!
my SDI12 program folows:
'CR800 Series
'Created by Short Cut (3.2)
'Declare Variables and Units
Public BattV
Public PTemp_C
Public WSData(3)
Public N(8)
Alias WSData(1)=WindDir
Alias WSData(2)=WS_ms
Alias WSData(3)=WSDiag
Alias N(1)=SmplsF
Alias N(2)=Diag1F
Alias N(3)=Diag2F
Alias N(4)=Diag4F
Alias N(5)=Diag8F
Alias N(6)=Diag9F
Alias N(7)=Diag10F
Alias N(8)=NNDF
Units BattV=Volts
Units PTemp_C=Deg C
Units WindDir=degrees
Units WS_ms=meters/second
Units WSDiag=unitless
'Define Data Tables
DataTable(Table1,True,-1)
DataInterval(0,60,Min,10)
Sample(1,WindDir,FP2)
Sample(1,WS_ms,FP2)
Sample(1,WSDiag,FP2)
Totalize(1,SmplsF,FP2,False)
EndTable
DataTable(Table2,True,-1)
DataInterval(0,1440,Min,10)
Minimum(1,BattV,FP2,False,False)
EndTable
'Main Program
BeginProg
'Main Scan
Scan(5,Sec,1,0)
'Default CR800 Datalogger Battery Voltage measurement 'BattV'
Battery(BattV)
'Default CR800 Datalogger Wiring Panel Temperature measurement 'PTemp_C'
PanelTemp(PTemp_C,_60Hz)
'WindSonic4 Two Dimensional Sonic Wind Speed & Direction Sensor measurements 'WindDir', 'WS_ms', and 'WSDiag'
'Get data from WindSonic4
SDI12Recorder(WindDir,3,"0","R0!",1,0)
If WindDir=NaN Then
Move(WS_ms,2,WindDir,1)
EndIf
'Set diagnostic variables as needed
Move(SmplsF,8,0,1)
Select Case WSDiag
Case=0
SmplsF=1
Case=1
Diag1F=1
Case=2
Diag2F=1
Case=4
Diag4F=1
Case=8
Diag8F=1
Case=9
Diag9F=1
Case=10
Diag10F=1
Else
NNDF=1
EndSelect
'Call Data Tables and Store Data
CallTable Table1
CallTable Table2
NextScan
EndProg
the wiring conections are:
windsonic CR800
pin 2 12V
pin 3 g
pin 1 g
pin 5 c3
According with gill's user manual the 12V conection is on pin 3 and gnd conection on pin 2 for Windsonic 1
and for windsonic 4 these conections are inverted.
When I was thinking that the sensor was a RS232 I power it with the 12V + on pin 3.
Is this wrong connection have caused damage on the sensor?
If not, Is something wrong with my wire conections ?
Regards.
Does the sticker on your sensor say Windsonic Option 1, or Windsonic Option 4?
Is your cable wired for a Windsonic Option 1, or for a Windsonic Option 4?