Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Regular Weather Updates (Pocket Weather Station?)

Has anyone ever used Labview to talk to a Kestrel Pocket Weather Tracker?  I have it hooked to my laptop through COM1, and it talks to the manufacturer's software, but when I try to use VISA to read from it I keep getting error "-1073807339" timeout errors.

I'd like to poll it every 30 minutes for the temperature and humidity, but it seems to be built more for recording the weather conditions throughout the day and downloading them at the end of the day (that's how the manufacturer's software works).  I'm using the Kestrel because it's what I have available; is there an easier way to get temperature and humidity data into my laptop every 30 minutes without being connected to the internet?

Thanks!
Denise Nelson
0 Kudos
Message 1 of 9
(4,702 Views)
probably you use the wrong end character for your message.
Start to record what happens during the original software.
You can use NI-Spy to track the serial port, or http://www.serial-port-monitor.com/


greetings from the Netherlands
0 Kudos
Message 2 of 9
(4,689 Views)
Excellent!  The serial port monitor helps a ton!  Thanks!  (NI Spy was tracking what messages I was sending in Labview, but not in the manufacturer's program).

So, my laptop sends (in hex, but it seems like I have to send it in ASCII when working in Labview?  I can't seem to figure out how to send it in hex, but it looks the same in the monitor)

0D 0D 62 0D

and the weather station responds with

0D 0A 3E 20 62 0D 0A 3E 20

and then goes into the weather data, and ends with

0D 0A 3E 20

So... is there a way to get it to ignore the first string and accept the second string as the termination?  3E and 20 aren't used anywhere in the weather data, but 0D and 0A are.

Thanks again!
Denise

0 Kudos
Message 3 of 9
(4,672 Views)

Hi Denise,

You can select what termination character you would like to use in LabVIEW. In the VISA Configure Serial Port VI, there is a terminal for terminal character.  Simply place a control at this terminal and then select or enter your desired termination character.

Ted

 



Message Edited by Ted H on 12-04-2007 12:40 PM
Ted H
Applications Engineering
National Instruments
0 Kudos
Message 4 of 9
(4,659 Views)
I did that, but it seems to be responding to the first character instead of the third (like I want it to).  How can I get it to ignore the first 2 instances of the termination character?

Thanks!
Denise
0 Kudos
Message 5 of 9
(4,656 Views)
So, I added an addition 'Read' VI after the first one, and now the second one collects the weather data... sometimes.  Sometimes the whole thing gets a framing error.  I checked my settings... 9600 baud, wordlength=8, 1 stop bit, no parity, but I'm not sure how to determine flow control.  All of the available settings "validate" in MAX.  When I use the manufacturer's software, it sends Xon/Xoff characters, so is that what I should use?

Thanks!
Denise
0 Kudos
Message 6 of 9
(4,648 Views)

Hi Denise,

I'm afraid VISA will always respond to the first instance of the termination character.  One option you do have is receive all the data from the weather station, and then parse the data using the LabVIEW string commands.  You can search the data for the particular sequence of characters you are looking for and then output only the data associated with this data.

Ted

Ted H
Applications Engineering
National Instruments
0 Kudos
Message 7 of 9
(4,647 Views)

If the manufacturer's software is using flow control, go ahead and try using it.  It doesn't hurt to at least try.  Do you have a programming manual for this device?  A manual would tell you exactly what communication settings to use.

Ted

Ted H
Applications Engineering
National Instruments
0 Kudos
Message 8 of 9
(4,642 Views)
Ted,
A programming manual would make this so much easier!  No, I don't have one; their documentation seems to be pretty sparse.

Sometimes I can get intelligeable conversation back, and sometimes it's just garbage (with the framing error code). 

Thanks for your help, perhaps I'll come up with something.

Denise
0 Kudos
Message 9 of 9
(4,613 Views)