02-20-2013 05:10 AM
I'm completely newbie in LabView environment.
(I hope that the topic I type in the right section)
What do I do?
I'm trying to create a program in LabView (version LabView2012 have) the same as in attachment (gpssrednia.7z - there is exe file) that:
Get stream data from a GPS (COM/serial port) which retrieves the header lines and pulls GGA longitude of them (except display those lines for inspection)
Then, the graph shows the fluctuations of longitude (white graph) and average (the arithmetic mean of all measurements).
I can`t:
- Use evi, and other ready-made solutions
- Insert code in other languages
What I managed to do:
a) Connect the GPS `a and set it on a COM port:
- Model: Haicom - HI-203III,
- Recevier default protocol: 4800bps, 8data bits, 1 stop bit, none parity
- Works in hyperterminal on XP
b) Install LabView 2012 with the package VISA
I should be grateful for any tips on how to approach this task and where to start, especially for pointing out which parts I should use.
We greet
Torynek
02-21-2013 03:07 AM - edited 02-21-2013 03:08 AM
Hi Torynek and welcome to NI Forums!
Reading serial data is fairly straightforward in LabVIEW, here's a quick example how:
In case you need two-way communication (i.e. you have to request the data from the device), you need to add a VISA Write as well, and as an input you have to have the right command in a string control.You can find some additional examples for serial communication in Help > Find Examples > Hardware Input and Output > Serial, as well as at ni.com/examples.
Then to display the data, you need to convert your string to a number. This depends on the data format, you can find the conversion VIs on the String Palette, find the one that works for your data. You might need to remove some parts of your string (header or such), so that only the number is there. Then you can connect this data to a Waveform Graph and it will be displayed.
I hope this helps. If you have any additional questions or troubles, ask away!
Regards:
Andrew Valko
NI Hungary
02-21-2013 06:14 AM
Dziękuję bardzo, Własnie skonczyłem swój pierwszy projekt w labview. 🙂
02-21-2013 06:14 AM
Thank you very much, I just finished my first project in labview. 🙂
02-21-2013 09:47 AM - edited 02-21-2013 09:48 AM
Chance are the GPS outputs NMEA "sentences" (comma delimited strings) at regular intervals.
Here is a good source for decoding NMEA sentences.
05-07-2013 09:05 AM