I am trying to set up a Vaisaila WMT702 (configured for RS-485) ultrasonic anemometer with a CR3000. I am making use of the SDM-SIO1A in order to make the connection between the logger and instrument. I have followed the guidance in the relevant Vaisala and Campbell manuals, however I am not able to get anything other than garbled text or single question marks (hex 3F) back as a reply from the anemometer. I would be grateful to anyone who has managed to set up a WMT702 using RS-485 for any advice.
You might have a baud rate mismatch. It is easiest to get that sorted out if the sensor is set on an automatic output.
Here is a program I wrote a while back for a WMT702. Your comport number of course will be different. For using the SDM-SIO1A in RS485 mode, the format parameter in SerialOpen will be different. There is a table in the SDM-SIO1A manual.
'CR1000 Series Datalogger
'WMT702 programed to output at 2Hz automatic on sensor's com2, RS232 19200 baud 8N1, data format 23
'Declare Public Variables
Const SensorPort1 = Com3
Const SensorPort2 = Com4
Public WindSpd_1, WindDir_1,WindSpd_2,WindDir_2
Public WindSensorStat_1 As Long, WindSensorStat_2 As Long
Public PTemp, batt_volt
Dim NBytesReturned
Dim ReturnedData As String * 256
Public SubStrings(9) As String * 32
'Define Data Tables
DataTable (Test,1,1000)
DataInterval (0,15,Sec,10)
Minimum (1,batt_volt,FP2,0,False)
Sample (1,PTemp,FP2)
EndTable
'Main Program
BeginProg
SerialOpen (SensorPort1,19200,3,0,512)
SerialOpen (SensorPort2,19200,3,0,512)
Scan (1,Sec,0,0)
PanelTemp (PTemp,250)
Battery (batt_volt)
'Enter other measurement instructions
'Call Output Tables
SerialInRecord (SensorPort1,ReturnedData,&h24,0,&h0d0a,NBytesReturned,01)
'returneddata = 999.00,999.00,00.00,00.00,331.30,00.3,23.3,20.0,40
SplitStr (SubStrings(),ReturnedData,",",9,0)
WindSensorStat_1 = SubStrings(9)
WindSpd_1 = SubStrings(1)
WindDir_1 = SubStrings(2)
SerialInRecord (SensorPort2,ReturnedData,&h24,0,&h0d0a,NBytesReturned,01)
'returneddata = 999.00,999.00,00.00,00.00,331.30,00.3,23.3,20.0,40
SplitStr (SubStrings(),ReturnedData,",",9,0)
WindSensorStat_2 = SubStrings(9)
WindSpd_2 = SubStrings(1)
WindDir_2 = SubStrings(2)
'Example:
CallTable Test
NextScan
EndProg