LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

USB GPS Control

I was wondering if anyone out there has examples of controlling their GPS units via Labview. That is displaying various information on the front panel and saving data to the hard drive. I'm using Labview 7 Express and trying to use a relatively new Garmin product, the USB GPS 18. I seem to have found various posts dealing with serial port connections, but I'm not sure how this would translate into USB. I'm still pretty new at Labview. I was hoping maybe someone had some examples to share or something I could go on.


Thanks...
Using Labview 7.0 and 2010 SP1 with Windows XP and 7.
0 Kudos
Message 1 of 32
(6,417 Views)
Here is the vi I found that I had made reference to earlier. It is for a Garmin GPS 45 unit controlled via the serial port. I was wondering if anyone had tried this vi before and/or modified to fit their needs or come up with something similar. Basically I'd like to have something like this, except run my GPS through the USB port, which I'm not sure how to do in Labview. I did find a SDK file from Garmin, which has commands for C++, etc. But again, I'm not skilled in that language.

Any help or insights anyone could provide, would be most appreciated.

Thanks...
Using Labview 7.0 and 2010 SP1 with Windows XP and 7.
0 Kudos
Message 2 of 32
(6,394 Views)
Unfortunately communicating over serial and USB are fundamentally different, so the serial information you found really isn't valid anymore. You do have two possibilities for communicating with your USB GPS device.

1) I'm guessing the C++ SDK you found simply makes calls to a DLL. The easiest method for communicating with your device would be to use a Call Library Node in LabVIEW to make calls to that DLL.

2) The other possibility which I don't really recommend is to use NI-VISA to create a driver for your GPS device, and communicate with it directly. I don't recommend this because it would require you to know exactly how data is sent/received from your device, and I'm guessing Garmin does not publish this information.

Shawn B.
National Instruments
Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 3 of 32
(6,361 Views)
Hi Shawn, thanks for replying.

I had a feeling that the vi I found was a bit outdated. I wasn't able to get my other serial GPS working with it.

As far as the C++ SDK and the like, I have no experience with that language or any other to be honest. I have looked over the SDK and do not quite understand how it would work in setting up a Call Library Node. I do not have any experience with that function either and it seems a bit complex to tackle. I have only been working with LV a few months and was hoping to find some type of working example to go and modify to fit my needs. I'm not sure if yourself or someone out there could do this for me if I passed along the SDK.

As far as the VISA, again this is something I thought would work as well after looking through my options with LV, but I would not have any clue as to how to set it up.

I was looking over the site and found the Read GPS Time, Position, Velocity, and Course Heading vi for LV 7.1. This would look like something I could use if it was for the USB port (plugged directly into my computer, no type of special cards) and for LV 7.0 Express. I'm not sure if this is an option, but if someone could come up with something like that for the USB port and for LV 7.0 I think I'd be find hopefully.

In the worse case scenario I just plan on running my Garmin software separately from the vi. I'd just like to work both into one nice vi.

Thanks for your response and input, I appreciate your time.
Using Labview 7.0 and 2010 SP1 with Windows XP and 7.
0 Kudos
Message 4 of 32
(6,341 Views)
Actually if the GPS vi located at this link is able to be run in LV 7.0 I'd like to try it out with my serial GPS. I just need someone to save it in version 7.0 for me.

Here's the link:

http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=DB0882E37369122DE034080020E74861&p_node=DZ52363&p_source=external

Any help would be appreciated. Thanks...
Using Labview 7.0 and 2010 SP1 with Windows XP and 7.
0 Kudos
Message 5 of 32
(6,318 Views)
I have saved a copy of the example you found for LabVIEW 7.0, but I can't guarantee that it will work because I didn't test it.

I think the best option for communicating with your USB Device is to use the SDK you found and Call Library Nodes in LabVIEW. Since you are new to LabVIEW/Programming you may want to read the Using External Code In LabVIEW manual.

Shawn B.
National Instruments
Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 6 of 32
(6,308 Views)
Thanks Shawn. Is the "ConsumeBefore.vi" a LV 7.1 vi only? Can you post somewhere where I can find this at? That seems to be the only thing that is stopping me from trying to run it.

I'll have a look at that manual and see if it's something I can do.


Thanks for your help.
Using Labview 7.0 and 2010 SP1 with Windows XP and 7.
0 Kudos
Message 7 of 32
(6,273 Views)
ConsumeBefore.vi is installed with the Instrument I/O Assistant. You can install the Instrument I/O assistant from the Drivers CD that came with LabVIEW.

Shawn B
National Instruments
Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 8 of 32
(6,254 Views)
Is this available on the May 2003 version of the Device Driver disk? That is the disk that came with my LV 7 Express when I originally purchased LV. To my knowledge I installed everything on that disk I could on the computer where I am currently working at. I do not recall seeing the vi. Perhaps I am overlooking something?
Using Labview 7.0 and 2010 SP1 with Windows XP and 7.
0 Kudos
Message 9 of 32
(6,235 Views)
I figure it would be on that CD, but if it is not it can be downloaded here.

Shawn B.
National Instruments
Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 10 of 32
(6,216 Views)