Thread Subject:
DAVIS WEATHER INSTRUMENT

Subject: DAVIS WEATHER INSTRUMENT

From: SHAUN MONTMINY

Date: 19 Jun, 2005 09:52:34

Message: 1 of 5

i HAVE RECENTLY PUCHASED THE DAVIS WEATHER INSTRUMENTS VANTAGE PRO 2
AND WISH TO COMMUNICATE VIA SERIAL PORT. I HAVE BEEN SUCCESSFUL IN
COMMUNICATING VIA SERIAL PORT FOR OTHER INSTRUMENTS. I AM ABLE TO
COMMUNICATE USING HYPERTERMINAL. I USED THE SETTINGS FROM
HYPERTERMINAL FOR CONFIG THE PORT. MANUFACTURE REQUIRES ALL CAPS AND
ASCII STRINGS. FIRST SEND IS TO "WAKE UP" UNIT AND SECOND SHOULD
RECEIVE A RESPONSE OF "TEST". THE SOURCE CODE SO FAR IS AS FOLLOWS:

%weather program
clear all, close all, clc
s1 =
serial('COM1','BaudRate',9600,'DataBits',8,'StopBits',1,'Parity','none
','FlowControl','none','Terminator','LF');

fopen(s1);
fprintf(s1,'%s','\n')
pk1= fscanf(s1)

fprintf(s1,'TEST')
pk2 = fscanf(s1)

fclose(s1)
delete(s1)
clear s1

I BELIEVE THAT THE LINE FEED IS THE PROBLEM. I should get an inital
response of LF and CR (\n\r). After I send test I should recieve
TEST\n back. Also tried waking up unit via hyperterminal and then
used matlab to try test command (no luck).

- CAN ANYONE GIVE ME SOME SUGGESTIONS?

Subject: DAVIS WEATHER INSTRUMENT

From: rf

Date: 20 Jun, 2005 10:53:32

Message: 2 of 5

SHAUN MONTMINY wrote:
>
>
> i HAVE RECENTLY PUCHASED THE DAVIS WEATHER INSTRUMENTS VANTAGE PRO
> 2
> AND WISH TO COMMUNICATE VIA SERIAL PORT. I HAVE BEEN SUCCESSFUL IN
> COMMUNICATING VIA SERIAL PORT FOR OTHER INSTRUMENTS. I AM ABLE TO
> COMMUNICATE USING HYPERTERMINAL. I USED THE SETTINGS FROM
> HYPERTERMINAL FOR CONFIG THE PORT. MANUFACTURE REQUIRES ALL CAPS
> AND
> ASCII STRINGS. FIRST SEND IS TO "WAKE UP" UNIT AND SECOND SHOULD
> RECEIVE A RESPONSE OF "TEST". THE SOURCE CODE SO FAR IS AS FOLLOWS:
>
> %weather program
> clear all, close all, clc
> s1 =
>
serial('COM1','BaudRate',9600,'DataBits',8,'StopBits',1,'Parity','no
> ne

In the following line you have specified the terminator as 'LF'.
Thus you should not have to include '\n' in the fprintf command line.

> ','FlowControl','none','Terminator','LF');
>
> fopen(s1);
> fprintf(s1,'%s','\n')
> pk1= fscanf(s1)
>
> fprintf(s1,'TEST')
> pk2 = fscanf(s1)
>
> fclose(s1)
> delete(s1)
> clear s1
>
> I BELIEVE THAT THE LINE FEED IS THE PROBLEM. I should get an inital
> response of LF and CR (\n\r). After I send test I should recieve

Earlier you have specified 'LF' as the terminator yet here you say it
should be 'LF/CR'. You need to know which.
rf

> TEST\n back. Also tried waking up unit via hyperterminal and then
> used matlab to try test command (no luck).
>
> - CAN ANYONE GIVE ME SOME SUGGESTIONS?

Subject: DAVIS WEATHER INSTRUMENT

From: William

Date: 17 Aug, 2012 14:48:14

Message: 3 of 5

Hello,

I have been able to communicate to Davis vantage pro 2 via Serial,
uisng hyperterminal.

I was also trying to read data from the wather station using the LOOP comand and MATLAB. the problem I have is that the downloaded date is not readable.

Here my code

s = serial('COM5','BaudRate',19200,'DataBits',8);
fopen(s)
fprintf(s,'LOOP 1')
out=fscanf(s)
fclose(s)
pause(1)

I know bout rate has to be 19200

Subject: DAVIS WEATHER INSTRUMENT

From: dpb

Date: 17 Aug, 2012 18:42:29

Message: 4 of 5

On 8/17/2012 9:48 AM, William wrote:
> Hello,
>
> I have been able to communicate to Davis vantage pro 2 via Serial,
> uisng hyperterminal.
>
...

> s = serial('COM5','BaudRate',19200,'DataBits',8);
...

>
> I know bout rate has to be 19200

What about parity, etc., ...?

What's message terminator, if any.

I'd think Davis would have all the info you need -- I've one of the
Vantage VUE w/ no serial I know of so no direct info directly
applicable. If can't find it in the doc or online, I've found their
tech support to be very accommodating--give 'em a buzz.

--

Subject: DAVIS WEATHER INSTRUMENT

From: TideMan

Date: 17 Aug, 2012 21:11:12

Message: 5 of 5

On Saturday, August 18, 2012 2:48:14 AM UTC+12, William wrote:
> Hello,
>
>
>
> I have been able to communicate to Davis vantage pro 2 via Serial,
>
> uisng hyperterminal.
>
>
>
> I was also trying to read data from the wather station using the LOOP comand and MATLAB. the problem I have is that the downloaded date is not readable.
>
>
>
> Here my code
>
>
>
> s = serial('COM5','BaudRate',19200,'DataBits',8);
>
> fopen(s)
>
> fprintf(s,'LOOP 1')
>
> out=fscanf(s)
>
> fclose(s)
>
> pause(1)
>
>
>
> I know bout rate has to be 19200

Have you seen the (free) software cumulus:
http://sandaysoft.com/products/cumulus
I have a FineOffset, not a Davis, weather station and I find cumulus excellent. It will read just about any weather station and it writes an ASCII file at whatever interval you set that is easily imported into Matlab. There's also a forum where you can get help.

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us