LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Davis Instruments Vangage Pro Weather Station and LabVIEW

I am developing a VI for communication with the Davis Instruments Vantage Pro Weather Station in LabVIEW.  I need to be able to take the current weather conditions off of the weather station and display them in a VI.  The Weather Station will be connected via RS232 to a Compact Fieldpoint.  Currently I am planning on sending the request command over the serial (through VISA?), which would return a signal containing all of the the needed data (which could be parsed within LabVIEW).  Does anyone know either how to do this or a better way to communicate with the Weather Station?

Thank you,
Joshua
0 Kudos
Message 1 of 20
(7,305 Views)

Cool. I have had a wireless Monitor II for the past decade but have never bothered to interface LabVIEW to it.

You might be able to use a 3rd party program to intercept/monitor the communication data between the VantagePro and the PC com port while running the Davis software. That would give you insight into what data is sent between the two and then use VISA functions to create a driver in LabVIEW to do the same.

Maybe a call to Davis, you never know, they might supply you with the protocol and command/data set.

Good Luck!

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 2 of 20
(7,295 Views)
Thanks for the reply.  I found documentation on the Davis Instruments website for the serial protocol.  We had also done a bit of sniffing with 3rd party software so we have an idea as to what the actual hex commands.  However, I do not have enough knowledge of LabVIEW to create the actual driver/VI.  Any ideas on how to implement this?

Thanks,
Joshua
Message 3 of 20
(7,287 Views)

Joshua:

Nice find on the Davis site, I haven't been there in years....

Looks like you have a couple options.

1. They have documented the serial command set and data format. You can look in LabVIEW help and search examples for serial communication (like Basic SerialReadandWrite). Set up the COM port accordingly and send a simple command and read the response as a test. To create a driver, at least in LabVIEW 8.2, under Tools/Instrumentation/CreateInstrumentDriverProject- use a GeneralPurpose (Message Based) for a source driver. I never have used it, but it may get you quicly started on the path. You can also probably use Windows Hyperterminal first as a sanity check before trying LabVIEW.

2. They also have a nice dll library that appears to be well documented. Within LabVIEW, you can make calls to the dll and get data back. As long as it was written in C osr stdcall, you can use the CallLibraryFunctionNode function. There is a section in the LabView Help- Calling Code Written in Text Based Languages that describes how to do this.

Hope this helps

-AK2DM

Edit: I just saw you are using Compact Fieldpoint- Not sure what that is and how it may affect use of the options above.

Message Edited by AnalogKid2DigitalMan on 04-03-2007 03:05 PM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
Message 4 of 20
(7,274 Views)
Thanks a lot.  I was able to use the advanced serial read write example to communicate with the device (using VISA on a PC).  Does anyone know how to adapt that to use on the Compact Fieldpoint?

Thanks,
Joshua
0 Kudos
Message 5 of 20
(7,230 Views)
You should have no problems adapting this to fieldpoint.
 
You will need to make a project, and add your fieldpoint device as a target.  Add the VI under the fieldpoint target in the project explorer tree.  You can open the VI from there.  Set your com port according.  When you press run, it will deploy the VI to the compact fieldpoint and start running it from there.
0 Kudos
Message 6 of 20
(7,226 Views)
I was able to target the Compact Fieldpoint in my project and add my VI under it.  I then selected the com port on the cFP (COM2 in my case).  However, when I ran the VI, I recieved an error saying the device could not be found.  I'm able to run the VI fine on a PC with the Davis connected to the serial port.  Does anyone know why it won't work from Fieldpoint?

Thanks for all of your help,
Joshua
0 Kudos
Message 7 of 20
(7,126 Views)

Which compact Fieldpoint controller do you have?

I have a cFP-2120 which has 4 serial ports.  Com1 is a 9-pin D-sub RS-232.  Com2 and 3 are also RS-232, but use an RJ-50 connector.  Very similar to an RJ-45 but have 10 pins.  Com4 is an RS-485 with the RJ-50 connector.

You say you are using Com2.  So does that mean you are using an RJ-50 connector?   I had to buy special cables from NI to be able to use the RJ-50 as I could not find those connectors commercially available to make my own cable.  Perhaps you have a wiring problem with the pins on the connector, or if you are using a D-sub, perhaps you are actually on Com1.  Of course check the settings for baud, parity, and stop bits.

Just some thoughts.

0 Kudos
Message 8 of 20
(7,124 Views)
At the moment we are trying to use the 9-pin D-Sub connector.  The VI (using VISA) works fine on the PC and displays the data on the front panel correctly.  Next, I targeted the cFP-2120 in the project explorer, dragged the VI under the Fieldpoint target, and opened the VI.  I set the com port to COM1 and ran it.  It gave me the following error: "VISA: (Hex 0xBFFF0011) Insufficient location information or the device or resource is not present on the system."  Any ideas?

Thanks for your help,
Joshua Harbert
0 Kudos
Message 9 of 20
(7,100 Views)
PS: I'm using LabVIEW 8.2
0 Kudos
Message 10 of 20
(7,084 Views)